cancel
Showing results for 
Search instead for 
Did you mean: 

RAP Unmanaged Scenario - Creation of RAP BO does not return the %pid

aldimitrov14
Explorer
0 Kudos
321

Hello guys, I have an unmanaged scenario of a web API that has to create an equipment. I am using the RAP BO Interface for the Equipment which is I_EquipmentTP ( CDS View also released for Cloud ).

The RAP BO Interface successfully creates the Equipment, but I do not have access to the Equipment ID ( the key of the RAP BO I_EquipmentTP ) as the Equipment RAP BO has a late numbering applied. I've found the way to retrieve the key fields by using the 'CONVERT KEY' option ( ref. https://github.com/SAP-samples/abap-platform-rap-workshops/blob/main/rap6xx/rap610/exercises/ex4/REA... ) but the %PID of the successful creation is quite empty. I've spent little time to open the create implementation of the RAP BO and to my surprise I do not see a %pid assigned for the operation.

aldimitrov14_0-1717487976412.png

As a payload I am only passing the mandatory field of the RAP BO Interface, and later I can find the newly created Equipment if I run ( let's say read all entities, or SELECT * from ), but I cannot provide the Equipment ID directly after creation, since CONVERT KEY fails to get the newly created key.

My question is this an error on my side ( taking into consideration that the Equipment is successfully created and existing, I would say no ) or this is an expected behavior of the RAP BO and I have to do additional steps to retrieve the key? 

ebe
Explorer
0 Kudos
Hi,
View Entire Topic
ebe
Explorer
0 Kudos

Hi,

I know this is an old question, but I was having the same issue and it seems that, for my case, it was a program error.

There is a SAP note to correct the fact that %PID is not returned: SAP note 3509081 

Regards,

Eric