SAP ADRT10_GET_RESB_QTY Function Module for Get Reservation Qty for CMC
ADRT10_GET_RESB_QTY is a standard adrt10 get resb qty SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Reservation Qty for CMC 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 get resb qty FM, simply by entering the name ADRT10_GET_RESB_QTY 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_GET_RESB_QTY 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_GET_RESB_QTY'"Get Reservation Qty for CMC.
EXPORTING
IV_MATNR = "
* IV_KUNUM = "Customer Number
* IV_KDAUFD = "Sales Order Number
* IV_KDPOS = "Item number in Sales Order
IV_WERKS = "
* IV_LGORT = "
* IV_BERID = "MRP area
IV_LGGRP = "Storage location
* IV_BWTAR = "Valuation type
IS_ADPMPRIOPRF = "Component Maintenance Cockpit Profile
* IV_PSPEL = "Work breakdown structure element (WBS element)
* IV_SOBKZ = "Special stock indicator
IMPORTING
ES_RESBQTY_MAT = "
ES_RESBQTY_FFF = "
ES_RESBQTY_SET = "
TABLES
* T_MDRS = "Generated table for view MDRS
EXCEPTIONS
WRONG_INPUT = 1 WHGROUP_NOT_FOUND = 2 NOT_CW_WHGROUP = 3 MATERIAL_NOT_FOUND = 4 PROFILE_NOT_FOUND = 5 IVGROUP_NOT_FOUND = 6 CUSTOMIZING_ERROR = 7 CLASSIFICATION_NOT_FOUND = 8
IMPORTING Parameters details for ADRT10_GET_RESB_QTY
IV_MATNR -
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
IV_KUNUM - Customer Number
Data type: CAUFVD-KUNUMOptional: Yes
Call by Reference: Yes
IV_KDAUFD - Sales Order Number
Data type: CAUFVD-KDAUF_AUFKOptional: Yes
Call by Reference: Yes
IV_KDPOS - Item number in Sales Order
Data type: CAUFVD-KDPOS_AUFKOptional: Yes
Call by Reference: Yes
IV_WERKS -
Data type: MARC-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
IV_LGORT -
Data type: MARD-LGORTOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_BERID - MRP area
Data type: BERIDOptional: Yes
Call by Reference: Yes
IV_LGGRP - Storage location
Data type: ADPMWHGRPHD-LGGRPOptional: No
Call by Reference: Yes
IV_BWTAR - Valuation type
Data type: BWTAR_DOptional: Yes
Call by Reference: Yes
IS_ADPMPRIOPRF - Component Maintenance Cockpit Profile
Data type: ADPMPRIOPRFOptional: No
Call by Reference: Yes
IV_PSPEL - Work breakdown structure element (WBS element)
Data type: CAUFVD-PSPELOptional: Yes
Call by Reference: Yes
IV_SOBKZ - Special stock indicator
Data type: MDPS-SOBKZOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ADRT10_GET_RESB_QTY
ES_RESBQTY_MAT -
Data type: S094-MNG02Optional: No
Call by Reference: No ( called with pass by value option)
ES_RESBQTY_FFF -
Data type: S094-MNG02Optional: No
Call by Reference: No ( called with pass by value option)
ES_RESBQTY_SET -
Data type: S094-MNG02Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ADRT10_GET_RESB_QTY
T_MDRS - Generated table for view MDRS
Data type: MDRSOptional: 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)
NOT_CW_WHGROUP -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MATERIAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
PROFILE_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
IVGROUP_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
CUSTOMIZING_ERROR -
Data type:Optional: No
Call by Reference: Yes
CLASSIFICATION_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ADRT10_GET_RESB_QTY 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: | ||||
| lt_t_mdrs | TYPE STANDARD TABLE OF MDRS, " | |||
| lv_iv_matnr | TYPE MARA-MATNR, " | |||
| lv_wrong_input | TYPE MARA, " | |||
| lv_es_resbqty_mat | TYPE S094-MNG02, " | |||
| lv_iv_kunum | TYPE CAUFVD-KUNUM, " | |||
| lv_iv_kdaufd | TYPE CAUFVD-KDAUF_AUFK, " | |||
| lv_iv_kdpos | TYPE CAUFVD-KDPOS_AUFK, " | |||
| lv_iv_werks | TYPE MARC-WERKS, " | |||
| lv_es_resbqty_fff | TYPE S094-MNG02, " | |||
| lv_whgroup_not_found | TYPE S094, " | |||
| lv_iv_lgort | TYPE MARD-LGORT, " | |||
| lv_es_resbqty_set | TYPE S094-MNG02, " | |||
| lv_not_cw_whgroup | TYPE S094, " | |||
| lv_iv_berid | TYPE BERID, " | |||
| lv_material_not_found | TYPE BERID, " | |||
| lv_iv_lggrp | TYPE ADPMWHGRPHD-LGGRP, " | |||
| lv_profile_not_found | TYPE ADPMWHGRPHD, " | |||
| lv_iv_bwtar | TYPE BWTAR_D, " | |||
| lv_ivgroup_not_found | TYPE BWTAR_D, " | |||
| lv_is_adpmprioprf | TYPE ADPMPRIOPRF, " | |||
| lv_customizing_error | TYPE ADPMPRIOPRF, " | |||
| lv_iv_pspel | TYPE CAUFVD-PSPEL, " | |||
| lv_classification_not_found | TYPE CAUFVD, " | |||
| lv_iv_sobkz | TYPE MDPS-SOBKZ. " |
|   CALL FUNCTION 'ADRT10_GET_RESB_QTY' "Get Reservation Qty for CMC |
| EXPORTING | ||
| IV_MATNR | = lv_iv_matnr | |
| IV_KUNUM | = lv_iv_kunum | |
| IV_KDAUFD | = lv_iv_kdaufd | |
| IV_KDPOS | = lv_iv_kdpos | |
| IV_WERKS | = lv_iv_werks | |
| IV_LGORT | = lv_iv_lgort | |
| IV_BERID | = lv_iv_berid | |
| IV_LGGRP | = lv_iv_lggrp | |
| IV_BWTAR | = lv_iv_bwtar | |
| IS_ADPMPRIOPRF | = lv_is_adpmprioprf | |
| IV_PSPEL | = lv_iv_pspel | |
| IV_SOBKZ | = lv_iv_sobkz | |
| IMPORTING | ||
| ES_RESBQTY_MAT | = lv_es_resbqty_mat | |
| ES_RESBQTY_FFF | = lv_es_resbqty_fff | |
| ES_RESBQTY_SET | = lv_es_resbqty_set | |
| TABLES | ||
| T_MDRS | = lt_t_mdrs | |
| EXCEPTIONS | ||
| WRONG_INPUT = 1 | ||
| WHGROUP_NOT_FOUND = 2 | ||
| NOT_CW_WHGROUP = 3 | ||
| MATERIAL_NOT_FOUND = 4 | ||
| PROFILE_NOT_FOUND = 5 | ||
| IVGROUP_NOT_FOUND = 6 | ||
| CUSTOMIZING_ERROR = 7 | ||
| CLASSIFICATION_NOT_FOUND = 8 | ||
| . " ADRT10_GET_RESB_QTY | ||
ABAP code using 7.40 inline data declarations to call FM ADRT10_GET_RESB_QTY
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 MATNR FROM MARA INTO @DATA(ld_iv_matnr). | ||||
| "SELECT single MNG02 FROM S094 INTO @DATA(ld_es_resbqty_mat). | ||||
| "SELECT single KUNUM FROM CAUFVD INTO @DATA(ld_iv_kunum). | ||||
| "SELECT single KDAUF_AUFK FROM CAUFVD INTO @DATA(ld_iv_kdaufd). | ||||
| "SELECT single KDPOS_AUFK FROM CAUFVD INTO @DATA(ld_iv_kdpos). | ||||
| "SELECT single WERKS FROM MARC INTO @DATA(ld_iv_werks). | ||||
| "SELECT single MNG02 FROM S094 INTO @DATA(ld_es_resbqty_fff). | ||||
| "SELECT single LGORT FROM MARD INTO @DATA(ld_iv_lgort). | ||||
| "SELECT single MNG02 FROM S094 INTO @DATA(ld_es_resbqty_set). | ||||
| "SELECT single LGGRP FROM ADPMWHGRPHD INTO @DATA(ld_iv_lggrp). | ||||
| "SELECT single PSPEL FROM CAUFVD INTO @DATA(ld_iv_pspel). | ||||
| "SELECT single SOBKZ FROM MDPS INTO @DATA(ld_iv_sobkz). | ||||
Search for further information about these or an SAP related objects