Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
YogiPavan
Explorer
1,517

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.

YogiPavan_41-1763655203608.png

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.

YogiPavan_42-1763655203626.png

Methods and its Parameters

YogiPavan_43-1763655203634.png

Steps to Create Custom Logic

Navigate to Custom logic App

Custom Logic App

YogiPavan_44-1763655203638.png

Choose Create button to create Custom Logic.

YogiPavan_45-1763655203643.png

 

Choose Required Business Content

YogiPavan_46-1763655203653.png

 

YogiPavan_47-1763655203664.png

List of available BAdi Definitions for the business context.

YogiPavan_48-1763655203676.png

Choose required BAdi Definition.

YogiPavan_49-1763655203685.png

Its Documentation.

YogiPavan_50-1763655203694.png

Choose Step 2 to add Implementation Description and ID.

YogiPavan_51-1763655203708.png

Implementation ID automatically appears based on Description and it can also be changed.

Choose Review

YogiPavan_52-1763655203721.png

Choose Create

YogiPavan_53-1763655203729.png

Click on Publish button.

YogiPavan_54-1763655203737.png

Its published.

YogiPavan_55-1763655203744.png

Click on Open Code Editor to write the logic.

Importing Parameters.

YogiPavan_56-1763655203760.png

Changing Parameters.

YogiPavan_57-1763655203768.png

Sampe Code -> Show Sample Code

YogiPavan_58-1763655203780.png

Keyboard Shortcuts -> three dot menu -> Show Keyboard Shortcuts

YogiPavan_59-1763655203783.png

YogiPavan_60-1763655203790.png

Write the required logic.

YogiPavan_61-1763655203799.png

 Navigate to Create Purchase order (ME21N)

YogiPavan_62-1763655203804.png

Provide the required details and check.

YogiPavan_63-1763655203809.png

Error is appeared as per logic written.

YogiPavan_64-1763655203815.png

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

YogiPavan_65-1763655203818.png

Chose BAdi Enhancement Implementation.

YogiPavan_66-1763655203820.png

Add Name and description.

YogiPavan_67-1763655203824.png

Add Enhancement Spot

YogiPavan_68-1763655203827.png

BAdi Enhancement Implementation is created.

YogiPavan_69-1763655203834.png

Choose BAdi Implementation to add Implementations.

YogiPavan_70-1763655203843.png

Add BAdi Definition and Custom Class name

YogiPavan_71-1763655203855.png

YogiPavan_72-1763655203867.png

Add Implementation Class

YogiPavan_73-1763655203878.png

Choose Implementation Class, add Custom Class name and its description

YogiPavan_74-1763655203883.png

Implementation Class is created.

YogiPavan_75-1763655203897.png

Implementation Class is added to Badi Implementation details

YogiPavan_76-1763655203908.png

Logic can be added to implementation class

YogiPavan_77-1763655203917.png

Navigate to Create Purchase Order (ME21N)

YogiPavan_78-1763655203920.png

Provide the required details and check

Error appeared as per logic written.

YogiPavan_79-1763655203927.png

Add breakpoint in the implementation class to debug.

Place cursor on the logic, choose right click.

YogiPavan_80-1763655203932.png

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

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.

2 Comments