What is the persistence class and use of that class?
Thanks in advance.
Comments
23 Jun 2014 1:05 pm rekha Best Answer
Persistence class store the object permanently in database, generally persistance class performs serialization technique, if we are using ths technique even under server failure situations we can get back old transaction & we can continue further, If object is stored in d/b or file we can retrieve back using de-serialization technique.
08 Jul 2014 8:34 am rekha Helpful Answer
Persistent class
ABAP Program stays in the local ABAP memory for the session only till the runtime of that program. This data lives only as long as its context – that is, as long as its associated procedure (for local procedure data); its object (for attributes of classes); or its program (for global program data). This means that the data and state is preserved only till the context of the program is active.
This data is known as transient. Data that can be preserved beyond the runtime of the program is known as persistent. When working with persistent data, system loads
data in transient state and stores it back to persistent state after use.
Uses of Persistent Class
Persistent classes are used extensively for workflow programming. The main advantag of persistance class is that you need not to fetch the data from the database Every time, as the data is already fetched using SELECT.
Use of Persistent classes would be good when we are dealing with only one object like Wrapper Module pool program for creating a document where you have only one header and certain line items
02 Apr 2018 7:00 pm Guest Helpful Answer
PERSISTENT CLASS:
Persistance class store object to RAM. Update data and get data without fail.
For example, when we are booking the ticket and while doing payment if our transaction fails that seat which we selected will be blocked for some time and tha information stored in persistant layer.
Persistence class store the object permanently in database, generally persistance class performs serialization technique, if we are using ths technique even under server failure situations we can get back old transaction & we can continue further, If object is stored in d/b or file we can retrieve back using de-serialization technique.