cancel
Showing results for 
Search instead for 
Did you mean: 

Inbound processing of flat file via IDoc process

cosmix3011
Explorer
0 Kudos

Dear community,

I must admit that I am not an expert when it comes to IDoc processing. I feel that there is an easy answer to my questions. Here is the scenario:

  • From a third party system and via FTP transfer, a flat file is received on the application server.
  • The flat file contains non SAP standard data and it does not include any IDoc specifics (control segment, ...). It contains pure business data in the format of the third party system.
  • I want to process the flat file via an inbound IDoc based process, thus I intend to create a new IDoc type, message type, ... I think I know all the required steps in order to trigger the process via a function module (WE82, BD51, WE57, WE42, ...) once the true IDoc is there.

My questions are as follows:

  1. As the flat file is not formatted correctly, I need to do this via a Z-program and schedule it periodically. After formatting, the Z-program could start the IDoc posting process via function module IDOC_INBOUND_SYNCHRONOUS. Is this the way to go respectively would this be the correct way?
  2. I also read a lot about ports / file ports (WE21). I googled a lot, but unfortunately the purpose of a file port is still not clear to me, especially not in an inbound scenario. What is the purpose of a file port and can it help in my scenario? Would it replace the call of IDOC_INBOUND_SYNCHRONOUS?


Of course it would be possible to handle the described scenario outside of an IDoc process, however I find it very elegant and charming to make use of all the standard functionalities available for IDocs.

Your help is highly appreciated.


Thanks and best regards

0 Kudos

Hi Andre

Did you find a solution on this ?

Regards,

Darryl

Accepted Solutions (0)

Answers (1)

Answers (1)

egor_malov
Contributor
0 Kudos

Hi, André,

1. There is a tool in SAP called LSMW. It is supposed to parse text files and post the data into the system ( posting as IDOCs is an option among others). I think it sounds very much like your task, so you should probably have a look. With this tool you express all the importing logic with less coding and more configuring. The tool is quite old, maybe it doesn't look fashionable, but I think it's designed quite clearly and is well documented.

2. As for file ports, I think it is part of SAP integration solutions like ALE, and the idea behind this is to treat various external data sources in a unified way (whether data come from another SAP system through RFC, or from text file, or something else).

cosmix3011
Explorer
0 Kudos

Hello Egor,

Thanks for your reply. I know LSMW and fully agree that although it looks a bit old fashioned, it represents a very powerful and flexible tool. For my scenario I decided not to use it for three reasons:

  1. Besides a pure conversion of the data, I also need to implement some validations.
  2. I use LSMW more for (one-time) migrations where little manual handling is acceptable (specify file, convert, ...). My above scenario actually represents an interface which will run on a very frequent basis.
  3. The interface should be future proof (S4 is on its way).


For this reason I decided to implement the interface via an inbound IDoc scenario.

Best regards

André