Skip to Content
0

Fetch Key in response profile in HCI

Mar 07, 2017 at 02:21 PM

42

avatar image
Former Member

Hi Experts,

I am upserting records in SuccessFactors FOCostCenter using Odata. The response profile I am getting does not contain any Key field to determine which record failed or was successful. Is there any way to determine the same?

Sample response:-

<FOCostCenterUpsertResponse>
<key null="true"/>
<status>OK</status>
<editStatus>UPSERTED</editStatus>
<message null="true"/>
<index type="Edm.Int32">0</index>
<httpCode type="Edm.Int32">200</httpCode>
<inlineResults type="Bag(SFOData.UpsertResult)"/>
</FOCostCenterUpsertResponse>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Mar 07, 2017 at 03:26 PM
1

Hi,

For successful records it comes like this .

<keynull="true"/>

<status>OK</status>

Keynull as True and status as OK.For unsuccessful records it comes in KEY the message will come and status will show Error.For example as follows:So your output is correct only.Try for one record which will fail in SF,so that you can be able to check Key there also.


errorrecord.png (33.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Sriprasad Shivaram Bhat Mar 07, 2017 at 03:45 PM
0

Hello Arpna,

Agree with sonalika.!

Key is not related to SAP HCI it has to come from SF only.

As per my understanding you have to capture those key details with index before upserting the data and then correlate both using Index[ if you are inserting in batch ]

Regards,

Sriprasad Shivaram Bhat

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sriprasad,

This was initial approach I thought of but was not sure if indexing of source file would match the response profile. Now I am upserting each record at a time and and saving key values in a property so that I can fetch them at a later stage.

Maybe not the best approach considering performance but this is what solved my problem.

Thanks,

Arpna

0