VF11

DEMO:VF11冲销开票凭证BAPI_BILLINGDOC_CANCEL1_系统

对应DB

DEMO:VF11冲销开票凭证BAPI_BILLINGDOC_CANCEL1_系统_02

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'.