DEMO:VF11冲销开票凭证BAPI_BILLINGDOC_CANCEL1
原创
©著作权归作者所有:来自51CTO博客作者sapLiuMeng的原创作品,请联系作者获取转载授权,否则将追究法律责任
VF11
对应DB
REPORT zdemo_vf11.
PARAMETERS:p_bill TYPE bapivbrksuccess-bill_doc.
DATA: lt_return TYPE TABLE OF bapireturn1,
lt_success TYPE TABLE OF bapivbrksuccess,
ls_success TYPE bapivbrksuccess.
CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
EXPORTING
billingdocument = p_bill
billingdate = sy-datum
TABLES
return = lt_return
success = lt_success.
READ TABLE lt_success INTO ls_success INDEX 1.
WRITE ls_success-bill_doc.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.