Programming
Example to apply DO statement in ABAP/4
You will apply this statement when you want to loop data with non-condition loops.
Example 1: Simple Loop
DO.
WRITE:/ sy-index.
IF sy-index = 4.
EXIT.
ENDIF.
ENDDO.The output is
1
2
3
4
Example 2: Loops with n times
DO 4 TIMES.
WRITE:/ sy-index.
ENDDO.The output is same as example 1.
Example 3: Nested Loops
- thitima's blog
- Add new comment
- Read more
- 751 reads
Basic Structure of HTML
HTML language has 2 elements; content and tag. Basic tag in HTML file are:
- ...
This tag is a indicator for start point and end point of HTML file. is nessesary declared at first line and is declared at end line of file. - ...
This tag response about header definition of web page by using tag... .tag will show title of page in title bar of browser. - ...
This tag response about body content that you want to show in your web.
Example file
- thitima's blog
- Add new comment
- Read more
- 1035 reads
Difference between CONTINUE, CHECK and EXIT statement in ABAP/4
-
CONTINUE
When you apply this statement, system will pass a current loop. System ignores any statements after CONTINUE statement and start to the next loop.
Example
DO 4 TIMES.
WRITE:/ sy-index.
IF sy-index <= 2.
CONTINUE.
ENDIF.
WRITE: ’After’.
ENDDO.
The output is
1
2
3 After
4 After
-
CHECK
This statement will apply if you want to check condition before go to next statement. If the result of checking is ’TRUE’, system will go to next step as normally. If the result of checking is ’FALSE’, system will operate look like CONTINUE statement.
Example
- thitima's blog
- Add new comment
- Read more
- 7025 reads
Example to apply WHILE statement in ABAP/4
You will apply this statement when you want to loop data with condition loops.
Example 1: Simple Loop
DATA: lv_int TYPE I VALUE 1.
WHILE lv_int <= 4.
WRITE:/ lv_int.
lv_int = lv_int + 1.
ENDWHILE.
The output is
1
2
3
4
Example 3: Nested Loops
DATA: lv_int TYPE I VALUE 1,
lv_int2 TYPE I.
WHILE lv_int <= 4.
WRITE:/ lv_int.
lv_int2 = 1.
WHILE lv_int2 <= 2.
WRITE: lv_int2.
lv_int2 = lv_int2 + 1.
ENDWHILE.
lv_int = lv_int + 1.
ENDWHILE.
The output is
- thitima's blog
- Add new comment
- Read more
- 1930 reads
Select...Where & Select...Check in ABAP/4
Select...Where
SELECT * FORM SPFLI
WHERE CARRID = ’LH’.
...
...
...
ENDSELECT.
Select...Check
In above logic, Select...Where is better than Select...Check because the database can then user an index and system resource load is considerably less.SELECT * FORM SPFLI.
CHECK SPFLI-CARRID = ’LH’.
...
...
...
ENDSELECT.
- thitima's blog
- Add new comment
- 955 reads
SELECT...INTO TABLE & SELECT...APPEND in ABAP/4
Select...Into Table
DATA: itab LIKE SPFLI OCCURS 0 WITH HEADER LINE.
SELECT * FORM SPFLI INTO TABLE itab.
Select...Append
In above logic, Select...Into Table is faster than Select...Append.DATA: itab LIKE SPFLI OCCURS 0 WITH HEADER LINE.
SELECT * FORM SPFLI INTO itab.
APPEND itab.
ENDSELECT.
- thitima's blog
- Add new comment
- 4135 reads
Recent comments
2 years 30 weeks ago
2 years 35 weeks ago
2 years 36 weeks ago
2 years 36 weeks ago
2 years 36 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago
2 years 39 weeks ago