cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Do I Need to Manually Implement UPDATE_ENTITY_LIST in SAP RAP Managed Scenario?

hcho1
Discoverer
0 Likes
1,177

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)"}}}}}

What I Have Done:

  1. Behavior Definition:

    • I defined the create, update, and delete operations for the entity in my 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;
}

  1. Service Binding:

    • The OData service binding was successfully published, and CRUD operations for single entities work as expected.
  2. Testing Upsert:

    • I tested upsert functionality using a PATCH request with a Delta Payload ("@context": "#$delta") via Postman.
    • Despite defining create and update in the Behavior Definition, I received the above error.

Questions:

  1. Is manual implementation of the UPDATE_ENTITY_LIST method necessary in a Managed Scenario for upsert functionality?

    • If not, why is the framework unable to handle it automatically?
  2. If manual implementation is required, what is the correct way to implement UPDATE_ENTITY_LIST in SAP RAP Managed Scenario?

    • Should it be placed in the Behavior Implementation class, or does it require a different CDS or custom interface?
  3. Are there specific configurations in the Behavior Definition or OData service that I might have missed?

    • For example, does the Delta Payload or the @context annotation in the request need specific settings?

I would appreciate guidance or examples to resolve this issue.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

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

 

saurabh__khare38
Participant
0 Likes
That would be great Andre!

Answers (0)