SAP /SAPTRX/CONTROL_PARAM_TEMPLATE Function Module for Function template for setup of control parameters
/SAPTRX/CONTROL_PARAM_TEMPLATE is a standard /saptrx/control param template SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Function template for setup of control parameters 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 /saptrx/control param template FM, simply by entering the name /SAPTRX/CONTROL_PARAM_TEMPLATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPTRX/FUNCTEMPL_AS
Program Name: /SAPTRX/SAPLFUNCTEMPL_AS
Main Program: /SAPTRX/SAPLFUNCTEMPL_AS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPTRX/CONTROL_PARAM_TEMPLATE 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 '/SAPTRX/CONTROL_PARAM_TEMPLATE'"Function template for setup of control parameters.
EXPORTING
I_APPSYS = "Logical system ID of an application system
I_APP_OBJ_TYPES = "Application object type
I_ALL_APPL_TABLES = "Container with references to all tables passed by the application
I_APP_TYPE_CNTL_TABS = "Control tables and nametabs for all appl. object types
I_APP_OBJECTS = "Tables all appl. object types
TABLES
E_CONTROL_DATA = "Control data for application objects
* E_LOGTABLE = "Return Parameter
EXCEPTIONS
PARAMETER_ERROR = 1 CDATA_DETERMINATION_ERROR = 2 TABLE_DETERMINATION_ERROR = 3 STOP_PROCESSING = 4
IMPORTING Parameters details for /SAPTRX/CONTROL_PARAM_TEMPLATE
I_APPSYS - Logical system ID of an application system
Data type: /SAPTRX/APPLSYSTEMOptional: No
Call by Reference: Yes
I_APP_OBJ_TYPES - Application object type
Data type: /SAPTRX/AOTYPESOptional: No
Call by Reference: Yes
I_ALL_APPL_TABLES - Container with references to all tables passed by the application
Data type: TRXAS_TABCONTAINEROptional: No
Call by Reference: Yes
I_APP_TYPE_CNTL_TABS - Control tables and nametabs for all appl. object types
Data type: TRXAS_APPTYPE_TABSOptional: No
Call by Reference: Yes
I_APP_OBJECTS - Tables all appl. object types
Data type: TRXAS_APPOBJ_CTABSOptional: No
Call by Reference: Yes
TABLES Parameters details for /SAPTRX/CONTROL_PARAM_TEMPLATE
E_CONTROL_DATA - Control data for application objects
Data type: /SAPTRX/CONTROL_DATAOptional: No
Call by Reference: No ( called with pass by value option)
E_LOGTABLE - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
PARAMETER_ERROR - Error in Parameters
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CDATA_DETERMINATION_ERROR - Error in control data determination
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLE_DETERMINATION_ERROR - A required datatable could not be found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STOP_PROCESSING - Stop processing
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SAPTRX/CONTROL_PARAM_TEMPLATE 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_appsys | TYPE /SAPTRX/APPLSYSTEM, " | |||
| lt_e_control_data | TYPE STANDARD TABLE OF /SAPTRX/CONTROL_DATA, " | |||
| lv_parameter_error | TYPE /SAPTRX/CONTROL_DATA, " | |||
| lt_e_logtable | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_i_app_obj_types | TYPE /SAPTRX/AOTYPES, " | |||
| lv_cdata_determination_error | TYPE /SAPTRX/AOTYPES, " | |||
| lv_i_all_appl_tables | TYPE TRXAS_TABCONTAINER, " | |||
| lv_table_determination_error | TYPE TRXAS_TABCONTAINER, " | |||
| lv_stop_processing | TYPE TRXAS_TABCONTAINER, " | |||
| lv_i_app_type_cntl_tabs | TYPE TRXAS_APPTYPE_TABS, " | |||
| lv_i_app_objects | TYPE TRXAS_APPOBJ_CTABS. " |
|   CALL FUNCTION '/SAPTRX/CONTROL_PARAM_TEMPLATE' "Function template for setup of control parameters |
| EXPORTING | ||
| I_APPSYS | = lv_i_appsys | |
| I_APP_OBJ_TYPES | = lv_i_app_obj_types | |
| I_ALL_APPL_TABLES | = lv_i_all_appl_tables | |
| I_APP_TYPE_CNTL_TABS | = lv_i_app_type_cntl_tabs | |
| I_APP_OBJECTS | = lv_i_app_objects | |
| TABLES | ||
| E_CONTROL_DATA | = lt_e_control_data | |
| E_LOGTABLE | = lt_e_logtable | |
| EXCEPTIONS | ||
| PARAMETER_ERROR = 1 | ||
| CDATA_DETERMINATION_ERROR = 2 | ||
| TABLE_DETERMINATION_ERROR = 3 | ||
| STOP_PROCESSING = 4 | ||
| . " /SAPTRX/CONTROL_PARAM_TEMPLATE | ||
ABAP code using 7.40 inline data declarations to call FM /SAPTRX/CONTROL_PARAM_TEMPLATE
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