Sunday, 13 May 2012

What is the syntax for form statement? | SAP-ABAP

  The form statement is used to specify the beginning of a subroutine, and the end of the preceding event.
The syntax of the form statement is as follows:
 from <subr> [tables tab1 tab2...][using us1 value(us2) ....][changing ch1 value(ch2)...].
 ......
 endform.
where:
<subr> - name of the subroutine.
tabl, tab2, usl, us2, chl, and ch2 - names of the parameters.
The following are the some of the restrictions of the form statement:
=>    All additions are optional.
=>    When the additions are coded in the statement, tables must come first, after that using, and then changing.
=>    Every addition can only occur once in the statement.
=>    Parameters are not separated by commas.
=>    User can only specify tables as internal tables, not database tables in the statement
=>    A subroutine can invoke other subroutine used in the program.
=>    A subroutine can call itself or a subroutine can be called by other subroutine.
=>    Subroutine cannot be embedded within another subroutine.

No comments: