Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Filter out temporary RFX Event ID from api output when event document is editing

adam_hartling
Member
0 Kudos
98

Hello,

We are currently setting up data automation using SAP Ariba API's to pull RFX event and sourcing project data to replicate into our own tender's portal. Every ten minutes a script runs to pull the latest data to replicate to the other system, if relevant.

We've recently noticed a behavior for RFXDocument document types for the internal ID, that if the document is being edited in Ariba when the script runs, a different internal ID is returned. Once the event document has finished editing and saved, the returned ID is reported as the correct one. We assume this new ID is a temporary, hidden document used to save the changes till they are saved to the document.

For example, when not being edited, any updates to the event returns the correct id of:

"InternalId": "Doc1395976349",

but when the event is being edited by the owner and hasn't saved the edit when the script runs, we get a different ID such as below. This unknown ID changes each time.
"InternalId": "Doc1400548792",

Is there a way to filter out these temporary ID's so they are not reported? Perhaps they ahve a flag or other indicator we could look for in the returned data?

Thank you,

Adam Hartling

Province of Nova Scotia
Department of Service Nova Scotia and Internal Services Procurement – Business Intelligence

  • SAP Managed Tags:
1 REPLY 1

Shashank
Advisor
Advisor
0 Kudos
43

Hi Adam,

From little investigation that I could do, I think this is one potential way of dealing with such temporary records:
There is a field called "DocumentId" in the metadata for RFXDocument, I added that to my view template. I think what you should do is check if the "InternalId" and "DocumentId.InternalId" in API response are different for a specific record. if yes, that would mean it is a temporary RFX record which will eventually go to Archived state. Let me know if that logic works out for you.

  • SAP Managed Tags: