SAP MDRDA_READ_MDRD_SINGLE Function Module for NOTRANSL: Lesen Belieferungsbeziehung für Lieferwerk/Warengruppe/Material









MDRDA_READ_MDRD_SINGLE is a standard mdrda read mdrd single SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Lesen Belieferungsbeziehung für Lieferwerk/Warengruppe/Material 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 mdrda read mdrd single FM, simply by entering the name MDRDA_READ_MDRD_SINGLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MDRDA
Program Name: SAPLMDRDA
Main Program: SAPLMDRDA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MDRDA_READ_MDRD_SINGLE 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 'MDRDA_READ_MDRD_SINGLE'"NOTRANSL: Lesen Belieferungsbeziehung für Lieferwerk/Warengruppe/Material
EXPORTING
I_RESDB = "Supplying (issuing) plant in case of stock transport order
* I_RFBUF = "Indicator: Refresh Buffer
* I_DBRES = "Indicator: Return in DB Format
* I_MATKL = "Material Group
* I_EXTWG = "External Material Group
* I_MATNR = "Material Number
I_RTYPE = "Delivery Relationship: Type of Goods Recipient
I_LEVEL = "DE-EN-LANG-SWITCH-NO-TRANSLATION
I_RFCHK = "Indicator: Determine Reference
* I_ENQUE = "Indicator: Set Lock
* I_BPBUF = 'X' "Indicator: Read Without Buffer

IMPORTING
E_CDATE = "Delivery Relationship: Creation Date
E_DDATE = "Delivery Relationship: Determination Date
E_S_CTRL = "Delivery Relationship: Control Parameters
E_S_REF_KEY = "DE-EN-LANG-SWITCH-NO-TRANSLATION

CHANGING
* CH_T_BERID = "Table of Supplied MRP Areas
* CH_T_MDRD = "Table of Recipients in DB Format
* CH_T_MDRD_EXTWG = "Table of Recipients in DB Format

EXCEPTIONS
WRONG_OR_MISSING_INPUT = 1 FOREIGN_USER_LOCK = 2 ERROR_WHEN_LOCKING = 3 ERROR_IN_REFERENCE = 4 DRD_NOT_UNIQUE = 5 DRD_NOT_EXISTING = 6
.



IMPORTING Parameters details for MDRDA_READ_MDRD_SINGLE

I_RESDB - Supplying (issuing) plant in case of stock transport order

Data type: MDRD-RESDB
Optional: No
Call by Reference: Yes

I_RFBUF - Indicator: Refresh Buffer

Data type: FLAG
Optional: Yes
Call by Reference: Yes

I_DBRES - Indicator: Return in DB Format

Data type: FLAG
Optional: Yes
Call by Reference: Yes

I_MATKL - Material Group

Data type: MDRD-MATKL
Optional: Yes
Call by Reference: Yes

I_EXTWG - External Material Group

Data type: MDRD_EXTWG-EXTWG
Optional: Yes
Call by Reference: Yes

I_MATNR - Material Number

Data type: MDRD-MATNR
Optional: Yes
Call by Reference: Yes

I_RTYPE - Delivery Relationship: Type of Goods Recipient

Data type: MDRD-RTYPE
Optional: No
Call by Reference: Yes

I_LEVEL - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: MDRD-LEVEL_M
Optional: No
Call by Reference: Yes

I_RFCHK - Indicator: Determine Reference

Data type: FLAG
Optional: No
Call by Reference: Yes

I_ENQUE - Indicator: Set Lock

Data type: FLAG
Optional: Yes
Call by Reference: Yes

I_BPBUF - Indicator: Read Without Buffer

Data type: FLAG
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for MDRDA_READ_MDRD_SINGLE

E_CDATE - Delivery Relationship: Creation Date

Data type: MDRD-CDATE
Optional: No
Call by Reference: Yes

E_DDATE - Delivery Relationship: Determination Date

Data type: MDRD-DDATE
Optional: No
Call by Reference: Yes

E_S_CTRL - Delivery Relationship: Control Parameters

Data type: MDRD_S_CTRL
Optional: No
Call by Reference: Yes

E_S_REF_KEY - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: MDRDT_S_MDRD_REF
Optional: No
Call by Reference: Yes

CHANGING Parameters details for MDRDA_READ_MDRD_SINGLE

CH_T_BERID - Table of Supplied MRP Areas

Data type: MDRDT_T_BERID
Optional: Yes
Call by Reference: Yes

CH_T_MDRD - Table of Recipients in DB Format

Data type: MDRDT_T_MDRD
Optional: Yes
Call by Reference: Yes

CH_T_MDRD_EXTWG - Table of Recipients in DB Format

Data type: MDRDT_T_MDRD_EXTWG
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

WRONG_OR_MISSING_INPUT - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FOREIGN_USER_LOCK - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_WHEN_LOCKING - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_IN_REFERENCE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DRD_NOT_UNIQUE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DRD_NOT_EXISTING - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MDRDA_READ_MDRD_SINGLE 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_cdate  TYPE MDRD-CDATE, "   
lv_i_resdb  TYPE MDRD-RESDB, "   
lv_ch_t_berid  TYPE MDRDT_T_BERID, "   
lv_wrong_or_missing_input  TYPE MDRDT_T_BERID, "   
lv_i_rfbuf  TYPE FLAG, "   
lv_i_dbres  TYPE FLAG, "   
lv_e_ddate  TYPE MDRD-DDATE, "   
lv_i_matkl  TYPE MDRD-MATKL, "   
lv_ch_t_mdrd  TYPE MDRDT_T_MDRD, "   
lv_foreign_user_lock  TYPE MDRDT_T_MDRD, "   
lv_i_extwg  TYPE MDRD_EXTWG-EXTWG, "   
lv_e_s_ctrl  TYPE MDRD_S_CTRL, "   
lv_ch_t_mdrd_extwg  TYPE MDRDT_T_MDRD_EXTWG, "   
lv_error_when_locking  TYPE MDRDT_T_MDRD_EXTWG, "   
lv_i_matnr  TYPE MDRD-MATNR, "   
lv_e_s_ref_key  TYPE MDRDT_S_MDRD_REF, "   
lv_error_in_reference  TYPE MDRDT_S_MDRD_REF, "   
lv_i_rtype  TYPE MDRD-RTYPE, "   
lv_drd_not_unique  TYPE MDRD, "   
lv_i_level  TYPE MDRD-LEVEL_M, "   
lv_drd_not_existing  TYPE MDRD, "   
lv_i_rfchk  TYPE FLAG, "   
lv_i_enque  TYPE FLAG, "   
lv_i_bpbuf  TYPE FLAG. "   'X'

  CALL FUNCTION 'MDRDA_READ_MDRD_SINGLE'  "NOTRANSL: Lesen Belieferungsbeziehung für Lieferwerk/Warengruppe/Material
    EXPORTING
         I_RESDB = lv_i_resdb
         I_RFBUF = lv_i_rfbuf
         I_DBRES = lv_i_dbres
         I_MATKL = lv_i_matkl
         I_EXTWG = lv_i_extwg
         I_MATNR = lv_i_matnr
         I_RTYPE = lv_i_rtype
         I_LEVEL = lv_i_level
         I_RFCHK = lv_i_rfchk
         I_ENQUE = lv_i_enque
         I_BPBUF = lv_i_bpbuf
    IMPORTING
         E_CDATE = lv_e_cdate
         E_DDATE = lv_e_ddate
         E_S_CTRL = lv_e_s_ctrl
         E_S_REF_KEY = lv_e_s_ref_key
    CHANGING
         CH_T_BERID = lv_ch_t_berid
         CH_T_MDRD = lv_ch_t_mdrd
         CH_T_MDRD_EXTWG = lv_ch_t_mdrd_extwg
    EXCEPTIONS
        WRONG_OR_MISSING_INPUT = 1
        FOREIGN_USER_LOCK = 2
        ERROR_WHEN_LOCKING = 3
        ERROR_IN_REFERENCE = 4
        DRD_NOT_UNIQUE = 5
        DRD_NOT_EXISTING = 6
. " MDRDA_READ_MDRD_SINGLE




ABAP code using 7.40 inline data declarations to call FM MDRDA_READ_MDRD_SINGLE

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 CDATE FROM MDRD INTO @DATA(ld_e_cdate).
 
"SELECT single RESDB FROM MDRD INTO @DATA(ld_i_resdb).
 
 
 
 
 
"SELECT single DDATE FROM MDRD INTO @DATA(ld_e_ddate).
 
"SELECT single MATKL FROM MDRD INTO @DATA(ld_i_matkl).
 
 
 
"SELECT single EXTWG FROM MDRD_EXTWG INTO @DATA(ld_i_extwg).
 
 
 
 
"SELECT single MATNR FROM MDRD INTO @DATA(ld_i_matnr).
 
 
 
"SELECT single RTYPE FROM MDRD INTO @DATA(ld_i_rtype).
 
 
"SELECT single LEVEL_M FROM MDRD INTO @DATA(ld_i_level).
 
 
 
 
DATA(ld_i_bpbuf) = 'X'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!