Professional Documents
Culture Documents
PARAMETERS :
It is used to accept input values at runtime of the program. For each parameter
declared, an input field appears on the corresponding selection screen.
*To assign a default value to a parameter, you use the following syntax:
**Example
WRITE:/ result.
*********************
Control Statements
*********************
*Relational Operators :
*
*EQ =
*GT >
*LT <
*NE <>
*LE <=
*GE >=
*
*Logical Operators :
*
*AND
*OR
*NOT
****IF condition
****CASE statement
* CASE and ENDCASE are used to avoid multiple IF statements
*SY-INDEX
*--------
*The system field SY-INDEX contains the number of loop passes,
*including the current loop pass.
****** DO.....ENDDO
*x = pa_num.
DO.
IF sy-index > 5.
EXIT.
* STOP.
ELSE.
WRITE:/ sy-index.
ENDIF.
ENDDO.
* EXIT :
* Terminates the loop and continues the rest of the program till the
* end.
* STOP :
* Terminates the loop and moves the control outof the program.
*****While...ENDWHILE
PARAMETERS pa_num type i.
*WHILE pa_num > 0.
*
*write : / sy-index.
*pa_num = pa_num - 1.
*ENDWHILE.
*****RADIO GROUP
* To define the input field of a parameter as a radio button, you use the following
syntax:
******CheckBox
*To define the input field of a parameter as a checkbox, you use the following
syntax:
--> Assignment write a program using checkbox like SUM,SUB,MUL and DIV.