cancel
Showing results for 
Search instead for 
Did you mean: 

Parent to multiple child: Linkage issue

Former Member
0 Kudos

Hi,

I have belw xsl code for Linkages. The code works fine for straight sku, which is from Pallet to Case, Case to Assorted Pack and Assorted Pack to Each. However, when we have more than 1 case or Assorted pack the Link breaks. So the requirement is Pallet to Case, Case to AP, again Case to AP (if 2 cases), Case to AP, Case to AP (if 2 AP) and so on. Shall be appreciative if the below code can be fixed to the requirement.

-


<xsl:if test="$loopControl=2 and $itemIndex2 &gt; 1">

<Relationship Name="Link GTIN" Type="Child">

<RelatedItem>

<xsl:variable name="umrezNum">

<xsl:value-of select="$sortedNodes/E1MARMM[$itemIndex2]/UMREZ"/>

</xsl:variable>

<xsl:variable name="umrenCurrent">

<xsl:value-of select="$sortedNodes/E1MARMM[$itemIndex2]/UMREN"/>

</xsl:variable>

<xsl:variable name="umrenPrevious">

<xsl:value-of select="$sortedNodes/E1MARMM[$itemIndex2 - 1]/UMREN"/>

</xsl:variable>

<xsl:attribute name="Quantity">

<xsl:variable name="quantity">

<xsl:value-of select="($umrezNum div $umrenCurrent) div $umrenPrevious"/>

</xsl:variable>

<xsl:if test="round($quantity)=$quantity">

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

</xsl:if>

<xsl:if test="round($quantity)!=$quantity">

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

</xsl:if>

</xsl:attribute>

</RelatedItem>

</Relationship>

</xsl:if>

Pls. feel free to ask for more info. if required.

Thanks,

Hemal

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I have sent you email with the attachments.

Thanks,

Hemal

Former Member
0 Kudos

Can I send an attachment to your email. If you can provide me one.

Thanks very much.

Hemal Gandhi

henrique_pinto
Active Contributor
0 Kudos

You could post the code here, there should be no problem.

Anyway, you can send it to xxxxxxxxxxxx@xxx.xxx .

Regards,

Henrique.

Former Member
0 Kudos

Can you pls. let me know where exactly should I put <xsl:for-each> inorder to make it work.

Thanks,

Hemal

henrique_pinto
Active Contributor
0 Kudos

Hemal,

for all the tags that can be multiple, in your case, you wil need to use for each. Maybe if you posted your input and ouput messages and also all the xsl code, I could help you more.

Regards,

Henrique.

henrique_pinto
Active Contributor
0 Kudos

Hemal,

maybe you'd want to put that code into a <xsl:for-each> tag.

Regards,

Henrique.