cancel
Showing results for 
Search instead for 
Did you mean: 

AIF API EDIT call from Gateway

10-23-2023 9:42 PM
nancy_paul Explorer
1141 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

Hi Team I am trying to trace a AIF edit call from message monitoring through OData traces and trying to execute the batch call from gateway client(by replaying the trace) and I am getting the following error

{"error":{"code":"/AIF/MONITORING/001","message":"Saving message failed. Refresh needed.","@SAP__common.longtextUrl":"../../../../default/iwbep/common/0001/T100Longtexts(MessageClass='%2FAIF%2FMONITORING',MessageNumber='001',Variable1='',Variable2='',Variable3='',Variable4='')/Documentation","@SAP__common.ExceptionCategory":"Provider_Application_Error","details":[{"code":"SY/530","message":"An exception was raised","@SAP__common.Severity":"error","@SAP__common.numericSeverity":4},{"code":"/AIF/ERROR_HANDLING/070","message":"Data is out-of-date; last changed by &NPAUL6& at &20231023191430.9743710 &; reload the data","@SAP__common.Severity":"error","@SAP__common.numericSeverity":4}],"innererror":{"ErrorDetails":{"@SAP__common.Application":{"ComponentId":"BC-SRV-AIF","ServiceRepository":"DEFAULT","ServiceId":"/AIF/MESSAGEHANDLING","ServiceVersion":"0001"},"@SAP__common.TransactionId":"D8D8F8DA269801D0E006505093051356","@SAP__common.Timestamp":"20231023193703.596145","@SAP__common.ErrorResolution":{"Analysis":"Use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details","Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"}}}}}

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

lei_su
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Nancy,

It tells you the data has been already modified. You need to first execute the GET request to get the eTag value and then you use it in your POST request.

Kind Regards,

Lei

nancy_paul
Explorer
0 Likes

Thanks for the response, I am trying to call the standard AIF API to update the AIF interface.

/sap/opu/odata4/aif/msgmonitoring_api/default/aif/messagehandling/0001/$batch?sap-client=110

When I trace from message monitoring I can see the get and the patch call however when I try to replay the same I get the above error.

I understand we need to do the get and then the patch but can you explain in detail how to do it.

May be I am missing some steps or pass in the wrong header value.