Code: Alles auswählen.
FORM output_to_chart.
clear gs_all.
CONCATENATE
'<!DOCTYPE HTML>'
'<html>'
'<head>'
'<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"/>'
'<script type="text/javascript">'
'window.onload = function () {'
' var chart = new CanvasJS.Chart("chartContainer",'
' {'
' title:{'
' text: "Gaming Consoles Sold in 2012"'
' },'
' legend: {'
' maxWidth: 350,'
' itemWidth: 120'
' },'
' data: ['
' {'
' type: "pie",'
' showInLegend: true,'
' legendText: "{indexLabel}",'
' dataPoints: ['
' { y: 4181563, indexLabel: "PlayStation 3" },'
' { y: 2175498, indexLabel: "Wii" },'
' { y: 3125844, indexLabel: "Xbox 360" },'
' { y: 1176121, indexLabel: "Nintendo DS"},'
' { y: 1727161, indexLabel: "PSP" },'
' { y: 4303364, indexLabel: "Nintendo 3DS"},'
' { y: 1717786, indexLabel: "PS Vita"}'
' ]'
' }'
' ]'
' });'
' chart.render();'
'}'
'</script>'
'<script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>'
'</head>'
'<body>'
'<div id="chartContainer" style="height: 300px; width: 100%;"></div>'
'</body>'
'</html>' INTO gs_all SEPARATED BY lc_crlf.
ENDFORM. "output_to_chart
Code: Alles auswählen.
FORM html_datei.
DATA: binary_content TYPE solix_tab,
size TYPE so_obj_len.
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = gs_all
iv_codepage = '4103'
iv_add_bom = 'X'
IMPORTING
et_solix = binary_content
ev_size = size ).
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = gv_pfad
filetype = 'BIN'
codepage = '4103'
TABLES
data_tab = binary_content.
ENDFORM. "html_datei
Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag:
JanR
Ich meinte natürlich nur beim GUI_DOWNLOAD, bei STRING_TO_SOLIX braucht man immer eine Codepage. 😉