cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with mapping source to target structure

Former Member
0 Kudos

Hi!

I have a problem in message mapping.

My source structure looks like this:

<start>
     <a>
     <b>
     <c>
     <a>
     <b>
     <c>
     <a>
     <b>
     <c>
     and so on
<end>  1:1

After my more or less 1:grahpical 1 mapping I get the follwoing target structure:

<start>
     <a>
     <a>
     <a>
     <b>
     <b>
     <b>
     <c>
     <c>
     <c>
<end>

But that is not what I want and need. The original source structure should also be in the target structure.

Any ideas how to solve this? Please help!

Regards,

Volker

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can check this (even though it is related to FCC but still you can check the logic of creating the target structure using java mapping):

http://scn.sap.com/people/shabarish.vijayakumar/blog/2010/01/14/file-conversion-using-nodeception

Thanks

Amit Srivastava

former_member184681
Active Contributor
0 Kudos

Hi Amit,

That's a nice illustration to what I've suggested as option#1 here. I agree that it doesn't have to be related to FCC to be technically achievable. Still, it might not be acceptable as a data format by the receiver system - it depends on the actual requirements.

Regards,
Greg

Former Member
0 Kudos

Hi Greg,

But I guess usage of java mapping (shown in the blog above) after the graphical one will surely help Volker is achieving the desied structure at the target side(like <root> <a> <b> <c> <a> <b> <c>...<root>)...

http://wiki.sdn.sap.com/wiki/display/XI/Parametrized+Java+Mapping+in+PI+7.1

what you have to say on this??

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit and Greg!
Thanx very much for your replies. I will give option 1 a try. I'll come back to inform you if it is an acceptable solution for me.

Regards,
Volker

former_member184681
Active Contributor
0 Kudos

Dear Amit,

I must admit I haven't read the blog carefully enough... Definitely the nodeception Java mapping will get the job done. Good one! And thanks for pointing it again for me to clarify.

Regards,
Greg

Former Member
0 Kudos

Hi Amit and Greg!
Indeed I could fix my problem with the help of the blog mentioned by Amit.
Again thanx very much for your recommendations! You saved a PI Consultant's life today ...

Regards,
Volker

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Volker,

You mean that you want the same structure mapping but you need to change tsome value mapping.

There musn't have a problem if you have the same XSD or Message Type in the source and the target and finally you make a mapping one to one in the nodes.

Regards.

former_member184681
Active Contributor
0 Kudos

Dear Iñaki,

I believe the problem here is the nodes sequence: a,b,c,a,b,c being changed by the graphical mapping to a,a,b,b,c,c. And I do not know any way to avoid this, when using graphical mapping. The sequence can be maintained as a,b,c,a,b,c in two ways:

1. Still using graphical mapping - if some grouping "root" node was added to the structure, like this:
<root><a><b><c></root><root><a><b><c></root>... But I am aware that this might not be acceptable from the receiver system's perspective.

2. Replacing the graphical mapping with a Java mapping should also get the job done.

Hope this helps,
Greg

former_member184681
Active Contributor
0 Kudos

Hi Volker,

Do you mean you want the target structure to be identical to source structure? No mapping at all, simply pass the source message to the receiver adapter? If so, simply remove the Operation Mapping from your Interface Determination and it should work as you expect.

Hope this helps,
Greg

Former Member
0 Kudos

Hi Greg!

Thanx for ASAP reply. Yes, that's what I mean.

My problem is that I have to manipulate 2 fields in the <start> and <end> structure, thus I need a mapping.

Regards,
Volker