[[{“value”:”
Introduction
In On Stack extensibility, Enhancements can be created using Custom Logic App in Key User Extensibility.
Key user extensibility also know as In App extensibility, extensions can be added with key user tools.
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.
IF purchaseorder-supplier EQ ‘0000100005’.
APPEND VALUE #( messagetype = ‘E’ messagevariable1 = |Choose another Supplier| ) TO messages.
ENDIF.
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.
Conclusion
In Key User Extensibility,
Custom logic can be added and Enhancements can be created using Custom Logic App.
Own implementation can be created and those can be deleted.
Implementation can be published to test, production systems
Code can be compared with older code versions.
References
- Custom Logic | SAP Help Portal
- Custom Logic Tracing | SAP Help Portal
- Extensibility | SAP Help Portal
- Key User Extensibility | SAP Help Portal
“}]]
Read More Technology Blog Posts by Members articles
#abap