Introduction
In On Stack extensibility, Enhancements can be created using BAdi Enhancement Implementation in Developer Extensibility.
Developer extensibility using SAP Cloud ABAP Environment for developer extensions.
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.
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
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.
ZCL_CHECK_PO▸
CLASS zcl_check_po DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_badi_interface
INTERFACES if_ex_mmpur_final_check_po .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_check_po IMPLEMENTATION.
METHOD if_ex_mmpur_final_check_po~check.
ENDMETHOD.
ENDCLASS.
Implementation Class is added to Badi Implementation details
Logic can be added to implementation class
ZCL_CHECK_PO▸
CLASS zcl_check_po DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_badi_interface
INTERFACES if_ex_mmpur_final_check_po .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_check_po IMPLEMENTATION.
METHOD if_ex_mmpur_final_check_po~check.
IF purchaseorder-supplier EQ ‘0000100005’.
APPEND VALUE #( messagetype = ‘E’ messagevariable1= |Choose another Supplier] ) TO messages.
ENDIF.
ENDMETHOD.
ENDCLASS.
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).
Conclusion
In Developer Extensibility, BAdi Enhancement Implementation can be created and deleted.
Custom Implementation can be captured in TR’s and those can be moved to test, production systems.
This custom implementation can also be debugged.
References
Extensibility | SAP Help PortalDeveloper Extensibility | SAP Help PortalImplementing BAdI Enhancement in SAP S/4HANA Cloud Public Edition | SAP Help Portal
IntroductionIn On Stack extensibility, Enhancements can be created using BAdi Enhancement Implementation in Developer Extensibility.Developer extensibility using SAP Cloud ABAP Environment for developer extensions. Business 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.On 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 ParametersDeveloper 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. ZCL_CHECK_PO▸
CLASS zcl_check_po DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_badi_interface
INTERFACES if_ex_mmpur_final_check_po .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_check_po IMPLEMENTATION.
METHOD if_ex_mmpur_final_check_po~check.
ENDMETHOD.
ENDCLASS. Implementation Class is added to Badi Implementation detailsLogic can be added to implementation class ZCL_CHECK_PO▸
CLASS zcl_check_po DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_badi_interface
INTERFACES if_ex_mmpur_final_check_po .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_check_po IMPLEMENTATION.
METHOD if_ex_mmpur_final_check_po~check.
IF purchaseorder-supplier EQ ‘0000100005’.
APPEND VALUE #( messagetype = ‘E’ messagevariable1= |Choose another Supplier] ) TO messages.
ENDIF.
ENDMETHOD.
ENDCLASS. Navigate 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).ConclusionIn Developer Extensibility, BAdi Enhancement Implementation can be created and deleted.Custom Implementation can be captured in TR’s and those can be moved to test, production systems.This custom implementation can also be debugged.ReferencesExtensibility | SAP Help PortalDeveloper Extensibility | SAP Help PortalImplementing BAdI Enhancement in SAP S/4HANA Cloud Public Edition | SAP Help Portal Read More Technology Blog Posts by Members articles
#SAP
#SAPTechnologyblog