SAP HR_PL_MSWORD_EXPORT Function Module for Exports SAPScript forms to Word









HR_PL_MSWORD_EXPORT is a standard hr pl msword export SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Exports SAPScript forms to Word 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 hr pl msword export FM, simply by entering the name HR_PL_MSWORD_EXPORT into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRBASPL_MSWORD_EXPORT
Program Name: SAPLHRBASPL_MSWORD_EXPORT
Main Program: SAPLHRBASPL_MSWORD_EXPORT
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HR_PL_MSWORD_EXPORT 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 'HR_PL_MSWORD_EXPORT'"Exports SAPScript forms to Word
EXPORTING
* WORD_DOC = "
* PASSWORD_OPTION = 2 "
* PRINT = ' ' "
* MERGE = ' ' "

TABLES
P_WORK_DATA = "
P_FIELD_NAMES = "

EXCEPTIONS
INVALID_FIELDNAMES = 1 USER_CANCELLED = 2 DOWNLOAD_PROBLEM = 3 COMMUNICATION_ERROR = 4 WEB_GUI_ERROR = 5
.



IMPORTING Parameters details for HR_PL_MSWORD_EXPORT

WORD_DOC -

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

PASSWORD_OPTION -

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

PRINT -

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

MERGE -

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

TABLES Parameters details for HR_PL_MSWORD_EXPORT

P_WORK_DATA -

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

P_FIELD_NAMES -

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

EXCEPTIONS details

INVALID_FIELDNAMES -

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

USER_CANCELLED -

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

DOWNLOAD_PROBLEM -

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

COMMUNICATION_ERROR -

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

WEB_GUI_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HR_PL_MSWORD_EXPORT 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_word_doc  TYPE RLGRAP-FILENAME, "   
lt_p_work_data  TYPE STANDARD TABLE OF RLGRAP, "   
lv_invalid_fieldnames  TYPE RLGRAP, "   
lt_p_field_names  TYPE STANDARD TABLE OF RLGRAP, "   
lv_user_cancelled  TYPE RLGRAP, "   
lv_password_option  TYPE I, "   2
lv_print  TYPE C, "   SPACE
lv_download_problem  TYPE C, "   
lv_merge  TYPE C, "   SPACE
lv_communication_error  TYPE C, "   
lv_web_gui_error  TYPE C. "   

  CALL FUNCTION 'HR_PL_MSWORD_EXPORT'  "Exports SAPScript forms to Word
    EXPORTING
         WORD_DOC = lv_word_doc
         PASSWORD_OPTION = lv_password_option
         PRINT = lv_print
         MERGE = lv_merge
    TABLES
         P_WORK_DATA = lt_p_work_data
         P_FIELD_NAMES = lt_p_field_names
    EXCEPTIONS
        INVALID_FIELDNAMES = 1
        USER_CANCELLED = 2
        DOWNLOAD_PROBLEM = 3
        COMMUNICATION_ERROR = 4
        WEB_GUI_ERROR = 5
. " HR_PL_MSWORD_EXPORT




ABAP code using 7.40 inline data declarations to call FM HR_PL_MSWORD_EXPORT

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 FILENAME FROM RLGRAP INTO @DATA(ld_word_doc).
 
 
 
 
 
DATA(ld_password_option) = 2.
 
DATA(ld_print) = ' '.
 
 
DATA(ld_merge) = ' '.
 
 
 


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!