Sorting and disassembling - BizTalk flat file

Hi All,

I have a requirement where I have to sort the below flat file based on 3rd element and then diassemble it based on the same value of the 3rd element and then send to SAP.

for eg : Original file

1;abc; 123

2; xyz ; 124

3; qaz ; 123

4 ; qwe ; 125

5; plm ; 124

This will get disassembled into 3 different messages as below

Message 1 : 

 1;abc; 123

3; qaz ; 123

Message 2 :

2; xyz ; 124

5; plm ; 124

Message 3:

4 ; qwe ; 125

And I want to loop these message in orchestration to send to SAP , A file to be sent to SAP for each message above

Everything should be done in orchestration, any suggestion ?? -- I can sort it but not sure how to disassemble them.

Thanks,

February 17th, 2015 11:23am

I would approach this in two steps.

Step 1 is a Map to group the records.  Here are some techniques:

http://www.jenitennison.com/xslt/grouping/

Step 2 is using the XmlDisassembler to Debatch the records.

Once you get the grouping right, it's really a simple process so don't over think it.

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 12:41pm

Hi John,

How Step 2 will work ? can you please elaborate 

Thanks,

Varun

February 17th, 2015 2:21pm

It's just the regular XmlDisassembler.

You have a couple of options.

  • One Orchestration where you apply the Grouping Map, then use the Orchestration Debatching Technique to debatch.  See here: https://msdn.microsoft.com/en-us/library/aa562035.aspx
  • A Loopback Send Port where you do the Grouping Map either in the first Receive or Send side of the Loopback Port, then debatch in the Receive Pipeline of the Loopback Port.  You can use the Loopback Adapter for this: Loopback Adapter (Disclaimer:  I maintain the Loopback Adapter.  It's completely free but no official support.)
  • Some other combination.  Any way you do it, you have apply the Map, then debatch.
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 3:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics