2008 Mar 17 5:50 PM
Hi,
Could anyone send a snippet with a "how-to-use" example of the method IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_OID??
Regards,
Rafael Menezes
2008 Mar 17 8:53 PM
Hi Raf,
there are lots of blogs and other help on this. Just do a search in SDN for them.
I like this blog from Thomas. /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
Cheers
Graham
2008 Mar 17 8:53 PM
Hi Raf,
there are lots of blogs and other help on this. Just do a search in SDN for them.
I like this blog from Thomas. /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
Cheers
Graham
2008 Mar 17 9:41 PM
Hello Graham. Thanks for your help. But this is the way I know how to use persistent class. I'd like to see an example using Instance-GUID like in
[Mapping by Instance-GUID and Business Key|http://help.sap.com/saphelp_nw04s/helpdata/en/b1/82309cd26611d4b2e90050dadfb92b/frameset.htm]
I've browsed tons of documents here in SDN and couldn't find any with a practical example.
I mean, like SAP Help, they mention the Instance-GUID way, but don't show an example.
Regards,
Rafael Menezes
2010 Sep 17 4:20 PM
Hello Graham. Thanks for your help. But this is the way I know how to use persistent class. I'd like to see an example using Instance-GUID like in
Mapping by Instance-GUID and Business Key
I've browsed tons of documents here in SDN and couldn't find any with a practical example.
I mean, like SAP Help, they mention the Instance-GUID way, but don't show an example.
Regards,
Rafael Menezes
Hi,
I know it's quite a time, but it might help someone else. I am just looking into this technique but I think it's like this.
First of all, if you want to use OID, you have to create a field in a Transparent Table which is of a type OS_GUID. You can see this guide for details: [Mapping by Instance-GUID|http://help.sap.com/saphelp_nw04s/helpdata/en/b1/82309fd26611d4b2e90050dadfb92b/frameset.htm]
I think you have probably read that.
After that, you will see, that the method IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_OID gets automatically implemented. And by calling this method, you can get your Persistent Object after supplying this method with an OID parameter.
Example of use:
I would use it for example when I would want to remember data currently being edited by a certain user and display the same conent next time the user runs a transaction. To achieve this I would create a table with a user name as a key field and OID as a second field. And this way I would remember Persistent Object's OID for each user .
2008 Mar 18 12:44 PM
Hi Rafael,
The interface method GET_PERSISTENT_BY_OID might not be having any implementations in the versioning of SAP.
Better check some function modules GETGUID* and write your own implementation with help of these findings.
There are number of functions for GETGUID*.
Hope you find outthe function module.
Regds,
Gaurav
2008 Apr 23 8:30 AM
Can any one explain about persistent class.
I want definition .
And functionality
2010 Sep 17 4:05 PM
Can any one explain about persistent class.
I want definition .
And functionality
There is a nice explanation here:
[Concepts Used in Persistence|http://help.sap.com/saphelp_nw04s/helpdata/en/f5/a3682ebc6911d4b2e80050dadfb92b/frameset.htm]
Simply put, Persistent Objects are objects which don't disappear after a program ends. Technically, Persistent Object is connected to a Transparent Table and all its data (attributes) are saved there and can be loaded later on.
Try SE80 and create a Persistent Object for yourself.