Custom Logic, BAdi Enhancement Implementation – On Stack Extensibility

Estimated read time 6 min read

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 addedEasy exploration of extension points, key user documentationSyntax check, syntax highlighting, code completionDraft, published, testing includedABAP Language Version for Key UsersEnhancements 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 PortalCustom Logic Tracing | SAP Help PortalExtensibility | SAP Help PortalKey User Extensibility | SAP Help PortalDeveloper Extensibility | SAP Help PortalUsing Key-User In-App Extensibility to Create Custom Business LogImplementing 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.

 

​ IntroductionIn 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 LogicCustom Logic is one of the Key User Extensibility Tools                        In the Custom logic App, Custom logic can be addedEasy exploration of extension points, key user documentationSyntax check, syntax highlighting, code completionDraft, published, testing includedABAP Language Version for Key UsersEnhancements can be created using Custom Logi AppBusiness Accelerator HubSAP 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 BAdisOn Stack Extensibility -> Business Add-insSearch 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 ParametersSteps to Create Custom LogicNavigate to Custom logic AppCustom Logic AppChoose 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 ReviewChoose CreateClick on Publish button.Its published.Click on Open Code Editor to write the logic.Importing Parameters.Changing Parameters.Sampe Code -> Show Sample CodeKeyboard Shortcuts -> three dot menu -> Show Keyboard ShortcutsWrite 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 ImplementationSteps to Create ImpelementationCreate New BAdi Enhancement ImplementationChose BAdi Enhancement Implementation.Add Name and description.Add Enhancement SpotBAdi Enhancement Implementation is created.Choose BAdi Implementation to add Implementations.Add BAdi Definition and Custom Class nameAdd Implementation ClassChoose Implementation Class, add Custom Class name and its descriptionImplementation Class is created.Implementation Class is added to Badi Implementation detailsLogic can be added to implementation classNavigate to Create Purchase Order (ME21N)Provide the required details and checkError appeared as per logic written.Add breakpoint in the implementation class to debug.Place cursor on the logic, choose right click.Break point is addedBreak point can be added in the logic, and it triggers when creating purchase order in the Create Purchase Order (ME21N).ReferencesCustom Logic | SAP Help PortalCustom Logic Tracing | SAP Help PortalExtensibility | SAP Help PortalKey User Extensibility | SAP Help PortalDeveloper Extensibility | SAP Help PortalUsing Key-User In-App Extensibility to Create Custom Business LogImplementing BAdI Enhancement in SAP S/4HANA Cloud Public Edition | SAP Help PortalConclusion                     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 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author