In order to use the IDoc file interface to read and write an IDoc from a directory, I already have configured the port (WE21) with:
* physical directory (internal SAP)
* inbound file
My question is, which function module do I have to choose at this screen or I should leave this option blank? I read that EDI_PATH_CREATE_CLIENT_DOCNUM was the best option, but I'm not sure.
Besides the file must be in any kind of file in particular (for example txt) or not.
The function module simply determines how the file name is created. You can create the filename from the DOCNUM (as above) or create it from the actual time stamp or give it a constant value. That is your proper decision which fits best in your application. The resulting file will always contain plain ASCII text with fixed record length. The file suffix (extension) depends on the requirement of your operating system. E.g. for Windows the recommended suffix would be indeed .DAT or .TXT, that allows you to easily open the file in a text editor, but if you give a fancy name like .IDOC it does not really make a difference, as long the receiving app understands it.
Reading IDocs from a file is done via ABAP RSEINB00.
Related Q&A from Axel Angeli
An SAP user wants to know how to upload data into SAP R/3 when SAP Scripting is not enabled.continue reading
An SAP user is receiving an error message while integrating SAP iDoc PORDCR1 for a purchase order.continue reading
An SAP user is having difficulty with PERNR iDoc while transporting data from SAP to an external system.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.