Skip to Content
avatar image
Former Member

PI XSLT mapping issue

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jul 13, 2015 at 04:33 PM

    Hi,

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

    Could you please share complete source structure?

    regards,

    Roberto.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Jul 14, 2015 at 06:56 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Jul 14, 2015 at 09:37 AM

    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 -->

              ...

    Add comment
    10|10000 characters needed characters exceeded