SAP RSPLFC_GENERATE_PROGRAMM Function Module for Generate Program for Runtime
RSPLFC_GENERATE_PROGRAMM is a standard rsplfc generate programm SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generate Program for Runtime processing and below is the pattern details for this FM, 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 rsplfc generate programm FM, simply by entering the name RSPLFC_GENERATE_PROGRAMM into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSPLFC_FORMULA
Program Name: SAPLRSPLFC_FORMULA
Main Program: SAPLRSPLFC_FORMULA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSPLFC_GENERATE_PROGRAMM 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 'RSPLFC_GENERATE_PROGRAMM'"Generate Program for Runtime.
EXPORTING
I_TS_FORML = "Planning: Formulas
I_SERVICE = "Name (ID) of Planning Service
I_INFOPROV = "InfoProvider
I_TS_FCAT = "Field Catalog for Formulas
I_R_MSG = "Container for Messages
IMPORTING
E_GENPROG = "Generated Program
IMPORTING Parameters details for RSPLFC_GENERATE_PROGRAMM
I_TS_FORML - Planning: Formulas
Data type: RSPLS_TS_FORMLOptional: No
Call by Reference: Yes
I_SERVICE - Name (ID) of Planning Service
Data type: RSPLF_SRVNMOptional: No
Call by Reference: Yes
I_INFOPROV - InfoProvider
Data type: RSINFOPROVOptional: No
Call by Reference: Yes
I_TS_FCAT - Field Catalog for Formulas
Data type: RSPLS_TS_FORML_FCATOptional: No
Call by Reference: Yes
I_R_MSG - Container for Messages
Data type: CL_RSPLFU_MSGOptional: No
Call by Reference: Yes
EXPORTING Parameters details for RSPLFC_GENERATE_PROGRAMM
E_GENPROG - Generated Program
Data type: PROGRAMMOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for RSPLFC_GENERATE_PROGRAMM 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_e_genprog | TYPE PROGRAMM, " | |||
| lv_i_ts_forml | TYPE RSPLS_TS_FORML, " | |||
| lv_i_service | TYPE RSPLF_SRVNM, " | |||
| lv_i_infoprov | TYPE RSINFOPROV, " | |||
| lv_i_ts_fcat | TYPE RSPLS_TS_FORML_FCAT, " | |||
| lv_i_r_msg | TYPE CL_RSPLFU_MSG. " |
|   CALL FUNCTION 'RSPLFC_GENERATE_PROGRAMM' "Generate Program for Runtime |
| EXPORTING | ||
| I_TS_FORML | = lv_i_ts_forml | |
| I_SERVICE | = lv_i_service | |
| I_INFOPROV | = lv_i_infoprov | |
| I_TS_FCAT | = lv_i_ts_fcat | |
| I_R_MSG | = lv_i_r_msg | |
| IMPORTING | ||
| E_GENPROG | = lv_e_genprog | |
| . " RSPLFC_GENERATE_PROGRAMM | ||
ABAP code using 7.40 inline data declarations to call FM RSPLFC_GENERATE_PROGRAMM
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.Search for further information about these or an SAP related objects