Example of how to add a Validation with the Business Partner Master Data BADI in S/4HANA Cloud
***Image/data in this Blog is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.***
Hello SAP S/4HANA Cloud Community,
I work on the LO-MD-BP component for SAP S/4HANA Cloud and I wanted to share some information with our community around BADIs. While this blog is specifically aimed at Customer/Supplier Business Partner Master Data area the steps could also be useful to other areas. In the Customer/Supplier Business Partner Master Data area we have three BADIs (see this blog for information on these BADIs: Business Partner (Customer / Supplier) Master Data BADIs in S/4HANA Cloud )
In this blog, I will show a simple example of how to write a validation on the Authorisation Group field for the Business Partner Master. Much more complex validations can be written but I have written and tested a simple validation for the purpose of this blog. ***Disclaimer, the code which is written in the screenshot below is intended for demonstration purposes only.
1. Open the Custom Fields and Logic App (F1481)
2. Open the “Custom Logic” section and press the create symbol ‘+’
3. Choose the Business Context and BADI give it an Implementation Description and press create
4. On the next screen, you will be able to write your validation code, once you are happy with your code you can Test and Publish it.
5. We will now test this line of validation code by trying to create a Business Partner while leaving the Authorisation Group field blank.
6. Once the Authorisation Group is entered the error is no longer raised.
Information on Additional Related Blogs:
For the General SAP Help Portal documentation on Extensibility & Custom Fields and Logic see:
For information on Customer / Supplier Business Partner Master Data: Authorization Groups see this blog:
Customer / Supplier Business Partner Master Data: Authorization Groups
The example in this blog is intended for explanation purposes.
SAP Product Support