A description of the interface for a function module that is used for generic data extraction:
I_DSOURCE type SRSC_S_IF_SIMPLE-DSOURCE DataSource
I_INITFLAG type SRSC_S_IF_SIMPLE-INITFLAG Initialization call
I_MAXSIZE type SRSC_S_IF_SIMPLE-MAXSIZE package size
I_REQUNR type SRSC_S_IF_SIMPLE-REQUNR request number
I_T_SELECT type SRSC_S_IF_SIMPLE-T_SELECT
I_T_FIELDS type SRSC_S_IF_SIMPLE-T_SELECT
This parameter is set to ‘X’ when the function module is called up for the first time, then to ‘ ‘.
This parameter contains the number of lines expected within a read call.
The function module is called up again and again during an extraction process:
1. Initialization call:
Only the request parameters are transferred to the module here. The module is as yet unable to transfer data.
2. First read call:
The extractor returns the data typified with the extract structure in an interface table. The number of rows the system expected is determined in the request parameter (I_MAXSIZE).
3. Second read call:
The extractor returns the data enclosed within the first data package in a separate package with I_MAXSIZE rows.
4. The system calls up the function module again and again until the module returns the exception NO_MORE_DATA. Data cannot be transferred in the call in which this exception is called up.
An example of a function module that meets these demands is RSAX_BIW_GET_DATA_SIMPLE. A simple way of creating a syntactically correct module is to copy it into its own function group and then to cope the rows of the top-include of function group RSAX (LRSAXTOP) into the top-include of its own function group. Afterwards, the copied function module must be adjusted to the individual requests.