‎2007 May 01 4:56 PM
Does anyone know if ABAP Persistent Objects support cloning?
I can clone the object using a SYSTEM-CALL (though I'd rather not), however that would still mean breaking the rules to set the object key to a new value.
At the moment the only solution appears to be creating a new persistent or transient object via the agent and manually assigning the attributes.
‎2007 May 02 5:27 AM
‎2007 May 02 5:27 AM
‎2007 May 02 5:49 AM
Thanks Uwe. I knew about the SYSTEM-CALL but in this case it does not help.
My problem is that the object key of a persistent object does not appear to be easily modified even from within the object. I want to clone the object and then modify the key to avoid insert collisions.
So far as I can see there is no simple way of modifying the business key of a persistent object.
For now I've implemented IF_OS_CLONE~CLONE in a public method of my persistent object, created a new persistent object and manually assigned the attributes. Unfortunately the code will have to be modified whenever a new attribute is added.