This post gives the details about conditional statements which are used in SAP-ABAP programming language, dear ABAPers for more details can refer this post.
IF.........END IF
1) IF condition1. 2) IF condition1.
action1. action1.
ELSE. ELSE.
action2. IF condition 2.
ENDIF. action2.
ENDIF.
action3.
ENDIF.
CASE.................END CASE
The field after case is always compared with values after when with respect to equality. You can’t express a > b etc.
syntax:
CASE field.
WHEN value1.
action1.
WHEN value2.
action2.
WHEN OTHERS
action_other.
ENDCASE.
WHILE................END WHILE
1) WHILE condition.
Statements.
ENDWHILE.
2) WHILE condition.
Statements.
IF condition.
EXIT.
ENDIF.
ENDWHILE.
DO...............END DO
1) DO n TIMES. 2) DO.
Statements Statements.
CONTINUE. IF condition.
ENDDO. EXIT.
ENDIF.
ENDDO.
Continue - stops the current steps and continues with next step in loop
Exit - stops processing loop and continues at next statement after ENDDO.
CHECK
CHECK condition.
If condition is True then execution continues
Otherwise action depends on the location where Check statement is used.
eq. in Form - control goes to Endform
in Loop - control goes to Endloop
in Program - execution terminated
"You found the information helpful and want to say thanks? Your donation is enough to inspire us to do more. Thanks a bunch!"
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.