on 11-04-2011 1:10 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
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.
If your version is 7.1 and above, you can also try using enhanced interface determination. Please go through the below link
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.