cancel
Showing results for 
Search instead for 
Did you mean: 

How to do this mapping in XI

Former Member
0 Kudos

hi,

My Source Structure is like

Object_IND FILENAME FILEVALUE

0 Column1 aaa0

0 Column2 bbb0

0 Coulmn3 ccc0

0 Coulmn4 ddd0

0 Coulmn5 eee0

1 Column1 aaa1

1 Column2 bbb1

1 Coulmn3 ccc1

1 Coulmn4 ddd1

1 Coulmn5 eee1

2 Column1 aaa2

2 Column2 bbb2

2 Coulmn3 ccc2

2 Coulmn4 ddd2

2 Coulmn5 eee2

Basically there is a group of five records for a particula object index

I have to display in file values for coulmn1 and column3 only

ie my output file should like

aa0,cc0

aa1,cc1

aa2.cc2

Can we do via value mapping , or is there a simpler way to do .

If any one of you have does , please do revert back

Thanks

Amit

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Amit,

<b>Can you please provide the XML structure of your source and target messages ?</b>

As I understand, the source structure you are using is something like this -

<Object_IND>

<Column1>

<FILEVALUE> aaa0 </FILEVALUE>

</Column1>

<Column2>

<FILEVALUE> bbb0 </FILEVALUE>

</Column2>

<Column3>

<FILEVALUE> ccc0 </FILEVALUE>

</Column3>

<Column4>

<FILEVALUE> ddd0 </FILEVALUE>

</Column4>

<Column5>

<FILEVALUE> eee0 </FILEVALUE>

</Column5>

</Object_IND>

<Object_IND>

-


-


-


-


-


</Object_IND>

And so on. Correct me if this is wrong.

There is fix no. of elements (i.e 5 elements of Column1 to Column5) for each Object Index.

<b>Do you want to use the same values viz. aaa0 and ccc0 to be copied in the target message ? or you want that these values to be mapped first to some other values and then assign to target message ?</b>

Create the target structure similar to this -

<Object_IND>

<Column1>

<FILEVALUE> </FILEVALUE>

</Column1>

<Column3>

<FILEVALUE> </FILEVALUE>

</Column3>

</Object_IND>

If you want to pass the same values of column names, then do the message mapping by mapping the Column1 and Column3 elements of source message to the Column1 and Column3 elements of target message.

Let me know whether this is ok.

Regards,

Former Member
0 Kudos

My Source structure is like

<?xml version="1.0" encoding="UTF-8"?>

<ns0:file_sender_mt xmlns:ns0="urn:filetofiledemo">

<CHARACTERISTICS>

<item>

<OBJECT_INDEX>0</OBJECT_INDEX>

<FIELDNAME>/B20C/S_CRATCL</FIELDNAME>

<FIELDVALUE>0</FIELDVALUE>

</item>

<item>

<OBJECT_INDEX>0</OBJECT_INDEX>

<FIELDNAME>/B20C/S_CRATCLYYY</FIELDNAME>

<FIELDVALUE>VALUE123</FIELDVALUE>

</item>

<item>

<OBJECT_INDEX>0</OBJECT_INDEX>

<FIELDNAME>/BA1/C40FTRAN</FIELDNAME>

<FIELDVALUE>a0</FIELDVALUE>

</item>

<item>

<OBJECT_INDEX>1</OBJECT_INDEX>

<FIELDNAME>/BA1/C40FTRAN77</FIELDNAME>

<FIELDVALUE>junk</FIELDVALUE>

</item>

<item>

<OBJECT_INDEX>1</OBJECT_INDEX>

<FIELDNAME>/B20C/S_CRATCL</FIELDNAME>

<FIELDVALUE>1</FIELDVALUE>

</item>

<item>

<OBJECT_INDEX>1</OBJECT_INDEX>

<FIELDNAME>/BA1/C40FTRAN</FIELDNAME>

<FIELDVALUE>a1</FIELDVALUE>

</item>

</CHARACTERISTICS>

</ns0:file_sender_mt>

The Fieldname would repeat for dif values of objectindex

Thats is for objectindex 0

My filedname would have value

filedname1,filedname2,filedname3

and they would have diff field values

like

filedvalue-a,filedvalue-b,filedvalue-c,

for objectindex 1

My filedname again would have value

filedname1,filedname2,filedname3

but they would have diff field values

like

filedvalue-d,filedvalue-e,filedvalue-f

I want to display values like

filedvalue-a,filedvalue-c

filedvalue-d,filedvalue-e

Please let me know if i have made my self clear

Thanks

Amit

Former Member
0 Kudos

Amit,

Your requirement is not clear to me. Do you have the entire structure as input or it is in different files and you need help to retrieve values from files "Column1" and "Column3"?

Regards,

Jai Shankar

former_member189558
Contributor
0 Kudos

Hello Amit,

Go for que mapping function .. you will receive all the fields in ques that is arrays.

You can manipulate those in the function and build up the output que.

Cheers,

Himadri

Former Member
0 Kudos

Hi Amit,

Just create the target message with node element that contains only two child elements, that you wish (e.g. aa1,cc1)

Put the occurence properly for the nodes and sub-elements.

Then map the corresponding elements from source message to the target message appropriately.

Regards,

Former Member
0 Kudos

Can you Kindly explain in detail. I didnt get what you have said .