SAP CV222_GEN_DOC_CREATE Function Module for NOTRANSL: Anlegen eines Dokuments und Orginal









CV222_GEN_DOC_CREATE is a standard cv222 gen doc create 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: Anlegen eines Dokuments und Orginal 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 cv222 gen doc create FM, simply by entering the name CV222_GEN_DOC_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function CV222_GEN_DOC_CREATE 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 'CV222_GEN_DOC_CREATE'"NOTRANSL: Anlegen eines Dokuments und Orginal
EXPORTING
DOKNR = "Document Number
DOKAR = "Document Type
DOKTL = "Documentation - Text Lines
DOKVR = "Documentation - Text Lines
PF_KPRO_USE = "Generic Type
PF_OBJECT = "Linked SAP Object
PF_OBJECT_KEY = "Document Management Object Key

IMPORTING
DOKNR_E = "Document number
DOKAR_E = "Document Type
DOKTL_E = "Document Part
DOKVR_E = "Document Version

EXCEPTIONS
NOT_CREATE = 1
.



IMPORTING Parameters details for CV222_GEN_DOC_CREATE

DOKNR - Document Number

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

DOKAR - Document Type

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

DOKTL - Documentation - Text Lines

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

DOKVR - Documentation - Text Lines

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

PF_KPRO_USE - Generic Type

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

PF_OBJECT - Linked SAP Object

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

PF_OBJECT_KEY - Document Management Object Key

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

EXPORTING Parameters details for CV222_GEN_DOC_CREATE

DOKNR_E - Document number

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

DOKAR_E - Document Type

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

DOKTL_E - Document Part

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

DOKVR_E - Document Version

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

EXCEPTIONS details

NOT_CREATE -

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

Copy and paste ABAP code example for CV222_GEN_DOC_CREATE 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_doknr  TYPE DRAW-DOKNR, "   
lv_doknr_e  TYPE DRAW-DOKNR, "   
lv_not_create  TYPE DRAW, "   
lv_dokar  TYPE DRAW-DOKAR, "   
lv_dokar_e  TYPE DRAW-DOKAR, "   
lv_doktl  TYPE DRAW-DOKTL, "   
lv_doktl_e  TYPE DRAW-DOKTL, "   
lv_dokvr  TYPE DRAW-DOKVR, "   
lv_dokvr_e  TYPE DRAW-DOKVR, "   
lv_pf_kpro_use  TYPE C, "   
lv_pf_object  TYPE DOKOB, "   
lv_pf_object_key  TYPE OBJKY. "   

  CALL FUNCTION 'CV222_GEN_DOC_CREATE'  "NOTRANSL: Anlegen eines Dokuments und Orginal
    EXPORTING
         DOKNR = lv_doknr
         DOKAR = lv_dokar
         DOKTL = lv_doktl
         DOKVR = lv_dokvr
         PF_KPRO_USE = lv_pf_kpro_use
         PF_OBJECT = lv_pf_object
         PF_OBJECT_KEY = lv_pf_object_key
    IMPORTING
         DOKNR_E = lv_doknr_e
         DOKAR_E = lv_dokar_e
         DOKTL_E = lv_doktl_e
         DOKVR_E = lv_dokvr_e
    EXCEPTIONS
        NOT_CREATE = 1
. " CV222_GEN_DOC_CREATE




ABAP code using 7.40 inline data declarations to call FM CV222_GEN_DOC_CREATE

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 DOKNR FROM DRAW INTO @DATA(ld_doknr).
 
"SELECT single DOKNR FROM DRAW INTO @DATA(ld_doknr_e).
 
 
"SELECT single DOKAR FROM DRAW INTO @DATA(ld_dokar).
 
"SELECT single DOKAR FROM DRAW INTO @DATA(ld_dokar_e).
 
"SELECT single DOKTL FROM DRAW INTO @DATA(ld_doktl).
 
"SELECT single DOKTL FROM DRAW INTO @DATA(ld_doktl_e).
 
"SELECT single DOKVR FROM DRAW INTO @DATA(ld_dokvr).
 
"SELECT single DOKVR FROM DRAW INTO @DATA(ld_dokvr_e).
 
 
 
 


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!