This wiki explains how to set up idoc inbound processing for LSMW.
An IDoc, short for Intermediate Document, is an SAP format for transferring the data for a business transaction between systems.
In oreder to do this though, some preliminary settings are required (settings have to be done for eache project). Firstly, you need to configure a file port for the file transfer. The transaction used here is WE21. You could call the port LSMW or something similar.
As an addition, you may also configure a tRFC port if you want to avoid creating files, but instead transfer the data directly to the standard SAP function module IDOC_INBOUND_ASYNCHRONOUS.
Next, you need to define a partner in WE20. It is recommended to use the partner type "US" (User) As of release 4.5A, this partner type is available in the standard system. Finally a partner number should be defined. It is recommended to call the partner LSMW for transparency reasons.
Then you need to activate the inbound processing.
Finally, maintain the workflow runtime. To do this, you can start automatic customizing via SWU3.
You do not need to schedule the job for work items with errors. If you select that option, SAP tries over and over again to post incorrect IDocs that were created during data migration.