SAP EHS_BAS002_DYNP_READ_FIELD Function Module for
EHS_BAS002_DYNP_READ_FIELD is a standard ehs bas002 dynp read field SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 ehs bas002 dynp read field FM, simply by entering the name EHS_BAS002_DYNP_READ_FIELD into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHS_BAS002
Program Name: SAPLEHS_BAS002
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EHS_BAS002_DYNP_READ_FIELD 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 'EHS_BAS002_DYNP_READ_FIELD'".
EXPORTING
I_PROGRAM = "
I_DYNPRO = "
I_FIELDNAME = "
I_FLG_STEPLOOP = "
* I_FLG_REQUEST = FALSE "
IMPORTING
E_STEPL = "
E_FLG_FIELD_INPUT = "
CHANGING
X_VALUE = "
IMPORTING Parameters details for EHS_BAS002_DYNP_READ_FIELD
I_PROGRAM -
Data type: D020S-PROGOptional: No
Call by Reference: Yes
I_DYNPRO -
Data type: D020S-DNUMOptional: No
Call by Reference: Yes
I_FIELDNAME -
Data type: DYNPREAD-FIELDNAMEOptional: No
Call by Reference: Yes
I_FLG_STEPLOOP -
Data type: COptional: No
Call by Reference: Yes
I_FLG_REQUEST -
Data type: ESEBOOLEDefault: FALSE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for EHS_BAS002_DYNP_READ_FIELD
E_STEPL -
Data type: SY-STEPLOptional: No
Call by Reference: Yes
E_FLG_FIELD_INPUT -
Data type: ESEBOOLEOptional: No
Call by Reference: Yes
CHANGING Parameters details for EHS_BAS002_DYNP_READ_FIELD
X_VALUE -
Data type: DYNPREAD-FIELDVALUEOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for EHS_BAS002_DYNP_READ_FIELD 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_e_stepl | TYPE SY-STEPL, " | |||
| lv_x_value | TYPE DYNPREAD-FIELDVALUE, " | |||
| lv_i_program | TYPE D020S-PROG, " | |||
| lv_i_dynpro | TYPE D020S-DNUM, " | |||
| lv_e_flg_field_input | TYPE ESEBOOLE, " | |||
| lv_i_fieldname | TYPE DYNPREAD-FIELDNAME, " | |||
| lv_i_flg_steploop | TYPE C, " | |||
| lv_i_flg_request | TYPE ESEBOOLE. " FALSE |
|   CALL FUNCTION 'EHS_BAS002_DYNP_READ_FIELD' " |
| EXPORTING | ||
| I_PROGRAM | = lv_i_program | |
| I_DYNPRO | = lv_i_dynpro | |
| I_FIELDNAME | = lv_i_fieldname | |
| I_FLG_STEPLOOP | = lv_i_flg_steploop | |
| I_FLG_REQUEST | = lv_i_flg_request | |
| IMPORTING | ||
| E_STEPL | = lv_e_stepl | |
| E_FLG_FIELD_INPUT | = lv_e_flg_field_input | |
| CHANGING | ||
| X_VALUE | = lv_x_value | |
| . " EHS_BAS002_DYNP_READ_FIELD | ||
ABAP code using 7.40 inline data declarations to call FM EHS_BAS002_DYNP_READ_FIELD
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 STEPL FROM SY INTO @DATA(ld_e_stepl). | ||||
| "SELECT single FIELDVALUE FROM DYNPREAD INTO @DATA(ld_x_value). | ||||
| "SELECT single PROG FROM D020S INTO @DATA(ld_i_program). | ||||
| "SELECT single DNUM FROM D020S INTO @DATA(ld_i_dynpro). | ||||
| "SELECT single FIELDNAME FROM DYNPREAD INTO @DATA(ld_i_fieldname). | ||||
| DATA(ld_i_flg_request) | = FALSE. | |||
Search for further information about these or an SAP related objects