SAP Function Modules

BUPA_BUP_WRITE_DOCUMENT SAP Function module - CHDO BUPA_BUP => Gen. by RSSCD000







BUPA_BUP_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 BUPA_BUP_WRITE_DOCUMENT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BUDC
Released Date: Not Released
Processing type: Start of update delayed (Start Delayed)
update module start delayed settings


Pattern for FM BUPA_BUP_WRITE_DOCUMENT - BUPA BUP WRITE DOCUMENT





CALL FUNCTION 'BUPA_BUP_WRITE_DOCUMENT' "CHDO BUPA_BUP => 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_bupa_bup = SPACE  " cdpos-chngind
    n_but000 =                  " but000
    o_ybut000 =                 " but000
    upd_but000 = SPACE          " cdpos-chngind
    upd_but000_td = SPACE       " cdpos-chngind
    n_but001 =                  " but001
    o_ybut001 =                 " but001
    upd_but001 = SPACE          " cdpos-chngind
    upd_but0bk = SPACE          " cdpos-chngind
    upd_but0cc = SPACE          " cdpos-chngind
    upd_but0id = SPACE          " cdpos-chngind
    upd_but0is = SPACE          " cdpos-chngind
    upd_but100 = SPACE          " cdpos-chngind
  TABLES
    icdtxt_bupa_bup =           " cdtxt
    xbut000_td =                " vbut000_td
    ybut000_td =                " vbut000_td
    xbut0bk =                   " vbut0bk
    ybut0bk =                   " vbut0bk
    xbut0cc =                   " vbut0cc
    ybut0cc =                   " vbut0cc
    xbut0id =                   " vbut0id
    ybut0id =                   " vbut0id
    xbut0is =                   " vbut0is
    ybut0is =                   " vbut0is
    xbut100 =                   " vbut100
    ybut100 =                   " vbut100
    .  "  BUPA_BUP_WRITE_DOCUMENT

ABAP code example for Function Module BUPA_BUP_WRITE_DOCUMENT





The ABAP code below is a full code listing to execute function module BUPA_BUP_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_bupa_bup  TYPE STANDARD TABLE OF CDTXT,"TABLES PARAM
wa_icdtxt_bupa_bup  LIKE LINE OF it_icdtxt_bupa_bup ,
it_xbut000_td  TYPE STANDARD TABLE OF VBUT000_TD,"TABLES PARAM
wa_xbut000_td  LIKE LINE OF it_xbut000_td ,
it_ybut000_td  TYPE STANDARD TABLE OF VBUT000_TD,"TABLES PARAM
wa_ybut000_td  LIKE LINE OF it_ybut000_td ,
it_xbut0bk  TYPE STANDARD TABLE OF VBUT0BK,"TABLES PARAM
wa_xbut0bk  LIKE LINE OF it_xbut0bk ,
it_ybut0bk  TYPE STANDARD TABLE OF VBUT0BK,"TABLES PARAM
wa_ybut0bk  LIKE LINE OF it_ybut0bk ,
it_xbut0cc  TYPE STANDARD TABLE OF VBUT0CC,"TABLES PARAM
wa_xbut0cc  LIKE LINE OF it_xbut0cc ,
it_ybut0cc  TYPE STANDARD TABLE OF VBUT0CC,"TABLES PARAM
wa_ybut0cc  LIKE LINE OF it_ybut0cc ,
it_xbut0id  TYPE STANDARD TABLE OF VBUT0ID,"TABLES PARAM
wa_xbut0id  LIKE LINE OF it_xbut0id ,
it_ybut0id  TYPE STANDARD TABLE OF VBUT0ID,"TABLES PARAM
wa_ybut0id  LIKE LINE OF it_ybut0id ,
it_xbut0is  TYPE STANDARD TABLE OF VBUT0IS,"TABLES PARAM
wa_xbut0is  LIKE LINE OF it_xbut0is ,
it_ybut0is  TYPE STANDARD TABLE OF VBUT0IS,"TABLES PARAM
wa_ybut0is  LIKE LINE OF it_ybut0is ,
it_xbut100  TYPE STANDARD TABLE OF VBUT100,"TABLES PARAM
wa_xbut100  LIKE LINE OF it_xbut100 ,
it_ybut100  TYPE STANDARD TABLE OF VBUT100,"TABLES PARAM
wa_ybut100  LIKE LINE OF it_ybut100 .


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_bupa_bup).

DATA(ld_n_but000) = 'Check type of data required'.
DATA(ld_o_ybut000) = 'Check type of data required'.

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


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

DATA(ld_n_but001) = 'Check type of data required'.
DATA(ld_o_ybut001) = 'Check type of data required'.

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


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


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


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


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


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


"populate fields of struture and append to itab
append wa_icdtxt_bupa_bup to it_icdtxt_bupa_bup.

"populate fields of struture and append to itab
append wa_xbut000_td to it_xbut000_td.

"populate fields of struture and append to itab
append wa_ybut000_td to it_ybut000_td.

"populate fields of struture and append to itab
append wa_xbut0bk to it_xbut0bk.

"populate fields of struture and append to itab
append wa_ybut0bk to it_ybut0bk.

"populate fields of struture and append to itab
append wa_xbut0cc to it_xbut0cc.

"populate fields of struture and append to itab
append wa_ybut0cc to it_ybut0cc.

"populate fields of struture and append to itab
append wa_xbut0id to it_xbut0id.

"populate fields of struture and append to itab
append wa_ybut0id to it_ybut0id.

"populate fields of struture and append to itab
append wa_xbut0is to it_xbut0is.

"populate fields of struture and append to itab
append wa_ybut0is to it_ybut0is.

"populate fields of struture and append to itab
append wa_xbut100 to it_xbut100.

"populate fields of struture and append to itab
append wa_ybut100 to it_ybut100. . CALL FUNCTION 'BUPA_BUP_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_bupa_bup = ld_upd_icdtxt_bupa_bup n_but000 = ld_n_but000 o_ybut000 = ld_o_ybut000 upd_but000 = ld_upd_but000 upd_but000_td = ld_upd_but000_td n_but001 = ld_n_but001 o_ybut001 = ld_o_ybut001 upd_but001 = ld_upd_but001 upd_but0bk = ld_upd_but0bk upd_but0cc = ld_upd_but0cc upd_but0id = ld_upd_but0id upd_but0is = ld_upd_but0is upd_but100 = ld_upd_but100 TABLES icdtxt_bupa_bup = it_icdtxt_bupa_bup xbut000_td = it_xbut000_td ybut000_td = it_ybut000_td xbut0bk = it_xbut0bk ybut0bk = it_ybut0bk xbut0cc = it_xbut0cc ybut0cc = it_ybut0cc xbut0id = it_xbut0id ybut0id = it_ybut0id xbut0is = it_xbut0is ybut0is = it_ybut0is xbut100 = it_xbut100 ybut100 = it_ybut100 . " BUPA_BUP_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_bupa_bup  TYPE STANDARD TABLE OF CDTXT ,
wa_icdtxt_bupa_bup  LIKE LINE OF it_icdtxt_bupa_bup,
ld_tcode  TYPE CDHDR-TCODE ,
it_xbut000_td  TYPE STANDARD TABLE OF VBUT000_TD ,
wa_xbut000_td  LIKE LINE OF it_xbut000_td,
ld_utime  TYPE CDHDR-UTIME ,
it_ybut000_td  TYPE STANDARD TABLE OF VBUT000_TD ,
wa_ybut000_td  LIKE LINE OF it_ybut000_td,
ld_udate  TYPE CDHDR-UDATE ,
it_xbut0bk  TYPE STANDARD TABLE OF VBUT0BK ,
wa_xbut0bk  LIKE LINE OF it_xbut0bk,
ld_username  TYPE CDHDR-USERNAME ,
it_ybut0bk  TYPE STANDARD TABLE OF VBUT0BK ,
wa_ybut0bk  LIKE LINE OF it_ybut0bk,
ld_planned_change_number  TYPE CDHDR-PLANCHNGNR ,
it_xbut0cc  TYPE STANDARD TABLE OF VBUT0CC ,
wa_xbut0cc  LIKE LINE OF it_xbut0cc,
ld_object_change_indicator  TYPE CDHDR-CHANGE_IND ,
it_ybut0cc  TYPE STANDARD TABLE OF VBUT0CC ,
wa_ybut0cc  LIKE LINE OF it_ybut0cc,
ld_planned_or_real_changes  TYPE CDHDR-CHANGE_IND ,
it_xbut0id  TYPE STANDARD TABLE OF VBUT0ID ,
wa_xbut0id  LIKE LINE OF it_xbut0id,
ld_no_change_pointers  TYPE CDHDR-CHANGE_IND ,
it_ybut0id  TYPE STANDARD TABLE OF VBUT0ID ,
wa_ybut0id  LIKE LINE OF it_ybut0id,
ld_upd_icdtxt_bupa_bup  TYPE CDPOS-CHNGIND ,
it_xbut0is  TYPE STANDARD TABLE OF VBUT0IS ,
wa_xbut0is  LIKE LINE OF it_xbut0is,
it_ybut0is  TYPE STANDARD TABLE OF VBUT0IS ,
wa_ybut0is  LIKE LINE OF it_ybut0is,
ld_n_but000  TYPE BUT000 ,
it_xbut100  TYPE STANDARD TABLE OF VBUT100 ,
wa_xbut100  LIKE LINE OF it_xbut100,
ld_o_ybut000  TYPE BUT000 ,
it_ybut100  TYPE STANDARD TABLE OF VBUT100 ,
wa_ybut100  LIKE LINE OF it_ybut100,
ld_upd_but000  TYPE CDPOS-CHNGIND ,
ld_upd_but000_td  TYPE CDPOS-CHNGIND ,
ld_n_but001  TYPE BUT001 ,
ld_o_ybut001  TYPE BUT001 ,
ld_upd_but001  TYPE CDPOS-CHNGIND ,
ld_upd_but0bk  TYPE CDPOS-CHNGIND ,
ld_upd_but0cc  TYPE CDPOS-CHNGIND ,
ld_upd_but0id  TYPE CDPOS-CHNGIND ,
ld_upd_but0is  TYPE CDPOS-CHNGIND ,
ld_upd_but100  TYPE CDPOS-CHNGIND .


SELECT single OBJECTID
FROM CDHDR
INTO ld_objectid.


"populate fields of struture and append to itab
append wa_icdtxt_bupa_bup to it_icdtxt_bupa_bup.

SELECT single TCODE
FROM CDHDR
INTO ld_tcode.


"populate fields of struture and append to itab
append wa_xbut000_td to it_xbut000_td.

SELECT single UTIME
FROM CDHDR
INTO ld_utime.


"populate fields of struture and append to itab
append wa_ybut000_td to it_ybut000_td.

SELECT single UDATE
FROM CDHDR
INTO ld_udate.


"populate fields of struture and append to itab
append wa_xbut0bk to it_xbut0bk.

SELECT single USERNAME
FROM CDHDR
INTO ld_username.


"populate fields of struture and append to itab
append wa_ybut0bk to it_ybut0bk.

SELECT single PLANCHNGNR
FROM CDHDR
INTO ld_planned_change_number.


"populate fields of struture and append to itab
append wa_xbut0cc to it_xbut0cc.

SELECT single CHANGE_IND
FROM CDHDR
INTO ld_object_change_indicator.


"populate fields of struture and append to itab
append wa_ybut0cc to it_ybut0cc.

SELECT single CHANGE_IND
FROM CDHDR
INTO ld_planned_or_real_changes.


"populate fields of struture and append to itab
append wa_xbut0id to it_xbut0id.

SELECT single CHANGE_IND
FROM CDHDR
INTO ld_no_change_pointers.


"populate fields of struture and append to itab
append wa_ybut0id to it_ybut0id.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_icdtxt_bupa_bup.


"populate fields of struture and append to itab
append wa_xbut0is to it_xbut0is.

"populate fields of struture and append to itab
append wa_ybut0is to it_ybut0is.
ld_n_but000 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xbut100 to it_xbut100.
ld_o_ybut000 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ybut100 to it_ybut100.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but000.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but000_td.

ld_n_but001 = 'Check type of data required'.
ld_o_ybut001 = 'Check type of data required'.

SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but001.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but0bk.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but0cc.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but0id.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but0is.


SELECT single CHNGIND
FROM CDPOS
INTO ld_upd_but100.

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 BUPA_BUP_WRITE_DOCUMENT or its description.