Ansicht
Dokumentation

ABAPDERIVED_TYPES_KEY - DERIVED TYPES KEY

ABAPDERIVED_TYPES_KEY - DERIVED TYPES KEY

Fill RESBD Structure from EBP Component Structure   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

%key

%key is a component group in BDEF derived types. The component group contains the primary key fields of a RAP BO instance. Thus, it serves as an identifier for persisted instances.

Wherever %key can be specified within statements during the RAP interaction phase, %tky can be specified, too. Since the component group %tky includes %key, it is recommended that %tky is specified instead of %key also in non- draft scenarios. %tky also contains the draft indicator %is_draft. When using %tky in non-draft scenarios, you are prepared for a later switch to a draft scenario and you can avoid lots of adaptations in the code.

Use of keys and RAP BO instance identifiers in a nutshell

Type

The key fields in %key have their original line type. In case of the use within %control, the type of the key fields is ABP_BEHV_FLAG.

  • CREATE
  • UPDATE
  • DELETE
  • READ IMPORT
  • READ RESULT
  • READ LINK (here, as part of the structures SOURCE and TARGET)
  • ACTION RESULT (instance actions)
  • ACTION REQUEST (instance actions)
  • FUNCTION RESULT (instance functions)
  • FUNCTION REQUEST (instance functions)
  • PERMISSIONS KEY
  • DETERMINATION
  • VALIDATION
  • FAILED [EARLY$|LATE]
  • MAPPED [EARLY$|LATE]
  • REPORTED [EARLY$|LATE]
  • CHANGE
  • [INSTANCE] FEATURES KEY
  • [INSTANCE] FEATURES RESULT
  • [INSTANCE] AUTHORIZATION KEY
  • [INSTANCE] AUTHORIZATION RESULT

The component also occurs within the following components

  • %control

Notes

  • 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.
  • The components of an internal table typed with TYPE TABLE FOR KEY OF or a structure with the type TYPE STRUCTURE FOR KEY OF comprise the key fields directly and not as %key includes.

Example

The following source code section taken from DEMO_RAP_DERIVED_TYPES_KEY demonstrates the component %key. It includes various options on how to refer to the key.

The example Using %key demonstrates the use of %key with a managed RAP BO.






CL_GUI_FRONTEND_SERVICES - Frontend Services   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 5029 Date: 20240614 Time: 054045     sap01-206 ( 51 ms )