SAP RCP321_EHS_FIELDS_READ Function Module for NOTRANSL: RMS-RCP: Lesen der EHS Objekte
RCP321_EHS_FIELDS_READ is a standard rcp321 ehs fields read 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: RMS-RCP: Lesen der EHS Objekte 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 rcp321 ehs fields read FM, simply by entering the name RCP321_EHS_FIELDS_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: RCP321
Program Name: SAPLRCP321
Main Program: SAPLRCP321
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RCP321_EHS_FIELDS_READ 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 'RCP321_EHS_FIELDS_READ'"NOTRANSL: RMS-RCP: Lesen der EHS Objekte.
EXPORTING
I_DATA_SCENARIO = "Data Scenario for API Recipe
I_GUID = "Internal Identification for PVS Objects
* I_AENNR = "Change Number
I_VALFROM = "Valid-From Date
* I_VALDAT = "Key Date for Read
IMPORTING
E_EHS_RECN = "Sequence Number of the Data Record
E_AUTHGRP = "Authorization Group for a Recipe Object
E_SUBCAT = "Specification Type
E_SUBID = "Specification
E_ACTN = "Sequential Number of Change State
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for RCP321_EHS_FIELDS_READ
I_DATA_SCENARIO - Data Scenario for API Recipe
Data type: RCPE_DATASCENOptional: No
Call by Reference: Yes
I_GUID - Internal Identification for PVS Objects
Data type: PVS_GUIDOptional: No
Call by Reference: Yes
I_AENNR - Change Number
Data type: AENNROptional: Yes
Call by Reference: Yes
I_VALFROM - Valid-From Date
Data type: RCPE_ADATUMOptional: No
Call by Reference: Yes
I_VALDAT - Key Date for Read
Data type: PVS_ADATUMOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RCP321_EHS_FIELDS_READ
E_EHS_RECN - Sequence Number of the Data Record
Data type: ESERECNOptional: No
Call by Reference: Yes
E_AUTHGRP - Authorization Group for a Recipe Object
Data type: RCPE_AUTHGRPOptional: No
Call by Reference: Yes
E_SUBCAT - Specification Type
Data type: ESESUBCATOptional: No
Call by Reference: Yes
E_SUBID - Specification
Data type: ESESUBIDOptional: No
Call by Reference: Yes
E_ACTN - Sequential Number of Change State
Data type: ESEACTNOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR - Error reading data
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RCP321_EHS_FIELDS_READ 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_error | TYPE STRING, " | |||
| lv_e_ehs_recn | TYPE ESERECN, " | |||
| lv_i_data_scenario | TYPE RCPE_DATASCEN, " | |||
| lv_i_guid | TYPE PVS_GUID, " | |||
| lv_e_authgrp | TYPE RCPE_AUTHGRP, " | |||
| lv_i_aennr | TYPE AENNR, " | |||
| lv_e_subcat | TYPE ESESUBCAT, " | |||
| lv_e_subid | TYPE ESESUBID, " | |||
| lv_i_valfrom | TYPE RCPE_ADATUM, " | |||
| lv_e_actn | TYPE ESEACTN, " | |||
| lv_i_valdat | TYPE PVS_ADATUM. " |
|   CALL FUNCTION 'RCP321_EHS_FIELDS_READ' "NOTRANSL: RMS-RCP: Lesen der EHS Objekte |
| EXPORTING | ||
| I_DATA_SCENARIO | = lv_i_data_scenario | |
| I_GUID | = lv_i_guid | |
| I_AENNR | = lv_i_aennr | |
| I_VALFROM | = lv_i_valfrom | |
| I_VALDAT | = lv_i_valdat | |
| IMPORTING | ||
| E_EHS_RECN | = lv_e_ehs_recn | |
| E_AUTHGRP | = lv_e_authgrp | |
| E_SUBCAT | = lv_e_subcat | |
| E_SUBID | = lv_e_subid | |
| E_ACTN | = lv_e_actn | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " RCP321_EHS_FIELDS_READ | ||
ABAP code using 7.40 inline data declarations to call FM RCP321_EHS_FIELDS_READ
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.Search for further information about these or an SAP related objects