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

Mapping help

Hi all,

I am new to XI. I have the following requirement.

Mapping a filed in target structure based on the occurrence of a field of a segment.

Say if the segment ABC occurs 5 times in the source structure. A field of segment "XYZ" with value "ITEM" occurs thrice.

I have to get three values of "DEF" of the source structure of "ABC" segment in the target structure where "XYZ" value is "ITEM".

ABC

DEF.... YO

XYZ .... ITEM

ABC

DEF...LU

XYZ... LINE

ABC

DEF...FX

XYZ...ITEM

ABC

DEF..JC

XYZ...LINE

ABC

DEF...MN

XYZ...ITEM

In Target structure field "BRAND" should be mapped with YO, FX, MN, in One record set of the Target.

Please help me out in achieving this.

Thanks,

Karuna.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 03:11 AM

    Hi Karuna,

    You can solve your problem by using standard function.

    1) Take XYZ as a input , put RemoveContext after that.

    2) Take one Constant function assign value = ITEM.

    3) Take Equals function from Text Category. Output of 1st and 2nd step consider as input to Equals function.

    4) Take DEF as a input , put RemoveContext after that.

    5) Take IfWithOutElse function from Boolean Category Output of 3rd and 4th step consider as input to this function.

    6) Put SplitByValue(EachValue) after that.

    7) Give this as a input to your target field BRAND.

    I think this solve your problem.

    Regards,

    Rohit.

    Reward points if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Karuna,

      Please check occurance of BRAND field.

      it should be 0..unbounded may be in your case it is 1..1 check it and reply me back.

      For parent node use RemoveContext function before map to target field.

      Regards,

      Rohit.

      Reward points if helpful.

  • Posted on Apr 29, 2008 at 04:10 AM

    Hi Karuna ,

    You are getting only BRAND node because you are creating brand three times(in example you have given ) but you are not repeating its parent node for that many time .To varify that just check Display queue of your parent node under which field brand exist and see if there are three occurence of it (Without context change) .Rohit's Solution is perfectly ok .

    Reward points if Helpful .

    Thanks

    Sunil Singh

    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.