cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple IDocs -> XI -> Flat file

Former Member
0 Kudos

We are looking at a scenario to send multiple IDOCS from SAP to Flat File. We implemented this using the Collect Pattern in BPM, merge all the IDocs into a single message and write it in a file. But is there any a way to avoid BPM and still be able to send multiple IDOCS in a package to be written onto one file?

Thanks

Vinoda

Accepted Solutions (0)

Answers (4)

Answers (4)

dharamveer_gaur2
Active Contributor
0 Kudos

deleted

Former Member
0 Kudos

Hi Vinoda,

You can do the same without a BPM also....using XSLT MAPPING.....I will send you a link which will talk about doing file to multiple IDOC Scenario, In simmilar lines just follow and do even Multiple IDOC to file scenario...the link will help you understand how to do your Scenario using XSLT mapping.

<a href="/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping to Multiple IDocs (XSLT Mapping)</a>

Now since you wanna covert the file to a flat file at the receiver end...pls go through the info provided below and do the same.

So you want content conversion at the receiver end, For that please go through these links below.It clearly explains your requirement.

<a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion Receiver with Content Conversion</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm">Converting File Content in the Receiver Adapter</a>

and also for a sample IDOC to file Scenario pls Go through the following link:

<a href="/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters scenario</a>

Regards,

abhy

moorthy
Active Contributor
0 Kudos

HI Vinoda,

It is not possible without using BPM right now.

Pls refer following blog-

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

Regards,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

I think this is possible using PACKAGING.

Check this note <b>814393</b> on Service Market Place.

<i>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.

Solution

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.

Example:

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

maxOccurs="unbounded">

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

😎 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.

</i>

Regards,

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

Hi Vinoda,

>>>>But is there any a way to avoid BPM and still be able to send multiple IDOCS in a package to be written onto one file?

I don't think it's possible without BPM in standard

but....

what kind of a file is that?

if this is a flat file you can try something like this:

send idocs without BPM and do append to this file

if the other system will be ready it can just import and delete this

file..then the next idoc will create the file again and append

new idocs as they will come...

Regards,

michal