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

Convert itab to HTML

Former Member
0 Likes
1,904

Hi all,

How can i convert internal table to HTML?

Best regards,

Munur

Hi all,

How can i convert internal table to HTML?

Best regards,

Munur

5 REPLIES 5
Read only

Former Member
0 Likes
959

hii,

using function WWW_LIST_TO_HTML to convert to html format

regards,

Shweta

Read only

Former Member
0 Likes
959

hii,

moreover this answer has been answered earlier also

u can refer ti following link

regards,

Shweta

Read only

Former Member
0 Likes
959

Hi,

refer to the following link

https://wiki.sdn.sap.com/wiki/display/sandbox/ConvertinternaltabledataintoHTMLformatwithoutusingFunctionModules

Regards

Akshay

Read only

Former Member
0 Likes
959

Hi,

Refer to the following code:

it_header TYPE STANDARD TABLE OF w3head WITH HEADER LINE, "Header

it_fields TYPE STANDARD TABLE OF w3fields WITH HEADER LINE, "Fields

it_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE, "Html

it_fcat TYPE STANDARD TABLE OF lvc_s_fcat. " Fieldcatalog

wa_header TYPE w3head,

wa_head TYPE w3head,

wa_fcat TYPE lvc_s_fcat.

CLEAR it_fcat.

REFRESH it_fcat.

wa_fcat-coltext = 'Object ID'.

APPEND wa_fcat TO it_fcat.

wa_fcat-coltext = 'Code'.

APPEND wa_fcat TO it_fcat.

wa_fcat-coltext = 'Description'.

APPEND wa_fcat TO it_fcat.

*Fill the Column headings and Properties

LOOP AT it_fcat INTO wa_fcat.

wa_head-text = wa_fcat-coltext.

*-Populate the Column Headings

CALL FUNCTION 'WWW_ITAB_TO_HTML_HEADERS'

EXPORTING

field_nr = sy-tabix

text = wa_head-text

fgcolor = 'black'

bgcolor = 'green'

TABLES

header = it_header.

*-Populate Column Properties

CALL FUNCTION 'WWW_ITAB_TO_HTML_LAYOUT'

EXPORTING

field_nr = sy-tabix

fgcolor = 'black'

size = '3'

TABLES

fields = it_fields.

ENDLOOP.

*-Title of the Display

wa_header-text = 'INACTIVE PU/DU DETAILS' .

wa_header-font = 'Arial'.

wa_header-size = '2'.

ENDFORM. " SET_HEADER

REFRESH it_html.

CALL FUNCTION 'WWW_ITAB_TO_HTML'

EXPORTING

table_header = wa_header

TABLES

html = it_html

fields = it_fields

row_header = it_header

itable = it_hrp1000.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'File path'

TABLES

data_tab = it_html.

Regards,

Rajesh Kumar

Edited by: Rajesh Kumar on Aug 18, 2009 11:51 AM

Read only

Former Member
0 Likes
959

Hello,

tere's a technology created by sap named DOM.

search in forum with this key.

regards