SAP CVAPI_DOC_GETDETAIL Function Module for NOTRANSL: DVS: Detaildaten eines Dokuments ermitteln









CVAPI_DOC_GETDETAIL is a standard cvapi doc getdetail 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: DVS: Detaildaten eines Dokuments ermitteln 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 cvapi doc getdetail FM, simply by entering the name CVAPI_DOC_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: CVAPI01
Program Name: SAPLCVAPI01
Main Program: SAPLCVAPI01
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function CVAPI_DOC_GETDETAIL 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 'CVAPI_DOC_GETDETAIL'"NOTRANSL: DVS: Detaildaten eines Dokuments ermitteln
EXPORTING
* PF_BATCHMODE = ' ' "Aufruf im Batch (ohne GUI)
* PF_READ_COMP = ' ' "Ermittle Komponenten
* PF_READ_KPRO = 'X' "Ermittle KPRO-Daten
* PF_READ_DRAT = 'X' "Ermittle Beschreibungen
* PF_BAPI_CALL = "
* PF_HOSTNAME = ' ' "Rechnername des Frontends
PF_DOKAR = "Dokumentart
PF_DOKNR = "Dokumentnummer
PF_DOKVR = "Dokumentversion
PF_DOKTL = "Teilldokument
* PF_READ_DRAD = ' ' "Lese Objektverknüpfungen
* PF_READ_DRAP = ' ' "Lese Statusprotokoll
* PF_ACTIVE_FILES = ' ' "Ermittle nur aktive Originale

IMPORTING
PSX_DRAW = "Dokumentdaten
PFX_DESCRIPTION = "Beschreibung Dokument (Anmeldesprache)

TABLES
* PT_FILES = "Originale
* PT_COMP = "Komponenten
* PT_DRAP = "Statusprotokoll
* PT_DRAD = "Mandant
* PT_DRAT = "Kurztexte

EXCEPTIONS
NOT_FOUND = 1 NO_AUTH = 2 ERROR = 3
.



IMPORTING Parameters details for CVAPI_DOC_GETDETAIL

PF_BATCHMODE - Aufruf im Batch (ohne GUI)

Data type: MCDOK-ACTION
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_READ_COMP - Ermittle Komponenten

Data type: MCDOK-ACTION
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_READ_KPRO - Ermittle KPRO-Daten

Data type: MCDOK-ACTION
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_READ_DRAT - Ermittle Beschreibungen

Data type: MCDOK-ACTION
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_BAPI_CALL -

Data type: MCDOK-ACTION
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_HOSTNAME - Rechnername des Frontends

Data type: TDWD-NTADR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_DOKAR - Dokumentart

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

PF_DOKNR - Dokumentnummer

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

PF_DOKVR - Dokumentversion

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

PF_DOKTL - Teilldokument

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

PF_READ_DRAD - Lese Objektverknüpfungen

Data type: MCDOK-ACTION
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_READ_DRAP - Lese Statusprotokoll

Data type: MCDOK-ACTION
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PF_ACTIVE_FILES - Ermittle nur aktive Originale

Data type: MCDOK-ACTION
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CVAPI_DOC_GETDETAIL

PSX_DRAW - Dokumentdaten

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

PFX_DESCRIPTION - Beschreibung Dokument (Anmeldesprache)

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

TABLES Parameters details for CVAPI_DOC_GETDETAIL

PT_FILES - Originale

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

PT_COMP - Komponenten

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

PT_DRAP - Statusprotokoll

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

PT_DRAD - Mandant

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

PT_DRAT - Kurztexte

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

EXCEPTIONS details

NOT_FOUND - Dokument nicht vorhanden

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

NO_AUTH - Keine Berechtigung

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

ERROR - Fehler

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

Copy and paste ABAP code example for CVAPI_DOC_GETDETAIL 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_psx_draw  TYPE DRAW, "   
lt_pt_files  TYPE STANDARD TABLE OF CVAPI_DOC_FILE, "   
lv_not_found  TYPE CVAPI_DOC_FILE, "   
lv_pf_batchmode  TYPE MCDOK-ACTION, "   SPACE
lv_pf_read_comp  TYPE MCDOK-ACTION, "   SPACE
lv_pf_read_kpro  TYPE MCDOK-ACTION, "   'X'
lv_pf_read_drat  TYPE MCDOK-ACTION, "   'X'
lv_pf_bapi_call  TYPE MCDOK-ACTION, "   
lv_no_auth  TYPE MCDOK, "   
lt_pt_comp  TYPE STANDARD TABLE OF CVAPI_DOC_COMP, "   
lv_pf_hostname  TYPE TDWD-NTADR, "   SPACE
lv_pfx_description  TYPE DRAT-DKTXT, "   
lv_error  TYPE DRAT, "   
lt_pt_drap  TYPE STANDARD TABLE OF DRAP, "   
lv_pf_dokar  TYPE DRAW-DOKAR, "   
lt_pt_drad  TYPE STANDARD TABLE OF DRAD, "   
lv_pf_doknr  TYPE DRAW-DOKNR, "   
lt_pt_drat  TYPE STANDARD TABLE OF DRAT, "   
lv_pf_dokvr  TYPE DRAW-DOKVR, "   
lv_pf_doktl  TYPE DRAW-DOKTL, "   
lv_pf_read_drad  TYPE MCDOK-ACTION, "   SPACE
lv_pf_read_drap  TYPE MCDOK-ACTION, "   SPACE
lv_pf_active_files  TYPE MCDOK-ACTION. "   SPACE

  CALL FUNCTION 'CVAPI_DOC_GETDETAIL'  "NOTRANSL: DVS: Detaildaten eines Dokuments ermitteln
    EXPORTING
         PF_BATCHMODE = lv_pf_batchmode
         PF_READ_COMP = lv_pf_read_comp
         PF_READ_KPRO = lv_pf_read_kpro
         PF_READ_DRAT = lv_pf_read_drat
         PF_BAPI_CALL = lv_pf_bapi_call
         PF_HOSTNAME = lv_pf_hostname
         PF_DOKAR = lv_pf_dokar
         PF_DOKNR = lv_pf_doknr
         PF_DOKVR = lv_pf_dokvr
         PF_DOKTL = lv_pf_doktl
         PF_READ_DRAD = lv_pf_read_drad
         PF_READ_DRAP = lv_pf_read_drap
         PF_ACTIVE_FILES = lv_pf_active_files
    IMPORTING
         PSX_DRAW = lv_psx_draw
         PFX_DESCRIPTION = lv_pfx_description
    TABLES
         PT_FILES = lt_pt_files
         PT_COMP = lt_pt_comp
         PT_DRAP = lt_pt_drap
         PT_DRAD = lt_pt_drad
         PT_DRAT = lt_pt_drat
    EXCEPTIONS
        NOT_FOUND = 1
        NO_AUTH = 2
        ERROR = 3
. " CVAPI_DOC_GETDETAIL




ABAP code using 7.40 inline data declarations to call FM CVAPI_DOC_GETDETAIL

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 ACTION FROM MCDOK INTO @DATA(ld_pf_batchmode).
DATA(ld_pf_batchmode) = ' '.
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_read_comp).
DATA(ld_pf_read_comp) = ' '.
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_read_kpro).
DATA(ld_pf_read_kpro) = 'X'.
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_read_drat).
DATA(ld_pf_read_drat) = 'X'.
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_bapi_call).
 
 
 
"SELECT single NTADR FROM TDWD INTO @DATA(ld_pf_hostname).
DATA(ld_pf_hostname) = ' '.
 
"SELECT single DKTXT FROM DRAT INTO @DATA(ld_pfx_description).
 
 
 
"SELECT single DOKAR FROM DRAW INTO @DATA(ld_pf_dokar).
 
 
"SELECT single DOKNR FROM DRAW INTO @DATA(ld_pf_doknr).
 
 
"SELECT single DOKVR FROM DRAW INTO @DATA(ld_pf_dokvr).
 
"SELECT single DOKTL FROM DRAW INTO @DATA(ld_pf_doktl).
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_read_drad).
DATA(ld_pf_read_drad) = ' '.
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_read_drap).
DATA(ld_pf_read_drap) = ' '.
 
"SELECT single ACTION FROM MCDOK INTO @DATA(ld_pf_active_files).
DATA(ld_pf_active_files) = ' '.
 


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!