Symptom
How to define custom routines for the BAdI 'Flexible Billing Document Cancellation' (SD_BIL_FLEX_CANCELLATION).
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
SAP S/4HANA Cloud Public Edition
Resolution
- Create an implementation for the 'Flexible Billing Document Cancellation' BAdI (SD_BIL_FLEX_CANCELLATION) in the 'Custom Logic' app. Implement the required custom logic and assign a filter value to the BAdI implementation.
- Open the 'Implementation Activities' app.
- Open the configuration activity 'Define Custom Routines for Flexible Billing Document Cancellation'.
- In 'Register Routine Number', create a new routine (for example, 3000002) and save your changes.
- In 'Assign Enhancement' IDs to a Routine Number, assign the enhancement ID (filter value) of your BAdI implementation to the registered routine number. Save the changes and assign them to a transport request.
- Open the configuration activity 'Assign Custom Routines to Billing Types'.
- Select the required billing type (for example, F2) and assign the registered routine number (3000002). Save the configuration.
- After completing these steps, the system calls the SD_BIL_FLEX_CANCELLATION BAdI implementation during the cancellation of billing documents for the configured billing type.
See Also
- Flexible Billing Document Cancellation
- 3513593 - Preventing the Cancellation of Cleared Billing Documents in SAP S/4HANA Cloud Public Edition
Keywords
billing document cancellation, reversal posting date, creation date mismatch, document date, prior period posting, closed period, cancellation billing date, flexible billing document cancellation, sd_bil_flex_cancellation, routine assignment, enhancement id filter, billing type configuration, change billing documents, vf02, posting to accounting , KBA , SD-BIL-CA-2CL , Release of Billing Documents to Accounting (Public Cloud) , How To
SAP Knowledge Base Article - Public