This is Regarding wants table values output into HTML formate
Hello Experts,
can you please help me regarding this,i want table valuees in to HTML formate,so can you please tell solution ,is there any FM or any other solution for geeting Table values in HTML formate.please suggest me
Thanks and regards,
durga.k
dketcham wrote:
cotton.m wrote:
>
2) I'm looking at how you called stuff, and you're trying to call the jsp file as an image? That jsp isn't the source of the image, just a page linking to an image. I think if you really want to do things that way you're going to need to just include that jsp within the jsp you're calling it from (or you can do it the easy way, and if you have the information to get the path of the image you want, you could simply call the image from the first jsp you posted)This is incorrect.
There are two JSPs. The second when called will (if it worked) return the source of an image as stored in the database.even when called with <img src=xx.jsp>??
Yes.
If any of what I say next seems obvious or otherwise negative I apologize, just trying to explain and I don't know what you know vs what you don't.
The link in the src is just a URL not a filetype. So just because it ends with JSP does not mean it has to return HTML. The content type is determined by the browser using the Content-Type header returned by the server in the HTTP response. In this case the header is set to be a jpeg so that's what the browser will attempt to interpret the content part of the response as.
So in fact one is not limited to just HTML or images but whatever content type you would like to return (that the browser can understand anyway). This could be HTML or it could be an image of some type or it could be a PDF or it could be an Excel spreadsheet. All you have to do in the JSP is set the header appropriately and then send content that is actually in that format.
This does not just apply to JSP by the way but all other web programming languages. You can do similar things to produce the same results in PHP, Perl, ASP etc.
The only JSP/Servlet complication is whether or not doing this in a JSP is a "good" idea but I am not an expert enough at that to make a definitive statement. Mostly though JDBC in a JSP is a no-no.
Similar Messages
-
Converting sap script output into pdf format?
Hi all,
I have modified the standard purchase order script form MEDRUCK . Now i need to generate the output into pdf format.
This is not only limited to spool requests , But also when the user creates the purchase order and clicks on print or print preview the output should be in pdf format.
Please help on where and what code has to be written for this requirement?
Thanks,
Aravind.Hi
I don't know which is your release, but I don't think it's possible to create a preview in pdf format, but u can create a pdf file instead of the spool and then open it automatically, this is an example:
- A) Open form
IF P_PDF = 'X'.
XDEVICE = 'PRINTER'.
* Get OTF
ITCPO-TDGETOTF = 'X'.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = XDEVICE
DIALOG = 'X'
FORM = 'ZFI_CL_EC_MOVI'
OPTIONS = ITCPO
MAIL_SENDER = LVS_SENDER
MAIL_RECIPIENT = LVS_RECIPIENT
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
B) Close FORM
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = T_OTF
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
ELSE.
PERFORM DOWNLOAD_PDF.
ENDIF.
C) Create PDF and open it:
FORM DOWNLOAD_PDF.
DATA: BIN_FILESIZE TYPE I.
DATA: T_FILE_PDF TYPE STANDARD TABLE OF TLINE,
DOCTAB_ARCHIVE TYPE STANDARD TABLE OF DOCS.
DATA: FILE_TABLE TYPE FILETABLE WITH HEADER LINE.
DATA: RC TYPE I,
USER_ACTION TYPE I.
DATA: TITLE TYPE STRING,
FILENAME TYPE STRING.
CHECK P_PDF = 'X'.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = BIN_FILESIZE
TABLES
OTF = T_OTF
DOCTAB_ARCHIVE = DOCTAB_ARCHIVE
LINES = T_FILE_PDF
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
EXIT.
ENDIF.
TITLE = 'Creare File'(T02).
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = TITLE
DEFAULT_EXTENSION = '*.pdf'
CHANGING
FILE_TABLE = FILE_TABLE[]
RC = RC
USER_ACTION = USER_ACTION
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
EXIT.
ELSE.
IF USER_ACTION = 9. EXIT. ENDIF.
IF RC = 1.
READ TABLE FILE_TABLE INDEX 1.
ENDIF.
ENDIF.
MOVE FILE_TABLE-FILENAME TO FILENAME.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
FILENAME = FILENAME
FILETYPE = 'BIN'
CHANGING
DATA_TAB = T_FILE_PDF
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
EXIT.
ELSE.
MESSAGE S208(00) WITH 'File creato con successo'(S01).
ENDIF.
CHECK P_OPEN = 'X'.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
URL = FILE_TABLE-FILENAME
EXCEPTIONS
FRONTEND_NOT_SUPPORTED = 1
FRONTEND_ERROR = 2
PROG_NOT_FOUND = 3
NO_BATCH = 4
UNSPECIFIED_ERROR = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
ENDIF.
ENDFORM. " DOWNLOAD_PDF
Max -
Sandard Smart Form output into PDF format.
Hi to all,
Any one please guide me, how to convert sandard Smart Form output into PDF format.
Regards,
Thaneshhi thanesh,
the below code may help you.
data: FM_NAME TYPE RS38L_FNAM.
DATA: W_BIN_FILESIZE TYPE I,
T_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
T_PDF_TAB TYPE TLINE OCCURS 0 WITH HEADER LINE,
W_FILESIZE TYPE I,
WA_CTRLOP TYPE SSFCTRLOP,
WA_OUTOPT TYPE SSFCOMPOP,
T_OTFDATA TYPE SSFCRESCL.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = <ur form name>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
WA_CTRLOP-GETOTF = 'X'.
WA_CTRLOP-NO_DIALOG = 'X'.
WA_OUTOPT-TDNOPREV = 'X'.
call function <function module generated for ur form>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = WA_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = WA_OUTOPT
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = T_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
T_OTF[] = T_OTFDATA-OTFDATA[].
call function 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
IMPORTING
BIN_FILESIZE = W_BIN_FILESIZE
BIN_FILE =
tables
OTF = T_OTF
LINES = T_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
CODEPAGE = ' '
FILENAME = 'D:\TEST11.PDF'
FILETYPE = 'BIN'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = W_FILESIZE
tables
data_tab = T_PDF_TAB
FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
if sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
WRITE: / 'SUCCESSFULLY CONVERTED'.
endif. -
How to convert table content into html format?
Hi,
Experts,
How to convert internal data into HTML format is there any function module or piece of code to download content into HTML.
Thank u,
Shabeer Ahmed.Then use this code....
REPORT ytest_table_html1.
* D A T A D E C L A R A T I O N
*-HTML Table
DATA:
t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
" Html Table
*- Declare Internal table and Fieldcatalog
it_flight TYPE STANDARD TABLE OF sflight WITH HEADER LINE,
" Flights Details
it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
" Fieldcatalog
*-Variables
DATA:
v_lines TYPE i,
v_field(40).
*-Fieldsymbols
FIELD-SYMBOLS: <fs> TYPE ANY.
* S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
SELECT *
FROM sflight
INTO TABLE it_flight
UP TO 20 ROWS.
* E N D - O F - S E L E C T I O N
END-OF-SELECTION.
*-Fill the Column headings and Properties
* Field catalog is used to populate the Headings and Values of
* The table cells dynamically
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = it_fcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
DELETE it_fcat WHERE fieldname = 'MANDT'.
t_html-line = '<html>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<td><h1>Flights Details</h1></td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<table border = "1">'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate HTML columns from Filedcatalog
LOOP AT it_fcat.
CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
it_fcat-scrtext_l
'</th>' INTO t_html-line.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
DESCRIBE TABLE it_fcat LINES v_lines.
*-Populate HTML table from Internal table data
LOOP AT it_flight.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate entire row of HTML table Dynamically
*-With the Help of Fieldcatalog.
DO v_lines TIMES.
READ TABLE it_fcat INDEX sy-index.
CONCATENATE 'IT_FLIGHT-' it_fcat-fieldname INTO v_field.
ASSIGN (v_field) TO <fs>.
t_html-line = '<td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = <fs>.
APPEND t_html.
CLEAR t_html.
t_html-line = '</td>'.
APPEND t_html.
CLEAR t_html.
CLEAR v_field.
UNASSIGN <fs>.
ENDDO.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</table>'.
APPEND t_html.
CLEAR t_html.
*-Download the HTML into frontend
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\Flights.htm'
TABLES
data_tab = t_html
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-Display the HTML file
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = 'C:\Flights.htm'
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
none of the above function modules r obsolete... -
Can i get the report output in HTML format?
Hello everybody,
I have developed a report whose output needs to be printed in HTML format.
Can anybody suugest how this can be accomplished by coding in program itself using any function modules if necesary?
Helpful answers will surely be rewarded.
Thanx in advance,
Sanghamitra.refer the below code
Generate an HTML file from a Report in ABAP
data: begin of itab occurs 0,
matnr type mara-matnr,
mtart type mara-mtart,
matkl type mara-matkl,
groes type mara-groes,
end of itab.
data: ifields type table of w3fields with header line.
data: ihtml type table of w3html with header line.
select * into corresponding fields of table itab
from mara up to 100 rows.
call function 'WWW_ITAB_TO_HTML'
EXPORTING
TABLE_ATTRIBUTES = 'BORDER=1'
TABLE_HEADER =
ALL_FIELDS = 'X'
tables
html = ihtml
fields = ifields
ROW_HEADER =
itable = itab
check sy-subrc = 0.
call function 'GUI_DOWNLOAD'
exporting filename = 'c:\test.html'
tables data_tab = ihtml
or for conerting internal table data into html
See below simple report to convert the internal table data to a HTML format data and stores in a internal table and then pass that internal table as an attachment to the external email using function module SO_NEW_DOCUMENT_ATT_SEND_API1.
You need for create a spool also.
REPORT Z_HTML .
include <icon>.
types: begin of msg,
type like icon-id,
text(140) type c,
end of msg.
constants: gc_marked type c value 'X',
gc_ok like icon-id value '@5B@'.
data:
gt_msg type standard table of msg,
gs_msg like line of gt_msg,
gv_msg(138) type c,
*-- html
html_container type ref to cl_gui_custom_container,
html_control type ref to cl_gui_html_viewer,
my_row_header like w3head occurs 10 with header line,
my_fields like w3fields occurs 10 with header line,
my_header like w3head,
my_html type standard table of w3html ,
ok_code like sy-ucomm.
Start of Selection *
start-of-selection.
clear gv_msg.
gv_msg = 'MESSAGES for HTML'.
do 3 times.
perform message using gc_ok gv_msg .
enddo.
End of Selection *
end-of-selection.
set screen 0100.
*& Form message
form message using p_type
p_text.
clear gs_msg.
gs_msg-type = p_type.
gs_msg-text = p_text.
append gs_msg to gt_msg.
endform. " MESSAGE
*& Module STATUS_0100 OUTPUT
module status_0100 output.
perform convert_itab_html.
set titlebar '100' .
set pf-status 'MAIN100'.
create object html_container
exporting
container_name = 'CONTAINER'.
create object html_control
exporting
parent = html_container
saphtmlp = gc_marked .
data: assigned_url type url.
call method html_control->load_data
EXPORTING
URL = url
TYPE = 'text'
SUBTYPE = 'html'
SIZE = 0
ENCODING =
CHARSET =
importing
assigned_url = assigned_url
changing
data_table = my_html
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_GENERAL = 2
CNTL_ERROR = 3
others = 4
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call method html_control->show_url
exporting
url = assigned_url
FRAME =
IN_PLACE = ' X'
EXCEPTIONS
CNTL_ERROR = 1
CNHT_ERROR_NOT_ALLOWED = 2
CNHT_ERROR_PARAMETER = 3
DP_ERROR_GENERAL = 4
others = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module exit INPUT
module exit input.
leave program.
endmodule. " exit INPUT
*& Module user_command_0100 INPUT
text
module user_command_0100 input.
case ok_code.
when 'EXIT' or 'BACK'.
leave program.
when others.
call method cl_gui_cfw=>dispatch.
endcase.
endmodule. " user_command_0100 INPUT
*& Form convert_itab_html
form convert_itab_html.
data: lv_tabix like sy-tabix.
*-- table header
call function 'WWW_ITAB_TO_HTML_HEADERS'
exporting
field_nr = 1
text = 'Type'
fgcolor = 'navy'
bgcolor = 'red'
font = 'Arial'
tables
header = my_row_header.
call function 'WWW_ITAB_TO_HTML_HEADERS'
exporting
field_nr = 2
text = 'Message'
fgcolor = 'navy'
bgcolor = 'red'
font = 'Arial'
tables
header = my_row_header.
*-- table rows
clear lv_tabix.
loop at gt_msg into gs_msg.
lv_tabix = sy-tabix.
call function 'WWW_ITAB_TO_HTML_LAYOUT'
exporting
field_nr = 1
line_nr = lv_tabix
icon = gc_marked
tables
fields = my_fields.
call function 'WWW_ITAB_TO_HTML_LAYOUT'
exporting
field_nr = 2
line_nr = lv_tabix
fgcolor = 'red'
bgcolor = 'black'
font = 'Arial'
size = '2'
tables
fields = my_fields.
endloop.
*-- header
move 'Messages during program run' to my_header-text.
move 'Arial' to my_header-font.
move '2' to my_header-size.
move 'Centered' to my_header-just.
move 'red' to my_header-bg_color.
move 'blue' to my_header-fg_color.
refresh my_html.
call function 'WWW_ITAB_TO_HTML'
exporting
table_header = my_header
all_fields = ' '
tables
html = my_html
fields = my_fields
row_header = my_row_header
itable = gt_msg.
endform. "convert_itab_html
regards,
srinivas
<b>*reward for useful answers*</b> -
Capture cursor output in HTML format in PL/SQL
Hi,
I want to capture Cursor's output in html format.
following is the current query which is giving me output as mentioned below it
Query:-
declare
v_msgtext varchar(4000);
cursor c_query IS
select emp_no,emp_name,salary
from employees
where dept_id = 100;
begin
for v_query in c_query LOOP
v_msgtext = v_msgtext ||
'empno:'|| v_query.emp_no||','||
'emp_name:'||v_query.emp_name||'.'||
'emp_salary:'||'v_query.salary'||
char(13)||char(10);
END LOOP;
utl_mail.send(v_sender, v_recipient, NULL, NULL, v_subject, v_msgText, 'text/html; charset=windows-1250', NULL);
end;
o/p:-
empno: 123,emp_name:sagar,emp_salary:10,000
empno: 124,emp_name:neeraj,emp_salary:20.000
empno: 125,emp_name:ashish,emp_salary:18.000
empno: 126,emp_name:ramesh,emp_salary:5.000
empno: 127,emp_name:suresh,emp_salary:30.000
I want to generate the output as HTML report in tabular format with the below columns
(empno,emp_name,salary) and send this html file via email to user.
Can anybody please suggest a solution ASAP.
Thanks in advance.Hi,
You can do in this way ...
CALL FUNCTION 'WWW_ITAB_TO_HTML'
TABLES
HTML = F_HTML
FIELDS = FLDS
ITABLE = ITAB.
IF SY-SUBRC NE 0.
WRITE: / 'Error in generating the html format'.
EXIT.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = 'c:test.html'
MODE = 'BIN'
TABLES
DATA_TAB = F_HTML
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
OTHERS = 9.
call these 2 Fucntion modules for every page. so each page it wil downlaod a HTML page
Regards
Sudheer -
Capturing cursor output in HTML format
Hi,
I want to capture Cursor's output in html format.
following is the current query which is giving me output as mentioned below it
Query:-
declare
v_msgtext varchar(4000);
cursor c_query IS
select emp_no,emp_name,salary
from employees
where dept_id = 100;
begin
for v_query in c_query LOOP
v_msgtext = v_msgtext ||
'empno:'|| v_query.emp_no||','||
'emp_name:'||v_query.emp_name||'.'||
'emp_salary:'||'v_query.salary'||
char(13)||char(10);
END LOOP;
utl_mail.send(v_sender, v_recipient, NULL, NULL, v_subject, v_msgText, 'text/html; charset=windows-1250', NULL);
end;
o/p:-
empno: 123,emp_name:sagar,emp_salary:10,000
empno: 124,emp_name:neeraj,emp_salary:20.000
empno: 125,emp_name:ashish,emp_salary:18.000
empno: 126,emp_name:ramesh,emp_salary:5.000
empno: 127,emp_name:suresh,emp_salary:30.000
I want to generate the output as HTML report in tabular format with the below columns
(empno,emp_name,salary) and send this html file via email to user.
Can anybody please suggest a solution ASAP.
Thanks in advance.Hi ,
Please follow the below link may it will be useful for you.It shows how to generate a HTML format output through the query.
oracle - Within a PL/SQL procedure, wrap a query or refcursor in HTML table - Stack Overflow -
Converting SPool information into HTML Format
Hi Friends,
How to Converting SPool information into HTML Format
and send this HTML INFORMATION INTO MAIL..
can anyone send program for this issue pls.
it is an urgent issue
regards,Hi Rich,
once again thanks for your kindly reply.
but i am developing below Code.. that HTMAL AATCHMENTS ARE NOT COMING IN MAIL.
PLS can you you verify the below code.
DATA DECLARATIONS *
DATA: I_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE,
VARIANT LIKE RSVAR-VARIANT,
DOC_CHNG LIKE SODOCCHGI1,
RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE,
data: spoolid type tsp01-rqident.
DATA IT_MAIL LIKE TSP01 OCCURS 0 WITH HEADER LINE.
data report_html like W3HTML OCCURS 0 WITH HEADER LINE.
DATA: G_ICONS(32) OCCURS 10 WITH HEADER LINE.
DATA LISTOBJECT LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA sent_to_all like sonv-flag.
data : RECEIVER(30),
spoolid type tsp01-rqident,
it_buffer like SOLI occurs 10 with header line.
data: list type table of abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
TABLE DECLARATIONS *
TABLES : TSP01.
SELECTION-SCREEN *
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN: SKIP.
PARAMETERS : RQ2NAME LIKE TSP01-RQ2NAME .
RQIDENT like TSP01-RQIDENT.
SELECT-OPTIONS : S_RECVR FOR RECEIVER NO INTERVALS.
SELECTION-SCREEN: SKIP.
SELECTION-SCREEN: END OF BLOCK B1.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM SEND_TO_SPOOL.
PERFORM GET_SPOOL_ID.
loop at it_mail.
PERFORM CONVERT_SPOOL_TO_PDF.
PERFORM SEND_MAIL.
endloop.
Save the list
call function 'SAVE_LIST'
tables
listobject = list
exceptions
list_index_invalid = 1
others = 2.
*& Form GET_SPOOL_ID
Getting the Latest Spool Request Number
FORM GET_SPOOL_ID.
SELECT *
FROM TSP01 INTO TABLE IT_MAIL
and RQIDENT = RQIDENT.
WHERE RQ2NAME = RQ2NAME .
ENDFORM. " GET_SPOOL_ID
*& Form CONVERT_SPOOL_TO_PDF
Converting the Spool to PDF Document
FORM CONVERT_SPOOL_TO_PDF.
*--Assigning the Spool number
WRITE :/ IT_MAIL-RQIDENT.
spoolid = IT_MAIL-RQIDENT.
*--Converting the Spool to PDF
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = spoolid
FIRST_LINE = 1
LAST_LINE =
TABLES
BUFFER = it_buffer
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LISTOBJECT = IT_BUFFER.
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME =
TEMPLATE_NAME = 'WEBREPORTING_REPORT'
TABLES
HTML = report_html
LISTOBJECT = LISTOBJECT
LISTICONS = G_ICONS.
ENDFORM. " CONVERT_SPOOL_TO_PDF
FORM SEND_MAIL.
call function 'WWW_LIST_TO_HTML'
tables
html = htmllines.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
LOOP AT S_RECVR.
reclist-receiver = S_RECVR-LOW.
reclist-rec_type = 'U'.
append reclist.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = report_html "mailtxt
object_content = mailtxt
receivers = reclist "mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0.
write 'mail sent'.
endif.
ENDLOOP.
regards,
venu. -
How can i make a form in access into html format?
I am trying to convert my form in access 2013 into into html format. When i try doing so it looks 100% different on the browser than it does in access. I tried doing the export command,
and this is what happened. What can i do to make sure that it looks the exact same and will receive the data from the database? thank you for the helpYou can avoid the Ken Burns effect, but it would be a lot of work:
See: http://help.apple.com/imovie/ipad/2.0/index.html#knac3eec39c6
If you don’t want the Ken Burns effect applied to a photo, set the image position and zoom level to be the same for the start and end points.
Adjust the movement of photos with the Ken Burns effect
iMovie applies the Ken Burns effect to the photos you add to your project. With this effect, the camera appears to sweep across and zoom in on the photo. If there are people in the photo, iMovie uses face detection to keep faces within the viewing area.
You can adjust the Ken Burns effect so that the motion starts and ends on the parts of the image you specify.
In the timeline, tap the photo you want to adjust.The Ken Burns effect controls appear in the lower-right corner of the image in the viewer.
To set the way the photo is framed at the beginning, tap the Start button .
Pinch to zoom in or out, then drag the image in the viewer to frame it the way you want.
To set the way the photo is framed at the end, tap the End button .
Pinch to zoom in or out, then drag the image in the viewer to frame it the way you want.
To close the controls, tap the Ken Burns Effect button , or tap outside of the clip.
If you don’t want the Ken Burns effect applied to a photo, set the image position and zoom level to be the same for the start and end points. -
How to retrieve complete report output in HTML format
Hi,
I'm looking for how to retrieve complete report output in HTML format.
I have tried the following and it only give me first page of the report output where in the actual report output should be 5 pages. Is there something I'm missing.
CallbackOption[] boCallOpt = new CallbackOption[1];
ImageManagement boImgMan = new ImageManagement();
boImgMan.setCallbackScript("getImage.jsp");
boImgMan.setImageManagementHolder("imageName");
boImgMan.setDocumentReferenceHolder("docRef");
boCallOpt[0] = boImgMan;
RetrieveData oRetrieveData = new RetrieveData();
RetrieveView oRetrieveView = new RetrieveView();
oRetrieveView.setCallbackOption(boCallOpt);
oRetrieveData.setRetrieveView(oRetrieveView);
Action[] oActions;
oActions = new Action[1];
oActions[0] = fillPrompts;
oReportEngine.getDocumentInformation(boDocInfo.getDocumentReference(), null, oActions, null,oRetrieveData);
Testing this on BOE XI 3.0
Thanks,For Web Intelligence, HTML is an interactive viewing format and not an export format such as PDF.
Note that the HTML will be embedded with postback URLs to the application for images and drill downs.
Closest you'd get is to be able to specify HTML output of an entire REPORT rather than REPORT_PAGE in the ViewSupport.setViewMode method. But this brings back just one report in the document, and will have postback URLs mentioned above.
Sincerely,
Ted Ueda -
Convert JEditorPane document into HTML format
Hi,
I have developed an editor using swing's JEditorPane.
I want to know whether is it possible to convert the entire content of the
JEditorPane into HTML format using some API's.
For example if JEditorPane contains the text such as
JEditor pane to HTML
After converting it to HTML, it should appear as
<b>JEditorPane</b> <i>to</i> <u>HTML</u>
.editorPane.getDocument.getText()
-
Hi Frns,
I wanna convert webi report into html format...
Is there any possibility in bo???
I'm using sap bo 4.1 sp2
Regards
RiazHi Riaz,
As per my knowledge Webi report export to HTML format is not possible in BI 4.1
You can raise a request in SAP IDEA's place
Refer the below links for workaround solution
[WebI XI 3.x] Export report to HTML or XML
Does BOE XI 3.1 supports exporting WebI to XML format? -
This is Regarding internal tables
Hi to all,
I have 3 internal tables like this.
it_itab1 It_itab2 it_final
!--f1 !-f3 !---f1
!--f2 !-f4 !---f2
!---f3
!---f4
the fields are like this.now i want to move the data from first two internal tables to final internal table.
how to do this.
thanks and regards,
screate ur final internal table with the same data element as the fields of 1 and 2 itabs
and say move- corresponding to it_final.. -
This is regarding internal table
Hi to all,
types : begin of it_itab,
name type ztab-name,
tval like ztab-tval,
fval like ztab-fval,
end ofit_itab,
it_jtab type standard table of it_itab.
What is the meaning of this it_jtab type standard table of it_itab.
what it specifies exactly.
Thanks and regards,
sHi,
types : begin of it_itab,
name type ztab-name,
tval like ztab-tval,
fval like ztab-fval,
end ofit_itab,
Types defines the standard strcuture which you can use any where in the report.
<b>it_jtab type standard table of it_itab.</b>
As strcuture doesnot contain morethan one data, we declaring the internal using the strcuture which defined.<b> The above statement is used to create a internal table without header line and the internal table type is of standard.</b>
Thanks,
Sriram Ponna. -
How to convert ALV output into XML format.
Hi all,
I just want to know how to convert an ALV output into a XML format, this is really urgent.
regards,
Ruchika sainiThis program exports an internal table to an XML file. *----
Report ZPRUEBA_MML_13 *
Export an internal table to XML document *
NO BORRAR ESTE CODIGO *
REPORT ZPRUEBA_MML_13.
PANTALLA SELECCION *
PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
PANTALLA SELECCION *
TYPE TURNOS *
TYPES: BEGIN OF TURNOS,
LU LIKE T552A-TPR01,
MA LIKE T552A-TPR01,
MI LIKE T552A-TPR01,
JU LIKE T552A-TPR01,
VI LIKE T552A-TPR01,
SA LIKE T552A-TPR01,
DO LIKE T552A-TPR01,
END OF TURNOS.
TYPE TURNOS *
TYPE SOCIO *
TYPES: BEGIN OF SOCIO,
NUMERO LIKE PERNR-PERNR,
REPOSICION LIKE PA0050-ZAUVE,
NOMBRE LIKE PA0002-VORNA,
TURNOS TYPE TURNOS,
END OF SOCIO.
TYPE SOCIO *
ESTRUCTURA ACCESOS *
DATA: BEGIN OF ACCESOS OCCURS 0,
SOCIO TYPE SOCIO,
END OF ACCESOS.
ESTRUCTURA ACCESOS *
START OF SELECTION *
START-OF-SELECTION.
PERFORM LLENA_ACCESOS.
PERFORM DESCARGA_XML.
END-OF-SELECTION.
END OF SELECTION *
FORM LLENA_ACCESOS *
FORM LLENA_ACCESOS.
REFRESH ACCESOS.
CLEAR ACCESOS.
MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
CLEAR ACCESOS.
MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
ENDFORM.
FORM LLENA_ACCESOS *
FORM DESCARGA_XML *
FORM DESCARGA_XML.
DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
WRITE: / 'Converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'ACCESOS'
DATAOBJECT = ACCESOS[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
IF W_RC IS INITIAL.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
W_RC.
ENDIF.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = GK_RUTA
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
OTHERS = 10.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Message was edited by:
Hymavathi Oruganti
Maybe you are looking for
-
Function Module for outline agreement
Dear Sir, I want to know the function module for contract/outline agreement from where I can fetch the details of release orders against the given contract. Regards Amit Agarwal
-
Hi, HOW CAN WE TAKE THE REPORT FOR NON RECEIPT OF CASH PAYMENT? Pls give the T-code Regards,
-
This question was posted in response to the following article: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-642ca .html
-
Command-Z keyboard menu shortcut is not working
Hi Command-Z keyboard menu shortcut is not working in my profile i.e.,my login. But able to execute the same keyboard shortcut in other profile. ALl the other menu keyboard shortcuts are working fine. Have tried deleting Universal Access, HotKeys,Fin
-
Simple ways of sharing folders across users?
Hi I realise this has been done to death, but after many attempts I am wondering if I am missing something. I am using the top level public folder and system preferences route to drop in a folder that contains several sub folders and then multiple do