Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in converting spool to pdf

Former Member
0 Likes
557

Hi Experts,

I want an internal table to be converted to the PDF. For this RSPO_OPEN_SPOOLREQUEST, RSPO_WRITE_SPOOLREQUEST and RSPO_CLOSE_SPOOLREQUEST to create the spool. However, somehow the table tsp01 does not gets updated as a result i could not convert the data to PDF. Can any one help me how this problem could be solved.

Thank.

Warm Regards,

Harshad.

Hi Experts,

I want an internal table to be converted to the PDF. For this RSPO_OPEN_SPOOLREQUEST, RSPO_WRITE_SPOOLREQUEST and RSPO_CLOSE_SPOOLREQUEST to create the spool. However, somehow the table tsp01 does not gets updated as a result i could not convert the data to PDF. Can any one help me how this problem could be solved.

Thank.

Warm Regards,

Harshad.

3 REPLIES 3
Read only

Former Member
0 Likes
513

Hi,

Have a look at the sample code in the given link.

[http://www.sapdev.co.uk/reporting/rep_spooltopdf.htm]

Regards,

Vikranth

Read only

Former Member
0 Likes
513

Hi,

you can refer this sample code.

DATA: t_otfdata_tab LIKE ITCOO OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'CLOSE_FORM'

TABLES

OTFDATA = t_otfdata_tab

fill the exceptions..

IF SY-SUBRC = 0.

ENDIF.

then pass the t_otfdata_tab to this function module..

CONSTANTS: c_pdf(03) VALUE 'PDF'.

  • PDF File size

DATA: w_file_size TYPE I.

  • Internal Table to hold Form contents in PDF format

DATA: t_pdfdata_tab LIKE tline OCCURS 0 WITH HEADER LINE.

  • for converting. the output format from OTF to PDF

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT eq c_pdf

IMPORTING

BIN_FILESIZE = w_file_size

TABLES

OTF eq t_otfdata_tab

LINES eq t_pdfdata_tab

EXCEPTIONS...

use these links, hope it will be useful to you....

Thanks and Regards,

Ahamed.

Read only

Former Member
0 Likes
513

solved