Persistent Objects: Using GUID Object Identity

By Abdul Hakim, Satyam Computer Services Ltd

Objective 

To Store the attributes of the Objects persistently in the database. 

Persistent Object’s Identity 

Every Persistent Object has a unique identity with which it can be accessed. There are 2 types of Object identity 

  1. Business Key
  2. GUID( Global Unique Identifier ) 

For Persistent Objects using Business key Identity please check my previous article, “Persistent Objects: Using Business Key identity” 

This article will focus only on Persistent Object using GUID. 

Step: 1 -> Create a database table

This table should contain a key field of type OS_GUID. 

 

Step: 2 ->Create a Persistent Class

Go to Class Builder (tcode SE24)

Give persistent class name for eg ZCL_PERSIST_02 and hit the create button

In the next screen select the class type as Persistent Class and then hit Save Button. 

 

Step: 3 -> Persistent Mapping or Mapping 

Goto->Persistence Representation 

 

Give the table name. For eg ZSTUDENT02 and hit the enter button

Table fields appear in the lower half of the tool screen. 

 

Double Click the table field

 

Press the upward arrow button  

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image