SAP STEMP_MERGE_STRUCTURES Function Module for
STEMP_MERGE_STRUCTURES is a standard stemp merge structures 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 stemp merge structures FM, simply by entering the name STEMP_MERGE_STRUCTURES into the relevant SAP transaction such as SE37 or SE38.
Function Group: TEMPLATE_FILTER
Program Name: SAPLTEMPLATE_FILTER
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function STEMP_MERGE_STRUCTURES 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 'STEMP_MERGE_STRUCTURES'".
EXPORTING
* TEMPLATE_ID = "Template ID
* AUTO_CORRECT = "
* NO_TEMP_NEW_HEADER = "Definition Table for Structures
* OLD_HEADER = "Definition Table for Structures
* TITLE = "Explanatory text
* TITLE_MANU = "Explanatory text
* BRANCH = "Industry
* MERGE_SCOP = "
* CHANGE = "
* NO_TEMPLATES = 'X' "
IMPORTING
NEW_STRUCT_HEADER = "Definition Table for Structures
STEMP_STATISTIC = "Templates: Statistics
TEMP_TITLE = "GUI Title
TABLES
STRUCT_MERGE = "Templates: Object ID
* ACTIVE_NODES = "List of Active Nodes for a Structure
* SEL_PARAMETERS = "Parameter for view: Maintenance by application only
* STEMP_CORE = "Customizing templates entity table
* STEMP_BRANCH = "Customizing templates entity table
EXCEPTIONS
NOTHING_TO_MERGE = 1 NO_ACTIVE_NODES = 2 NO_SEL_PARAMETERS = 3
IMPORTING Parameters details for STEMP_MERGE_STRUCTURES
TEMPLATE_ID - Template ID
Data type: TCUSTEMP-TEMP_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
AUTO_CORRECT -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
NO_TEMP_NEW_HEADER - Definition Table for Structures
Data type: TTREEOptional: Yes
Call by Reference: No ( called with pass by value option)
OLD_HEADER - Definition Table for Structures
Data type: TTREEOptional: Yes
Call by Reference: No ( called with pass by value option)
TITLE - Explanatory text
Data type: TTREET-TEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
TITLE_MANU - Explanatory text
Data type: TTREET-TEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
BRANCH - Industry
Data type: TCUSTEMP-BRANCHOptional: Yes
Call by Reference: No ( called with pass by value option)
MERGE_SCOP -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
NO_TEMPLATES -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for STEMP_MERGE_STRUCTURES
NEW_STRUCT_HEADER - Definition Table for Structures
Data type: TTREEOptional: No
Call by Reference: No ( called with pass by value option)
STEMP_STATISTIC - Templates: Statistics
Data type: STEMPSTCOptional: No
Call by Reference: No ( called with pass by value option)
TEMP_TITLE - GUI Title
Data type: TTREET-TEXTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for STEMP_MERGE_STRUCTURES
STRUCT_MERGE - Templates: Object ID
Data type: STEMPOBJOptional: No
Call by Reference: Yes
ACTIVE_NODES - List of Active Nodes for a Structure
Data type: TTREEIOptional: Yes
Call by Reference: Yes
SEL_PARAMETERS - Parameter for view: Maintenance by application only
Data type: TTREEPOptional: Yes
Call by Reference: Yes
STEMP_CORE - Customizing templates entity table
Data type: TCUSTEMPOptional: Yes
Call by Reference: Yes
STEMP_BRANCH - Customizing templates entity table
Data type: TCUSTEMPOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOTHING_TO_MERGE -
Data type:Optional: No
Call by Reference: Yes
NO_ACTIVE_NODES -
Data type:Optional: No
Call by Reference: Yes
NO_SEL_PARAMETERS -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for STEMP_MERGE_STRUCTURES 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_template_id | TYPE TCUSTEMP-TEMP_ID, " | |||
| lt_struct_merge | TYPE STANDARD TABLE OF STEMPOBJ, " | |||
| lv_nothing_to_merge | TYPE STEMPOBJ, " | |||
| lv_new_struct_header | TYPE TTREE, " | |||
| lv_auto_correct | TYPE C, " | |||
| lt_active_nodes | TYPE STANDARD TABLE OF TTREEI, " | |||
| lv_no_active_nodes | TYPE TTREEI, " | |||
| lv_stemp_statistic | TYPE STEMPSTC, " | |||
| lv_no_temp_new_header | TYPE TTREE, " | |||
| lv_old_header | TYPE TTREE, " | |||
| lv_temp_title | TYPE TTREET-TEXT, " | |||
| lt_sel_parameters | TYPE STANDARD TABLE OF TTREEP, " | |||
| lv_no_sel_parameters | TYPE TTREEP, " | |||
| lv_title | TYPE TTREET-TEXT, " | |||
| lt_stemp_core | TYPE STANDARD TABLE OF TCUSTEMP, " | |||
| lv_title_manu | TYPE TTREET-TEXT, " | |||
| lt_stemp_branch | TYPE STANDARD TABLE OF TCUSTEMP, " | |||
| lv_branch | TYPE TCUSTEMP-BRANCH, " | |||
| lv_merge_scop | TYPE C, " | |||
| lv_change | TYPE C, " | |||
| lv_no_templates | TYPE C. " 'X' |
|   CALL FUNCTION 'STEMP_MERGE_STRUCTURES' " |
| EXPORTING | ||
| TEMPLATE_ID | = lv_template_id | |
| AUTO_CORRECT | = lv_auto_correct | |
| NO_TEMP_NEW_HEADER | = lv_no_temp_new_header | |
| OLD_HEADER | = lv_old_header | |
| TITLE | = lv_title | |
| TITLE_MANU | = lv_title_manu | |
| BRANCH | = lv_branch | |
| MERGE_SCOP | = lv_merge_scop | |
| CHANGE | = lv_change | |
| NO_TEMPLATES | = lv_no_templates | |
| IMPORTING | ||
| NEW_STRUCT_HEADER | = lv_new_struct_header | |
| STEMP_STATISTIC | = lv_stemp_statistic | |
| TEMP_TITLE | = lv_temp_title | |
| TABLES | ||
| STRUCT_MERGE | = lt_struct_merge | |
| ACTIVE_NODES | = lt_active_nodes | |
| SEL_PARAMETERS | = lt_sel_parameters | |
| STEMP_CORE | = lt_stemp_core | |
| STEMP_BRANCH | = lt_stemp_branch | |
| EXCEPTIONS | ||
| NOTHING_TO_MERGE = 1 | ||
| NO_ACTIVE_NODES = 2 | ||
| NO_SEL_PARAMETERS = 3 | ||
| . " STEMP_MERGE_STRUCTURES | ||
ABAP code using 7.40 inline data declarations to call FM STEMP_MERGE_STRUCTURES
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 TEMP_ID FROM TCUSTEMP INTO @DATA(ld_template_id). | ||||
| "SELECT single TEXT FROM TTREET INTO @DATA(ld_temp_title). | ||||
| "SELECT single TEXT FROM TTREET INTO @DATA(ld_title). | ||||
| "SELECT single TEXT FROM TTREET INTO @DATA(ld_title_manu). | ||||
| "SELECT single BRANCH FROM TCUSTEMP INTO @DATA(ld_branch). | ||||
| DATA(ld_no_templates) | = 'X'. | |||
Search for further information about these or an SAP related objects