SAP QVDM_READ Function Module for QM control in SD; read QVDMs for customer and sales organization
QVDM_READ is a standard qvdm read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for QM control in SD; read QVDMs for customer and sales organization 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 qvdm read FM, simply by entering the name QVDM_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: QVDM
Program Name: SAPLQVDM
Main Program: SAPLQVDM
Appliation area: Q
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QVDM_READ 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 'QVDM_READ'"QM control in SD; read QVDMs for customer and sales organization.
EXPORTING
I_KUNNR = "Customer number
I_MATNR = "Material number
I_VKORG = "Sales organization
* I_REVLV = ' ' "
* I_BYPASS_BUFFER = 'X' "
IMPORTING
E_QVDM = "QVDM work area
EXCEPTIONS
NO_DATA = 1 NO_KUNNR = 2 NO_VKORG = 3
IMPORTING Parameters details for QVDM_READ
I_KUNNR - Customer number
Data type: QVDM-KUNNROptional: No
Call by Reference: No ( called with pass by value option)
I_MATNR - Material number
Data type: QVDM-MATNROptional: No
Call by Reference: No ( called with pass by value option)
I_VKORG - Sales organization
Data type: QVDM-VKORGOptional: No
Call by Reference: No ( called with pass by value option)
I_REVLV -
Data type: QVDM_KEY-REVLVDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BYPASS_BUFFER -
Data type: QALS-STAT01Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for QVDM_READ
E_QVDM - QVDM work area
Data type: QVDMOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_DATA - No QVDM records found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_KUNNR - Customer number is blank or 0
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VKORG - Sales organization is blank or 0
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for QVDM_READ 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_qvdm | TYPE QVDM, " | |||
| lv_i_kunnr | TYPE QVDM-KUNNR, " | |||
| lv_no_data | TYPE QVDM, " | |||
| lv_i_matnr | TYPE QVDM-MATNR, " | |||
| lv_no_kunnr | TYPE QVDM, " | |||
| lv_i_vkorg | TYPE QVDM-VKORG, " | |||
| lv_no_vkorg | TYPE QVDM, " | |||
| lv_i_revlv | TYPE QVDM_KEY-REVLV, " ' ' | |||
| lv_i_bypass_buffer | TYPE QALS-STAT01. " 'X' |
|   CALL FUNCTION 'QVDM_READ' "QM control in SD; read QVDMs for customer and sales organization |
| EXPORTING | ||
| I_KUNNR | = lv_i_kunnr | |
| I_MATNR | = lv_i_matnr | |
| I_VKORG | = lv_i_vkorg | |
| I_REVLV | = lv_i_revlv | |
| I_BYPASS_BUFFER | = lv_i_bypass_buffer | |
| IMPORTING | ||
| E_QVDM | = lv_e_qvdm | |
| EXCEPTIONS | ||
| NO_DATA = 1 | ||
| NO_KUNNR = 2 | ||
| NO_VKORG = 3 | ||
| . " QVDM_READ | ||
ABAP code using 7.40 inline data declarations to call FM QVDM_READ
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 KUNNR FROM QVDM INTO @DATA(ld_i_kunnr). | ||||
| "SELECT single MATNR FROM QVDM INTO @DATA(ld_i_matnr). | ||||
| "SELECT single VKORG FROM QVDM INTO @DATA(ld_i_vkorg). | ||||
| "SELECT single REVLV FROM QVDM_KEY INTO @DATA(ld_i_revlv). | ||||
| DATA(ld_i_revlv) | = ' '. | |||
| "SELECT single STAT01 FROM QALS INTO @DATA(ld_i_bypass_buffer). | ||||
| DATA(ld_i_bypass_buffer) | = 'X'. | |||
Search for further information about these or an SAP related objects