on 08-04-2009 9:43 AM
After converting a Smartform to PDF, how do I create the PDF in application server? Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can u plz tell hw was the problem solved?
Thanks,
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manish,
This is the code I use. Variables for:-
gv_filename is a file path in the application server.
gt_lines is the internal table populated by function module CONVERT_OTF.
After the function module CONVERT_OTF, use code as below and the PDF will be generated directly into the application server.
OPEN DATASET gv_filename FOR OUTPUT IN BINARY MODE.
IF sy-subrc <> 0.
WRITE: 'File cannot be opened.'.
ENDIF.
LOOP AT gt_lines INTO gw_lines.
TRANSFER gw_lines TO gv_filename.
ENDLOOP.
CLOSE DATASET gv_filename.
Thanks everyone for the advice. This problem has been solved. It is possible to generate PDF directly to the application server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<li> Once you got smartform output as PDF into internal table lets say it_pdf, you need do like this way.
Thanks
Venkat.O
REPORT ztest_notepad.
DATA :app_file TYPE char120 VALUE '/usr/sap/put/data.PDF'.
OPEN DATASET app_file FOR OUTPUT IN BINARY MODE.
LOOP AT it_pdf.
TRANSFER it_pdf-data TO dsn.
ENDLOOP.
CLOSE DATASET app_file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.