SAP /SCMTMS/FD_EHS_PHRASE_UPDATE Function Module for RFC to update EH&S Phrase
/SCMTMS/FD_EHS_PHRASE_UPDATE is a standard /scmtms/fd ehs phrase update 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 update 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 update FM, simply by entering the name /SCMTMS/FD_EHS_PHRASE_UPDATE 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_UPDATE 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_UPDATE'"RFC to update EH&S Phrase.
EXPORTING
IV_ADDINF = "EHS: Additional Information for Function Module Calls
* IV_FLG_TEXT = ' ' "Truth Value
* IV_FLG_TEXT_LONGTEXT = ' ' "Truth Value
* IV_PHRASE_SET = '' "Phrase Set
IMPORTING
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
* CT_API_HEADER_TAB = "EHS: API Structure Phrase Headers
* CT_API_TEXT_TAB = "EHS: API Structure Phrase Item
* CT_API_TEXT_LONGTEXT_TAB = "EHS: API Structure Phrase Long Texts (SAPscript Long Texts)
* 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_UPDATE
IV_ADDINF - EHS: Additional Information for Function Module Calls
Data type: /SEHS/BAS_ADDINFOptional: No
Call by Reference: No ( called with pass by value option)
IV_FLG_TEXT - Truth Value
Data type: /SEHS/BAE_BOOLEANDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_FLG_TEXT_LONGTEXT - Truth Value
Data type: /SEHS/BAE_BOOLEANDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_PHRASE_SET - Phrase Set
Data type: ESEPHRSELDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for /SCMTMS/FD_EHS_PHRASE_UPDATE
EV_FLG_LOCKFAIL - Truth Value
Data type: /SEHS/BAE_BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
EV_FLG_ERROR - Truth Value
Data type: /SEHS/BAE_BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
EV_ERROR_MSG_ID - Message Class
Data type: SYST-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
EV_ERROR_MSG_NO - Message Number
Data type: SYST-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
EV_ERROR_MSG_PARAM - Message Variable
Data type: SYST-MSGV1Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for /SCMTMS/FD_EHS_PHRASE_UPDATE
CT_API_HEADER_TAB - EHS: API Structure Phrase Headers
Data type: /SEHS/PHY_APIPHOptional: Yes
Call by Reference: Yes
CT_API_TEXT_TAB - EHS: API Structure Phrase Item
Data type: /SEHS/PHY_APIPPOptional: Yes
Call by Reference: Yes
CT_API_TEXT_LONGTEXT_TAB - EHS: API Structure Phrase Long Texts (SAPscript Long Texts)
Data type: /SEHS/PHY_APIPLOptional: Yes
Call by Reference: Yes
IT_TEXT_HEAD - EHS: API Structure Phrase Item
Data type: /SEHS/PHY_APIPPOptional: Yes
Call by Reference: Yes
IT_TEXT_LONGTEXT - EHS: API Structure Phrase Long Texts (SAPscript Long Texts)
Data type: /SEHS/PHY_APIPLOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for /SCMTMS/FD_EHS_PHRASE_UPDATE 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_iv_addinf | TYPE /SEHS/BAS_ADDINF, " | |||
| lv_ev_flg_lockfail | TYPE /SEHS/BAE_BOOLEAN, " | |||
| lt_ct_api_header_tab | TYPE STANDARD TABLE OF /SEHS/PHY_APIPH, " | |||
| lv_iv_flg_text | TYPE /SEHS/BAE_BOOLEAN, " ' ' | |||
| lv_ev_flg_error | TYPE /SEHS/BAE_BOOLEAN, " | |||
| lt_ct_api_text_tab | TYPE STANDARD TABLE OF /SEHS/PHY_APIPP, " | |||
| lv_ev_error_msg_id | TYPE SYST-MSGID, " | |||
| lv_iv_flg_text_longtext | TYPE /SEHS/BAE_BOOLEAN, " ' ' | |||
| lt_ct_api_text_longtext_tab | TYPE STANDARD TABLE OF /SEHS/PHY_APIPL, " | |||
| lt_it_text_head | TYPE STANDARD TABLE OF /SEHS/PHY_APIPP, " | |||
| lv_iv_phrase_set | TYPE ESEPHRSEL, " '' | |||
| lv_ev_error_msg_no | TYPE SYST-MSGNO, " | |||
| lt_it_text_longtext | TYPE STANDARD TABLE OF /SEHS/PHY_APIPL, " | |||
| lv_ev_error_msg_param | TYPE SYST-MSGV1. " |
|   CALL FUNCTION '/SCMTMS/FD_EHS_PHRASE_UPDATE' "RFC to update EH&S Phrase |
| EXPORTING | ||
| IV_ADDINF | = lv_iv_addinf | |
| IV_FLG_TEXT | = lv_iv_flg_text | |
| IV_FLG_TEXT_LONGTEXT | = lv_iv_flg_text_longtext | |
| IV_PHRASE_SET | = lv_iv_phrase_set | |
| IMPORTING | ||
| 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 | ||
| CT_API_HEADER_TAB | = lt_ct_api_header_tab | |
| CT_API_TEXT_TAB | = lt_ct_api_text_tab | |
| CT_API_TEXT_LONGTEXT_TAB | = lt_ct_api_text_longtext_tab | |
| IT_TEXT_HEAD | = lt_it_text_head | |
| IT_TEXT_LONGTEXT | = lt_it_text_longtext | |
| . " /SCMTMS/FD_EHS_PHRASE_UPDATE | ||
ABAP code using 7.40 inline data declarations to call FM /SCMTMS/FD_EHS_PHRASE_UPDATE
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_flg_text) | = ' '. | |||
| "SELECT single MSGID FROM SYST INTO @DATA(ld_ev_error_msg_id). | ||||
| DATA(ld_iv_flg_text_longtext) | = ' '. | |||
| DATA(ld_iv_phrase_set) | = ''. | |||
| "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