cancel
Showing results for 
Search instead for 
Did you mean: 

How to map Multiline Inputfile to idocs?

Former Member
0 Kudos

Hi experts,

My scenario is as follows: I have a multiline input textfile, which I have to upload and map to IDOCS. The upload-part is done. When I check the resulting XML though, it does not contain the following nodes, which I seem to need for my message mapping:

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

...

</ns0:Message1>

</ns0:Messages>

Therefor the mapping results in an error. How to do this mapping? I think I should do this via BPM (read file->loop at inputfile->create idoc per line and just use a 1:1 message mapping) but I don't know how to do this in the integration process...

Can anybody tell me how to create this Integration Process? Or shoud I solve this another way?

Example inputfile:

215193 19010 2-3-1999 A. A. A. PROGRESS L N MDV 8621874 .... -> has to result in 1 idoc

210618 19030 2-3-1999 A A BAKYKHANOV L N AZE 8328721.... -> has to result in 1 idoc

270555 19400 16-11-2005 A. A. MCKINNEY->etc

Thanks,

William

Accepted Solutions (1)

Accepted Solutions (1)

aashish_sinha
Active Contributor
0 Kudos

Hi,

I think this is simple file to idoc scenario in which you are taking data from flat file and mapping it to Idocs one by one as you know the fields in which u want to map it.

In the flat file side you need to use the File content Conversion in communication channel and give the file seperator as space or whatever you want. and in mapping you just map it as you want.

Please refer to this blog for more clear picture

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping

Also check this wiki

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/fileToIDOC&

regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

Thanks for the quick answer

So if I understand correctly, I just have to create a 1:1 message mapping from inputfile-record to idoc? In my message ,apping, I linked filename to idocname and record to idoc. Then, when I test with 3 records, I only get 1 idoc... Is my mapping still ok?

source target

filename ____________________ idocname

record (0..unbounded)_________ idoc (1..1)

field1 _____________________ ...

field2 _____________________ ....

Regards,

William

Former Member
0 Kudos

Yes....If you want to generate as more IDOCs basing on your recoreds,you can implement with IDOC bundling concept....

Check the below link for more info...

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

aashish_sinha
Active Contributor
0 Kudos

Hi,

Yes your mapping is fine then.Just be careful while if you want to map to multiple IDocs in one maplping from single source.

have a nice time in mapping. Don't get confused. your approach is fine.

Regards

Aashish Sinha

PS : reward points if helpful

Edited by: Aashish Sinha on May 16, 2008 11:05 AM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi JWD,

If MULTILINE > FILE- IDOCNo need to BPM

IF MULTIPLE INTPUTS---> We need to use BPM

Create the INTEGRATION PROCESS:

Under namespace there is four objects is there

1) INTEGRATION SCENARIO & INTEGRATION PROCESS

2) INTERFACE OBJECTS

3) MAPPING OBJECTS

4) ADAPTER OBJECTS

u can select the first object and choose the INTEGRATION PROCESS right click & create

Before u can create the INTEGRTION PROCESS, U need to know the steps like(Receive,send,transforamtion, fork,loop,block,container,control & switch).

Regards,

Sateesh

Former Member
0 Kudos

which I seem to need for my message mapping:

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

...

</ns0:Message1>

</ns0:Messages>

These nodes automatically added to your XML in runtime.

You dont need BPM also for this.Just check the generated XML from moni and the stcruture which you are using in mapping.

Former Member
0 Kudos

Hi Sekhar,

I'm not quite sure I understand.. do you mean should I download the xml from moni and parse it in between the following nodes in my message mapping to test it?

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

..

</ns0:Message1>

</ns0:Messages>

And this does not result in an error during runtime?

Regards,

William