Skip to Content
avatar image
Former Member

How to send file as attachment and call RFC to trigger event in ECC?

Hello,

A file is retrieved from FTP into PI (w/ NO MAPPING required - just pass through) and placed on the ECC appl. Server. Then, a RFC is made to trigger an event to process the file in ECC. However, a RFC cannot be called in the graphical mapping if there is no mapping required.

I have seen this Blog, u201CFile to R/3 via ABAP Proxyu201D, http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1847. [original link is broken] [original link is broken] [original link is broken] But we are told not to touch the file as it will be converted in ECC by a program.

Also, I read that using ABAP proxy-PI-FTP, I can do a pseudo mapping, simple one node, (just so a RFC can be triggered) and also pass the file as an attachment. Letu2019s say this works:

Question 1: What configuration steps in the FTP adapter that will allow me to u201Calsou201D send the file as an attachment?

Question 2: (Continue with ABAP proxy option) How do I control where will it be deposited so that the program can access it?

Question 3: If this is not the best approach, how many steps would I need to do it in BPM (i.e. pick up the file from FTP, place it on appl server, and trigger a RFC to call an event to process file)?

Thanks for any suggestions!

John_Xi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 04, 2011 at 04:36 PM

    Do a File to Proxy with no mapping (this means no operation mapping and message mapping objects needed, source and destination message types are same in Repository). In the proxy, extract the structure and write it to ECC server. Then call the RFC that processes the file.

    VJ

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I have read those two help file and was able to use it in the ABAP proxy code. Thanks.

      This is the current outcome. I totally understand that SAP PI communicates via XML. So when PI picks up a file that contains XML tags, the Inbound proxy is triggered. I can see its processing in SM50. However, when I give the Sender FTP adapter a non-XML file to pick up, the Inbound Proxy does not trigger. The file itself should be read into memory so that I can save it to the application server via ABAP code (with no mapping). That is why there is no operation mapping

      The reason I am using using FTP to ABAP proxy is because I need to call a subsequent RFC step to process the file. Else, I will just use FTP to File Adapter scenario.

      Question 1: I am thinking that that file is the attachment. Is that where I am incorrect and I still need to send in an XML file with the attachment as an addition?

      Question 2: Is this the best approach or should I use BPM? If BPM, what steps do I need?

  • avatar image
    Former Member
    Apr 28, 2011 at 02:58 AM

    Hi John,

    Another way of doing this is if you have the RFC SDK installed in your system, you can create an OS script that will use startrfc.exe to call your RFC function module that triggers the event in ECC.

    You can trigger the OS script in your File Receiver Adapter after message processing.

    https://service.sap.com/sap/support/notes/1025361

    http://www.erpgenie.com/sapedi/startrfc.htm

    Regards,

    Erwin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 15, 2011 at 05:27 PM

    Thanks everyone for replies. They were very helpful. I have given points.

    Add comment
    10|10000 characters needed characters exceeded