Show TOC

Mapping by Instance-GUID and Business KeyLocate this document in the navigation structure

Use

This type of mapping is a combination of mapping by business key and mapping by instance GUID . The relevant tables must have a field of the type OS_GUID from the ABAP Dictionary, as well as their application-specific primary key. You must either create special tables or add a field of type OS_GUID to existing tables. The system generates a key attribute and thus a business key for each primary key field, just as in mapping by business key . The type OS_GUID field acts as an independent key that lets you access the object using an instance GUID. It is advisable to create this field as a unique secondary index.

Each table line can thus be uniquely identified either using the instance GUID or a business key. The Persistence Service manages the objects of persistent classes (mapped to these database tables) internally, using the instance GUID. However, it also allows you to address them using business keys.

In an ABAP program, for example, you can use the business key to get a reference to such an object, so that you can then work with it further.