ABAP/4
Dynamic WHERE Clause in ABAP/4
You can apply internal table for create dynamic where clauses.
Example
DATA i_where(100) OCCURS 0 WITH HEADER LINE.
APPEND ’vbeln LIKE ’’%1’’’ to i_where.
APPEND ’matnr LIKE ’’%M’’’ to i_where.
TABLE lips.
DATA i_lips TYPE TABLE OF lips WITH HEADER LINE.
SELECT * FROM lips INTO TABLE i_lips
WHERE werks = ’1000’
AND (i_where).
Above Example is look like:
TABLE lips.
DATA i_lips TYPE TABLE OF lips WITH HEADER LINE.
SELECT * FROM lips INTO TABLE i_lips
WHERE werks = ’1000’
AND vbeln LIKE ’%1’
AND matnr LIKE ’%M’.
- thitima's blog
- Add new comment
- Read more
- 5792 reads
How to Copy File on Windows by ABAP/4
If you want to copy file on PC windows, you can use function "WS_FILE_COPY".
Example
*&---------------------------------------------------------------------*
*& Form COPY_FILE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PAR_SOURCE text
* -->PAR_DESTINATION text
*----------------------------------------------------------------------*
FORM copy_file USING par_source
par_destination.
- thitima's blog
- Add new comment
- Read more
- 2504 reads
How to Display Field Value as Checkbox in ABAP/4
When you want to display value of filed as checkbox in ABAP report, you can use WRITE statement by using option "AS CHECKBOX".
Example
DATA: ch1(1) TYPE C,
ch2(1) TYPE C VALUE ’X’.
WRITE: / ’Checkbox 1 ’, ch1 AS CHECKBOX,
/ ’Checkbox 2 ’, ch2 AS CHECKBOX.
- thitima's blog
- Add new comment
- 1167 reads
Dynamic Table Name in ABAP/4
In ABAP/4, you can specify table name in SELECT statement by dynamically.
Example
DATA table_name(10) TYPE C.
DATA num_rows TYPE I.
table_name = ’BKPF’.
SELECT COUNT( * ) FROM (table_name) INTO num_rows.
WRITE: ’Table Name ’, table_name, ’have rows ’, num_rows.
- thitima's blog
- Add new comment
- 1038 reads
Chained Statement in ABAP/4
The statements that same keyword can be chained by colon (:). Between the statements separated by ",". When you apply this method, ensure that the chained statement ended by ".".
Example
Normal Statement
PARAMETERS p1(10) TYPE C.
PARAMETERS p2 TYPE D.Chained Statement
PARAMETERS: p1(10) TYPE C,
p2 TYPE D.Normal Statement
WRITE ’First’.
WRITE ’Second’.
- thitima's blog
- Add new comment
- Read more
- 1693 reads
Color in ABAP/4
Name Code Color
COL_BACKGROUND 0 depends on GUI
COL_HEADING 1 grayish-blue
COL_NORMAL 2 bright gray
COL_TOTAL 3 yellow
COL_KEY 4 bluish green
COL_POSITIVE 5 green
COL_NEGATIVE 6 red
COL_GROUP 7 violet
- thitima's blog
- Add new comment
- 1074 reads
« first‹ previous…151617181920212223next ›last »
Recent comments
2 years 43 weeks ago
2 years 48 weeks ago
2 years 49 weeks ago
2 years 49 weeks ago
2 years 50 weeks ago
3 years 4 hours ago
3 years 4 hours ago
3 years 1 day ago
3 years 3 days ago
3 years 6 days ago