Persistent Objects: Using Business Key Identity

By Abdul Hakim, Satyam Computer Services Ltd


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

Step: 1 ->Create a Persistent Class

Go to Class Builder (TCode SE24) 

Give persistent class name for e.g. ZCL_PERSIST_01 and hit the create button 


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


Step: 2 -> Persistent Mapping or Mapping 

Utilities->Persistence Representation 


Give the table name. For e.g. ZSTUDENT01 and hit the enter button

Table fields appear below the mapping screen. 


Double Click the table field and then press the upward arrow button  


Add the remaining fields as well. Screen looks like this now. 


Activate the Class. Press the Yes Button to activate the class actor as well. 


Step: 3 -> Write a Program to create / fetch / delete the Persistent Object 

Our Program Selection-Screen looks like below 


Here I am creating a new student. Specify the value and hit the execute button.


Go to SE16 and check the entries 

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