Configuring the Customer Exit
The Customer Exit mechanism in SAP ABAP allows customization of SAP standard functionality without modifying core code. This ensures enhancements are upgrade-safe, maintainable, and business-specific. Customer exits can include custom business rules, validations, or calculations. They remain intact during upgrades as they are isolated in dedicated includes or function modules. They support various use cases, such as Menu, Screen, Function Module, and Field Exits.
Customer exits are part of the SAP enhancement framework, including BAdIs and Enhancement Points. They provide developers with flexibility while maintaining compliance with system standards compliance. Customer exits reside in their own namespaces (e.g., ZX*, Z*), making them easy to document, audit, and transport between systems.
In SAP, an INCLUDE is provided within a Customer Exit to offer customers a safe and structured environment for writing custom code without directly modifying SAP standard programs. An INCLUDE acts as a secure sandbox for custom logic, preventing code breakage and ensuring full protection during upgrades. The INCLUDE statement modularizes code by inserting the content of one ABAP program or code block into another. It acts as a reusable container for code and is especially useful for organizing large programs.
The INCLUDE statement tells the ABAP runtime to insert the source code from the specified include program during compilation.
Advantages of INCLUDE statements:
- Modularity: Breaks large programs into smaller, logical blocks, making the code easier to understand and manage.
- Reusability: Common logic, declarations, and routines can be written once in an include and reused across multiple programs or function modules.
- Maintainability: INCLUDE statements isolate functionality, allowing updates or bug fixes in one place without affecting unrelated code.
- Enhancement Support: SAP often places enhancement points inside INCLUDES, making them ideal for customer-specific extensions.
- Version Control and Transport Simplicity: Smaller INCLUDE files simplify tracking changes and managing transports.
In the Managed Gateway AddOn, INCLUDE statements address integration requirements between the backend SAP system and SAP Ariba.
Two INCLUDE statements are provided to implement the Request for Quotations (RFQ) via a customer exit.
- INCLUDE ARBCIG_QUOTE_REQUEST_002
- Handles RFQ outbound processing, primarily for the item-level structure and details of the RFQ required for integration. It includes mapping logic, field transformations, and structure population rules to convert SAP RFQ data into the Ariba-expected payload format.
- INCLUDE ARBCIG_QUOTE_REQUEST_011
- Typically handles additional information in the QuoteRequest message, such as Internal to External Format Conversion, Product Hierarchy, custom formatting of service lines, and Service Line Texts. It transforms data to fit SAP Ariba’s XML data model and customer-specific business rules, allowing customers to add or fine-tune RFQ data before sending it to SAP, ensuring it matches their business needs and avoids integration issues.