cancel
Showing results for 
Search instead for 
Did you mean: 

Split a message into multiple instances

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts

   I have a outbound interface that contains

      <get_UserDetails>

         <Items>

               <id>1</id>

               <name>Harish</name>

               <age>25</age>

         <Items>

         <Items>

               <id>2</id>

               <name>Manish</name>

               <age>30</age>

         <Items>

   </get_UserDetails>

  Here depending on the <Items> node I want to generate that many inbound interface instances.

  I do not want to use ccBPM. How can I achieve this?

Thanks

Gopal

Accepted Solutions (1)

Accepted Solutions (1)

gopalkrishna_baliga
Participant
0 Kudos

Hi all,

  Thanks for your help.

  I am able to fix the issue.

  I just updated the ICO and reactivated it.

  Now it is working and I am getting multiple output files.

Thanks

Gopal

Muniyappan
Active Contributor
0 Kudos

Hi Gopal,

can you mark the reply as correct answer instead of assumed answer?

because for similar issue, it can help others to find the solution easily.


correct me if i am wrong here.

Regards,

Muniyappan.

Answers (3)

Answers (3)

ambrish_mishra
Active Contributor
0 Kudos

Hi Gopalkrishna,

This is a simple case of multi mapping (1:n). First design your target data type suitably and change the definition of messages as multiple in the target which will give you a message envelope for splitting the message. You can create the message node based on items received from source.

Hope it helps!

Ambrish

gopalkrishna_baliga
Participant
0 Kudos

Hi Ambrish,

   I did what you said.

   I changed the message mapping. There in the Signature tab, I changed the occurrence of target message to 0..unbounded.

  Then the source and target message structure has also changed.

Source Message:

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

   <ns0:Message1>

      <ns1:Iget_UserDetails xmlns:ns1="http:/test/trng/Gopal">

         <Items>

            <name/>

            <id/>

            <age/>

         </Items>

      </ns1:get_UserDetails>

   </ns0:Message1>

</ns0:Messages>

Target Message:

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

   <ns0:Message1>

      <ns1:Output_multimap xmlns:ns1="http:/test/trng/Gopal">

            <name/>

            <id/>

            <age/>

      </ns1:Output_multimap>

   </ns0:Message1>

</ns0:Messages>

I have actually mapped <Items> to <Output_multimap>

       then <name> to <name>, <id> to <id> and <age > to <age>

Do I need to map anything else? Please help.

what do I map <Messages> and <Message1> to?

Thanks

Gopal

former_member185881
Active Participant
0 Kudos

Hello Gopal

No need to map Message and Message1

Thanks

Dheeraj Kumar

ambrish_mishra
Active Contributor
0 Kudos

Map Messages/Message1 to constant (blank). Make sure Output_multimap is 0...unbounded.

Test with multiple Items and revert back if you don't get desired results.

Ambrish

Muniyappan
Active Contributor
0 Kudos

Dear Gopal,

as ambrish said,your source should be like this.use duplicate substructure option in test tab.

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

   <ns0:Message1>

      <ns1:Iget_UserDetails xmlns:ns1="http:/test/trng/Gopal">

         <Items>

            <name/>

            <id/>

            <age/>

         </Items>

          <Items>

            <name/>

            <id/>

            <age/>

         </Items>

      </ns1:get_UserDetails>

   </ns0:Message1>

</ns0:Messages>

then execute the mapping.

Regards,

Muniyappan.

Former Member
gopalkrishna_baliga
Participant
0 Kudos

I did the same. But not getting the desired results. My config is FILE to FILE and I am using AAE (ICO).

I am expecting 2 output files when there are 2 items node in the input file.

But getting a single output file containing data as below

<ns0:Messages xmlns:ns0 = "http://sap.com/xi/XI/SplitAndMerge">

    <ns0:Message1></ns0:Message1>

</ns0:Messages>

I am using PI 7.31.

What am I missing?

Thanks

Gopal

gopalkrishna_baliga
Participant
0 Kudos

Yes you are correct. I have used 2 items nodes in my source XML.

monikandan_p
Active Participant
0 Kudos

Hi Gopal,

       You can acheive this multiple instance by grapical mapping itself.

Kindly follow the below screenshot.Hope it will solve your issue.

Best Regards,

Monikandan.

former_member185881
Active Participant
0 Kudos

Hi Gopal

Use Multi Mapping concept. Many docs can be found in SDN.

Regards

Dheeraj Kumar

gopalkrishna_baliga
Participant
0 Kudos

Hi Dheeraj,

  Many docs are using BPM. But I don't want to use that.

former_member185881
Active Participant
0 Kudos

Hello Gopal

Multi Mapping concept is used when you don't have to use BPM.

See the PDF doc for Multi Mapping.

"www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?overridelayout=true"