SAP CV121_ECL_ADD_DOCUMENT Function Module for NOTRANSL: DVS: Dokument viewen (inline)









CV121_ECL_ADD_DOCUMENT is a standard cv121 ecl add document 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: Dokument viewen (inline) 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 cv121 ecl add document FM, simply by entering the name CV121_ECL_ADD_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.

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



Function CV121_ECL_ADD_DOCUMENT 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 'CV121_ECL_ADD_DOCUMENT'"NOTRANSL: DVS: Dokument viewen (inline)
EXPORTING
* PS_DOC_KEY = "Document Data
* PF_DAPPL = "Application
* PF_FILE = "Original of Document
* PF_URL = "URL
* PF_MIMETYPE = ' ' "HTML content type
* PF_LOIO = "ID for Documents and Relationships
* PF_PHIO = "ID for Documents and Relationships
* PF_APPNR = "Application number 1 or 2
* PF_REMOVE_FIRST = ' ' "

IMPORTING
PFX_LAYER = "Layer name

EXCEPTIONS
CNTL_ERROR = 1 ERROR = 2
.



IMPORTING Parameters details for CV121_ECL_ADD_DOCUMENT

PS_DOC_KEY - Document Data

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

PF_DAPPL - Application

Data type: DRAW-DAPPL
Optional: Yes
Call by Reference: Yes

PF_FILE - Original of Document

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

PF_URL - URL

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

PF_MIMETYPE - HTML content type

Data type: TDWP-MIMETYPE
Default: SPACE
Optional: Yes
Call by Reference: Yes

PF_LOIO - ID for Documents and Relationships

Data type: SDOKOBJECT-OBJID
Optional: Yes
Call by Reference: Yes

PF_PHIO - ID for Documents and Relationships

Data type: SDOKOBJECT-OBJID
Optional: Yes
Call by Reference: Yes

PF_APPNR - Application number 1 or 2

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

PF_REMOVE_FIRST -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CV121_ECL_ADD_DOCUMENT

PFX_LAYER - Layer name

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

EXCEPTIONS details

CNTL_ERROR - Control Error

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

ERROR - General Error

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

Copy and paste ABAP code example for CV121_ECL_ADD_DOCUMENT 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_pfx_layer  TYPE C, "   
lv_cntl_error  TYPE C, "   
lv_ps_doc_key  TYPE DMS_DOC_KEY, "   
lv_error  TYPE DMS_DOC_KEY, "   
lv_pf_dappl  TYPE DRAW-DAPPL, "   
lv_pf_file  TYPE DRAW-FILEP, "   
lv_pf_url  TYPE MCDOK-URL, "   
lv_pf_mimetype  TYPE TDWP-MIMETYPE, "   SPACE
lv_pf_loio  TYPE SDOKOBJECT-OBJID, "   
lv_pf_phio  TYPE SDOKOBJECT-OBJID, "   
lv_pf_appnr  TYPE APPNR, "   
lv_pf_remove_first  TYPE C. "   SPACE

  CALL FUNCTION 'CV121_ECL_ADD_DOCUMENT'  "NOTRANSL: DVS: Dokument viewen (inline)
    EXPORTING
         PS_DOC_KEY = lv_ps_doc_key
         PF_DAPPL = lv_pf_dappl
         PF_FILE = lv_pf_file
         PF_URL = lv_pf_url
         PF_MIMETYPE = lv_pf_mimetype
         PF_LOIO = lv_pf_loio
         PF_PHIO = lv_pf_phio
         PF_APPNR = lv_pf_appnr
         PF_REMOVE_FIRST = lv_pf_remove_first
    IMPORTING
         PFX_LAYER = lv_pfx_layer
    EXCEPTIONS
        CNTL_ERROR = 1
        ERROR = 2
. " CV121_ECL_ADD_DOCUMENT




ABAP code using 7.40 inline data declarations to call FM CV121_ECL_ADD_DOCUMENT

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 DAPPL FROM DRAW INTO @DATA(ld_pf_dappl).
 
"SELECT single FILEP FROM DRAW INTO @DATA(ld_pf_file).
 
"SELECT single URL FROM MCDOK INTO @DATA(ld_pf_url).
 
"SELECT single MIMETYPE FROM TDWP INTO @DATA(ld_pf_mimetype).
DATA(ld_pf_mimetype) = ' '.
 
"SELECT single OBJID FROM SDOKOBJECT INTO @DATA(ld_pf_loio).
 
"SELECT single OBJID FROM SDOKOBJECT INTO @DATA(ld_pf_phio).
 
 
DATA(ld_pf_remove_first) = ' '.
 


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!