Skip to Content
avatar image
Former Member

Multiple IDOCs to Single file

Is it possible to create a single output file from two or more IDOCs? What do needs to be done on the Interface mappings and message mapping.

Regards,

Kumar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Apr 16, 2006 at 02:12 AM

    You can achieve this using BPM.

    Please find the beginners guide for BPM,

    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1822. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]

    you can also find some example scenarios under Basis, and Integration Process component.

    Thanks,

    Raj.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2006 at 02:46 AM

    Hi Kumar,

    <i>Is it possible to create a single output file from two or more IDOCs?</i>

    >>>> Yes it is possible. You can produce one output file from Mulitple Idocs of Same Idoc Type or Multiple Idocs of different Idoc types.

    <i>What do needs to be done on the Interface mappings and message mapping.</i>

    >>> As you need to produce one output file from mulitple Idocs i.e you need to generate one Message from mulitple Messages(Idocs). So you need to execute N:1 Mapping. Inorder to accomplish this, you need to use BPM.

    In BPM , you are going to collect mulitple Idocs and grouping into one Message using Mulitline container variable. And then you are going to execute N:1 Mapping in the Transformation Step.

    For more-

    http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm

    Simple Idoc to File without Collection-

    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

    Multiple Idocs types into Single File ~

    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm

    Hope this helps,

    Regards,

    Moorthy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2006 at 05:39 AM

    Hi,

    Yes. We can create a single output file for two or more idocs(of the same type) using BPM.

    In the BPM, you need to have a

    1. Receive step: To receive the message from the R/3 system.

    2. Collect(container): You need to collect idocs for a specified interval(in a maultiline container). You need to use correlation, so that you can collect idocs for a particular type.

    3. Transform: To carry out the mapping.

    4. Send : to send the message to the receiver.

    Interfaces: The source interface should have an occurence of 0..ub and the target interface 1..1

    In message mapping: What we need is, multiple idocs in a single file. i.e, a file, having a single header and multiple idocs under it.

    So, map the source idoc header to target header(which is of occurence 1..1).

    Map the child(of the source header) to a target node (which has occurance of 0..ub).

    Hope this helps.

    Regards,

    Smitha.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 04:02 AM

    Hi Kumar,

    I think this is possible using PACKAGING.

    Check this note 814393 on Service Market Place.

    You want to create or process an XI message with multiple instances of an IDoc (of the same IDoc or extension type) in the mapping.

    The payload of the relevant message is to have the following the format:

    ...

    <IDOCTYP>

    <IDOC>...</IDOC>

    ...

    <IDOC>...</IDOC>

    </IDOCTYP>

    To be able to process these messages in the message mapping of the source system and to create them in the target system, you need an XML schema for the IDOC that allows multiple instances of the IDOCtag.

    If the relevant IDOC is imported into the Integration Repository, the system generates an XML schema that sets the number of instances of the IDOC tag to exactly one.

    The following describes how you can manually change the XML schema so that multiple instances of the IDOC tag are allowed, and how you can make the modified XML schema available to an adequate message mapping.

    Other terms

    IDoc packaging

    Reason and Prerequisites

    The relevant IDoc is imported into the Integration Repository.

    <u>

    <b>Solution</b></u>

    1) Log on to the Integration Repository.

    2) Open the relevant IDoc in the object editor.

    3) Select the "Export XSD" menu option in the "Tools" menu.

    4) In the subsequent dialog box, assign a file name and save the data to the hard disk of your local PC.

    5) Open the file that you have saved in step 4 in an adequate editor (for example, Notepad) for editing.

    6) Locate the first entry: <xsd:element name="IDOC" type="<

    Idocname>"> and add the following expression, maxOccurs="unbounded", between the value of the type attribute and the closing angular bracket.

    <b>Example:</b>

    <xsd:element name="IDOC" type="ADR2MAS.ADR2MAS02"

    maxOccurs="unbounded">

    7) Save the modified file to the hard disk of your local PC.

    8) In the message mapping, use the file saved in step 7 instead of the imported IDoc by using the "Import XML or XSD" function in the mapping tool to select the source or target messages.

    And also go through this Blog which tells you how to do the Scenario your trying using a BPM:

    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm

    Regards,

    Abhy

    Add comment
    10|10000 characters needed characters exceeded