SAP EHS_FIND_AGENTS Function Module for
EHS_FIND_AGENTS is a standard ehs find agents 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 find agents FM, simply by entering the name EHS_FIND_AGENTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHS00PPROT
Program Name: SAPLEHS00PPROT
Main Program: SAPLEHS00PPROT
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function EHS_FIND_AGENTS 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_FIND_AGENTS'".
EXPORTING
* IM_BEGDA = SY-DATUM "
* IM_ENDDA = SY-DATUM "
TABLES
IM_OBJECTS = "Org. Management: Table of Object Entries
IM_STRUC = "Org. Management: Table of Structure Entries
* EX_AGENTS_1403 = "EHS: Info Category 1403 Extended
* EX_AGENTS_1404 = "EHS: Info Category 1404 Extended
EX_EXP_LTA = "EHS: Agent (LTA)
EX_EXP_STE = "EHS: Exposure (STE)
EXCEPTIONS
NO_OBJECTS = 1 NOTHING_FOUND = 2 ENDDA_BEFORE_BEGDA = 3
IMPORTING Parameters details for EHS_FIND_AGENTS
IM_BEGDA -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
IM_ENDDA -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for EHS_FIND_AGENTS
IM_OBJECTS - Org. Management: Table of Object Entries
Data type: OBJEC_TOptional: No
Call by Reference: Yes
IM_STRUC - Org. Management: Table of Structure Entries
Data type: STRUC_TOptional: No
Call by Reference: Yes
EX_AGENTS_1403 - EHS: Info Category 1403 Extended
Data type: EHS00Y_1403Optional: Yes
Call by Reference: Yes
EX_AGENTS_1404 - EHS: Info Category 1404 Extended
Data type: EHS00Y_1404Optional: Yes
Call by Reference: Yes
EX_EXP_LTA - EHS: Agent (LTA)
Data type: EHS00Y_EXPLTAOptional: No
Call by Reference: Yes
EX_EXP_STE - EHS: Exposure (STE)
Data type: EHS00Y_EXPSTEOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_OBJECTS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOTHING_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENDDA_BEFORE_BEGDA -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for EHS_FIND_AGENTS 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_im_begda | TYPE SY-DATUM, " SY-DATUM | |||
lt_im_objects | TYPE STANDARD TABLE OF OBJEC_T, " | |||
lv_no_objects | TYPE OBJEC_T, " | |||
lv_im_endda | TYPE SY-DATUM, " SY-DATUM | |||
lt_im_struc | TYPE STANDARD TABLE OF STRUC_T, " | |||
lv_nothing_found | TYPE STRUC_T, " | |||
lt_ex_agents_1403 | TYPE STANDARD TABLE OF EHS00Y_1403, " | |||
lv_endda_before_begda | TYPE EHS00Y_1403, " | |||
lt_ex_agents_1404 | TYPE STANDARD TABLE OF EHS00Y_1404, " | |||
lt_ex_exp_lta | TYPE STANDARD TABLE OF EHS00Y_EXPLTA, " | |||
lt_ex_exp_ste | TYPE STANDARD TABLE OF EHS00Y_EXPSTE. " |
  CALL FUNCTION 'EHS_FIND_AGENTS' " |
EXPORTING | ||
IM_BEGDA | = lv_im_begda | |
IM_ENDDA | = lv_im_endda | |
TABLES | ||
IM_OBJECTS | = lt_im_objects | |
IM_STRUC | = lt_im_struc | |
EX_AGENTS_1403 | = lt_ex_agents_1403 | |
EX_AGENTS_1404 | = lt_ex_agents_1404 | |
EX_EXP_LTA | = lt_ex_exp_lta | |
EX_EXP_STE | = lt_ex_exp_ste | |
EXCEPTIONS | ||
NO_OBJECTS = 1 | ||
NOTHING_FOUND = 2 | ||
ENDDA_BEFORE_BEGDA = 3 | ||
. " EHS_FIND_AGENTS |
ABAP code using 7.40 inline data declarations to call FM EHS_FIND_AGENTS
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 DATUM FROM SY INTO @DATA(ld_im_begda). | ||||
DATA(ld_im_begda) | = SY-DATUM. | |||
"SELECT single DATUM FROM SY INTO @DATA(ld_im_endda). | ||||
DATA(ld_im_endda) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects