on ‎2024 Dec 01 8:50 AM
I am working with SAP ABAP RAP in a Managed Scenario to enable upsert functionality for an OData V4 API. I am using SAP S/4HANA Public Cloud's Developer Extensibility feature, and the source code was automatically generated through the Generate RAP Service option in Eclipse.
My understanding is that UPDATE_ENTITY_LIST does not need to be manually implemented in a Managed Scenario because the framework should handle create, update, and delete operations automatically when they are defined in the Behavior Definition.
The OData service works perfectly for single entity operations (create, update, and delete). However, I encountered an issue when testing upsert with a Delta Payload PATCH request for a collection of entities:
{"error":{"code":"/IWBEP/CM_V4S_RUN/003","message":"Not implemented - The request cannot be processed; Implement '/IWBEP/IF_V4_DP_ADVANCED~UPDATE_ENTITY_LIST'","@SAP__common.ExceptionCategory":"Provider_Application_Error","innererror":{"ErrorDetails":{"@SAP__common.Application":{"ComponentId":"BC-ESI-ESF-GW","ServiceRepository":"SRVD_A2X","ServiceId":"ZAPI_EAC_TEST_TBL_O4","ServiceVersion":"0001"},"@SAP__common.TransactionId":"9E74C0DFBEB60000E00674B0F7224F8C","@SAP__common.Timestamp":"20241201082256.048968","@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)"}}}}}
Behavior Definition:
define behavior for ZR_EAC_TEST_TBL
persistent table ZEAC_TEST_TBL
lock master
authorization master( global )
{
field ( mandatory : create ) ApprNo;
field ( readonly : update ) ApprNo;
field ( mandatory : create ) ItemNm;
field ( readonly : update ) ItemNm;
create;
update;
delete;
}
Service Binding:
Testing Upsert:
Is manual implementation of the UPDATE_ENTITY_LIST method necessary in a Managed Scenario for upsert functionality?
If manual implementation is required, what is the correct way to implement UPDATE_ENTITY_LIST in SAP RAP Managed Scenario?
Are there specific configurations in the Behavior Definition or OData service that I might have missed?
I would appreciate guidance or examples to resolve this issue.
Request clarification before answering.
The upsert functionality is not yet supported in SAP S/4HANA Cloud public edition.
It is planned to be supported as of 2502.
In SAP S/4HANA public edition you can not implement the method UPDATE_ENTITY_LIST of the SAP Gateway V4 framework.
In SAP S/4HANA private edition it would be possible to have a workaround by developing a second service which is implemented using code based implementation of the SAP Gateway OData V4 framework which has the same signature as your RAP based service and that in the end would use the RAP BO via EML calls.
That means for using upsert one would have to call a different URL though.
I am currently working an a sample that I am going to publish in GitHub that exactly shows this feature for private cloud and on prem systems in addition to showing this new feature in RAP in 2502.
Kind regards,
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.