Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to extend the bapi_acc_document_post to HZUON field

0 Kudos
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.

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos

Parameter EXTENSION2 should be handled in BAdI ACC_DOCUMENT (SE19), when EXTENSION1 should be handled in BTE RWBAPI01 (FIBF)