none
Debatching SAP IDOCs with multiple records RRS feed

  • Question

  • Hi,

    We are using BizTalk Server 2010 for receiving IDOC's from SAP, where the SAP adapter (v3.0) acts as an RFC server for receiving special RFC calls from SAP whenever an IDOC is created and sent (similar to scenario described here).

    We have generated the schemas that represent the IDOC structure using "Add -> Add Generated Items -> Consume Adapter Service -> sapBinding, Service (Inbound Operation), Select the relevant IDOC message type (HRMD_A) and Operation = Receive method". This results in very complex schemas, which are very hard to figure out and work with. The IDOC's are flat files when sent from SAP, but transformed to XML docs in the receive process, using a custom pipeline with FF dasm, setting the DocSpecName to the auto generated schema.

    The sent IDOC's can contain multiple records, 1..Unbounded.

    What is the easiest way of ensuring that IDOC's with multiple records are split into individual records? I'm not sure if I can achieve this by following same procedure as Richard Seroter describes here, or I have to use a pipeline approach...

    Anyone tried to do this before? Some quick tips would be much appreciated.

    Thanks.

    Wednesday, September 12, 2012 12:19 PM

All replies

  • Hi MPapas,

    A (very) basic solution for BizTalk developers is to ask SAP Administrator to always send to BizTalk single IDOC. This could be done on SAP side. Not sure this is the answer you expected, but it works...


    Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Wednesday, September 12, 2012 2:59 PM
  • If I remember correctly, IDoc batches come with all Root IDoc Type Segments, followed by the individual segments for each IDoc.  I thought I had written information in the old BizTalk newsgroups on how it is possible to slightly alter the schema and use a custom pipeline component to re-order the stream in such a way as to allow for complete individual IDoc disassembly to work.  This was 7 or 8 years ago, so my memory is somewhat clouded on the structure of batched IDocs.

    If you send me your generated IDoc schema and a sample batch (3 or more IDocs in the batch), it may jog my memory.  You can send it to my MSDN email at: ddownin@hotmail.com

    At a minimum, I believe you will need a custom pipeline component, and a slight modification to the generated schema.

    NOTE: Check to see if there are any additional pipeline components included with the adapter.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.


    Thursday, September 13, 2012 4:09 AM
  • Hi Cristophe,

    I tried to make the SAP developer do what you suggest, but as I understood it wasn't possible since it is change pointers that is the basis for creating an IDoc in our case. Apparently change pointers/changes are processed in certain intervals, and all changes up to that time will be included in the generated IDoc.

    But if you have any suggestion on how to achieve this, please let me know and I will relate the information to the SAP developer.

    Thanks.

    Thursday, September 13, 2012 9:08 AM
  • Hi David,

    I have sent the files you requested to your MSDN email address.

    I also checked if there were any other pipelines included with the adapter, but there doesn't seem to by any.

    I'm trying different approaches, but I haven't succeeded so far...

    Thursday, September 13, 2012 9:13 AM
  • Hi MPapas,

    You could try that : with SAP transaction WE20, select your partner, then edit outbound parameters and set to 1 property called Pack Size.

    Hope this helps you !


    Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Thursday, September 13, 2012 9:42 AM
  • Hi Cristophe,

    I checked using WE20, and the Pack Size property is already set to 1.

    Thanks for the tip anyway.

    Thursday, September 13, 2012 11:07 AM