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

RAP: Difference between %CID and %PID?

andre_katz_88
Explorer
0 Likes
8,120

Hello Gurus,

I'm currently learning RAP and have encountered difficulties in understanding the following aspects:

1. Are %CID & %PIT the same thing but at different stages of processing?

2. What is the main difference between %CID & %PID?

3. At what stage is %CID assigned and at what %PID?

4. Is %CID only assigned in CREATE and %PID in UPDATE?

Would be grateful for any useful advice/hints.

Thank You!

P.S. I've already looked through the official documentation, but I still couldn't understand the points mentioned.

Accepted Solutions (0)

Answers (1)

Answers (1)

Renzo
Product and Topic Expert
Product and Topic Expert

%CID is an ID that is given by the consumer of RAP EML to correlate the result (like MAPPED, RESULT, FAILED and REPORTED) to the input. It is available for

  1. create operation (create, create by association, factory actions and static factory actions), where it can also be used to reference the created instance via %CID_REF to create e.g. children within the same EML statement,
  2. as well as static actions, static functions and repeatable actions.

%CID has to be unique and is valid for a single EML statement.

%PID is a preliminary ID that is given by the provider. It is present only in case of late numbering of an entity.

%PID is no (unique) ID on its own, but the full transient and unique key of an entity is %TKY. The %TKY is unique within the current transaction. In the save sequence, early save phase, adjust numbers the %TKY is replaced by the final key (without %PID or rather %PID being initial) returned in MAPPED (late).