I have a requirement to pick a pdf file using SFTP channel and then to send it to the SAP system over proxy with pdf file name.
I have created a data type for proxy with two fields, one with the File name another with the file content. It is similar as described below.
I have used a UDF to get the file name of the pdf and mapped this UDF to FileName field under datatype and used the dynamic file setting in the channel.
Sender channel has successfully picked up the file and sent it to adapter engine but it failed in the request message mapping stage under Pipeline with following error :
Runtime exception occured during application mapping
com.sap.aii.utilxi.misc.api.BaseRuntimeException : Content is not allowed in the prolog.
Although when I have sent the PDF with only one field as Filecontent, it is getting processed successfully.
Appreciate if any one can suggest any alternative/resolution. We have restriction to not use Integrated configuration in this case.
Please use java mapping to parse the PDF file into binary format and then send the binary content in file content field to ABAP proxy. But in ABAP proxym, you should do the reverse to get the PDF file. In this way, you can have both the file name + the PDF file in your ABAP proxy.
I have done exactly the same for one of my integration with third party vendor and I was able to transfer 500-600 PDF files/Day through SAP PI 7.0.