Introduction
In OnStack extensibility, Enhancements can be created using Custom Logic App in Key User Extensibility and BAdi Enhancement Implementation in Developer Extensibility.
Key user extensibility also know as In App extensibility, extensions can be added with key user tools.
Developer extensibility using sap cloud abap environment for developer extensions.
Key User Extensibility / In App Extensibility- Custom Logic
Custom Logic is one of the Key User Extensibility Tools
In the Custom logic App,
- Custom logic can be added
- Easy exploration of extension points, key user documentation
- Syntax check, syntax highlighting, code completion
- Draft, published, testing included
- ABAP Language Version for Key Users
- Enhancements can be created using Custom Logi App
Business Accelerator Hub
SAP Business Accelerator Hub provides a section for On Stack extensibility (key user extensibility and developer extensibility), to know list of SAP CDS views, APIs, Business Add-ins etc. are available with the release status.
Navigate to Business Accelerator Hub to find BAdis
On Stack Extensibility -> Business Add-ins
Search for required BAdi.
This BAdi is related to check purchase order before saving to create it.
Here it shows BAdi Definition and Enhancement spot.
BAdi can be used in both Key User and Developer Extensibility as both states of BAdi is in released state.
Methods and its Parameters
Steps to Create Custom Logic
Navigate to Custom logic App
Custom Logic App
Choose Create button to create Custom Logic.
Choose Required Business Content
List of available BAdi Definitions for the business context.
Choose required BAdi Definition.
Its Documentation.
Choose Step 2 to add Implementation Description and ID.
Implementation ID automatically appears based on Description and it can also be changed.
Choose Review
Choose Create
Click on Publish button.
Its published.
Click on Open Code Editor to write the logic.
Importing Parameters.
Changing Parameters.
Sampe Code -> Show Sample Code
Keyboard Shortcuts -> three dot menu -> Show Keyboard Shortcuts
Write the required logic.
Navigate to Create Purchase order (ME21N)
Provide the required details and check.
Error is appeared as per logic written.
This implementation class can be opened in the eclipse, and break point can be added in the logic, and it triggers when creating purchase order in the Create Purchase Order (ME21N).
Key-user objects can be displayed and debugged but cannot be edited with ABAP development tools.
Developer Extensibility – BAdi Enhancement Implementation
Steps to Create Impelementation
Create New BAdi Enhancement Implementation
Chose BAdi Enhancement Implementation.
Add Name and description.
Add Enhancement Spot
BAdi Enhancement Implementation is created.
Choose BAdi Implementation to add Implementations.
Add BAdi Definition and Custom Class name
Add Implementation Class
Choose Implementation Class, add Custom Class name and its description
Implementation Class is created.
Implementation Class is added to Badi Implementation details
Logic can be added to implementation class
Navigate to Create Purchase Order (ME21N)
Provide the required details and check
Error appeared as per logic written.
Add breakpoint in the implementation class to debug.
Place cursor on the logic, choose right click.
Break point is added
Break point can be added in the logic, and it triggers when creating purchase order in the Create Purchase Order (ME21N).
References
- Custom Logic | SAP Help Portal
- Custom Logic Tracing | SAP Help Portal
- Extensibility | SAP Help Portal
- Key User Extensibility | SAP Help Portal
- Developer Extensibility | SAP Help Portal
- Using Key-User In-App Extensibility to Create Custom Business Log
- Implementing BAdI Enhancement in SAP S/4HANA Cloud Public Edition | SAP Help Portal
Conclusion
In Key User Extensibility, Custom logic can be added and Enhancements can be created using Custom Logic App.
In Developer Extensibility, BAdi Enhancement Implementation can be created.
Read More Technology Blog Posts by Members articles
#abap