What is the persistence class and use of that class?
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.
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
Sign up for STechies
Ask Question From Our Experts
All the site contents are Copyright © www.stechies.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies. The site www.stechies.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity. Information used on this site is at your own risk.
The content on this site may not be reproduced or redistributed without the express written permission of
www.stechies.com or the content authors.