on 01-27-2017 6:15 PM
Hi Experts,
we have a mapping requirement wherein the target node should be repeated as many as times based upon other source field i.e., <line_number> should be repeated based upon <identification_code> at the target side. whether the same can be achieve via standard function or do we need to create an UDF for the same. Kindly help me in this regard by providing the mapping logic.
Suppose the Source structure is
<INPUT_MESSAGE>
<LINE_NUMBER>1</LINE_NUMBER>
<LINES>
<IDENTIFICATION_CODE>ZA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>001</ACTIVITY_CODE>
<IDENTIFICATION_CODE>FA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>002</ACTIVITY_CODE>
<IDENTIFICATION_CODE>EF</IDENTIFICATION_CODE>
<ACTIVITY_CODE>003</ACTIVITY_CODE>
</LINES>
<LINE_NUMBER>2</LINE_NUMBER>
<LINES>
<IDENTIFICATION_CODE>ZA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>004</ACTIVITY_CODE>
<IDENTIFICATION_CODE>FA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>005</ACTIVITY_CODE>
</LINES>
</MESSAGE>
and the output should be the below one.
<OUTPUT_MESSAGE>
<LINES>
<LINE>
<LINE_NUMBER>1</LINE_NUMBER>
<IDENTIFICATION_CODE>ZA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>001</ACTIVITY_CODE>
</LINE>
<LINE>
<LINE_NUMBER>1</LINE_NUMBER>
<IDENTIFICATION_CODE>FA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>002</ACTIVITY_CODE>
</LINE>
<LINE>
<LINE_NUMBER>1</LINE_NUMBER>
<IDENTIFICATION_CODE>EF</IDENTIFICATION_CODE>
<ACTIVITY_CODE>003</ACTIVITY_CODE>
</LINE>
</LINES>
<LINES>
<LINE>
<LINE_NUMBER>2</LINE_NUMBER>
<IDENTIFICATION_CODE>ZA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>004</ACTIVITY_CODE>
</LINE>
<LINE>
<LINE_NUMBER>2</LINE_NUMBER>
<IDENTIFICATION_CODE>FA</IDENTIFICATION_CODE>
<ACTIVITY_CODE>005</ACTIVITY_CODE>
</LINE>
</LINES>
</OUTPUT_MESSAGE>
your help is highly appreciated
Regards
Faisal
Hi Abdul!
Your requirement can be easily achieved by using UseOneAsMany standard function in message mapping or using Variable.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.