SAP /SCMTMS/FD_EHS_PHRASE_CREATE Function Module for RFC to create EH&S Phrase









/SCMTMS/FD_EHS_PHRASE_CREATE is a standard /scmtms/fd ehs phrase create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RFC to create EH&S Phrase 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 /scmtms/fd ehs phrase create FM, simply by entering the name /SCMTMS/FD_EHS_PHRASE_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: /SCMTMS/FD_EHS_PHRASE_API
Program Name: /SCMTMS/SAPLFD_EHS_PHRASE_API
Main Program: /SCMTMS/SAPLFD_EHS_PHRASE_API
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function /SCMTMS/FD_EHS_PHRASE_CREATE 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 '/SCMTMS/FD_EHS_PHRASE_CREATE'"RFC to create EH&S Phrase
EXPORTING
IV_PHRASE_LIBRARY = "Unique phrase library identification
IV_PHRASE_GROUP = "Phrase Group
* IV_PHRASE_SET = '' "Phrase Set

IMPORTING
EV_PHRASE_ID = "Phrase
EV_FLG_LOCKFAIL = "Truth Value
EV_FLG_ERROR = "Truth Value
EV_ERROR_MSG_ID = "Message Class
EV_ERROR_MSG_NO = "Message Number
EV_ERROR_MSG_PARAM = "Message Variable

TABLES
IT_TEXT_HEAD = "EHS: API Structure Phrase Item
* IT_TEXT_LONGTEXT = "EHS: API Structure Phrase Long Texts (SAPscript Long Texts)
.



IMPORTING Parameters details for /SCMTMS/FD_EHS_PHRASE_CREATE

IV_PHRASE_LIBRARY - Unique phrase library identification

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

IV_PHRASE_GROUP - Phrase Group

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

IV_PHRASE_SET - Phrase Set

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

EXPORTING Parameters details for /SCMTMS/FD_EHS_PHRASE_CREATE

EV_PHRASE_ID - Phrase

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

EV_FLG_LOCKFAIL - Truth Value

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

EV_FLG_ERROR - Truth Value

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

EV_ERROR_MSG_ID - Message Class

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

EV_ERROR_MSG_NO - Message Number

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

EV_ERROR_MSG_PARAM - Message Variable

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

TABLES Parameters details for /SCMTMS/FD_EHS_PHRASE_CREATE

IT_TEXT_HEAD - EHS: API Structure Phrase Item

Data type: /SEHS/PHY_APIPP
Optional: No
Call by Reference: Yes

IT_TEXT_LONGTEXT - EHS: API Structure Phrase Long Texts (SAPscript Long Texts)

Data type: /SEHS/PHY_APIPL
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for /SCMTMS/FD_EHS_PHRASE_CREATE 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_ev_phrase_id  TYPE ESEPHRID, "   
lt_it_text_head  TYPE STANDARD TABLE OF /SEHS/PHY_APIPP, "   
lv_iv_phrase_library  TYPE ESECATPIN, "   
lv_ev_flg_lockfail  TYPE /SEHS/BAE_BOOLEAN, "   
lv_iv_phrase_group  TYPE ESEPHRGRP, "   
lt_it_text_longtext  TYPE STANDARD TABLE OF /SEHS/PHY_APIPL, "   
lv_ev_flg_error  TYPE /SEHS/BAE_BOOLEAN, "   
lv_iv_phrase_set  TYPE ESEPHRSEL, "   ''
lv_ev_error_msg_id  TYPE SYST-MSGID, "   
lv_ev_error_msg_no  TYPE SYST-MSGNO, "   
lv_ev_error_msg_param  TYPE SYST-MSGV1. "   

  CALL FUNCTION '/SCMTMS/FD_EHS_PHRASE_CREATE'  "RFC to create EH&S Phrase
    EXPORTING
         IV_PHRASE_LIBRARY = lv_iv_phrase_library
         IV_PHRASE_GROUP = lv_iv_phrase_group
         IV_PHRASE_SET = lv_iv_phrase_set
    IMPORTING
         EV_PHRASE_ID = lv_ev_phrase_id
         EV_FLG_LOCKFAIL = lv_ev_flg_lockfail
         EV_FLG_ERROR = lv_ev_flg_error
         EV_ERROR_MSG_ID = lv_ev_error_msg_id
         EV_ERROR_MSG_NO = lv_ev_error_msg_no
         EV_ERROR_MSG_PARAM = lv_ev_error_msg_param
    TABLES
         IT_TEXT_HEAD = lt_it_text_head
         IT_TEXT_LONGTEXT = lt_it_text_longtext
. " /SCMTMS/FD_EHS_PHRASE_CREATE




ABAP code using 7.40 inline data declarations to call FM /SCMTMS/FD_EHS_PHRASE_CREATE

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_iv_phrase_set) = ''.
 
"SELECT single MSGID FROM SYST INTO @DATA(ld_ev_error_msg_id).
 
"SELECT single MSGNO FROM SYST INTO @DATA(ld_ev_error_msg_no).
 
"SELECT single MSGV1 FROM SYST INTO @DATA(ld_ev_error_msg_param).
 


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!