cancel
Showing results for 
Search instead for 
Did you mean: 

Message Splitting

Former Member
0 Kudos

Hi All,

I am trying to do a scenario in which I want to split my source message into number of target messages using graphical mapping

or any other mapping.

<ns1:MT_FileSplit_Src xmlns:ns1="urn://FileSplitting.com">
         <Details>
            <EmpId>12</EmpId>
            <Name>satya</Name>
            <Designation>CON</Designation>
         </Details>
         <Details>
            <EmpId>321</EmpId>
            <Name>xyz</Name>
            <Designation>DL</Designation>
         </Details>
      </ns1:MT_FileSplit_Src>

If above structure is my source then I want the result as

<ns1:MT_FileSplit_Src xmlns:ns1="urn://FileSplitting.com">
         <Details>
            <EmpId>12</EmpId>
            <Name>satya</Name>
            <Designation>CON</Designation>
         </Details>
 </ns1:MT_FileSplit_Src>

<ns1:MT_FileSplit_Src xmlns:ns1="urn://FileSplitting.com">
         <Details>
            <EmpId>321</EmpId>
            <Name>xyz</Name>
            <Designation>DL</Designation>
         </Details>
      </ns1:MT_FileSplit_Src>

Can anyone help me to do this??

I tried UseOneAsmany standard function to get this but not succeeded .

Any kind of suggestion will be appreciated.

Thanks

Rabi

Accepted Solutions (1)

Accepted Solutions (1)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi Rabi,

under signature tab in Message Mapping,

change the occurance of your target structur to 0...unbounded

then mapping editor map the field <EmpId> with <MT_FileSplit_Src>

by this way you will have as many target structure as <EmpId> values you receive.

Rgds

RP

Edited by: Rodrigo Alejandro Pertierra on Nov 4, 2011 1:52 PM

Former Member
0 Kudos

Hi All,

I did exactly as you said.But in sxmb_moni it is saying that "Split mapping created no messages".

So I got to know from sdn blogs that it is due to mapping which is not splitting the message .

Can you tell me how to split it using graphical mapping??

Thanks

Rabi

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

could yuo post the request message and the target structure that you are specting please??

Former Member
0 Kudos

Hi Rodrigo,

This is my source structure

 <?xml version="1.0" encoding="UTF-8" ?> 
- <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
- <ns0:Message1>
- <ns1:MT_Employee_Src xmlns:ns1="urn://FileToFile_ERD">
- <Details>
  <EmpId>1</EmpId> 
  <Name>Raj</Name> 
  <Designation /> 
  </Details>
- <Details>
  <EmpId>2</EmpId> 
  <Name>rabi</Name> 
  <Designation /> 
  </Details>
  </ns1:MT_Employee_Src>
  </ns0:Message1>
  </ns0:Messages>

This is the resulted message in sxmb_moni tcode

<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>XIServer</SAP:Category> 
  <SAP:Code area="MAPPING">GENERIC</SAP:Code> 
  <SAP:P1>Split mapping created no messages</SAP:P1> 
  <SAP:P2 /> 
  <SAP:P3 /> 
  <SAP:P4 /> 
  <SAP:AdditionalText /> 
  <SAP:ApplicationFaultMessage namespace="" /> 
  <SAP:Stack>Split mapping created no messages</SAP:Stack> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

So if you can help then this will be really appreciating.

Thanks

Rabi

Former Member
0 Kudos

Hi,

In the source XML message you may find some extra tags being included.

Just remove those extra tags, then it will work fine.

For example:

If your source XML message is:

<?xml version="1.0" encoding="UTF-8"?>

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

<ns0:Message1>

<ns1:MT_FileToFile_MultiMap_Src xmlns:ns1="http://FileToFile/MultiMap">

<Input>

<Name>ab</Name>

<EmpId>123</EmpId>

</Input>

</ns1:MT_FileToFile_MultiMap_Src>

</ns0:Message1>

</ns0:Messages>

remove the extra tags and then it will look like:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_FileToFile_MultiMap_Src xmlns:ns0="http://FileToFile/MultiMap">

<Input>

<Name>ab</Name>

<EmpId>123</EmpId>

</Input>

</ns0:MT_FileToFile_MultiMap_Src>

i hope this will help you,

regards,

ganesh.

Former Member
0 Kudos

Hi,

I did what you said.But it is showing error in sxmb_moni as "com/sap/xi/tf/_MM_FileSplit_java.lang.Null Pointer Exception".

If I am not removing the extra tags as you gad told me then it is showing error as "Split mapping created no message".

So if you can tell me then it will be very helpful for me.

Thanks

Rabi

Former Member
0 Kudos

Hi,

Your errors tells me that you are running issue in the mapping side. Basically you are accessing field which has no value found. Thats why you get Null Pointer Exception. Go through your source and target structure and see your mapping fields one after another and check the values you are passing. Also try to test the same values in message mapping screen.

you have to remove extra open and close tags in you source payload as below i mentioned,

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

</ns0:Messages>

regadrs,

ganesh.

Former Member
0 Kudos

Hi Rabi

Which rule are you using for your target MT node (node with 0...unbounded occurrence under Messages\Message1)?

Check that it's mapped with Details source node.

Regards,

Giuseppe

Former Member
0 Kudos

Hi All,

Thanks to you for this useful replies.

This is solved now.

Changing occurrence and removing unwanted code from source message payload it is working fine.

Thanks

Rabi

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If your version is 7.1 and above, you can also try using enhanced interface determination. Please go through the below link

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

Former Member
0 Kudos

Hi,

Follow the below steps to achieve your requirement.

1. You need to provide occurance of the field to be 1..Unbounded.

2. Do the mapping according to the requirement.

3. In the Receiver Determination, you need to select " Extended" in the Type of Receeiver determination.

4. Value mapping function in message mapping.

regards,

ganesh.