SAP FCOM_ECP_TEMPLATE_GENERATE Function Module for Generation of the Configuration for a Template
FCOM_ECP_TEMPLATE_GENERATE is a standard fcom ecp template generate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generation of the Configuration for a Template 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 fcom ecp template generate FM, simply by entering the name FCOM_ECP_TEMPLATE_GENERATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCOM_ECP
Program Name: SAPLFCOM_ECP
Main Program: SAPLFCOM_ECP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FCOM_ECP_TEMPLATE_GENERATE 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 'FCOM_ECP_TEMPLATE_GENERATE'"Generation of the Configuration for a Template.
EXPORTING
IV_TEMPLATE_ID = "Costing Model
* IV_DEVCLASS = '$TMP' "Package
* IV_GENERATE_TEMPLATE = "Generate FPM configuration for Form
* IV_START_CONFIG = 'W' "Start Config Editor from Web Dynpro ('W') or GUI('G') or NOT Starting (' ')
* IO_WD_COMPONENT = "Web Dynpro: Component (for transport request only)
* IV_TESTRUN = "Test Run
* IV_DELTA_MODE = "Add new fields from model
IMPORTING
EV_TEMPLATE_NAME = "Name of Costing Model
EV_MESSAGE = "Return Parameter
EV_CONFIG_ID = "Configuration Identification
EXCEPTIONS
INVALID_TEMPLATE = 1
IMPORTING Parameters details for FCOM_ECP_TEMPLATE_GENERATE
IV_TEMPLATE_ID - Costing Model
Data type: CK_COSTMODELOptional: No
Call by Reference: Yes
IV_DEVCLASS - Package
Data type: DEVCLASSDefault: '$TMP'
Optional: Yes
Call by Reference: Yes
IV_GENERATE_TEMPLATE - Generate FPM configuration for Form
Data type: XFELDOptional: Yes
Call by Reference: Yes
IV_START_CONFIG - Start Config Editor from Web Dynpro ('W') or GUI('G') or NOT Starting (' ')
Data type: CHAR1Default: 'W'
Optional: Yes
Call by Reference: Yes
IO_WD_COMPONENT - Web Dynpro: Component (for transport request only)
Data type: IF_WD_COMPONENTOptional: Yes
Call by Reference: Yes
IV_TESTRUN - Test Run
Data type: XFELDOptional: Yes
Call by Reference: Yes
IV_DELTA_MODE - Add new fields from model
Data type: XFELDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FCOM_ECP_TEMPLATE_GENERATE
EV_TEMPLATE_NAME - Name of Costing Model
Data type: CK_COSTMODELTOptional: No
Call by Reference: Yes
EV_MESSAGE - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: Yes
EV_CONFIG_ID - Configuration Identification
Data type: WDY_CONFIG_IDOptional: No
Call by Reference: Yes
EXCEPTIONS details
INVALID_TEMPLATE - Invalid Template ID
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FCOM_ECP_TEMPLATE_GENERATE 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_iv_template_id | TYPE CK_COSTMODEL, " | |||
| lv_ev_template_name | TYPE CK_COSTMODELT, " | |||
| lv_invalid_template | TYPE CK_COSTMODELT, " | |||
| lv_ev_message | TYPE BAPIRET2, " | |||
| lv_iv_devclass | TYPE DEVCLASS, " '$TMP' | |||
| lv_ev_config_id | TYPE WDY_CONFIG_ID, " | |||
| lv_iv_generate_template | TYPE XFELD, " | |||
| lv_iv_start_config | TYPE CHAR1, " 'W' | |||
| lv_io_wd_component | TYPE IF_WD_COMPONENT, " | |||
| lv_iv_testrun | TYPE XFELD, " | |||
| lv_iv_delta_mode | TYPE XFELD. " |
|   CALL FUNCTION 'FCOM_ECP_TEMPLATE_GENERATE' "Generation of the Configuration for a Template |
| EXPORTING | ||
| IV_TEMPLATE_ID | = lv_iv_template_id | |
| IV_DEVCLASS | = lv_iv_devclass | |
| IV_GENERATE_TEMPLATE | = lv_iv_generate_template | |
| IV_START_CONFIG | = lv_iv_start_config | |
| IO_WD_COMPONENT | = lv_io_wd_component | |
| IV_TESTRUN | = lv_iv_testrun | |
| IV_DELTA_MODE | = lv_iv_delta_mode | |
| IMPORTING | ||
| EV_TEMPLATE_NAME | = lv_ev_template_name | |
| EV_MESSAGE | = lv_ev_message | |
| EV_CONFIG_ID | = lv_ev_config_id | |
| EXCEPTIONS | ||
| INVALID_TEMPLATE = 1 | ||
| . " FCOM_ECP_TEMPLATE_GENERATE | ||
ABAP code using 7.40 inline data declarations to call FM FCOM_ECP_TEMPLATE_GENERATE
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.| DATA(ld_iv_devclass) | = '$TMP'. | |||
| DATA(ld_iv_start_config) | = 'W'. | |||
Search for further information about these or an SAP related objects