cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code logic to read current Account ID in BADI for Custom Business Object

0 Kudos
690

Hi All,

We have created a custom business object with some custom fields, in SAP Marketing Cloud, and have added it on the UI as a new tile. We now use the URL of the CBO in the extensions of the account screen, to create a new section on the account screen.

Now, I need to write some code logic to filter data in the custom business object based on the current account which the user has opened. Is there a way to read the current account value into the custom business object, so that I can filter the values in the CBO based on the current account ID.

Here is an example for reference:-

Suppose we have a CBO with the below fields

We have added this CBO on the account screen as a new section, say Test Section. Now if I am opening the account 12345 on the marketing cloud screen, and go into the Test Section where I have added the CBO. Here I want to see only the field values for AccountID 12345 i.e

Please let me know how we can achieve this.

kunalkumar.bansal saurabhkabra2009 Tobias Schneider...can any of you help on this. Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks a lot Eileen, for the detailed explanation.

Really helped in achieving my requirement.

Regards,

Pooja Maru

eileenriediger
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pooja,

sorry my answer was not enough. When you fill the CBO, you also need to save the SAP_UUID of the Account ID in a custom field of your account. Than you need to copy the URL with the subsection part and use this URL and the SAP_UUID in your custom field for building the URL:

To get rid of the launchpad header in your iFrame you can add &sap-ushell-config=headerless right before the Fiori ID in your URL, e.g. https://<hostname>.s4hana.ondemand.com/ui?sap-language=EN&sap-ushell-config=headerless#YY1_

Best regards,

Eileen

0 Kudos

Hi Eileen,

Thanks for the response. I made the changes as per your suggestion and created a root node with Account ID and subnode with the fields field1, field2, field3. Even now adding the parameter account ID in the URL, does not filter, but displays the entire data.

Anything that i am doing wrong?

Thanks & Regards,

Pooja Maru

eileenriediger
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pooja,

you can only filter via URL parameter on the key of a node. For that you need to change the structure of your CBO. The Account ID must be part of the root node and field1, field2 and field3 must be part of the subnode.

Best regards,

Eileen