SAP RV_GET_DOCUMENT_TYPE Function Module for NOTRANSL: Ermittelt Vertriebsbelegart und Bezeichnung
RV_GET_DOCUMENT_TYPE is a standard rv get document type 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: Ermittelt Vertriebsbelegart und Bezeichnung 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 rv get document type FM, simply by entering the name RV_GET_DOCUMENT_TYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: V05Z
Program Name: SAPLV05Z
Main Program:
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RV_GET_DOCUMENT_TYPE 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 'RV_GET_DOCUMENT_TYPE'"NOTRANSL: Ermittelt Vertriebsbelegart und Bezeichnung.
EXPORTING
* POSNR = '000000' "
VBELN = "
* VBTYP = ' ' "
IMPORTING
KOPF_WA = "
POS_WA = "
EXCEPTIONS
NO_LIKP = 1 NO_VBUK = 10 NO_LIPS = 2 NO_MSEG = 3 NO_VBAK = 4 NO_VBAP = 5 NO_VBBK = 6 NO_VBEP = 7 NO_VBRK = 8 NO_VBRP = 9
IMPORTING Parameters details for RV_GET_DOCUMENT_TYPE
POSNR -
Data type: VBAP-POSNRDefault: '000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VBELN -
Data type: VBUK-VBELNOptional: No
Call by Reference: No ( called with pass by value option)
VBTYP -
Data type: VBUK-VBTYPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RV_GET_DOCUMENT_TYPE
KOPF_WA -
Data type: VBKOPOptional: No
Call by Reference: No ( called with pass by value option)
POS_WA -
Data type: VBPOSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_LIKP -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBUK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_LIPS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_MSEG -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBAK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBAP -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBBK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBEP -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBRK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VBRP -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RV_GET_DOCUMENT_TYPE 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_posnr | TYPE VBAP-POSNR, " '000000' | |||
| lv_kopf_wa | TYPE VBKOP, " | |||
| lv_no_likp | TYPE VBKOP, " | |||
| lv_no_vbuk | TYPE VBKOP, " | |||
| lv_vbeln | TYPE VBUK-VBELN, " | |||
| lv_pos_wa | TYPE VBPOS, " | |||
| lv_no_lips | TYPE VBPOS, " | |||
| lv_vbtyp | TYPE VBUK-VBTYP, " ' ' | |||
| lv_no_mseg | TYPE VBUK, " | |||
| lv_no_vbak | TYPE VBUK, " | |||
| lv_no_vbap | TYPE VBUK, " | |||
| lv_no_vbbk | TYPE VBUK, " | |||
| lv_no_vbep | TYPE VBUK, " | |||
| lv_no_vbrk | TYPE VBUK, " | |||
| lv_no_vbrp | TYPE VBUK. " |
|   CALL FUNCTION 'RV_GET_DOCUMENT_TYPE' "NOTRANSL: Ermittelt Vertriebsbelegart und Bezeichnung |
| EXPORTING | ||
| POSNR | = lv_posnr | |
| VBELN | = lv_vbeln | |
| VBTYP | = lv_vbtyp | |
| IMPORTING | ||
| KOPF_WA | = lv_kopf_wa | |
| POS_WA | = lv_pos_wa | |
| EXCEPTIONS | ||
| NO_LIKP = 1 | ||
| NO_VBUK = 10 | ||
| NO_LIPS = 2 | ||
| NO_MSEG = 3 | ||
| NO_VBAK = 4 | ||
| NO_VBAP = 5 | ||
| NO_VBBK = 6 | ||
| NO_VBEP = 7 | ||
| NO_VBRK = 8 | ||
| NO_VBRP = 9 | ||
| . " RV_GET_DOCUMENT_TYPE | ||
ABAP code using 7.40 inline data declarations to call FM RV_GET_DOCUMENT_TYPE
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 POSNR FROM VBAP INTO @DATA(ld_posnr). | ||||
| DATA(ld_posnr) | = '000000'. | |||
| "SELECT single VBELN FROM VBUK INTO @DATA(ld_vbeln). | ||||
| "SELECT single VBTYP FROM VBUK INTO @DATA(ld_vbtyp). | ||||
| DATA(ld_vbtyp) | = ' '. | |||
Search for further information about these or an SAP related objects