SAP LXE_WORD_TEMPLATE_EXEC_MACRO Function Module for Obsolete
LXE_WORD_TEMPLATE_EXEC_MACRO is a standard lxe word template exec macro SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Obsolete 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 lxe word template exec macro FM, simply by entering the name LXE_WORD_TEMPLATE_EXEC_MACRO into the relevant SAP transaction such as SE37 or SE38.
Function Group: LXE_WORD
Program Name: SAPLLXE_WORD
Main Program: SAPLLXE_WORD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LXE_WORD_TEMPLATE_EXEC_MACRO 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 'LXE_WORD_TEMPLATE_EXEC_MACRO'"Obsolete.
EXPORTING
TEMPLATE_ID = "Text Key
* PARAM7 = "Generic Type
* PARAM8 = "Generic Type
* PARAM9 = "Generic Type
* PARAM10 = "Generic Type
* PARAM11 = "Generic Type
* PARAM12 = "Generic Type
* SEGMENT_TAB = "Table Type for Structure LXE_KEY_ST
* RELOBJECTS_TAB = "Object lists table type
MACRO = "Text Line with 30 Characters
* PARAM_CNT = '0' "Predefined Type
* PARAM1 = "Generic Type
* PARAM2 = "Generic Type
* PARAM3 = "Generic Type
* PARAM4 = "Generic Type
* PARAM5 = "Generic Type
* PARAM6 = "Generic Type
IMPORTING
RESULT_NUM = "Predefined Type
RESULT_TXT = "Predefined Type
PSTATUS = "Process Status
IMPORTING Parameters details for LXE_WORD_TEMPLATE_EXEC_MACRO
TEMPLATE_ID - Text Key
Data type: LXETEXTKEYOptional: No
Call by Reference: Yes
PARAM7 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM8 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM9 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM10 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM11 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM12 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
SEGMENT_TAB - Table Type for Structure LXE_KEY_ST
Data type: LXE_KEY_ST_TABTYPOptional: Yes
Call by Reference: Yes
RELOBJECTS_TAB - Object lists table type
Data type: LXE_TT_COLOBOptional: Yes
Call by Reference: Yes
MACRO - Text Line with 30 Characters
Data type: LXE0030LINOptional: No
Call by Reference: Yes
PARAM_CNT - Predefined Type
Data type: IDefault: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARAM1 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM2 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM3 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM4 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM5 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
PARAM6 - Generic Type
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LXE_WORD_TEMPLATE_EXEC_MACRO
RESULT_NUM - Predefined Type
Data type: IOptional: No
Call by Reference: Yes
RESULT_TXT - Predefined Type
Data type: STRINGOptional: No
Call by Reference: Yes
PSTATUS - Process Status
Data type: LXESTATPRCOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for LXE_WORD_TEMPLATE_EXEC_MACRO 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_result_num | TYPE I, " | |||
| lv_template_id | TYPE LXETEXTKEY, " | |||
| lv_param7 | TYPE ANY, " | |||
| lv_param8 | TYPE ANY, " | |||
| lv_param9 | TYPE ANY, " | |||
| lv_param10 | TYPE ANY, " | |||
| lv_param11 | TYPE ANY, " | |||
| lv_param12 | TYPE ANY, " | |||
| lv_segment_tab | TYPE LXE_KEY_ST_TABTYP, " | |||
| lv_relobjects_tab | TYPE LXE_TT_COLOB, " | |||
| lv_macro | TYPE LXE0030LIN, " | |||
| lv_result_txt | TYPE STRING, " | |||
| lv_pstatus | TYPE LXESTATPRC, " | |||
| lv_param_cnt | TYPE I, " '0' | |||
| lv_param1 | TYPE ANY, " | |||
| lv_param2 | TYPE ANY, " | |||
| lv_param3 | TYPE ANY, " | |||
| lv_param4 | TYPE ANY, " | |||
| lv_param5 | TYPE ANY, " | |||
| lv_param6 | TYPE ANY. " |
|   CALL FUNCTION 'LXE_WORD_TEMPLATE_EXEC_MACRO' "Obsolete |
| EXPORTING | ||
| TEMPLATE_ID | = lv_template_id | |
| PARAM7 | = lv_param7 | |
| PARAM8 | = lv_param8 | |
| PARAM9 | = lv_param9 | |
| PARAM10 | = lv_param10 | |
| PARAM11 | = lv_param11 | |
| PARAM12 | = lv_param12 | |
| SEGMENT_TAB | = lv_segment_tab | |
| RELOBJECTS_TAB | = lv_relobjects_tab | |
| MACRO | = lv_macro | |
| PARAM_CNT | = lv_param_cnt | |
| PARAM1 | = lv_param1 | |
| PARAM2 | = lv_param2 | |
| PARAM3 | = lv_param3 | |
| PARAM4 | = lv_param4 | |
| PARAM5 | = lv_param5 | |
| PARAM6 | = lv_param6 | |
| IMPORTING | ||
| RESULT_NUM | = lv_result_num | |
| RESULT_TXT | = lv_result_txt | |
| PSTATUS | = lv_pstatus | |
| . " LXE_WORD_TEMPLATE_EXEC_MACRO | ||
ABAP code using 7.40 inline data declarations to call FM LXE_WORD_TEMPLATE_EXEC_MACRO
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_param_cnt) | = '0'. | |||
Search for further information about these or an SAP related objects