SAP Function Modules

EINKBELEG_WRITE_DOCUMENT SAP Function module - CHDO EINKBELEG => Gen. by RSSCD000







EINKBELEG_WRITE_DOCUMENT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name EINKBELEG_WRITE_DOCUMENT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CDEI
Released Date: Not Released
Processing type: Start update immediately (start immed)
update module start immediate settings


Pattern for FM EINKBELEG_WRITE_DOCUMENT - EINKBELEG WRITE DOCUMENT





CALL FUNCTION 'EINKBELEG_WRITE_DOCUMENT' "CHDO EINKBELEG => Gen. by RSSCD000
  EXPORTING
    objectid =                  " cdhdr-objectid
    tcode =                     " cdhdr-tcode
    utime =                     " cdhdr-utime
    udate =                     " cdhdr-udate
    username =                  " cdhdr-username
    planned_change_number = SPACE  " cdhdr-planchngnr
    object_change_indicator = 'U'  " cdhdr-change_ind
    planned_or_real_changes = SPACE  " cdhdr-change_ind
    no_change_pointers = SPACE  " cdhdr-change_ind
    upd_icdtxt_einkbeleg = SPACE  " cdpos-chngind
    upd_ekek = SPACE            " cdpos-chngind
    upd_ekes = SPACE            " cdpos-chngind
    upd_eket = SPACE            " cdpos-chngind
    upd_ekkn = SPACE            " cdpos-chngind
    n_ekko =                    " ekko
    o_ekko =                    " ekko
    upd_ekko = SPACE            " cdpos-chngind
    upd_ekpa = SPACE            " cdpos-chngind
    upd_ekpo = SPACE            " cdpos-chngind
    upd_konvc = SPACE           " cdpos-chngind
  TABLES
    icdtxt_einkbeleg =          " cdtxt
    xekek =                     " uekek
    yekek =                     " uekek
    xekes =                     " uekes
    yekes =                     " uekes
    xeket =                     " ueket
    yeket =                     " ueket
    xekkn =                     " uekkn
    yekkn =                     " uekkn
    xekpa =                     " uekpa
    yekpa =                     " uekpa
    xekpo =                     " uekpo
    yekpo =                     " uekpo
    xkonvc =                    " ukonvc
    ykonvc =                    " ukonvc
    .  "  EINKBELEG_WRITE_DOCUMENT

ABAP code example for Function Module EINKBELEG_WRITE_DOCUMENT





The ABAP code below is a full code listing to execute function module EINKBELEG_WRITE_DOCUMENT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_icdtxt_einkbeleg  TYPE STANDARD TABLE OF CDTXT,"TABLES PARAM
wa_icdtxt_einkbeleg  LIKE LINE OF it_icdtxt_einkbeleg ,
it_xekek  TYPE STANDARD TABLE OF UEKEK,"TABLES PARAM
wa_xekek  LIKE LINE OF it_xekek ,
it_yekek  TYPE STANDARD TABLE OF UEKEK,"TABLES PARAM
wa_yekek  LIKE LINE OF it_yekek ,
it_xekes  TYPE STANDARD TABLE OF UEKES,"TABLES PARAM
wa_xekes  LIKE LINE OF it_xekes ,
it_yekes  TYPE STANDARD TABLE OF UEKES,"TABLES PARAM
wa_yekes  LIKE LINE OF it_yekes ,
it_xeket  TYPE STANDARD TABLE OF UEKET,"TABLES PARAM
wa_xeket  LIKE LINE OF it_xeket ,
it_yeket  TYPE STANDARD TABLE OF UEKET,"TABLES PARAM
wa_yeket  LIKE LINE OF it_yeket ,
it_xekkn  TYPE STANDARD TABLE OF UEKKN,"TABLES PARAM
wa_xekkn  LIKE LINE OF it_xekkn ,
it_yekkn  TYPE STANDARD TABLE OF UEKKN,"TABLES PARAM
wa_yekkn  LIKE LINE OF it_yekkn ,
it_xekpa  TYPE STANDARD TABLE OF UEKPA,"TABLES PARAM
wa_xekpa  LIKE LINE OF it_xekpa ,
it_yekpa  TYPE STANDARD TABLE OF UEKPA,"TABLES PARAM
wa_yekpa  LIKE LINE OF it_yekpa ,
it_xekpo  TYPE STANDARD TABLE OF UEKPO,"TABLES PARAM
wa_xekpo  LIKE LINE OF it_xekpo ,
it_yekpo  TYPE STANDARD TABLE OF UEKPO,"TABLES PARAM
wa_yekpo  LIKE LINE OF it_yekpo ,
it_xkonvc  TYPE STANDARD TABLE OF UKONVC,"TABLES PARAM
wa_xkonvc  LIKE LINE OF it_xkonvc ,
it_ykonvc  TYPE STANDARD TABLE OF UKONVC,"TABLES PARAM
wa_ykonvc  LIKE LINE OF it_ykonvc .


SELECT single OBJECTID
FROM CDHDR
INTO @DATA(ld_objectid).


SELECT single TCODE
FROM CDHDR
INTO @DATA(ld_tcode).


SELECT single UTIME
FROM CDHDR
INTO @DATA(ld_utime).


SELECT single UDATE
FROM CDHDR
INTO @DATA(ld_udate).


SELECT single USERNAME
FROM CDHDR
INTO @DATA(ld_username).


SELECT single PLANCHNGNR
FROM CDHDR
INTO @DATA(ld_planned_change_number).


SELECT single CHANGE_IND
FROM CDHDR
INTO @DATA(ld_object_change_indicator).


SELECT single CHANGE_IND
FROM CDHDR
INTO @DATA(ld_planned_or_real_changes).


SELECT single CHANGE_IND
FROM CDHDR
INTO @DATA(ld_no_change_pointers).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_icdtxt_einkbeleg).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_ekek).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_ekes).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_eket).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_ekkn).

DATA(ld_n_ekko) = 'Check type of data required'.
DATA(ld_o_ekko) = 'Check type of data required'.

SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_ekko).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_ekpa).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_ekpo).


SELECT single CHNGIND
FROM CDPOS
INTO @DATA(ld_upd_konvc).


"populate fields of struture and append to itab
append wa_icdtxt_einkbeleg to it_icdtxt_einkbeleg.

"populate fields of struture and append to itab
append wa_xekek to it_xekek.

"populate fields of struture and append to itab
append wa_yekek to it_yekek.

"populate fields of struture and append to itab
append wa_xekes to it_xekes.

"populate fields of struture and append to itab
append wa_yekes to it_yekes.

"populate fields of struture and append to itab
append wa_xeket to it_xeket.

"populate fields of struture and append to itab
append wa_yeket to it_yeket.

"populate fields of struture and append to itab
append wa_xekkn to it_xekkn.

"populate fields of struture and append to itab
append wa_yekkn to it_yekkn.

"populate fields of struture and append to itab
append wa_xekpa to it_xekpa.

"populate fields of struture and append to itab
append wa_yekpa to it_yekpa.

"populate fields of struture and append to itab
append wa_xekpo to it_xekpo.

"populate fields of struture and append to itab
append wa_yekpo to it_yekpo.

"populate fields of struture and append to itab
append wa_xkonvc to it_xkonvc.

"populate fields of struture and append to itab
append wa_ykonvc to it_ykonvc. . CALL FUNCTION 'EINKBELEG_WRITE_DOCUMENT' EXPORTING objectid = ld_objectid tcode = ld_tcode utime = ld_utime udate = ld_udate username = ld_username planned_change_number = ld_planned_change_number object_change_indicator = ld_object_change_indicator planned_or_real_changes = ld_planned_or_real_changes no_change_pointers = ld_no_change_pointers upd_icdtxt_einkbeleg = ld_upd_icdtxt_einkbeleg upd_ekek = ld_upd_ekek upd_ekes = ld_upd_ekes upd_eket = ld_upd_eket upd_ekkn = ld_upd_ekkn n_ekko = ld_n_ekko o_ekko = ld_o_ekko upd_ekko = ld_upd_ekko upd_ekpa = ld_upd_ekpa upd_ekpo = ld_upd_ekpo upd_konvc = ld_upd_konvc TABLES icdtxt_einkbeleg = it_icdtxt_einkbeleg xekek = it_xekek yekek = it_yekek xekes = it_xekes yekes = it_yekes xeket = it_xeket yeket = it_yeket xekkn = it_xekkn yekkn = it_yekkn xekpa = it_xekpa yekpa = it_yekpa xekpo = it_xekpo yekpo = it_yekpo xkonvc = it_xkonvc ykonvc = it_ykonvc . " EINKBELEG_WRITE_DOCUMENT
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_objectid  TYPE CDHDR-OBJECTID ,
it_icdtxt_einkbeleg  TYPE STANDARD TABLE OF CDTXT ,
wa_icdtxt_einkbeleg  LIKE LINE OF it_icdtxt_einkbeleg,
ld_tcode  TYPE CDHDR-TCODE ,
it_xekek  TYPE STANDARD TABLE OF UEKEK ,
wa_xekek  LIKE LINE OF it_xekek,
ld_utime  TYPE CDHDR-UTIME ,
it_yekek  TYPE STANDARD TABLE OF UEKEK ,
wa_yekek  LIKE LINE OF it_yekek,
ld_udate  TYPE CDHDR-UDATE ,
it_xekes  TYPE STANDARD TABLE OF UEKES ,
wa_xekes  LIKE LINE OF it_xekes,
ld_username  TYPE CDHDR-USERNAME ,
it_yekes  TYPE STANDARD TABLE OF UEKES ,
wa_yekes  LIKE LINE OF it_yekes,
ld_planned_change_number  TYPE CDHDR-PLANCHNGNR ,
it_xeket  TYPE STANDARD TABLE OF UEKET ,
wa_xeket  LIKE LINE OF it_xeket,
ld_object_change_indicator  TYPE CDHDR-CHANGE_IND ,
it_yeket  TYPE STANDARD TABLE OF UEKET ,
wa_yeket  LIKE LINE OF it_yeket,
ld_planned_or_real_changes  TYPE CDHDR-CHANGE_IND ,
it_xekkn  TYPE STANDARD TABLE OF UEKKN ,
wa_xekkn  LIKE LINE OF it_xekkn,
ld_no_change_pointers  TYPE CDHDR-CHANGE_IND ,
it_yekkn  TYPE STANDARD TABLE OF UEKKN ,
wa_yekkn  LIKE LINE OF it_yekkn,
ld_upd_icdtxt_einkbeleg  TYPE CDPOS-CHNGIND ,
it_xekpa  TYPE STANDARD TABLE OF UEKPA ,
wa_xekpa  LIKE LINE OF it_xekpa,
it_yekpa  TYPE STANDARD TABLE OF UEKPA ,
wa_yekpa  LIKE LINE OF it_yekpa,
ld_upd_ekek  TYPE CDPOS-CHNGIND ,
it_xekpo  TYPE STANDARD TABLE OF UEKPO ,
wa_xekpo  LIKE LINE OF it_xekpo,
ld_upd_ekes  TYPE CDPOS-CHNGIND ,
it_yekpo  TYPE STANDARD TABLE OF UEKPO ,
wa_yekpo  LIKE LINE OF it_yekpo,
ld_upd_eket  TYPE CDPOS-CHNGIND ,
it_xkonvc  TYPE STANDARD TABLE OF UKONVC ,
wa_xkonvc  LIKE LINE OF it_xkonvc,
ld_upd_ekkn  TYPE CDPOS-CHNGIND ,
it_ykonvc  TYPE STANDARD TABLE OF UKONVC ,
wa_ykonvc  LIKE LINE OF it_ykonvc,
ld_n_ekko  TYPE EKKO ,
ld_o_ekko  TYPE EKKO ,
ld_upd_ekko  TYPE CDPOS-CHNGIND ,
ld_upd_ekpa  TYPE CDPOS-CHNGIND ,
ld_upd_ekpo  TYPE CDPOS-CHNGIND ,
ld_upd_konvc  TYPE CDPOS-CHNGIND .


SELECT single OBJECTID
FROM CDHDR
INTO ld_objectid.


"populate fields of struture and append to itab
append wa_icdtxt_einkbeleg to it_icdtxt_einkbeleg.

SELECT single TCODE
FROM CDHDR
INTO ld_tcode.


"populate fields of struture and append to itab
append wa_xekek to it_xekek.

SELECT single UTIME
FROM CDHDR
INTO ld_utime.


"populate fields of struture and append to itab
append wa_yekek to it_yekek.

SELECT single UDATE
FROM CDHDR
INTO ld_udate.


"populate fields of struture and append to itab
append wa_xekes to it_xekes.

SELECT single USERNAME
FROM CDHDR
INTO ld_username.


"populate fields of struture and append to itab
append wa_yekes to it_yekes.

SELECT single PLANCHNGNR
FROM CDHDR
INTO ld_planned_change_number.


"populate fields of struture and append to itab
append wa_xeket to it_xeket.

SELECT single CHANGE_IND
FROM CDHDR
INTO ld_object_change_indicator.


"populate fields of struture and append to itab
append wa_yeket to it_yeket.

SELECT single CHANGE_IND
FROM CDHDR
INTO ld_planned_or_real_changes.


"populate fields of struture and append to itab
append wa_xekkn to it_xekkn.

SELECT single CHANGE_IND
FROM CDHDR
INTO ld_no_change_pointers.


"populate fields of struture and append to itab
append wa_yekkn to it_yekkn.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_icdtxt_einkbeleg.


"populate fields of struture and append to itab
append wa_xekpa to it_xekpa.

"populate fields of struture and append to itab
append wa_yekpa to it_yekpa.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_ekek.


"populate fields of struture and append to itab
append wa_xekpo to it_xekpo.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_ekes.


"populate fields of struture and append to itab
append wa_yekpo to it_yekpo.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_eket.


"populate fields of struture and append to itab
append wa_xkonvc to it_xkonvc.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_ekkn.


"populate fields of struture and append to itab
append wa_ykonvc to it_ykonvc.
ld_n_ekko = 'Check type of data required'.
ld_o_ekko = 'Check type of data required'.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_ekko.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_ekpa.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_ekpo.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_konvc.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name EINKBELEG_WRITE_DOCUMENT or its description.