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
337

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! 

OwenLiu
Product and Topic Expert
Product and Topic Expert
0 Kudos
Added Sales tag.
Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Could you please clarify if your challenge lies in understanding how to upsert data into a CBO using an extension point (BADI), or if you are having difficulty finding an appropriate extension point to implement your custom logic?

Best Regards,
Fancy

Shadab_Hussain
Explorer
0 Kudos
Hi Fancy - We are struggling to find out the way to insert/update data to CBO using extension point. We already know the BADI.

Accepted Solutions (0)

Answers (1)

Answers (1)

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