cancel
Showing results for 
Search instead for 
Did you mean: 

How to update a RAP object within another RAP-object?

AndreM
Explorer
0 Kudos
504

I have a managed (self-built) RAP object, that is working pretty well together with the generated Fiori-Elements-App.

Upon creating/updating/deleting a dataset in that BO I want to update another (SAP-built) BO through EML. But as I can't commit changes within the "save_modified" and without committing them they won't get saved, I am a bit lost. I also tried to raise a custom Business-Event, fetching it in another class, yet still EML-Modify plus EML-Commit are crashing on runtime because in the obviously synchronous Event-Handling (why synchronous?) I am still "not allowed" to Commit things.

Hope someone can help me soon on how to solve this, Google was no help at all.

View Entire Topic
patrick_boehm
Explorer
0 Kudos

Hi, 

like yunwu also replied.

The commit should be done by the framework automaticly. I've a similar scenario where I modify entities of a different BO within the RAP LUW. But this is done inside the action implementation ( and not inside the save_modified ) ans this is working well for me

rammel_sapdev
Participant
0 Kudos
But what if there is no action required here? It is just a simple app with editable columns, where I need to update the data upon clicking 'Save'?
rammel_sapdev
Participant
0 Kudos
May I know if you are using managed scenario with draft?
patrick_boehm
Explorer
0 Kudos
Yes, I'm using a managed scenario with draft and there we don't have the use case to modify an other BO by clicking an "Save"
rammel_sapdev
Participant
0 Kudos
Hi @patrick_boehm, can I check with you? was your approach similar to this? https://github.com/SAP-samples/abap-platform-rap-workshops/blob/main/rap6xx/rap610/exercises/ex4/REA.... Your action is getting triggered on an already saved BO?