SAP CF_DB_DOCUMENT_READ Function Module for NOTRANSL: Lesen Dokumentstammsatz









CF_DB_DOCUMENT_READ is a standard cf db document read 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: Lesen Dokumentstammsatz 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 cf db document read FM, simply by entering the name CF_DB_DOCUMENT_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function CF_DB_DOCUMENT_READ 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 'CF_DB_DOCUMENT_READ'"NOTRANSL: Lesen Dokumentstammsatz
EXPORTING
DOKAR_IMP = "Document type
DOKNR_IMP = "Document number
DOKTL_IMP = "Document document part
DOKVR_IMP = "Document version

IMPORTING
DKTXT_EXP = "Document short text
DOKST_EXP = "Document status
LOEDK_EXP = "Document deletion indicator
DOKAS_EXP = "
DOKGV_EXP = "

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for CF_DB_DOCUMENT_READ

DOKAR_IMP - Document type

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

DOKNR_IMP - Document number

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

DOKTL_IMP - Document document part

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

DOKVR_IMP - Document version

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

EXPORTING Parameters details for CF_DB_DOCUMENT_READ

DKTXT_EXP - Document short text

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

DOKST_EXP - Document status

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

LOEDK_EXP - Document deletion indicator

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

DOKAS_EXP -

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

DOKGV_EXP -

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

EXCEPTIONS details

NOT_FOUND -

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

Copy and paste ABAP code example for CF_DB_DOCUMENT_READ 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_dktxt_exp  TYPE DRAT-DKTXT, "   
lv_dokar_imp  TYPE DRAW-DOKAR, "   
lv_not_found  TYPE DRAW, "   
lv_doknr_imp  TYPE DRAW-DOKNR, "   
lv_dokst_exp  TYPE DRAW-DOKST, "   
lv_doktl_imp  TYPE DRAW-DOKTL, "   
lv_loedk_exp  TYPE DRAW-LOEDK, "   
lv_dokas_exp  TYPE DRAW-AENNR, "   
lv_dokvr_imp  TYPE DRAW-DOKVR, "   
lv_dokgv_exp  TYPE AENR-DATUV. "   

  CALL FUNCTION 'CF_DB_DOCUMENT_READ'  "NOTRANSL: Lesen Dokumentstammsatz
    EXPORTING
         DOKAR_IMP = lv_dokar_imp
         DOKNR_IMP = lv_doknr_imp
         DOKTL_IMP = lv_doktl_imp
         DOKVR_IMP = lv_dokvr_imp
    IMPORTING
         DKTXT_EXP = lv_dktxt_exp
         DOKST_EXP = lv_dokst_exp
         LOEDK_EXP = lv_loedk_exp
         DOKAS_EXP = lv_dokas_exp
         DOKGV_EXP = lv_dokgv_exp
    EXCEPTIONS
        NOT_FOUND = 1
. " CF_DB_DOCUMENT_READ




ABAP code using 7.40 inline data declarations to call FM CF_DB_DOCUMENT_READ

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 DKTXT FROM DRAT INTO @DATA(ld_dktxt_exp).
 
"SELECT single DOKAR FROM DRAW INTO @DATA(ld_dokar_imp).
 
 
"SELECT single DOKNR FROM DRAW INTO @DATA(ld_doknr_imp).
 
"SELECT single DOKST FROM DRAW INTO @DATA(ld_dokst_exp).
 
"SELECT single DOKTL FROM DRAW INTO @DATA(ld_doktl_imp).
 
"SELECT single LOEDK FROM DRAW INTO @DATA(ld_loedk_exp).
 
"SELECT single AENNR FROM DRAW INTO @DATA(ld_dokas_exp).
 
"SELECT single DOKVR FROM DRAW INTO @DATA(ld_dokvr_imp).
 
"SELECT single DATUV FROM AENR INTO @DATA(ld_dokgv_exp).
 


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!