cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Question

Former Member
0 Kudos

Hello,

I have a message as follows,

<Message1>

<Item>

<Table1>

<Key>

<name>

<plant>

<Table2>

<key>

<amount>

<year>

<Table3>

<key>

<costcenter>

<investmentnumber>

In this tables table1, table2, table3 has a common field named key and I have to collect these three tables based on the key and form a target message which looks like

<Message>

<Item>

<Key>

<name>

<plant>

<amount>

<year>

<costcenter>

<investmentnumber>

If I do a normal mapping tag to tag, it works for equal number of entries in all the tables.

But if there are entries in first two tables and there are no entries for that key table 3, still i need to create the target structure with key, fields from first two tables and leave the third table entry...

Any ideas??

Thanks

Thilothama

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I had the same scenario, it can be solved in message mapping use split by value (Value change) so that you will get one target node for every key value, and for the input to the Split by value use the EXIST function for the 3 keys values with OR boolean ..

let me know if this helps.

thankx,

shree

Former Member
0 Kudos

Shree,

I tried what you said, the output true is getting mapped to key value in the target..

Former Member
0 Kudos

Hi,

Please create user defined function where you will collect all this information from this tables in java HashTable(s) with this keys. Afterwards select from these HashTables. You can define these HashTables either in global sectionor in GlobalContainer.

regards,

wojtek

former_member206604
Active Contributor
0 Kudos

Hi,

Can you please post a clear strucutre of the message, actually I could'nt make up the strucutre.. is it a flat strucutre of there is some root node? Nothing is clear atleast you can use close tags of xml it would help us to understand it clearly. Also provide with occurances of each node..

Thanks,

Prakash