A Business Add-In (BAdI) is an SAP enhancement mechanism that allows customers to add custom business logic to standard SAP applications without modifying SAP standard code. It provides predefined enhancement points where organizations can implement validations, field derivations, data enrichment, and customer-specific processing. Because BAdIs keep custom code separate from SAP's standard programs, they offer a flexible, maintainable, and upgrade-safe way to extend SAP functionality. BAdIs are SAP's recommended enhancement technique because they enable organizations to adapt standard functionality to meet their specific business requirements while remaining upgrade-safe.
In the context of integrating invoice status from the back-end SAP system into SAP Ariba Procurement solutions, the ARBCIG_INV_STATUS_EXPORT BAdI provides an enhancement framework that enables customers to customize how canceled invoice statuses are processed before they are exported to SAP Ariba. This BAdI uses the following methods:
PUBLISH_BEFORE_SEND: To modify, validate, enrich, or filter the invoice status message, populate custom fields, add validations, and custom notes before sending to SAP Ariba Procurement solutions.
PUBLISH_AFTER_SEND: To process activities such as logging, auditing, notifications, workflow triggering, or updating custom tables after sending the invoice status export message to SAP Ariba Procurement solutions.
The ARBCIG_INV_STATUS_EXPORT BAdI allows customers to:
- Customize which canceled invoices should be exported.
- Modify or enrich the invoice status message before sending it.
- Apply additional validation rules.
- Populate customer-specific fields or extension fields.
- Implement organization-specific business logic.
The standard integration covers common invoice processing scenarios. However, organizations often have business-specific requirements that cannot be met solely through standard configuration. The ARBCIG_INV_STATUS_EXPORT BAdI allows customers to implement custom logic without modifying SAP standard code, making it a clean and upgrade-friendly enhancement option.
Follow these steps to implement BAdI for Invoice Status Export in the Managed Gateway for Spend&Network AddOn SPRO:
- Using the transaction code SPRO, navigate to Integration with Other SAP Components>Managed Gateway for Spend&Network for Buyer>SAP Ariba Procurement Integration>Business Add-Ins (BAdIs)>Invoice Status Export.

- Expand the Invoice Status Export node and select the IMG activity for BAdI for Invoice Status Export.

- On the Create Enhancement Implementation pop-up window, enter the necessary information, then select the Creation of Enhancement (Enter) icon to maintain the BAdI to address your business-specific requirements.
The values shown in the screenshot are for illustration purposes only.

Note
For more information on implementing BAdI, refer to the SAP standard documentation on How to Implement BAdI.