cancel
Showing results for 
Search instead for 
Did you mean: 

PI XSLT mapping issue

Former Member
0 Kudos

Hi All,

My Source structure is like below.

Role

    RoleCode

    Group

Requirement is if the Rolecode starts with Vendor/Supplier and Group field exist then pass the group value to KTOKK field of IDoc.

Please help how to implement the xslt code for this requirement.

Regards,

karthiga

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You could try somethnig like:


<xsl:for-each select="Record/Role[(starts-with(RoleCode,'Vendor') or starts-with(RoleCode,'Supplier'))]">

     <xsl:if test="Group">

          <!-- create your target node -->

          ...

iaki_vila
Active Contributor
0 Kudos

Hi Karthiga,

There is a XSLT instruction to compare a string with a string pattern:


<xsl:if test="starts-with(//RoleCode, //Group)">

</xsl:if>

If you share your source and target XML we can try to do the XSLT complete.

Regards.

Former Member
0 Kudos

Hi Inaki,

Please see below structure.

Record

    Partner number

    Roles

       RoleCode

       AccountGroup

if Rolecode strats with vendor or supplier and AccountGroup field exist  for role code (vendor/supplier),then pass the account group to KTOKK field of Idoc.

This is our requirement.Record can occur multiple times.

Regards,

Karthiga

rcsegovia
Active Participant
0 Kudos

Hi,

I don't see any constraint to use graphical mapping.

Could you please share complete source structure?

regards,

Roberto.

Former Member
0 Kudos

Hi Roberto,

Already XSLT mapping exist and i am just making the new change in the existing mapping.Please let me know how to implement the requirement in XSLT code.

Regards,

Karthiga