Rules for Inserting SAP Functions in the ABAP Program Flow
Rules for Inserting SAP Functions in the ABAP Program Flow
You can insert an SAP function before the first source table or after the last source table in the program flow. If you use a nested loop to join tables, you can also insert an SAP function between source tables. Be aware of where the Designer inserts the SAP function in the ABAP program to generate the ABAP program successfully.
The following table shows the rules for inserting an SAP function:
SQL Type
Rules
Exec SQL
You can insert SAP functions before the first source or after the last source. You cannot insert SAP functions between sources in the program flow.
If you insert an SAP function before the first source, the Designer calls the function before the exec statement.
If you insert an SAP function after the last source, the Designer inserts the function after the FORM WRITE_DSQNAME_TO_FILE statement.
ABAP join syntax
You can insert SAP functions before the first source or after the last source. You cannot insert functions between sources in the program flow.
If you insert an SAP function before the first source, the Designer calls the function before the select statement.
If you insert an SAP function after the last source, the Designer inserts the function after the WHERE clause.
Open SQL (nested loop)
You can insert SAP functions between sources in the program flow. The Designer inserts SAP functions between the select statements. You can insert SAP functions before the first source or after the last source.
If you insert an SAP function before the first source, the Designer calls the function before the first select statement.
If you insert an SAP function after the last source, the Designer inserts the function after the last WHERE clause.