SD
BAPI
RFC
Used the same way in S/4HANA
BAPI_BILLINGDOC_CANCEL1 Cancel Billing Document
Cancels a customer billing document and creates the cancellation document, like VF11. It is used in correction programs and interfaces that reverse invoices. Run it with TESTRUN first, check RETURN and SUCCESS, and call BAPI_TRANSACTION_COMMIT unless NO_COMMIT handling is in place.
- Function group
- VBRK
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| BILLINGDOCUMENT | BAPIVBRKSUCCESS-BILL_DOC | Billing document number | Yes |
| TESTRUN | BAPIVBRKTESTRUN-TESTRUN | Test run (no update) | — |
| NO_COMMIT | BAPI_NCOMT | Do not commit inside the BAPI | — |
| BILLINGDATE | BF_DATM1EB | Cancellation billing date | — |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| RETURN | BAPIRETURN1 | Return messages | Yes |
| SUCCESS | BAPIVBRKSUCCESS | Successfully processed documents | Yes |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
EXPORTING
billingdocument = lv_billingdocument
TABLES
return = lt_return
success = lt_success.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.