2010 Oct 11 10:30 AM
Hi
I have created a program, that can merge a service order and an invoice into one pdf., and then download it into my local drive (C:/).
1) The spool from the service order is converted into otf.
2) The spool from the invoce is converted into otf.
3) The otf data from both service order and invoice will be collected into one table.
4) and 5)
Then I call the FM: CONVERT_OTF_2_PDF
and then cl_gui_frontend_services=>gui_download
Above will download the file to my local drive.
But how to download to a library on my SAP server (found in AL11).
At the momenet I just got a lot of lines with informations about Type/Font/Subtype/LastChar/FirstChar etc. in my file on the server.
There is no pdf file, even that the name of the file is 1234_1233.pdf
I am doing as described in 1) + 2) + 3)
and then callling FM "CONVERT_OTF", from where I got the value from the importing parameter BIN_FILE (lv_pdf_file)
open dataset fnam for output in binary mode message msg.
transer lv_pdf_file to fnam.
close dataset fnam.
Anybody who can help, how to get my pdf downloaded into the server?
Thanks,
2010 Oct 11 11:07 AM
I think you should use FM CONVERT_OTF_2_PDF to get table LINES (of type TLINE) for given OTF format. Then transfer this table LINES content as you already do.
Regards
Marcin
Hi
I have created a program, that can merge a service order and an invoice into one pdf., and then download it into my local drive (C:/).
1) The spool from the service order is converted into otf.
2) The spool from the invoce is converted into otf.
3) The otf data from both service order and invoice will be collected into one table.
4) and 5)
Then I call the FM: CONVERT_OTF_2_PDF
and then cl_gui_frontend_services=>gui_download
Above will download the file to my local drive.
But how to download to a library on my SAP server (found in AL11).
At the momenet I just got a lot of lines with informations about Type/Font/Subtype/LastChar/FirstChar etc. in my file on the server.
There is no pdf file, even that the name of the file is 1234_1233.pdf
I am doing as described in 1) + 2) + 3)
and then callling FM "CONVERT_OTF", from where I got the value from the importing parameter BIN_FILE (lv_pdf_file)
open dataset fnam for output in binary mode message msg.
transer lv_pdf_file to fnam.
close dataset fnam.
Anybody who can help, how to get my pdf downloaded into the server?
Thanks,
2010 Oct 11 11:02 AM
2010 Oct 11 11:07 AM
I think you should use FM CONVERT_OTF_2_PDF to get table LINES (of type TLINE) for given OTF format. Then transfer this table LINES content as you already do.
Regards
Marcin
2010 Oct 11 12:51 PM
It doesn't work.
I just got a long string into the file.
My file is named xxx.pdf, but it is not a pdf document.
Any other ideas?
2010 Oct 11 1:47 PM
The problem was, that it is not possible to see the pdf directly from transaction AL11.
I used the transaction CG3Y to move the file from the server to my desktop, and there I can see the pdf file.
Solved
Thanks for the input.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |