SAP RSAP_DATA_TFS_GENERATE_40 Function Module for
RSAP_DATA_TFS_GENERATE_40 is a standard rsap data tfs generate 40 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rsap data tfs generate 40 FM, simply by entering the name RSAP_DATA_TFS_GENERATE_40 into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSAG
Program Name: SAPLRSAG
Main Program: SAPLRSAG
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSAP_DATA_TFS_GENERATE_40 pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RSAP_DATA_TFS_GENERATE_40'".
EXPORTING
I_ISOURCE = "
I_TRANSTRU = "
I_IDOCTYP = "
I_SLOGSYS = "
I_TFMETHODE = "
IMPORTING
E_SEGLENTH = "
CHANGING
C_S_ROISGEN = "
* C_PERCENTAGE = 050 "
TABLES
T_SEGFIELDS = "Fields
EXCEPTIONS
ERROR_IN_IDOC = 1 ERROR_IN_STRUCTURE = 2 ERROR_BY_ACTIVATE = 3 ERROR_ASSIGN_SEGMENT_TO_IDOC = 4 ERROR_BY_DELETE = 5 TRANSTRUCTURE_NAME_DIFFERENT = 6
IMPORTING Parameters details for RSAP_DATA_TFS_GENERATE_40
I_ISOURCE -
Data type: RSSIS-ISOURCEOptional: No
Call by Reference: No ( called with pass by value option)
I_TRANSTRU -
Data type: RSSIS-ISOURCEOptional: No
Call by Reference: No ( called with pass by value option)
I_IDOCTYP -
Data type: IDOCSYN-IDOCTYPOptional: No
Call by Reference: No ( called with pass by value option)
I_SLOGSYS -
Data type: SBIWS_LOGSYSOptional: No
Call by Reference: No ( called with pass by value option)
I_TFMETHODE -
Data type: ROISGEN-TFMETHODEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RSAP_DATA_TFS_GENERATE_40
E_SEGLENTH -
Data type: EDSEA-SEGLENOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for RSAP_DATA_TFS_GENERATE_40
C_S_ROISGEN -
Data type: ROISGENOptional: No
Call by Reference: No ( called with pass by value option)
C_PERCENTAGE -
Data type: SBIW_PERCENTAGEDefault: 050
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RSAP_DATA_TFS_GENERATE_40
T_SEGFIELDS - Fields
Data type: RSGENFLDSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ERROR_IN_IDOC -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_IN_STRUCTURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_BY_ACTIVATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_ASSIGN_SEGMENT_TO_IDOC -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_BY_DELETE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TRANSTRUCTURE_NAME_DIFFERENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RSAP_DATA_TFS_GENERATE_40 Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_isource | TYPE RSSIS-ISOURCE, " | |||
| lv_e_seglenth | TYPE EDSEA-SEGLEN, " | |||
| lv_c_s_roisgen | TYPE ROISGEN, " | |||
| lt_t_segfields | TYPE STANDARD TABLE OF RSGENFLDS, " | |||
| lv_error_in_idoc | TYPE RSGENFLDS, " | |||
| lv_i_transtru | TYPE RSSIS-ISOURCE, " | |||
| lv_c_percentage | TYPE SBIW_PERCENTAGE, " 050 | |||
| lv_error_in_structure | TYPE SBIW_PERCENTAGE, " | |||
| lv_i_idoctyp | TYPE IDOCSYN-IDOCTYP, " | |||
| lv_error_by_activate | TYPE IDOCSYN, " | |||
| lv_i_slogsys | TYPE SBIWS_LOGSYS, " | |||
| lv_error_assign_segment_to_idoc | TYPE SBIWS_LOGSYS, " | |||
| lv_i_tfmethode | TYPE ROISGEN-TFMETHODE, " | |||
| lv_error_by_delete | TYPE ROISGEN, " | |||
| lv_transtructure_name_different | TYPE ROISGEN. " |
|   CALL FUNCTION 'RSAP_DATA_TFS_GENERATE_40' " |
| EXPORTING | ||
| I_ISOURCE | = lv_i_isource | |
| I_TRANSTRU | = lv_i_transtru | |
| I_IDOCTYP | = lv_i_idoctyp | |
| I_SLOGSYS | = lv_i_slogsys | |
| I_TFMETHODE | = lv_i_tfmethode | |
| IMPORTING | ||
| E_SEGLENTH | = lv_e_seglenth | |
| CHANGING | ||
| C_S_ROISGEN | = lv_c_s_roisgen | |
| C_PERCENTAGE | = lv_c_percentage | |
| TABLES | ||
| T_SEGFIELDS | = lt_t_segfields | |
| EXCEPTIONS | ||
| ERROR_IN_IDOC = 1 | ||
| ERROR_IN_STRUCTURE = 2 | ||
| ERROR_BY_ACTIVATE = 3 | ||
| ERROR_ASSIGN_SEGMENT_TO_IDOC = 4 | ||
| ERROR_BY_DELETE = 5 | ||
| TRANSTRUCTURE_NAME_DIFFERENT = 6 | ||
| . " RSAP_DATA_TFS_GENERATE_40 | ||
ABAP code using 7.40 inline data declarations to call FM RSAP_DATA_TFS_GENERATE_40
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single ISOURCE FROM RSSIS INTO @DATA(ld_i_isource). | ||||
| "SELECT single SEGLEN FROM EDSEA INTO @DATA(ld_e_seglenth). | ||||
| "SELECT single ISOURCE FROM RSSIS INTO @DATA(ld_i_transtru). | ||||
| DATA(ld_c_percentage) | = 050. | |||
| "SELECT single IDOCTYP FROM IDOCSYN INTO @DATA(ld_i_idoctyp). | ||||
| "SELECT single TFMETHODE FROM ROISGEN INTO @DATA(ld_i_tfmethode). | ||||
Search for further information about these or an SAP related objects