on 05-20-2009 9:24 AM
Hi,
I'm using rstxpdft4 program to convert spool to PDF.
SUBMIT rstxpdft4
WITH spoolno = mi_rqident
WITH p_file = 'C:\testPDF.pdf'
AND RETURN.
But I am getting dialog to save PDF. Can I use this program without save dialog ans calling in background?
thanks!
Hello Adibo,
use this program.
REPORT zspooltopdf.
TABLES : tsp01.
DATA: it_pdf TYPE TABLE OF tline WITH HEADER LINE,
gv_string TYPE string.
DATA: t_tsp01 TYPE TABLE OF tsp01 WITH HEADER LINE.
DATA : tabix TYPE sy-tabix.
DATA: file TYPE string.
SELECT-OPTIONS: p_spool FOR tsp01-rqident.
PARAMETERS: p_file LIKE rlgrap-filename .
PARAMETERS: uname TYPE sy-uname.
IF uname IS INITIAL.
uname = sy-uname.
ENDIF.
IF p_file IS INITIAL.
p_file = 'C:\PDF\'.
ENDIF.
SELECT *
FROM tsp01
INTO CORRESPONDING FIELDS OF TABLE t_tsp01
WHERE rqident IN p_spool
AND rqowner = uname
* AND rq1name ne ''
AND rqfinal = 'C'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
static = 'X'
mask = ',*.txt,*.*'
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 1
OTHERS = 2 .
START-OF-SELECTION.
LOOP AT t_tsp01.
tabix = sy-tabix.
REFRESH it_pdf.
IF ( t_tsp01-rq0name = 'SMART' OR t_tsp01-rq0name = 'SCRIPT' ).
* For Scripts and Smartforms.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = t_tsp01-rqident
TABLES
pdf = it_pdf.
ELSEIF t_tsp01-rq0name = 'LIST1S'.
*for Reports.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = t_tsp01-rqident
TABLES
pdf = it_pdf.
ENDIF.
file = t_tsp01-rqident.
CONCATENATE p_file 'Spool-' file '.pdf' INTO gv_string.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = gv_string
filetype = 'BIN'
TABLES
data_tab = it_pdf.
ENDLOOP.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'File Path'
text_question = p_file
text_button_1 = 'OK'(001)
display_cancel_button = ' '.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = t_tsp01-rqident
TABLES
pdf = it_pdf.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this fm inseatd of the prgram
CONVERT_ABAPSPOOLJOB_2_PDF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.