Hello Sandra
I tryed with text, it looks like what I need, but there is no cr between the nodes ArticleNb and MatDesc
It's possible to make a line feed?
Thank you in advance, Daniel
<StoreMaterial> <tt:loop name="data" ref="$line.data"> <tt:text>Material Name = "ArticleNb" Value="</tt:text> <tt:value ref="articlenb"/> <tt:text>"</tt:text> <tt:text>Material Name = "MatDesc" Value="</tt:text> <tt:value ref="matdesc"/> <tt:text>"</tt:text> </tt:loop> </StoreMaterial>
Hi Daniel in ST you can create a corresponding DDIC structure and the base ST code is generated when u use it in STRANS.
Then you can improve it further. both for deserelization and serilization.
Did you try anything? What is the structure of your internal table?
Something like that:
<?sap.transform simple?> <tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary"> <tt:root name="ROOT"/> <tt:template> <XMLROOT> <tt:loop ref=".ROOT"> <StoreMaterial> <Material Name="ArticleNb"> <tt:attribute name="Value" value-ref="$ref.ARTICLENB"/> </Material> <Material Name="MatDesc"> <tt:attribute name="Value" value-ref="$ref.MATDESC"/> </Material> </StoreMaterial> </tt:loop> </XMLROOT> </tt:template> </tt:transform>
?
EDIT 15 hours later: sorry, it was value-ref, not ref.
Now I found the solution - but???
The first Node "ArticleNb" is not correct, the next nodes are correct
If I delete the first Node "ArticleNb", the next nodes are not correct
I can't find out the reason, thanks for any help
Daniel
<StoreMaterial> <tt:loop name="data" ref="$line.data"> <Material Value="ArticleNb"> " display wrong <tt:attribute name="Name"> <tt:value ref="articlenb"/> </tt:attribute> </Material> <Material Name="ArticleNb"> " display correct <tt:attribute name="Value"> <tt:value ref="articlenb"/> </tt:attribute> </Material> <Material Name="MatDesc"> " display correct <tt:attribute name="Value"> <tt:value ref="matdesc"/> </tt:attribute> </Material> </tt:loop> </StoreMaterial>
Hi Daniel,
Ideally Creating a node is important for correct output.please check with the node and the structure how your are refering in the coding part.Check with the screen shot may be this would helpful.You can also have test transformation T-Code : XSLT_TOOL give transformation name as SP12_TESTVECTOR2.
Add comment