Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Simple Transformation

Former Member
0 Likes
1,065

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

10 REPLIES 10
Read only

former_member156446
Active Contributor
0 Likes
1,017

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

Read only

0 Likes
1,017

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

Read only

0 Likes
1,017

[SAP XSLT Processor Reference|http://help.sap.com/saphelp_nw04/helpdata/EN/a8/824c3c66177414e10000000a114084/content.htm]

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,017

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.

Read only

0 Likes
1,017

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

Read only

0 Likes
1,017

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 ?

Read only

0 Likes
1,017

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

Read only

0 Likes
1,017

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.

Read only

0 Likes
1,017

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

Read only

0 Likes
1,017

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