06-27-2008 8:01 AM
Dear Experts,
I made a ALV report and provided one option to convert into PDF format.
How to convert that ALV report into PDF format ? How to pass spool request ?
Pl. give some idea with example.
Yusuf
06-27-2008 8:11 AM
Hi u can do a select in table TSP01and fetch RQIDENT which stores spoll id and call the functin module which will give you the output..!
Thanx,
Navin.
06-27-2008 8:03 AM
06-27-2008 8:03 AM
Hi Yusuf,
U can submit the report RSTXPDFT4 for converting SPOOL to PDF format. U have to pass Spool number and download path.
Try executing this report in SE38 and see if it helps u.
Thanks,
Vinod.
06-27-2008 8:06 AM
Hi Vinod,
But how to pass spool request ? when i run ALV report it creates spool and that spool i want to pass within ALV program itself.
Yusuf
06-27-2008 9:10 AM
Hi,
Put below piece of code. But it will give a popup for asking file name. Here u have to provide the file name to where the file should be downloaded.
DATA: i_selection TYPE TABLE OF RSPARAMS,
wa_selection TYPE RSPARAMS.
wa_selection-selname = 'SPOOLNO'.
wa_selection-kind = 'P'.
wa_selection-low = '29521'.
APPEND wa_selection TO i_selection.
SUBMIT RSTXPDFT4 WITH SELECTION-TABLE i_selection.
Thanks,
Vinod.
06-27-2008 8:06 AM
Hi ,
U can use the function module ' CONVERT_ABAPSPOOLJOB_2_PDF' to convert alv spool output to pdf..!
Thanx ,
navin
06-27-2008 8:11 AM
Hi u can do a select in table TSP01and fetch RQIDENT which stores spoll id and call the functin module which will give you the output..!
Thanx,
Navin.
06-27-2008 8:25 AM
HI Navin,
How to get spool number from tsp01 table ? There are many spool in that table. How to know this spool is for this report ?
Yusuf
06-27-2008 10:12 AM
Hi Yusuf,
If you go to SP02 u can see every spool which is generated has a tittle..
Similarly use a similar select as described below to get the Spool no:
SELECT rqident
rqowner
rqtitle FROM tsp01
INTO TABLE l_i_spool
WHERE ( rqowner EQ sy-uname ) AND
( rqtitle EQ 'Z_TITTLE' ).
Just supply all the parameters to the function module and your work should be done...
Hope this solves your problem.
Thanx,
Navin.
06-27-2008 8:20 AM