06-06-2018 3:12 PM
Do the following but it does not work<br>
data: begin of ti_zsample occurs 0,
posnr type bseg-buzei,
hzuon type bseg-hzuon.
data: end of ti_zsample.
clear lt_bapiparex.
refresh lt_bapiparex.
if ls_header-document_type = 'Z1' and
( lt_item-sglindicator eq '1' or lt_item-sglindicator eq '4' ).
lt_bapiparex-structure = 'TI_ZSAMPLE'.
lt_bapiparex-valuepart1 = lv_posnr. "posicion
lt_bapiparex-valuepart2 = '0001'. "hzuon
append lt_bapiparex.
endif.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = ls_documentheader
customercpd = ls_customercpd
TABLES
accountgl = lt_accountgl
accountreceivable = lt_accountrec
accountpayable = lt_accountpay
accounttax = lt_accounttax
currencyamount = lt_curramount
extension1 = lt_extension1
extension2 = lt_bapiparex
return = lt_return.
06-06-2018 3:38 PM
Parameter EXTENSION2 should be handled in BAdI ACC_DOCUMENT (SE19), when EXTENSION1 should be handled in BTE RWBAPI01 (FIBF)