SAP EHSB_FSCP_APPL_SCOPES_WRITE Function Module for NOTRANSL: EHS: Schreiben von Geltungsbereichszuordnungen
EHSB_FSCP_APPL_SCOPES_WRITE is a standard ehsb fscp appl scopes write SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: EHS: Schreiben von Geltungsbereichszuordnungen 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 ehsb fscp appl scopes write FM, simply by entering the name EHSB_FSCP_APPL_SCOPES_WRITE into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHSB_FSCP
Program Name: SAPLEHSB_FSCP
Main Program: SAPLEHSB_FSCP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EHSB_FSCP_APPL_SCOPES_WRITE 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 'EHSB_FSCP_APPL_SCOPES_WRITE'"NOTRANSL: EHS: Schreiben von Geltungsbereichszuordnungen.
EXPORTING
* I_KEY_DATE = "Key Date
* I_FLG_SAVE_TO_DB = ESP1_TRUE "
* I_AENNR = "Change Number
* I_VALFR = "
* I_VALTO = "
* I_FLG_KEYDATE_SWITCH_ONLY = ESP1_FALSE "
* I_FLG_COMMIT_DATA = ESP1_FALSE "
* I_FLG_CHECK_ONLY = ESP1_FALSE "
* I_FLG_NO_AUTH_CHECK = ESP1_FALSE "Indicator: Switch off authorization checks
* I_FLG_USER_EXITS_ONLY = ESP1_FALSE "
IMPORTING
E_FLG_ERROR = "
TABLES
X_APPL_SCOPE_TAB = "
* E_ERROR_TAB = "EHS: General Error Structure
EXCEPTIONS
INTERNAL_ERROR = 1 INTERVAL_ACCESS_ERROR = 2
IMPORTING Parameters details for EHSB_FSCP_APPL_SCOPES_WRITE
I_KEY_DATE - Key Date
Data type: RCGADDINF-VALDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_SAVE_TO_DB -
Data type: ESP1_BOOLEANDefault: ESP1_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AENNR - Change Number
Data type: RCGADDINF-AENNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_VALFR -
Data type: RCGADDINF-VALDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_VALTO -
Data type: RCGADDINF-VALDATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_KEYDATE_SWITCH_ONLY -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_COMMIT_DATA -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_CHECK_ONLY -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_NO_AUTH_CHECK - Indicator: Switch off authorization checks
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_USER_EXITS_ONLY -
Data type: ESP1_BOOLEANDefault: ESP1_FALSE
Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for EHSB_FSCP_APPL_SCOPES_WRITE
E_FLG_ERROR -
Data type: ESP1_BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EHSB_FSCP_APPL_SCOPES_WRITE
X_APPL_SCOPE_TAB -
Data type: EHSBS_APPL_SCOPE_APIOptional: No
Call by Reference: No ( called with pass by value option)
E_ERROR_TAB - EHS: General Error Structure
Data type: RCGEXTERROROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERVAL_ACCESS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EHSB_FSCP_APPL_SCOPES_WRITE 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_i_key_date | TYPE RCGADDINF-VALDAT, " | |||
| lv_e_flg_error | TYPE ESP1_BOOLEAN, " | |||
| lv_internal_error | TYPE ESP1_BOOLEAN, " | |||
| lt_x_appl_scope_tab | TYPE STANDARD TABLE OF EHSBS_APPL_SCOPE_API, " | |||
| lv_i_flg_save_to_db | TYPE ESP1_BOOLEAN, " ESP1_TRUE | |||
| lv_i_aennr | TYPE RCGADDINF-AENNR, " | |||
| lt_e_error_tab | TYPE STANDARD TABLE OF RCGEXTERROR, " | |||
| lv_interval_access_error | TYPE RCGEXTERROR, " | |||
| lv_i_valfr | TYPE RCGADDINF-VALDAT, " | |||
| lv_i_valto | TYPE RCGADDINF-VALDAT, " | |||
| lv_i_flg_keydate_switch_only | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
| lv_i_flg_commit_data | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
| lv_i_flg_check_only | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
| lv_i_flg_no_auth_check | TYPE ESP1_BOOLEAN, " ESP1_FALSE | |||
| lv_i_flg_user_exits_only | TYPE ESP1_BOOLEAN. " ESP1_FALSE |
|   CALL FUNCTION 'EHSB_FSCP_APPL_SCOPES_WRITE' "NOTRANSL: EHS: Schreiben von Geltungsbereichszuordnungen |
| EXPORTING | ||
| I_KEY_DATE | = lv_i_key_date | |
| I_FLG_SAVE_TO_DB | = lv_i_flg_save_to_db | |
| I_AENNR | = lv_i_aennr | |
| I_VALFR | = lv_i_valfr | |
| I_VALTO | = lv_i_valto | |
| I_FLG_KEYDATE_SWITCH_ONLY | = lv_i_flg_keydate_switch_only | |
| I_FLG_COMMIT_DATA | = lv_i_flg_commit_data | |
| I_FLG_CHECK_ONLY | = lv_i_flg_check_only | |
| I_FLG_NO_AUTH_CHECK | = lv_i_flg_no_auth_check | |
| I_FLG_USER_EXITS_ONLY | = lv_i_flg_user_exits_only | |
| IMPORTING | ||
| E_FLG_ERROR | = lv_e_flg_error | |
| TABLES | ||
| X_APPL_SCOPE_TAB | = lt_x_appl_scope_tab | |
| E_ERROR_TAB | = lt_e_error_tab | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| INTERVAL_ACCESS_ERROR = 2 | ||
| . " EHSB_FSCP_APPL_SCOPES_WRITE | ||
ABAP code using 7.40 inline data declarations to call FM EHSB_FSCP_APPL_SCOPES_WRITE
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 VALDAT FROM RCGADDINF INTO @DATA(ld_i_key_date). | ||||
| DATA(ld_i_flg_save_to_db) | = ESP1_TRUE. | |||
| "SELECT single AENNR FROM RCGADDINF INTO @DATA(ld_i_aennr). | ||||
| "SELECT single VALDAT FROM RCGADDINF INTO @DATA(ld_i_valfr). | ||||
| "SELECT single VALDAT FROM RCGADDINF INTO @DATA(ld_i_valto). | ||||
| DATA(ld_i_flg_keydate_switch_only) | = ESP1_FALSE. | |||
| DATA(ld_i_flg_commit_data) | = ESP1_FALSE. | |||
| DATA(ld_i_flg_check_only) | = ESP1_FALSE. | |||
| DATA(ld_i_flg_no_auth_check) | = ESP1_FALSE. | |||
| DATA(ld_i_flg_user_exits_only) | = ESP1_FALSE. | |||
Search for further information about these or an SAP related objects