cancel
Showing results for 
Search instead for 
Did you mean: 

XSL help

Former Member
0 Kudos

Hi everyone,

I need to output multiple keys for the table. Can anyone let me know how to write xsl for this. I need something like this

<Table Name="Extensions" ReferencePath="GTINs~Extensions">

<Record>

<Field Name="Name" Type="Field">

<b><ComplexValue Key="FMCG" "EuropeFields" /></b>

<!-- This is wrong syntax-->

</Field>

</Record>

</Table>

where FMCG and EuropeFields both are the keys. I don't know the correct syntax.

I have written as below but that doesn't work.

<Table Name="Extensions" ReferencePath="GTINs~Extensions">

<Record>

<Field Name="Name" Type="Field">

<ComplexValue Key="FMCG" />

<ComplexValue Key="EuropeFields" />

</Field>

</Record>

</Table>

So, if I have the xsl program as below

<Table Name="Extensions" ReferencePath="GTINs~Extensions">

<Record>

<Field Name="Name" Type="Field">

<ComplexValue Key="FMCG" />

</Field>

</Record>

</Table>

it will give the output for Extension table in MDM data manager as

FMCG

<b>But, I need the output for Extension table in MDM data manager as below

FMCG; EuropeFields</b>

Thanks & Regards,

Hemal

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

hi

if this should be rows in a table then you must define the rows as <item>

i could be something like:

<Table Name="Extensions" ReferencePath="GTINs~Extensions">

<Record>

<Field Name="Name" Type="Field">

<b><item></b>

<ComplexValue Key="FMCG" />

<b></item></b>

<b><item></b>

<ComplexValue Key="EuropeFields" />

<b></item></b>

</Field>

</Record>

</Table>

Former Member
0 Kudos

Hi,

Thanks for your response. I tried putting <Item> tag but doesn't work. Is there no other ways?

Thanks,

Hemal

0 Kudos

Hi

what's your source XML, and how should your target XML look like ? Do you have some examples ?

Generally u can define Rows in a table for an RFC like this:

<ns:BAPI_ACC_DOC_POST xmlns:ns="urn:sap-com:document:sap:rfc:functions">

<ACCOUNTGL>

<item>

<ITEMNO_ACC>

<xsl:value-of select="$Number"/>

</ITEMNO_ACC>

<GL_ACCOUNT>

<xsl:value-of select="something"/>

</GL_ACCOUNT>

</item>

</ACCOUNTGL>

Former Member
0 Kudos

Hi,

Thanks for your help. I was able to solve my own. Below is the Code that works.

<Table Name="Extensions" ReferencePath="GTINs~Extensions">

<Record>

<Field Name="Name" Type="Field">

<ComplexValue Key="EuropeFields" /> </Field>

</Record>

<Record>

<Field Name="Name" Type="Field">

<ComplexValue Key="FMCG" /> </Field>

</Record>

</Table>

Regards,

Hemal

Answers (0)