‎2009 Aug 31 8:20 AM
Hello,
while processing the following code I always have problems with the memory (it uses to much memory-space).
call transformation id
source m_li_objekt = li_instance
result xml string_instance.
Call transformation id creates a XML building a DOM (document object modell). I read in the SAP online help that there exists something called simple transformation. Unfortunatly I couldn´t find any manual how to use the simple transformation in my case, I don´t know how I can access the Object-Reference in the simple transformation programm. Is this possible?
Can anybody give me some help for that?
Many thanks,
Christoph
‎2009 Aug 31 9:00 AM
Hope this[ LINK |http://wiki.sdn.sap.com/wiki/x/oADDB]will help.
[Another link |http://sapblog.rmtiwari.com/2009/02/discovering-hidden-gem-generate-simple.html]
Edited by: J@Y on Aug 31, 2009 1:02 AM
‎2009 Aug 31 9:24 AM
Hi Thanks for your answer.
I still do not see the possibility to pass a object-reference to a simple transformation and access it in it.
Thanks a lot,
Christoph
‎2009 Aug 31 6:54 PM
[SAP XSLT Processor Reference|http://help.sap.com/saphelp_nw04/helpdata/EN/a8/824c3c66177414e10000000a114084/content.htm]
‎2009 Aug 31 7:43 PM
I'm surprised that the XSL transformation works with object references! It works neither with XSLT nor with ST. You may find a work around by passing references to transformation parameters. Or create your own serialization/deserialization methods.
‎2009 Aug 31 10:09 PM
Hi Sandra,
so there is no "easy" way to pass an object reference to a simple transformation - did I understand you right?
Is the only way then to pass every attribut of the object reference one by one to the ST to get the XML out of it?
Many thanks for your help!
Christoph
‎2009 Aug 31 10:28 PM
you're right on the 2 points
Note: you want to copy all attributes of an instance, it's strange in abap oo, because there may be private attributes (now or in the future) that you don't want to publish. To better help, may we know what it is for ?
‎2009 Sep 01 6:50 AM
Hi Sandra,
thanks a lot for your answers. Now I got an idea how I can´t do it
" CALL TRANSFORMATION ID " creates a XML of my instance - problem: to much memory consumption. So I need a way how to create the XML not using DOM. (I think the XML should be passed to the memory ID in a ABAP Program, read and deseralize again
afterwards - don´t ask me why, this is not the part I am working on )) ).
Do you know another way how to solve this problem?
Thanks,
Christoph
‎2009 Sep 01 9:32 AM
No. But as you say there is a program which deserializes the XML, just get the source and do the reversed transformation using the same technology (which probably transforms it into a complex structure (that you may simply reuse) instead of an instance...).
You say that call transformation (id) works with an instance, but as I said above, the SAP documentation says it doesn't work and I made a test too, it doesn't work either.
‎2009 Sep 01 9:40 AM
Hi Sandra,
you can serialise a object if it is an object of a class that contains the interface "IF_SERIALIZABLE_OBJECT".
Correct me if I am wrong or if we are talking about two different things.
Christoph
‎2009 Sep 01 10:54 AM
Hello, I'm ashamed to not know that. I tried it, it looks nice. I'm sorry about my answers, please forgot them and thank you for the information