SAP CVAPI_DOC_OPEN_CAD Function Module for NOTRANSL: DVS: Original im CAD öffnen









CVAPI_DOC_OPEN_CAD is a standard cvapi doc open cad 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: Original im CAD öffnen 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 open cad FM, simply by entering the name CVAPI_DOC_OPEN_CAD into the relevant SAP transaction such as SE37 or SE38.

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



Function CVAPI_DOC_OPEN_CAD 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_OPEN_CAD'"NOTRANSL: DVS: Original im CAD öffnen
EXPORTING
* PF_TCODE = 'CADI' "CADI(Einfügen)/CADV(Öffnen)
PF_DOKAR = "Dokumentart
PF_DOKNR = "Dokumentnummer
PF_DOKVR = "Dokumentversion
PF_DOKTL = "Teildokument
* PF_HOSTNAME = ' ' "Rechnername des Frontends
* PF_MSG = 'X' "Message ausgeben

IMPORTING
PFX_FILE = "temp. Dateiname für View
PFX_TCODE = "CANCEL, wenn Abbruch

EXCEPTIONS
ERROR = 1 NOT_FOUND = 2 NO_AUTH = 3 NO_ORIGINAL = 4
.



IMPORTING Parameters details for CVAPI_DOC_OPEN_CAD

PF_TCODE - CADI(Einfügen)/CADV(Öffnen)

Data type: SYST-UCOMM
Default: 'CADI'
Optional: Yes
Call by Reference: Yes

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 - Teildokument

Data type: DRAW-DOKTL
Optional: No
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_MSG - Message ausgeben

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

EXPORTING Parameters details for CVAPI_DOC_OPEN_CAD

PFX_FILE - temp. Dateiname für View

Data type: DRAW-FILEP
Optional: No
Call by Reference: Yes

PFX_TCODE - CANCEL, wenn Abbruch

Data type: SYST-UCOMM
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ERROR - allg. Fehler

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

NOT_FOUND - Dokument nicht gefunden

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)

NO_ORIGINAL - Kein Original

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

Copy and paste ABAP code example for CVAPI_DOC_OPEN_CAD 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_error  TYPE STRING, "   
lv_pfx_file  TYPE DRAW-FILEP, "   
lv_pf_tcode  TYPE SYST-UCOMM, "   'CADI'
lv_pf_dokar  TYPE DRAW-DOKAR, "   
lv_not_found  TYPE DRAW, "   
lv_pfx_tcode  TYPE SYST-UCOMM, "   
lv_no_auth  TYPE SYST, "   
lv_pf_doknr  TYPE DRAW-DOKNR, "   
lv_pf_dokvr  TYPE DRAW-DOKVR, "   
lv_no_original  TYPE DRAW, "   
lv_pf_doktl  TYPE DRAW-DOKTL, "   
lv_pf_hostname  TYPE TDWD-NTADR, "   SPACE
lv_pf_msg  TYPE C. "   'X'

  CALL FUNCTION 'CVAPI_DOC_OPEN_CAD'  "NOTRANSL: DVS: Original im CAD öffnen
    EXPORTING
         PF_TCODE = lv_pf_tcode
         PF_DOKAR = lv_pf_dokar
         PF_DOKNR = lv_pf_doknr
         PF_DOKVR = lv_pf_dokvr
         PF_DOKTL = lv_pf_doktl
         PF_HOSTNAME = lv_pf_hostname
         PF_MSG = lv_pf_msg
    IMPORTING
         PFX_FILE = lv_pfx_file
         PFX_TCODE = lv_pfx_tcode
    EXCEPTIONS
        ERROR = 1
        NOT_FOUND = 2
        NO_AUTH = 3
        NO_ORIGINAL = 4
. " CVAPI_DOC_OPEN_CAD




ABAP code using 7.40 inline data declarations to call FM CVAPI_DOC_OPEN_CAD

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 FILEP FROM DRAW INTO @DATA(ld_pfx_file).
 
"SELECT single UCOMM FROM SYST INTO @DATA(ld_pf_tcode).
DATA(ld_pf_tcode) = 'CADI'.
 
"SELECT single DOKAR FROM DRAW INTO @DATA(ld_pf_dokar).
 
 
"SELECT single UCOMM FROM SYST INTO @DATA(ld_pfx_tcode).
 
 
"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 NTADR FROM TDWD INTO @DATA(ld_pf_hostname).
DATA(ld_pf_hostname) = ' '.
 
DATA(ld_pf_msg) = '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!