on 06-07-2012 12:31 PM
Hi Group,
we have requirement to split the incoming file based on one field (PSGID) value chanage,can any body help how to achieve this:
Incoming Source:
------------------
<Record>
<DPZ>
<field1>201000</field1>
</DPZ>
<TDR>
<field11>20</field11>
</TDR>
<SUP>
<id>BEEN</id>
<\SUP>
<PSG>
<PSGID>A </PSGID>
<\PSG>
<DA>
<DAID>ex1</DAID>
</DA>
<PSG>
<PSGID>B </PSGID>
<\PSG>
<DA>
<DAID>ex2</DAID>
</DA>
<PSG>
<PSGID>C </PSGID>
<\PSG>
<DA>
<DAID>ex3</DAID>
</DA>
</Record>
Target
------
File1
----------
<Record>
<DPZ>
<field1>201000</field1>
</DPZ>
<TDR>
<field11>20</field11>
</TDR>
<SUP>
<id>BEEN</id>
<\SUP>
<PSG>
<PSGID>A </PSGID>
<\PSG>
<DA>
<DAID>ex1</DAID>
</DA>
</Record>
File 2
--------
<Record>
<DPZ>
<field1>201000</field1>
</DPZ>
<TDR>
<field11>20</field11>
</TDR>
<SUP>
<id>BEEN</id>
<\SUP>
<PSG>
<PSGID>B </PSGID>
<\PSG>
<DA>
<DAID>ex2</DAID>
</DA>
</Record>
File 3
--------
<Record>
<DPZ>
<field1>201000</field1>
</DPZ>
<TDR>
<field11>20</field11>
</TDR>
<SUP>
<id>BEEN</id>
<\SUP>
<PSG>
<PSGID>C</PSGID>
<\PSG>
<DA>
<DAID>ex3</DAID>
</DA>
</Record>
Below logic works in your case
Source field---->remove context---->splitby value(value change)---->collapse context---->target.
But how you are going to collect multiple files in to sinfle file, you need BOM for this.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajiv,
You could use multi.mapping for this issue http://scn.sap.com/people/ranga.rajan2/blog/2010/03/17/multi-mapping-with-a-simple-scenario--fledgli...
(Also, don't forget to "like" or rate (or both) the blog in case you find it useful.)
You use the function pointed by Zammer in order to create different messages.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try using SplitByValue(ValueChange) function so that all PSGID value A goes into one, B goes into another and so on. would be good if you can share the screenshot of mapping with source and target structure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.