ABAP Keyword Documentation → ABAP − Reference → ABAP RESTful Programming Model → Derived Types
Input Parameter Type
Other versions:
7.31 | 7.40 | 7.54
Syntax
TYPES type_for_import_parameter TYPE TABLE FOR
CREATE|UPDATE|DELETE|LOCK|READ IMPORT
CDS_entity_name.
TYPES type_for_action_import_parameter TYPE TABLE FOR
ACTION IMPORT entity_name~action_name.
Effect
Each individual type declaration for input parameters consists of a combination of an operation (CREATE, UPDATE, DELETE, LOCK or READ IMPORT) and an entity or an entity part (for actions).
The type name of the input parameter type_for_import_parameter can be specified freely.
If available, the alias specified in the behavior definition should be used to reference a CDS entity Therefore, CDS_entity_name refers to the name of the CDS entity or the alias as defined in the behavior definition.
Example
In the following example, the data from the ABAP flight data reference scenario (or flight data scenario for short) is used. It represents a legacy business logic that can be used to create and edit flight bookings. The root entity Travel represents the business object for managing flight trips. The underlying data model and the behavior of the root entity Travel are described in ABAP BDL - Example.
INHERITING FROM cl_abap_behavior_handler.
PRIVATE SECTION.
TYPES:
tt_travel_create TYPE TABLE FOR CREATE travel
tt_travel_update TYPE TABLE FOR UPDATE travel
tt_travel_delete TYPE TABLE FOR DELETE travel
tt_travel_key TYPE TABLE FOR LOCK travel
it_booking_read_in TYPE TABLE FOR READ IMPORT booking.
TYPES tt_travel_set_status_booked_in
TYPE TABLE FOR ACTION IMPORT travel~set_status_booked.
TYPES tt_travel_get_status_booked_in
TYPE TABLE FOR ACTION IMPORT travel~get_status.
...
ENDCLASS.