Skip to Content
author's profile photo Former Member
Former Member

Mapping doubt

Hi Experts,

below is my source structure.

<S_ST>

<G_S0100>

<S_N1>

<D_98>WH</D_98>

<D_93>KinderMorgan Chesapeake, VA</D_93>

<D_66>91</D_66>

<D_67>3028</D_67>

</S_N1>

</G_S0100>

<G_S0100>

<S_N1>

<D_98>ST</D_98>

<D_93>CF Industries Sales LLC</D_93>

<D_66>91</D_66>

<D_67>1234</D_67>

</S_N1>

</G_S0100>

</S_ST>

Requirement is: I need to send D_67 value to ship_to target field if D_98 = ST, need to pass "null" if value does not exist or segment does not exist.

I have done below mapping, the thing is i am not getting expected result for the below scenarios. tried by changing context to S_ST , still no luck.

<S_ST>

<G_S0100>

<S_N1>

<D_98>WH</D_98>

<D_93>KinderMorgan Chesapeake, VA</D_93>

<D_66>91</D_66>

<D_67>3028</D_67>

</S_N1>

</G_S0100>

<G_S0100>

<S_N1>

<D_98>ST</D_98>

<D_93>CF Industries Sales LLC</D_93>

<D_66>91</D_66>

</S_N1>

</G_S0100>

</S_ST>

--------------------------------------------------------------------------

<S_ST>

<G_S0100>

<S_N1>

<D_98>WH</D_98>

<D_93>KinderMorgan Chesapeake, VA</D_93>

<D_66>91</D_66>

<D_67>3028</D_67>

</S_N1>

</G_S0100>

<G_S0100>

<S_N1>

<D_98>ST</D_98>

<D_93>CF Industries Sales LLC</D_93>

<D_66>91</D_66>

<D_67></D_67>

</S_N1>

</G_S0100>

</S_ST>

---------------------------------------------------------------------------------

<S_ST>

<G_S0100>

<S_N1>

<D_98>WH</D_98>

<D_93>KinderMorgan Chesapeake, VA</D_93>

<D_66>91</D_66>

<D_67>8765</D_67>

</S_N1>

</G_S0100>

<G_S0100>

<S_N1>

<D_98>ST</D_98>

<D_93>CF Industries Sales LLC</D_93>

<D_66>91</D_66>

<D_67>1234</D_67>

</S_N1>

</G_S0100>

</S_ST>

Appreciate your help on this.

mapping.PNG (28.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2014 at 10:17 PM

    Both are not working... Can any one help on this please?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2014 at 12:38 AM

    try using AND condition instead of multiple if else.

    D_98 > equalss>ST

    AND --------> THEN D_67 (you can use format by example) else Null.

    D_67->not equals blank

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2014 at 05:57 AM

    Hi Sruthi,

    Try the mapping as shown in below pic.


    mapping.png (126.1 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.