cancel
Showing results for 
Search instead for 
Did you mean: 

Create/Update/Delete entry in key user custom business object using code in BADI implemented

Shadab_Hussain
Explorer
0 Kudos
672

Hi, We have created custom business object using key user extensibility in s4 hana public cloud system. Now, we have a requirement to create entry in this CBO using cloud badi available for billing document header for custom fields.

Whats the way and workaround for this. Let me know if further details are required.

Thanks! 

View Entire Topic
Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,
You may try updating the CBO using API. Kindly refer to the two blogs for how-to examples.
1. You can find how to create custom APIs to update CBO in API operations for Custom Business Objects in S/4H... - SAP Community
2. Based on the APIs, the blog discussed and illustrated how to invoke the API from BADI to update CBO: Solved: Update Custom CBO from BADI - SAP Community
Best Regards,
Fancy

Shadab_Hussain
Explorer
0 Kudos
Thanks Fancy, but solution 1 is for external call and solution 2 gives forbidden error when used in custom logic.
Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @Shadab_Hussain ,

To operate a custom business object (CBO), you need to refer to both blogs together. The first blog provides guidance on exposing an API for CBO operations, while the second blog demonstrates how to invoke this API via BADI to update data within the CBO.

Best Regards,
Fancy