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

List to HTML

Former Member
0 Likes
4,253

Does anyone have an easy solution to - within a report, downloading the report listing to a UNIX file in HTML format?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,127

hi, you can write the report into spool, and get the spool number you printed.

After that, do like following:

  
  CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
       EXPORTING
            RQIDENT              = SPOOL_NUMBER
       IMPORTING
            REAL_TYPE            = G_DOC_TYPE
       TABLES
            BUFFER               = COMPRESSED_LIST

..........
  CALL FUNCTION 'TABLE_DECOMPRESS'
       TABLES
            IN                   = COMPRESSED_LIST
            OUT                  = LISTOBJECT
..........
  CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
       TABLES
            HTML       = IT_HTML
            LISTOBJECT = LISTOBJECT
.......

then you get a HTML include the content of your report in IT_HTML.

About the details you can reference to the following link:

Hope it will be helpful

thanks

hi, you can write the report into spool, and get the spool number you printed.

After that, do like following:

  
  CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
       EXPORTING
            RQIDENT              = SPOOL_NUMBER
       IMPORTING
            REAL_TYPE            = G_DOC_TYPE
       TABLES
            BUFFER               = COMPRESSED_LIST

..........
  CALL FUNCTION 'TABLE_DECOMPRESS'
       TABLES
            IN                   = COMPRESSED_LIST
            OUT                  = LISTOBJECT
..........
  CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
       TABLES
            HTML       = IT_HTML
            LISTOBJECT = LISTOBJECT
.......

then you get a HTML include the content of your report in IT_HTML.

About the details you can reference to the following link:

Hope it will be helpful

thanks

4 REPLIES 4
Read only

Former Member
0 Likes
4,127

Hi Paul

You can use the function

LIST_DOWNLOAD_HTML to download a list in HTML format.

Regards

Naresh

Read only

Former Member
0 Likes
4,127

Hi

http://www.members.tripod.com/abap4/Output_List_Manipulation.html

or

while displaying list: go to System->List->Save->File, here choose HTML format.

Max

Message was edited by: max bianchi

Read only

glauco
Active Contributor
0 Likes
4,127

Yes. When u print a report to spool it is saved as .html.

I know that coz I've developed a sapscript for credit and after that, the program printed a "write" report to spool in background.

When I got the files on spool, by another program which atached the files and send by mail, the sapscript files were saved as .pdf(there is a function to get this document) and the write report were automaticly saved as .html format.

folow an example to get this file on spool:

rqident = l_spool.

CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'

EXPORTING

rqident = rqident

first_line = 1

last_line = 0

desired_type = ''

IMPORTING

real_type = v_type

TABLES

buffer = t_soli

EXCEPTIONS

no_such_job = 1

job_contains_no_data = 2

selection_empty = 3

no_permission = 4

can_not_access = 5

read_error = 6

type_no_match = 7

OTHERS = 8.

Read only

Former Member
0 Likes
4,128

hi, you can write the report into spool, and get the spool number you printed.

After that, do like following:

  
  CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
       EXPORTING
            RQIDENT              = SPOOL_NUMBER
       IMPORTING
            REAL_TYPE            = G_DOC_TYPE
       TABLES
            BUFFER               = COMPRESSED_LIST

..........
  CALL FUNCTION 'TABLE_DECOMPRESS'
       TABLES
            IN                   = COMPRESSED_LIST
            OUT                  = LISTOBJECT
..........
  CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
       TABLES
            HTML       = IT_HTML
            LISTOBJECT = LISTOBJECT
.......

then you get a HTML include the content of your report in IT_HTML.

About the details you can reference to the following link:

Hope it will be helpful

thanks