cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping

Former Member
0 Kudos

Hi,

I am creating IDOC to XML SOAP scenario.

The target structure is :

<item> ---12 times

<a>123</a>

</item>

and it is occurance is 12 times.

The value in 'a' is to be mapped from different fields of idoc for each occurance of item.

How this can be aciheved.

Thanks,

Vishal

Edited by: vishal gadkari on May 13, 2009 11:22 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

write a UDF and read all the inputs(different field that u want to map to the target) write

result.addValue(input1[0]);

result.addValue(input1[0]);

....

as many times as the no. of inputs.

ur message mapping will look like


input1----- UDF-----Item
input2--/
input3--/

choose "context" while creating the UDF

Shabarish_Nair
Active Contributor
0 Kudos

so what you need is,

if the item array looks like,

1

2

3

4

.

.

.

12

1 should go to target 1

2 should go to taget 2 etc

right?

Use the statistic fucntion index and pass the values

index will return the current occurance

so when index is equals to 1 pass the input to target 1

for target 2 use the logic as index equals 2 etc

Former Member
0 Kudos

Hi ,

My requirement is to map different values to same fieldname of target structure.

for 12 different values of fieldname I have 12 different values all mapped to 2 fields in target structure. Kindly suggest on this

Former Member
0 Kudos

you can use if else condition in mappint......

Former Member
0 Kudos

Right click to Item node --> Duplicate Subtree..

do it till Item is repeated for 12 times

Then you can assign 12 different values to field in Item

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi ,

>

> My requirement is to map different values to same fieldname of target structure.

> for 12 different values of fieldname I have 12 different values all mapped to 2 fields in target structure. Kindly suggest on this

if it the same target field and if the target field is unbounded in occurance, then you can dublicate the field and then map the values.

Note that the field has to be unbounded.or its parent node has to be unbounded.

Former Member
0 Kudos

No it is not allowing to create the duplicate tree..it giving is target mismatch..

any suggestions

Former Member
0 Kudos

you can not map to different field in different occurance,

take all the fields individualy (which needs different mapping) under ITEM tag and map it accordingly