Ansicht
Dokumentation

ABAPDERIVED_TYPES_PID - DERIVED TYPES PID

ABAPDERIVED_TYPES_PID - DERIVED TYPES PID

BAL_S_LOG - Application Log: Log header data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

%pid

%pid is a component of BDEF derived types. It is used as a preliminary ID that is only available if late numbering is defined in the BDEF.

To identify a newly created instance for internal processing during the RAP interaction phase and before the RAP save sequence, %pid is assigned as a temporary identifier for RAP BO instances in the methods for create operations. It works as a substitute as long as there are no final key values. Hence, instances are referred to by %pid. To assign the real and final key values to the instances, the method adjust_numbers is called before the actual saving happens with the save method. The adjust_numbers method transforms %pid into the final key values. This late key value assignment ensures that the instance can be written to the database.

Late numbering is usually specified in the root entity. Thus, late numbering gets inherited to the composition tree. Consequently, %pid components must also be reflected in the hierarchy of RAP BO instances and non-composition associations before finally setting the keys.

Use of keys and RAP BO instance identifiers in a nutshell

Type

The component has the following type: ABP_BEHV_PID

Where used

%pid occurs in late numbering scenarios only. It is not available in static actions and functions, TYPE TABLE FOR KEY OF or TYPE STRUCTURE FOR KEY OF. In case of create operations, %pid must be filled in the mapped response parameter only.

Note

In late numbering scenarios, not only %pid but also %key can contain preliminary keys during the RAP interaction phase. The preliminary keys are transformed into final key values with the adjust_numbers method.

Example

The following source code section taken from the BP_DEMO_UMANAGED_ROOT_LATE_NUMCCIMP of the global class of the behavior pool BP_DEMO_UMANAGED_ROOT_LATE_NUM demonstrates the component %pid in the context of a create method that is responsible for creating %pid and mapping it to %cid. See the executable program for this example in the topic Using %pid.

  • The example Using %pid demonstrates the use of %pid with an unmanaged RAP BO in a late numbering scenario.





General Material Data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 4446 Date: 20240419 Time: 074447     sap01-206 ( 57 ms )