‎2007 May 12 3:03 AM
hi
i want to download data from database tables to the html format what is function module for that.
regards
srinivas.
‎2007 May 12 4:37 AM
HI USE fm
LIST_DOWNLOAD_HTML
OR 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.
You can use the function LIST_DOWNLOAD_HTML to download a list in HTML format
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
*----
Demonstrate various things that can be done with lists
The first example shows how to have a list go to memory instead of the
screen or a spool, and how to write out that list.
*
The second set of examples shows how to save the screen list in
various formats
*----
REPORT ZKBTST31.
DATA: MTAB_REPORT_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA: MTAB_REPORT_HTML LIKE W3HTML OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF MTAB_REPORT_ASCII OCCURS 0,
LINE(255) TYPE C,
END OF MTAB_REPORT_ASCII.
START-OF-SELECTION.
*-- Submit a report. This one is the chart of accounts
SUBMIT RFSKPL00
EXPORTING LIST TO MEMORY " Save list in memory
AND RETURN. " Return control to this program
END-OF-SELECTION.
*-- Get the list from memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = MTAB_REPORT_LIST
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
*-- Write the list out
*-- This is a trivial example. A better use would be when the
*-- requirement is to have one report print out several different
*-- reports on the same list level.
CALL FUNCTION 'WRITE_LIST'
TABLES
LISTOBJECT = MTAB_REPORT_LIST
EXCEPTIONS
EMPTY_LIST = 1
OTHERS = 2.
************************************************************************
The examples below this line do not require that the report be *
submitted to memory when run. All that they require is that the *
report has been written to the screen. *
************************************************************************
*-- Take the current list that has been written to screen, and format
*-- as an HTML file.
CALL FUNCTION 'WWW_LIST_TO_HTML'
TABLES
HTML = MTAB_REPORT_HTML
EXCEPTIONS
OTHERS = 1.
*-- Save the list. Same as using System->List->Save->Local File or
*-- entering %pc in the OKCODE box. This function does not need the
*-- include <%_LIST> in a program.
*-- Method can be:
*-- NOCO - No conversion
*-- RTF - Rich Text Format
*-- DAT - Tab delimited Format
*-- When no method is given, a selection screen is presented for the
*-- user to choose the method.
CALL FUNCTION 'LIST_DOWNLOAD'
EXPORTING
METHOD = 'NOCO'
EXCEPTIONS
OTHERS = 1.
rEWADS IF HELPFUL
‎2007 May 12 5:46 AM
Hi,
Use this function module LIST_DOWNLOAD_HTML,
It will be help full to extract the data to html
Try check it out ..
REward if useful