cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing data from the ODATA association using BTP destination integration

chandan3009
Explorer
0 Kudos

Hello all,

I am using SAP BTP destination services for setting up the ODATA integration with SAP C4C. While doing this, I do see an option to expand(include) the associations in the integration (as can be seen in below screenshot)

In above screenshot, we can see BTP destination integration do give option to enable the association for integration, however I cannot access these association while actual binding to the UI components as it was possible with the traditional AppGyver ODATA integration.

Can someone shed some light on how could I access the association data (like Activity Text or Activity Party from above example) through the Enabled ODATA collection (here ActivityCollection)?

BR, Chandan

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

Hi Chandan,

you need to use a formula to access the expanded data.

Let's assume you have a list item object where you display all the ActivityCollection entry and you want to display the corresponding "Text" from the expanded ActivityText, it should be a formula like repeated.current.ActivityText.results.Text

Explanation:
repeated = because in the list we repeat the items with every entry in the backend
current = we want to access the current row
ActivityText = the expanded entity you want to access
results = I checked the API (https://api.sap.com/api/memoactivity/tryout) and it seems that the data from the ActivityText is again in an object called results. If not just delete the results. part
Text = the final data object that you want to display from the ActivityText data entity. Just type in the data object that you want to use.

Best regards;
Marc

chandan3009
Explorer
0 Kudos

Hi Marc,

While creating new memo in C4C, below payload works using Postman:

{"SubjectName": "Ticket Subject","InitiatorCode": "2", // value "2" for inbound to SAP Cloud for Customer, value "3" for outbound from SAP Cloud for Customer"ActivityParty": [{"PartyID": "1000080", // customerId"PartyTypeCode": "159", // value "159" for b2c, value "147" for b2b"RoleCode": "34" // value "34" for b2c, value "49" for b2b}],"ActivityText": [{"Text": "Ticket Message 2","TypeCode": "10002"}],"ActivityBusinessTransactionDocumentReference": [{ "ParentObjectID": "9B6B537C38BB1EDE8187F3EF6766C804", "ID": "164", "TypeCode": "118", "RoleCode": "1"}]}

But I cannot send all these sample data to C4C using Build Apps in single Create Record flow for ActivityCollection. This is because Data Variable for ActivityCollection doesn't show elements to bind the data (shown in screenshot above in reply to Daniel).

In turn, if I decide to create individual call to each ODATA collection for creation, I don't see option to add custom record for Record creation. Below screenshots for other two ODATA collection which I wish to use to associate the associate data to main ActivityCollection. These shows only option to add objectID for creation: