3 weeks ago
Hi all, I'm developing API based on RAP bo.
In batch request, there could be multi entities as import parameter in one changeset, and in RAP internal table, I see a field %cid. I thought it is content id which was provided in batch request body, but after I tried to set it, it was not shown in debugging.
I think this is the field to differentiate the entity with same key in batch. Please correct me if I was wrong.
Regards,
Eric
Hello,
Your understanding is correct! Let me explain further.
Suppose there is a Primary(Root) Entity lets name EntitySet1 and there is a Dependent Child Entity lets name it EntitySet2. And we are Triggering a CREATE operation. So, obviously in the Payload we would be passing values for EntitySet1 and EntitySet2 values using the Navigation Property.
Now you can consider this %CID as part of EML(Entity Manipulation Language) structures as a Temporary Key fields to uniquely identify the records. Temporary in the sense until the real Business Object identifiers are generated. Now, in this you can visualize the below scenario,
Suppose a Payload is passed with Root Entities and Child Entities values and while accessing the Payload say during a CREATE operation in the Behavior Pool Class you want to link a Root Entity record with its corresponding Child Entity Records then the same could be done using below link:
ENTITIES_CBA-%cid_ref = ENTITIES-%cid.
Left side is the EML runtime structure for Child Entity and Right side is the EML runtime structure for Root Entity.
Where CBA is for Create By Association.
Please refer the below link for more detail:
https://help.sap.com/docs/abap-cloud/abap-rap/implicit-response-parameters
Thanks,
Sijin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.