This is a blog on a topic which I assume has been discussed numerous times before as well. Since it took some digging on my side to find the solution to the requirement; I wanted to accumulate my findings.
I got a requirement to transfer a SAP SCRIPT to FTP Server as a PDF file. This should also hold true for Smart-forms as well.
The CLOSE_FORM has a exporting parameter 'RESULT' as shown below.
The result parameter is of type ITCPP. We will use the ITCPP-TDSPOOLID value, which carries the spool request number.
At this moment , the LT_PDF_DATA contents can be used to download the form in PDF format.
However, we will stick to our requirement and proceed to transfer the file to FTP Server.
Here do not forget to use BINARY MODE , since TEXT MODE will not work.
Command 3 should be dynamically determined before SUBMIT is called which carries the 'put' command with both the target and source file. Eg:
put /usr/tmp/source.pdf destination.pdf
---------------------------------------------------------------------------------------------------------------------------------------------
NOTE: Since I had to generate the file in background, I used the RFC destination as SAPFTPA instead of SAPFTP.
Also, I had tried to upload the file from presentation server to FTP after downloading using GUI_DOWNLOAD; unfortunately the approach did not work since SAPFTPA expects data(source file) to be present in the application server(AL11 Folder).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
8 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 |