cancel
Showing results for 
Search instead for 
Did you mean: 

unable to populate the value using XSLT mapping

former_member262051
Participant
0 Kudos

HI Experts,

I am working on idoc to file scenario...

From idoc i amusing to populate E1EDP01 segment values at item level of target structure except one field. The one field which i have to populate from some other segment. But the item note is matched to E1EDP01 segment.

<xsl:template match="E1EDP01">

  <ReturnOrderItem>

   <ItemNr>

    <xsl:value-of select="E1EDP02[QUALF=001]/ZEILE"/>

   </ItemNr>

   <ReturnDate>

    <xsl:value-of select="Z1EDP01_SIMS/LFDAT"/>

   </ReturnDate>

   <Status>

    <xsl:value-of select="Z1EDP01_SIMS/STATUS"/>

   </Status>

   <ReturnReason>

    <xsl:value-of select="E1EDPT1[TDID=ZI04]/E1EDPT2[1]/TDLINE"/>

   </ReturnReason>

   <TrackingNr>

    <xsl:value-of select="Z1EDP01_SIMS/BOLNR"/>

   </TrackingNr>

   <BankAccountNr>

<xsl:value-of select="E1EDKT1/E1EDKT2[1]/TDLINE"/>(Here i want to populate the value)

   </BankAccountNr>

   <SerialNrType>

    <xsl:value-of select="Z1EDP01_SIMS/ZSERTYP"/>

   </SerialNrType>

   <SerialNumbers>

    <SerialNr>

    <xsl:value-of select="Z1EDP01_SIMS/Z1SERIAL/SERIALNO"/>

    </SerialNr>

   </SerialNumbers>

  </ReturnOrderItem>

 

</xsl:template>

How can i populate the value for this case.

Please help me on this.

Regards,

Uday.

Accepted Solutions (1)

Accepted Solutions (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Uday,

Please try

<BankAccountNr>

  <xsl:value-of select="//E1EDKT1[1]/E1EDKT2[1]/TDLINE"/>

</BankAccountNr>

Do you always want value from a particular E1EDKT1? OR You want to relate E1EDP01 and E1EDKT1 and then get value (E1EDP01 and E1EDKT1 are at same level, it will be tricky to group them)?

former_member262051
Participant
0 Kudos

HI Raghu,

Thanks for reply..

We tried this one but no luck.

E1EDP01 and E1EDKT1 are at the same level but the target node X(for example) is matched to E1EDP01 but the field1 under X(segment) needs to be get the value from field under E1EDKT1 segmant.

uday

RaghuVamseedhar
Active Contributor
0 Kudos

Uday,

Please try this (give absolute path)

<BankAccountNr>

  <xsl:value-of select="/ORDERS05/IDOC/E1EDKT1/E1EDKT2/TDLINE"/>

</BankAccountNr>

OR

/ORDERS05/IDOC/E1EDKT1[TDID='ZH12']/E1EDKT2/TDLINE

former_member262051
Participant
0 Kudos

HI,

Thanks for your support.

Issue got resolved by my self by using command ../ in front of the query.

Thanks all.

Uday

Answers (2)

Answers (2)

former_member262051
Participant
0 Kudos

HI Experts,

Please help on this.

Uday

iaki_vila
Active Contributor
0 Kudos

Hi Uday,

If you share you input XML and your desired output XML it will easier for us to give you a right XSLT.

However, i have a little question for you, why don't use a standard message mapping?

Regards.

former_member262051
Participant
0 Kudos


HI Sorry for late reply.

We are working on mainatainance project. we are enhansing the exsiting functionality as XSLt.

We are using the standard ORDERSP.ORDERS05 idoc structure.

Ubder E1EDKT1/E1EDKT2/TDLINE filed value should populate at target under bankaccount number.

Currently values are poulating under E1EDP01.

Please help me in this.

Regards.

Uday