EHS_FIND_EXPOSURE_REL_PROT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name EHS_FIND_EXPOSURE_REL_PROT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
EHS00PPROT
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'EHS_FIND_EXPOSURE_REL_PROT' "
EXPORTING
im_pernr = " e1p0002-pernr Personnel Number
* im_begda = SY-DATUM " begda
* im_endda = SY-DATUM " endda
* im_flag_get_struc = 'X' "
* im_reason = 'X' " c
IMPORTING
ex_protocols = " ehspp_tbl_protocols
ex_reasons = " ehspp_tbl_reasons
TABLES
* result_tab = " swhactor
* result_objec = " objec_t Org. Management: Table of Object Entries
* result_struc = " struc_t Org. Management: Table of Structure Entries
* ex_agents_1403 = " ehs00y_1403 EHS: Info Category 1403 Extended
* ex_agents_1404 = " ehs00y_1404 EHS: Info Category 1403 Extended
* ex_exp_lta = " ehs00y_explta EHS: Agent (LTA)
* ex_exp_ste = " ehs00y_expste EHS: Exposure (STE)
* ex_exp_lta_nrd = " ehs00y_explta EHS: Agent (LTA)
* ex_exp_ste_nrd = " ehs00y_expste EHS: Exposure (STE)
* ex_exp_lta_res = " ehs00y_explta EHS: Agent (LTA)
* ex_exp_ste_res = " ehs00y_expste EHS: Exposure (STE)
ex_exp_persprot = " ehs00persprot
EXCEPTIONS
PERNR_NOT_ALLOWED = 1 "
PERNR_NOT_EXIST = 2 "
NO_PLVAR_FOUND = 3 "
ENDDA_BEFORE_BEGDA = 4 "
. " EHS_FIND_EXPOSURE_REL_PROT
The ABAP code below is a full code listing to execute function module EHS_FIND_EXPOSURE_REL_PROT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_ex_protocols | TYPE EHSPP_TBL_PROTOCOLS , |
| ld_ex_reasons | TYPE EHSPP_TBL_REASONS , |
| it_result_tab | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_result_tab | LIKE LINE OF it_result_tab , |
| it_result_objec | TYPE STANDARD TABLE OF OBJEC_T,"TABLES PARAM |
| wa_result_objec | LIKE LINE OF it_result_objec , |
| it_result_struc | TYPE STANDARD TABLE OF STRUC_T,"TABLES PARAM |
| wa_result_struc | LIKE LINE OF it_result_struc , |
| it_ex_agents_1403 | TYPE STANDARD TABLE OF EHS00Y_1403,"TABLES PARAM |
| wa_ex_agents_1403 | LIKE LINE OF it_ex_agents_1403 , |
| it_ex_agents_1404 | TYPE STANDARD TABLE OF EHS00Y_1404,"TABLES PARAM |
| wa_ex_agents_1404 | LIKE LINE OF it_ex_agents_1404 , |
| it_ex_exp_lta | TYPE STANDARD TABLE OF EHS00Y_EXPLTA,"TABLES PARAM |
| wa_ex_exp_lta | LIKE LINE OF it_ex_exp_lta , |
| it_ex_exp_ste | TYPE STANDARD TABLE OF EHS00Y_EXPSTE,"TABLES PARAM |
| wa_ex_exp_ste | LIKE LINE OF it_ex_exp_ste , |
| it_ex_exp_lta_nrd | TYPE STANDARD TABLE OF EHS00Y_EXPLTA,"TABLES PARAM |
| wa_ex_exp_lta_nrd | LIKE LINE OF it_ex_exp_lta_nrd , |
| it_ex_exp_ste_nrd | TYPE STANDARD TABLE OF EHS00Y_EXPSTE,"TABLES PARAM |
| wa_ex_exp_ste_nrd | LIKE LINE OF it_ex_exp_ste_nrd , |
| it_ex_exp_lta_res | TYPE STANDARD TABLE OF EHS00Y_EXPLTA,"TABLES PARAM |
| wa_ex_exp_lta_res | LIKE LINE OF it_ex_exp_lta_res , |
| it_ex_exp_ste_res | TYPE STANDARD TABLE OF EHS00Y_EXPSTE,"TABLES PARAM |
| wa_ex_exp_ste_res | LIKE LINE OF it_ex_exp_ste_res , |
| it_ex_exp_persprot | TYPE STANDARD TABLE OF EHS00PERSPROT,"TABLES PARAM |
| wa_ex_exp_persprot | LIKE LINE OF it_ex_exp_persprot . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_ex_protocols | TYPE EHSPP_TBL_PROTOCOLS , |
| ld_im_pernr | TYPE E1P0002-PERNR , |
| it_result_tab | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_result_tab | LIKE LINE OF it_result_tab, |
| ld_ex_reasons | TYPE EHSPP_TBL_REASONS , |
| ld_im_begda | TYPE BEGDA , |
| it_result_objec | TYPE STANDARD TABLE OF OBJEC_T , |
| wa_result_objec | LIKE LINE OF it_result_objec, |
| ld_im_endda | TYPE ENDDA , |
| it_result_struc | TYPE STANDARD TABLE OF STRUC_T , |
| wa_result_struc | LIKE LINE OF it_result_struc, |
| ld_im_flag_get_struc | TYPE STRING , |
| it_ex_agents_1403 | TYPE STANDARD TABLE OF EHS00Y_1403 , |
| wa_ex_agents_1403 | LIKE LINE OF it_ex_agents_1403, |
| it_ex_agents_1404 | TYPE STANDARD TABLE OF EHS00Y_1404 , |
| wa_ex_agents_1404 | LIKE LINE OF it_ex_agents_1404, |
| ld_im_reason | TYPE C , |
| it_ex_exp_lta | TYPE STANDARD TABLE OF EHS00Y_EXPLTA , |
| wa_ex_exp_lta | LIKE LINE OF it_ex_exp_lta, |
| it_ex_exp_ste | TYPE STANDARD TABLE OF EHS00Y_EXPSTE , |
| wa_ex_exp_ste | LIKE LINE OF it_ex_exp_ste, |
| it_ex_exp_lta_nrd | TYPE STANDARD TABLE OF EHS00Y_EXPLTA , |
| wa_ex_exp_lta_nrd | LIKE LINE OF it_ex_exp_lta_nrd, |
| it_ex_exp_ste_nrd | TYPE STANDARD TABLE OF EHS00Y_EXPSTE , |
| wa_ex_exp_ste_nrd | LIKE LINE OF it_ex_exp_ste_nrd, |
| it_ex_exp_lta_res | TYPE STANDARD TABLE OF EHS00Y_EXPLTA , |
| wa_ex_exp_lta_res | LIKE LINE OF it_ex_exp_lta_res, |
| it_ex_exp_ste_res | TYPE STANDARD TABLE OF EHS00Y_EXPSTE , |
| wa_ex_exp_ste_res | LIKE LINE OF it_ex_exp_ste_res, |
| it_ex_exp_persprot | TYPE STANDARD TABLE OF EHS00PERSPROT , |
| wa_ex_exp_persprot | LIKE LINE OF it_ex_exp_persprot. |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name EHS_FIND_EXPOSURE_REL_PROT or its description.