‎2006 Nov 21 6:45 AM
‎2006 Nov 21 7:17 AM
read this online help
http://help.sap.com/saphelp_nw04/helpdata/en/f5/a36828bc6911d4b2e80050dadfb92b/frameset.htm
and this weblog
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
Regards
Raja
‎2006 Nov 22 5:45 AM
‎2008 Jun 09 8:28 AM
hey swapnil,
this question is haunting me too...
even though i have gone through help.sap and few blogs.. i could not find the answer.
kindly let me know why are persistent objects used.
-manasi
‎2008 Jun 24 7:30 AM
In SE24, Transaction we can create classes of different types like Usual ABAP class, persistenct classes,Exception classes.
If we want to work with any database tables like MARA, SPFLI etc... we can create a persistent class and to this we can use tables and fields of those tables inside this class.
When we try to create this type of class- Actor class is automatically generated. Upon activation of this class, if we click on PERSISTENT button It asks for table/struture to be included from there we can select the required fields.
The main advantage of using these classes inorder to reatin the state of an object eventhough the application r program that is used to create this object is closed r lost. It maintains the state of an object beyond the life of an object. Here the instances are stored in permanent medium and we can retirve the instance at any point of time. Here the methods create,delete,get,set etc are automatically created and if we want we can redefine these methods. We can retieve values and work on tables using this classes using these methods . we need not hava to write any slelect queries again. Sometimes when we try to tranfer one object to other, we need to maitnain the state of an object( ie the attributes and thier values) for any communication. In order to maintian this state we go for thses classes.
Encourage me by rewarding the points.
Regards
Chandralekha
‎2008 Jun 24 7:40 AM
One more advatnage of using these persistent classes are to avoaid any incosistencies to the database tables. If we are given direct access to databese tables then inconsistencies in data may arise. To restrict this we also go for this type of classes