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

managed rap + unmanged save and bapi getting success message + error site

ABAP-Bernd
Discoverer
0 Kudos
155

Hi all,

hope you have a idea for my issue in my onPrem system. I create a managed rap business object displaying a maintenance order with operations and confirmations. For creating my confirmations I use a bapi (create maintenance confirmation with internal numbering). I embed the bapi in my handler class for unmanaged saving.

Using my generated fiori elements web site for creating a confirmation I get a success message and additional a error message (requested data wasn't found). In my console I see that my site made a get request with the maintenance order + operation but the key of the previous created confirmation are empty. 

How can I tell the system the key's of the created entity, so that the get method is processed correctly? 
Last week I made the course s4d437 and there the trainer told me to use late numbering, but how? The bapi manage the keys by itself. 

Does any one have a idea?

Thanks and regards
Bernd

View Entire Topic
MioYasutake
Active Contributor

@ABAP-Bernd 

If the entity's key is returned by the BAPI, call the BAPI in the adjust_numbers method as demonstrated in the blog post below:

https://community.sap.com/t5/technology-blog-posts-by-sap/exposing-bapi-as-odata-api-using-rap-facad...

 

 

ABAP-Bernd
Discoverer
@MioYasutake Now I get it, you made my day.