SAP STEMP_MERGE_TEMPLATES Function Module for









STEMP_MERGE_TEMPLATES is a standard stemp merge templates 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 templates FM, simply by entering the name STEMP_MERGE_TEMPLATES 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_TEMPLATES 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_TEMPLATES'"
EXPORTING
TEMPLATE_ID = "Template ID
* BRANCH = "Industry
* STEMP_TITLE_MANU = "Explanatory text
* CHANGE_TEMP = "
* AUTOCORRECT = "

IMPORTING
NEW_HEADER_FILT = "Definition Table for Structures
NEW_HEADER_SCOP = "Definition Table for Structures
STEMP_TITLE = "Explanatory text

TABLES
LIST_OF_TEMPLATES = "Objects assigned to a template
* STEMP_STATISTICS = "Templates: Statistics
* STEMP_CORE = "Customizing templates entity table
* STEMP_BRANCH = "Customizing templates entity table

EXCEPTIONS
NO_FILTERS_TO_MERGE = 1 TREE_IDS_NOT_CORRESPONDING = 2
.



IMPORTING Parameters details for STEMP_MERGE_TEMPLATES

TEMPLATE_ID - Template ID

Data type: TCUSTEMP-TEMP_ID
Optional: No
Call by Reference: No ( called with pass by value option)

BRANCH - Industry

Data type: TCUSTEMP-BRANCH
Optional: Yes
Call by Reference: No ( called with pass by value option)

STEMP_TITLE_MANU - Explanatory text

Data type: TTREET-TEXT
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHANGE_TEMP -

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

AUTOCORRECT -

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for STEMP_MERGE_TEMPLATES

NEW_HEADER_FILT - Definition Table for Structures

Data type: TTREE
Optional: No
Call by Reference: No ( called with pass by value option)

NEW_HEADER_SCOP - Definition Table for Structures

Data type: TTREE
Optional: No
Call by Reference: No ( called with pass by value option)

STEMP_TITLE - Explanatory text

Data type: TTREET-TEXT
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for STEMP_MERGE_TEMPLATES

LIST_OF_TEMPLATES - Objects assigned to a template

Data type: TOBJECTT
Optional: No
Call by Reference: Yes

STEMP_STATISTICS - Templates: Statistics

Data type: STEMPSTC
Optional: Yes
Call by Reference: Yes

STEMP_CORE - Customizing templates entity table

Data type: TCUSTEMP
Optional: Yes
Call by Reference: Yes

STEMP_BRANCH - Customizing templates entity table

Data type: TCUSTEMP
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_FILTERS_TO_MERGE -

Data type:
Optional: No
Call by Reference: Yes

TREE_IDS_NOT_CORRESPONDING -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for STEMP_MERGE_TEMPLATES 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, "   
lv_new_header_filt  TYPE TTREE, "   
lt_list_of_templates  TYPE STANDARD TABLE OF TOBJECTT, "   
lv_no_filters_to_merge  TYPE TOBJECTT, "   
lv_branch  TYPE TCUSTEMP-BRANCH, "   
lv_new_header_scop  TYPE TTREE, "   
lt_stemp_statistics  TYPE STANDARD TABLE OF STEMPSTC, "   
lv_tree_ids_not_corresponding  TYPE STEMPSTC, "   
lt_stemp_core  TYPE STANDARD TABLE OF TCUSTEMP, "   
lv_stemp_title  TYPE TTREET-TEXT, "   
lv_stemp_title_manu  TYPE TTREET-TEXT, "   
lv_change_temp  TYPE C, "   
lt_stemp_branch  TYPE STANDARD TABLE OF TCUSTEMP, "   
lv_autocorrect  TYPE C. "   

  CALL FUNCTION 'STEMP_MERGE_TEMPLATES'  "
    EXPORTING
         TEMPLATE_ID = lv_template_id
         BRANCH = lv_branch
         STEMP_TITLE_MANU = lv_stemp_title_manu
         CHANGE_TEMP = lv_change_temp
         AUTOCORRECT = lv_autocorrect
    IMPORTING
         NEW_HEADER_FILT = lv_new_header_filt
         NEW_HEADER_SCOP = lv_new_header_scop
         STEMP_TITLE = lv_stemp_title
    TABLES
         LIST_OF_TEMPLATES = lt_list_of_templates
         STEMP_STATISTICS = lt_stemp_statistics
         STEMP_CORE = lt_stemp_core
         STEMP_BRANCH = lt_stemp_branch
    EXCEPTIONS
        NO_FILTERS_TO_MERGE = 1
        TREE_IDS_NOT_CORRESPONDING = 2
. " STEMP_MERGE_TEMPLATES




ABAP code using 7.40 inline data declarations to call FM STEMP_MERGE_TEMPLATES

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 BRANCH FROM TCUSTEMP INTO @DATA(ld_branch).
 
 
 
 
 
"SELECT single TEXT FROM TTREET INTO @DATA(ld_stemp_title).
 
"SELECT single TEXT FROM TTREET INTO @DATA(ld_stemp_title_manu).
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!