cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem

Former Member
0 Kudos

Hi Experts,

I need ur valuble suggestion to do mappping for the following structures

Source Target
A         A(1...1)
B         ---B(1....unbounded)
C         ------C(1...1)
D         ---------D(1....unounded)
E          ------------E(1....1)

I did the graphical mapping. But here the problem i got was

All the C,D&E fields got mapped with the first occurance of B itself.

So for the second occurance of B it is giving an error message as unable to produce the field /A/B[2]/C.

I am doing an File to IDoc scenario.

Please dont refer any blogs or links. The scenario is able to execute sucessfully except this error.

My question is using the graphical mapping can we map the Single Hierarchy Source to the Multiple Hierarchy Target ....? or should we go for Java Mapping...?

Thanks in Advance....

Surely Points will be awarded for the helpfull answers

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Saravana,

Could you give the sample input and output structure u needed. I read in ur previous thread but its not clear...

Best regards,

raj,

Former Member
0 Kudos

Hi Raj,

My Input is like....

- <A>
  <KEY>A</KEY> 
  <B>571515198150857963</B> 
  </A>
- <B>
  <KEY>B</KEY> 
  <C>3002</C> 
  </B>
- <C>
  <KEY>C</KEY> 
  <D>KWH</D> 
  </C>
- <D>
  <KEY>D</KEY> 
  <E>Z02</E> 
  <F>714.538</F> 
  </D>
- <E>
  <KEY>E</KEY> 
  <G>2007062204000020070622050000</G> 
  </E>
- <B>
  <KEY>B</KEY> 
  <C>2006</C> 
  </B>
- <C>
  <KEY>C</KEY> 
  <D>KWH</D> 
  </C>
- <D>
  <KEY>D</KEY> 
  <E>Z01</E> 
  <F>0</F> 
  </D>
- <E>
  <KEY>E</KEY> 
  <G>2007062204000020070622060000</G> 
  </E>
- <D>
  <KEY>D</KEY> 
  <E>Z01</E> 
  <F>1</F> 
  </D>
- <E>
  <KEY>E</KEY> 
  <G>2007062204000020070622070000</G> 
  </E>
- <D>
  <KEY>D</KEY> 
  <E>Z01</E> 
  <F>2</F> 
  </D>
- <E>
  <KEY>E</KEY> 
  <G>2007062204000020070622080000</G> 
  </E>

the out put shoild look like...

- <A SEGMENT="Constant">
	- <B SEGMENT="Constant">
		- <C SEGMENT="Constant">
		  	- <D SEGMENT="Constant">
 				- <E SEGMENT="Constant">
				  </E>
			  </D>
			- <D SEGMENT="Constant">
				- <E SEGMENT="Constant">
				 </E>
			  </D>
			- <D SEGMENT="Constant">
				- <E SEGMENT="Constant">
				 </E>
			  </D>
			- <D SEGMENT="Constant">
				- <E SEGMENT="Constant">
				 </E>
			  </D>
		  </C>
	  </B>
	  - <B SEGMENT="Constant">
		- <C SEGMENT="Constant">
		  	- <D SEGMENT="Constant">
 				- <E SEGMENT="Constant">
				  </E>
			  </D>
			- <D SEGMENT="Constant">
				- <E SEGMENT="Constant">
				 </E>
			  </D>
		  </C>
	  </B>
  </A>

Can we do this using the UDF....

Former Member
0 Kudos

HI saravana,

I think so in the target side u can't hav deep nested structure like this.

plz check out this.

regards

yugapreetha

Former Member
0 Kudos

Hi,

I have realized deep structure cant be obtained using the graphical mapping..

now my question is should we go for the Jvamapping or can we write any UDF...

Former Member
0 Kudos

Hi,

For this u can go for java mapping which will be more comfortable.

regards

yugapreetha

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

Try below mapping...

C--->CopyValue---->TargetElement

[0]

The [0] is for CopyValue position.

Regards,

Former Member
0 Kudos

Hi Saravana,

<u>My question is using the graphical mapping can we map the Single Hierarchy Source to the Multiple Hierarchy Target ....? or should we go for Java Mapping...?</u>

Yes u can do it...

Another thing is tht all ur target structure are mandatory meaninf atleast one structure should be created....

Is ur source structure occuring once or multiple times?

Regards,

Akshay