on 02-20-2012 4:26 PM
I have a problem: I receive a XML file in my transaction input
<?xml version="1.0" encoding="UTF-8"?><DATA>
<VALUE_1/>
<VALUE_2/>
</DATA>
and I want to rename the property DATA with the name TAGS.
After this step, I want to access to the tag using Transaction.Source{/TAGS/VALUE_1}
Does anybody know how to do this?
I tried to use "Column aliasing" and "XSL Transformation" but without results. Which is the best way to do this?
Column aliasing wont work in this case. you have to use xls transformation for the same
Use something like this
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This template copies everything that doesn't have a more specific rule -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- This template copies and renames Books to TechBooks -->
<xsl:template match="DATA">
<TAGS>
<xsl:apply-templates/>
</TAGS>
</xsl:template>
</xsl:stylesheet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried it, but like before XSL transformation doesn't work. Maybe I do something wrong in XSL transformation settings.
I added XSL transformation.
I didn't configure the transformation URL (Configure object button)
In configure links, Incoming tab, I set Inpux XML file as "Transaction.Source" (Source is my xml input file)
In configure links, Incoming tab, I set InputXSL copying your xsl code.
I didn't set xml output file, so less error appears.
The system gave me a list of errors:
[ERROR]: STEP EXCEPTION () : Invalid Variable In Expression: xml
[ERROR]: STEP EXCEPTION (XSL_Transformation_0) : Invalid Variable In Expression: xml
[ERROR]: STEP EXCEPTION (Sequence_0) : Invalid Variable In Expression: xml
[ERROR]: STEP EXCEPTION (Sequence) : Invalid Variable In Expression: xml
[ERROR]: TRANSACTION EXECUTION TERMINATED
Do you know which is the right configuration for XSL transformation?
I know just this help page: http://help.sap.com/saphelp_xmii120/helpdata/en/45/cca60593696f74e10000000a1553f6/frameset.htm
but it is very short.
Do you know other helpful webpages?
Thank you for your first answer.
I tested it and worked perfectly in my case.
You have configured it correctly.
In configure links, Incoming tab, I set InputXSL copying your xsl code.
Create one local property with xml type. copy the XSL code in Value.
Assign this local property to InputXSL of your XSL transformation action block
Regards
Anshul
Edited by: Anshul Sahu on Feb 21, 2012 9:43 AM
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.