SAP ADRT10_READ_WHGBE Function Module for Determine Inventory Group
ADRT10_READ_WHGBE is a standard adrt10 read whgbe SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Inventory Group 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 adrt10 read whgbe FM, simply by entering the name ADRT10_READ_WHGBE into the relevant SAP transaction such as SE37 or SE38.
Function Group: ADRT10
Program Name: SAPLADRT10
Main Program: SAPLADRT10
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ADRT10_READ_WHGBE 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 'ADRT10_READ_WHGBE'"Determine Inventory Group.
EXPORTING
* IV_LGORT = "
IV_LGGRP = "Inventory Group ID ( rotable control)
IV_WERKS = "Plant
* IV_BWTAR = "Material Master View on Valuation Records
IMPORTING
EV_WHGBE = "Priolist : Key for rotable inventory group
ES_WHGRPHD = "Definiton of Warehouse groups ( master data )
TABLES
* T_IVGROUP = "Defines Warehouse Pools (Links Storg. Loc to Group)
EXCEPTIONS
WRONG_INPUT = 1 WHGROUP_NOT_FOUND = 2 LGORT_NOT_ASSIGNED = 3 WRONG_GROUPTYPE = 4
IMPORTING Parameters details for ADRT10_READ_WHGBE
IV_LGORT -
Data type: MARD-LGORTOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_LGGRP - Inventory Group ID ( rotable control)
Data type: ADPMWHGRPHD-LGGRPOptional: No
Call by Reference: No ( called with pass by value option)
IV_WERKS - Plant
Data type: ADPMWHGRPHD-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
IV_BWTAR - Material Master View on Valuation Records
Data type: BWTAR_DOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ADRT10_READ_WHGBE
EV_WHGBE - Priolist : Key for rotable inventory group
Data type: ADPMWHGRPHD-WHGBEOptional: No
Call by Reference: No ( called with pass by value option)
ES_WHGRPHD - Definiton of Warehouse groups ( master data )
Data type: ADPMWHGRPHDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ADRT10_READ_WHGBE
T_IVGROUP - Defines Warehouse Pools (Links Storg. Loc to Group)
Data type: ADPMIVROTSUBOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
WRONG_INPUT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WHGROUP_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LGORT_NOT_ASSIGNED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_GROUPTYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ADRT10_READ_WHGBE 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_ev_whgbe | TYPE ADPMWHGRPHD-WHGBE, " | |||
| lv_iv_lgort | TYPE MARD-LGORT, " | |||
| lt_t_ivgroup | TYPE STANDARD TABLE OF ADPMIVROTSUB, " | |||
| lv_wrong_input | TYPE ADPMIVROTSUB, " | |||
| lv_iv_lggrp | TYPE ADPMWHGRPHD-LGGRP, " | |||
| lv_es_whgrphd | TYPE ADPMWHGRPHD, " | |||
| lv_whgroup_not_found | TYPE ADPMWHGRPHD, " | |||
| lv_iv_werks | TYPE ADPMWHGRPHD-WERKS, " | |||
| lv_lgort_not_assigned | TYPE ADPMWHGRPHD, " | |||
| lv_iv_bwtar | TYPE BWTAR_D, " | |||
| lv_wrong_grouptype | TYPE BWTAR_D. " |
|   CALL FUNCTION 'ADRT10_READ_WHGBE' "Determine Inventory Group |
| EXPORTING | ||
| IV_LGORT | = lv_iv_lgort | |
| IV_LGGRP | = lv_iv_lggrp | |
| IV_WERKS | = lv_iv_werks | |
| IV_BWTAR | = lv_iv_bwtar | |
| IMPORTING | ||
| EV_WHGBE | = lv_ev_whgbe | |
| ES_WHGRPHD | = lv_es_whgrphd | |
| TABLES | ||
| T_IVGROUP | = lt_t_ivgroup | |
| EXCEPTIONS | ||
| WRONG_INPUT = 1 | ||
| WHGROUP_NOT_FOUND = 2 | ||
| LGORT_NOT_ASSIGNED = 3 | ||
| WRONG_GROUPTYPE = 4 | ||
| . " ADRT10_READ_WHGBE | ||
ABAP code using 7.40 inline data declarations to call FM ADRT10_READ_WHGBE
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 WHGBE FROM ADPMWHGRPHD INTO @DATA(ld_ev_whgbe). | ||||
| "SELECT single LGORT FROM MARD INTO @DATA(ld_iv_lgort). | ||||
| "SELECT single LGGRP FROM ADPMWHGRPHD INTO @DATA(ld_iv_lggrp). | ||||
| "SELECT single WERKS FROM ADPMWHGRPHD INTO @DATA(ld_iv_werks). | ||||
Search for further information about these or an SAP related objects