Passing select-options(range of values) and internal table as parameters in Normal Function Module
Passing select-options(range of values) and internal table as parameters in Normal Function Module
Enter the function module name start's with Y or Z<function module name> and click on
create button.
Click on import tab , enter the select-option variable and its type.
To create select-option
Go to Transaction code SE11.
Enter the Data Type (Structure ) name : RSDSSELOPT.
Click on Display button.
Click on Tables Tab and enter the internal table name and it's type.
Source code
RANGES : R_MATNR FOR MAKT-MATNR.
R_MATNR-SIGN = 'I'.
R_MATNR-OPTION = 'BT'.
R_MATNR-LOW = S_MATNR-LOW.
R_MATNR-HIGH = S_MATNR-HIGH.
APPEND R_MATNR .
Enter the program name start's with Y or Z<program name > and click on create button.
Enter the Title.
Select Attribute Type as Executable Program.
Click on save button.
Source code
TABLES : MAKT.
DATA : IT_MAKT TYPE TABLE OF MAKT.
IF SY-SUBRC = 0.
ENDLOOP.
ENDIF.
Input
Output