‎2008 Feb 28 2:53 AM
Guys,
Do you now how you can convert an Internal Table To HTML ? Are there any means with which we can do it in SAP 4.6C. I used FM WWW_ITAB_TO_HTML but we are having some alignment issues when the page is rendered,Please let me know if you have a code or some thing where i can work on. I have provided snapshot of my code.Kindly help
data: ifields type table of w3fields with header line,
ihtml type table of w3html with header line,
headers type table of w3head with header line,
PERFORM DEFINE_HTML_TABLE_HEADER.
CALL FUNCTION 'WWW_ITAB_TO_HTML'
TABLES
HTML = ihtml
FIELDS = ifields
ROW_HEADER = headers
ITABLE = int_tab.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = p_outht
filetype = 'ASC'
TABLES
data_tab = ihtml
EXCEPTIONS
:
FORM DEFINE_HTML_TABLE_HEADER.
headers-nr = 1.
headers-text = 'SAP Plant'.
append headers.
headers-nr = 2.
headers-text = 'Legacy Plant'.
append headers.
headers-nr = 3.
headers-text = 'Material Number'.
append headers.
headers-nr = 4.
headers-text = 'Qty'.
append headers.
headers-nr = 5.
headers-text = 'Total Qty'.
append headers.
ENDFORM.
Regards
Praveen
‎2008 Feb 28 3:34 AM
Hi,
Check this blog this may help you.
Link: [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3090] [original link is broken] [original link is broken] [original link is broken];
‎2008 Feb 28 4:22 AM
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
.
Thie will generate HTML local file with formatting as in the internal table.