We are on XI 3.0 and the following has been put to me:
We will receive a .CSV file from FTP server, into XI and then need to create Purchase Orders followed by the Goods Receipt documents in R/3 based on the incoming data.
Further to this, the requirement is to give a log of the successfule and failed PO + GR document summary to the business.
The programme in R/3 will compare the incoming file nmame with archived files already processed and will reject any files with duplicate names.
I was suggesting to go with the file to RFC in R/3 whereby we can have a Z shell BAPI to include the standard BAPI for PO creation and GR creation. This Z code can then be extended to email the log to the business of which records were successfully created and which failed.
However, I am stumped as to how can I make the file duplication comparison on R/3 as the incoming file will also be stored on R/3 archive somewhere.
Can this be made when the BAPI is called in XI?
I can configure alerts when the BAPI is mapped from incoming file for that interface.
What was suggested also was to pick up the CSV file and thow it as it is in R/3 and then the Z code can go through it and create the PO and GR objects. However, then it does not make much sense to use XI as the middleware platform.