Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP RESTful Programming Model →  Derived Types 

Component of the Derived Types

Derived data types in the context of the ABAP RESTful programming model also contain components that are not based on the row type of the entity and that start with the character % to avoid naming conflicts with original components. For example, the row type of the failed table failed contains a component %FAIL used to save the symptom of a failed instance, plus an include structure %KEY that contains all primary key fields of the entity.

The following list contains the most frequent components of the derived types:

  • Content ID %CID
    A temporary primary key for an instance (if the business object runtime did not create a primary key).
    The content ID is granted to bind the result of an operation to a name and address it again in a later operation. More specifically this applies to the operation CREATE, where the input does not contain the granted instance key (except where keys are granted externally). The component %CID is generated in the operations CREATE, UPDATE, DELETE, create-by-association, and ACTION and applied to the parameters failed, mapped, and reported.
  • %CID_REF
    A reference to the content ID %CID.
  • %KEY
    Contains all key elements of an entity.
    The component %KEY is generated in the operations CREATE, UPDATE, DELETE, create-by-association, ACTION, READ, and read-by-association and applied to the parameters LINK, failed, mapped und reported.
  • %PID
    The temporary ID component of type ABP_BEHV_PID.
    %PID is available only if late numbering is defined in the behavior definition without the addition in place. %PID is used only if the application does not provide a temporary primary key %TMP. In the operation CREATE, %PID must be entered in the mapped table and hence set with respect to %CID.
    The component %PID is generated in the operations UPDATE, DELETE create-by-association, ACTION, READ, and read-by-association and applied to the parameters failed, mapped, and reported.
  • %PIDPARENT and %PID_Assoc
    In the period before the final keys are granted, the %PID fields must represent the instance hierarchy and their associations using non-composition associations. The instance hierarchy is represented using the field %PIDPARENT, which (generically) applies the function of the superordinate foreign key. The associations are provided using %PID_Assoc fields, which are inserted in a target entity with late numbering and simple cardinality for each association with the name (or alias Assoc) released in a transactional way. Cardinality 0..1 or 1 matches a foreign key in the source entity. %PID_Assoc applies this function if it is not filled.
  • %CONTROL
    Specifies which elements of an entity are requested by the consumer.
    For each entity element, the control structure %CONTROL contains a flag specifying whether the field in question is provided or requested by the consumer. The fields of the entity have the uniform type ABP_BEHV_FLAG.
    The component %CONTROL is generated in CREATE, UPDATE, create-by-association (in %TARGET), and READ IMPORT.
  • %DATA
    Contains all data elements of an entity.
    The component %DATA is generated in CREATE, UPDATE, create-by-association (in %TARGET), and READ RESULT.
  • %FAIL
    Saves the symptom of a failed data record of a business object instance. The possible values of the component %FAIL are defined by the ENUM type IF_ABAP_BEHV=>T_FAIL_CAUSE.
  • %MSG
    Provides an instance of IF_ABAP_BEHV_MESSAGE. The default methods for the messages new_message( ) and new_message_with_text( ) can be used.
  • %ELEMENT
    References all elements of an entity
  • %PARAM
    Contains the input type and output type of an action.

Other versions: 7.31 | 7.40 | 7.54


Example

Uses components of the derived types in a parameter with errors:

APPEND #VALUE( %KEY = item-%KEY %FAIL = ... ) TO failed-Item.

item points to a row of the input parameters, for example update_import_parameter.