cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping RFC structure to deep XML structure

Former Member
0 Kudos

Hello,

I have a message mapping I am struggling with. The outbound interface is an RFC with structure like this:

RFC_send_material 
-material (1..unbounded) 
--matnr 
--meins 
--brgew 
-description (1..unbounded) 
--matnr 
--vkorg 
--text

The inbound interface should look like this:

Materials_from_SAP 
-material (1..unbounded) 
--matnr 
--meins 
--brgew 
--description (0..unbounded) 
---vkorg 
---text

My problem is to get all the description connected to the matnr together.

Examples with data:

Outbound rfc:

<RFC_send_material> 
   <material> 
      <matnr>100</matnr> 
      <meins>c1</code1> 
      <brgew>c2</code2> 
   </material> 
   <material> 
      <matnr>101</matnr> 
      <meins>c1a</code1> 
      <brgew>c2a</code2> 
   </material> 
   <material> 
      <matnr>102</matnr> 
      <meins>bv102</code1> 
      <brgew>addd102</code2> 
   </material> 
   <description> 
      <matnr>100</matnr> 
      <vkorg>NO10</sales_org> 
      <text>testing100</text> 
   </description> 
   <description> 
      <matnr>102</matnr> 
      <vkorg>SE10</sales_org> 
      <text>testing102</text> 
   </description> 
   <description> 
      <matnr>102</matnr> 
      <vkorg>DK10</sales_org> 
      <text>testing103</text> 
   </description> 
</RFC_send_material>

The inbound file structure should then look like this:

<Materials_from_SAP> 
   <material> 
      <matnr>100</matnr> 
      <meins>c1</meins> 
      <brgew>c2</brgew> 
      <description> 
         <vkorg>NO10</vkorg> 
         <text>testing100</text> 
      </description> 
   </material> 
   <material> 
      <matnr>101</matnr> 
      <meins>c1a</meins> 
      <brgew>c2a</brgew> 
   </material> 
   <material> 
      <matnr>102</matnr> 
      <meins>bv102</meins> 
      <brgew>addd102</brgew> 
      <description> 
         <vkorg>SE10</vkorg> 
         <text>testing102</text> 
      </description> 
      <description> 
         <vkorg>DK10</sales_org> 
         <text>testing103</text> 
      </description> 
   </material> 
</Materials_from_SAP>

So as you see, my problem is to get the correct description belonging to the material. Hope anybody can help with doing this in Message Mapping.

Regards,

Per

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi PRW,

As Michal said correctly, it is hard to describe in words, so here are some pictures which I think is the solution of your problem.

Description mapping : http://www.flickr.com/photos/23639237@N02/3220030016/sizes/o/

VKORG mapping : http://www.flickr.com/photos/23639237@N02/3219181675/sizes/o/

Text mapping : http://www.flickr.com/photos/23639237@N02/3219182919/sizes/o/

UDF CODE : http://www.flickr.com/photos/23639237@N02/3219184005/sizes/o/

And the Final result : http://www.flickr.com/photos/23639237@N02/3220035356/sizes/o/

Regards,

Sarvesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks again Sarvesh,

I changed the occurance, and as you said, it works!

Thanks,

Per

Former Member
0 Kudos

Thank you for your replies. And a special thank you to Sarvesh who took all that effort to solve the problem and display the solution in a very nice way!!!!

I have one question though, and that is if you say send 1000 materials and each material have 4 text description which will mean 4000 descriptions. Will there be any performance issues for this?

Another issue is if the descriptions was changed to 0..unbounded, if you then did not send any descriptions would the mapping then fail?

Well, thanks again!

Regards,

Per

Former Member
0 Kudos

> I have one question though, and that is if you say send 1000 materials and each material have 4 text description which will mean 4000 descriptions. Will there be any performance issues for this?

>

For 4 thousand descriptions there sholdn't be any perfromance issue in my opinion, but since in UDF we are using the Cache as "Queue" then there could be a little bit of impact on performance which I guess will be very less. Best thing is perform a volume test and see the results..

> Another issue is if the descriptions was changed to 0..unbounded, if you then did not send any descriptions would the mapping then fail?

Well the ans is No, it will not fail the mapping, but you should try it by your own in your mapping. Go to test tab and delete the description segment and then execute the mapping, you will get the results.

Regards,

Sarvesh

MichalKrawczyk
Active Contributor
0 Kudos

hi,

this is not a very difficult requirement but tthe problem is a little

bit different - it's quite hard to explain the mapping (as it will require a few UDFs) on a forum

my proposal for you if no one will answer to this post is to:

export your software component with your strcutures and append it to this post (attach files option) then maybe someone who has time will help you and do the mapping for you

unless somone can explain it on the forum easily

good luck,

Regards,

Michal Krawczyk