Application Development 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: 

Error in converting Spool to HTML format.

Former Member

Hi Gurus,

I am reading SPool and converting that into HTML formt. Please do find below code for the same.

  • Submit report to convert the spool to HTML format

SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN

WITH rqident = p_spoolno.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = gt_listobj

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • Convert the spool to HTML format

CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'

EXPORTING

  • REPORT_NAME =

template_name = 'WEBREPORTING_REPORT'

TABLES

html = p_html_tab

listobject = gt_listobj.

>>>>>>>>>>>>>>>>>>>

And i send p_html_tab as attachement to email.

When I opened the attachement, i can view only half page in htm.

How can i get the full page in htm.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

First convert the spool to internal table by using FM

RSPO_RETURN_ABAP_SPOOLJOB

Next from internal table to HTML....

Link: /people/rammanohar.tiwari/blog/2006/01/29/abap-utility-print-screen-to-html

or try the following

Please try the follwoing:

1. define HTML internal table with ref to type W3HTML

2. download it as BIN type and give total lenght of the strings as a parameter in the down load.

See the code extract below:

describe table html lines entries.

read table html into w_html index entries.

size = ( entries - 1 ) * 255 + strlen( w_html ).

concatenate p_path file into file.

call function 'WS_DOWNLOAD'

exporting

bin_filesize = size

filename = file

filetype = 'BIN'

tables

data_tab = html

1 REPLY 1

Former Member
0 Kudos

First convert the spool to internal table by using FM

RSPO_RETURN_ABAP_SPOOLJOB

Next from internal table to HTML....

Link: /people/rammanohar.tiwari/blog/2006/01/29/abap-utility-print-screen-to-html

or try the following

Please try the follwoing:

1. define HTML internal table with ref to type W3HTML

2. download it as BIN type and give total lenght of the strings as a parameter in the down load.

See the code extract below:

describe table html lines entries.

read table html into w_html index entries.

size = ( entries - 1 ) * 255 + strlen( w_html ).

concatenate p_path file into file.

call function 'WS_DOWNLOAD'

exporting

bin_filesize = size

filename = file

filetype = 'BIN'

tables

data_tab = html