SAP ABAP Data Element DR_KEYCONV (Drag&Relate: Key Conversion for Link Generation)
Hierarchy
PI_BASIS (Software Component) Basis Plug-In
   CA (Application Component) Cross-Application Components
     PORX (Package) Drag & Relate (Workplace Plugin)
Basic Data
Data Element DR_KEYCONV
Short Description Drag&Relate: Key Conversion for Link Generation  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type FLAG    
Data Type CHAR   Character String 
Length 1    
Decimal Places 0    
Output Length 1    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Conversion 
Medium 15 Conversion 
Long 30 Key Conversion 
Heading  
Documentation

Definition

If the technical key of an object (such as a GUID or internal number) does not correspond to the data element generally used on the screens, (for example, a 'semantic key' or an external number), the data elements on the screen cannot be defined as the key type.

To make it possible to use these data elements for Drag&Relate, the key must be converted, that is the 'external' key on the screen must be converted to the technical key in order to generate the object URL.

The object type used must therefore have methods to convert the external key to the internal (technical) key and back again.

Two methods must be defined, namely:

  • Conversion of External to Internal Key

This method must have the name GetInternalKey and at least one input parameter. The output parameter must have parameter InternalKey. If possible, it should reference SWOTOBJID-OBJKEY or data element SWO_TYPEID. The method must be defined to be independent of the instance.

  • Conversion of Internal to External Key

This method must have the name GetExternalKey and have output parameter ExternalKey, which should refer to SWOTOBJID-OBJKEY or data element SWO_TYPEID.

If the flag for an object type is set, the input parameter(s) of method GetInternalKey are used instead of the internal (technical) key of the object in order to define the key structure.

In this way correct object URLs can be created for objects whose internal key normally does not appear on the interface. At runtime, the method is parametrized with the fields of the external key and returns the internal key. The object URL is generated with this internal key.

When a transaction is started, the external key is defined again from the technical key so that the transaction can be parametrized accordingly.

When parametrizing function modules for attribute access, you can choose whether the internal key (always only the overall key) or the external key or key fields should be used.

Important

For technical reasons, this function cannot be used for Table Control fields.

History
Last changed by/on SAP  20130604 
SAP Release Created in