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>

Similar Messages

  • Displaying the report output in excel format

    Please help me in getting the report output in excel format.
    thnks

    I ran into a BIG problem after passing from 6i rep server to 9i rep server.
    On 6i rep server I used to set DESFORMAT='DELIMITED', and that produced reasonable tab-delimited output for reports that did not have group above (all the query groups were from left to right, not a single group having fields displayed above some other group). When deployed on rep server 9i, the same reports produced some unexplainable output: some of the rows were duplicated, but I couldn't figure out any rule.
    So, the best thing to get the reports into something that fits in .xls would be to have the output in .xml, that may be imported in Excel.

  • PAYABLES NOT GETTING THE REPORT OUTPUT IN PDF AFTER APPLYING RUP5 R12

    Hi All,
    RDBMS:10.2.0.3.0
    Oracle Apps :12.0.4
    OS:AIX 5.3
    Problem Description:
    We are presently facing an issue in Payables not getting the report output in PDF esp for the reports "Invoice Register", Invoice Hold Report and also other reports. We were able to generate the reports till our last test performed on last Thursday. This instance was cloned over the last weekend and probably the new upgrade to RUP5 R12,would have impacted it.
    Concurrent Programs submitted are completed normal but on clicking "view output" results in Blank PDF output.
    The error message what was shown is as below:
    "Adobe Reader could not open 'AcrC.tmp' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)".
    Where could we locate ther above 'AcrC.tmp' of Adobe Reader..
    could anyone please share such an experience encountered for resolution..
    Would appreciate an early response..
    Thanks for your time!
    Regards,

    I suggest you speak to your DBA/sysadmin. This is not likely to be a reports problem.
    Check that you can see the output from apps through the viewer (the report may not hav output anything)
    Check whether you can print anything on that printer from apps.
    May also be worth checking to see if you can print to another printer from this report.

  • 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

  • Where can i get the report server name in Reports 10g

    Where can i get my report server name in 10G ?

    Thanks ..
    When i opened the bat file :
    i did not find any report server name ...
    This is my file :-
    @echo off
    REM $Header: rwdiag.bat 13-may-2005.03:21:21 sunaraya Exp $
    REM
    REM rwdiag.bat
    REM
    REM Copyright (c) 2005, Oracle. All rights reserved.
    REM
    REM NAME
    REM rwdiag.bat - rw diagnostic tool
    REM
    REM DESCRIPTION
    REM Script to run the diagnostic tool used to locate servers / monitor packets on the network
    REM
    REM NOTES
    REM Usage: rwdiag.bat -find <server name> | -findAll [-conf <config file>] [-timeout <timeout in sec>]
    REM
    REM Usage: rwdiag.bat -monitor [-log <logfile>] [-conf <config file>]
    REM
    REM MODIFIED (MM/DD/YY)
    REM sunaraya 05/13/05 - Added rwrun.jar to the classpath for bug 4361664
    REM sunaraya 04/22/05 - Provided execute permission to the script for bug 4323789
    REM sunaraya 04/14/05 - sunaraya_bug-4221172
    REM sunaraya 04/14/05 - Creation
    REM
    set ORA_HOME=C:\ORANT
    if "%ORA_HOME%"=="" goto ERROR
    set CLASSPATH=%ORAHOME%\jlib\zrclient.jar;%ORA_HOME%\reports\jlib\rwrun.jar
    %ORA_HOME%\jdk\bin\java -DORACLE_HOME=%ORA_HOME% -classpath %_CLASSPATH% oracle.reports.utility.DiagServerLocator %*
    goto END
    :ERROR
    echo "ORACLE_HOME is not set"
    echo.
    :END

  • How can I get the report status?

    I am using web service to connect to BI Publisher and run the report by java code. And I have questions still unclear, anyone who knows about it please help me.
    1. Is there any method to get the report status, such as whether the report runs successfully or not.
    2. If I have a huge table that binds with the template (maybe RTF template), how about the performance of the BI publisher?
    3. I use the sample codes in the web service tutorial to run the report, but the out pdf report doesn't change when i add or remove the table data, how can I resolve it?
    Thanks very much.

    Use the web services and use this function
    getScheduledReportStatus
    you will get the status of the report ran.
    Possible values are: "Completed", "Error" "Running", "Scheduled","Suspended", "Unknown"
    It is in the table XMLP_SCHED_OUTPUT status column :)

  • Setting the report layout for HTML format

    hi friends
    when I generate my report to HTML file and open it to Internet Explorer it disturbs the actual report little bit like enlarging the fonts, hiding some graphical objects like Lines and wrapping the report. so can u tell me that how can I take the same output format in Internet Explorer as in reports previewer? I'm using Reports 6i and Micrsoft Internet Explorer 6.0. thanx.

    I think you should make some modification into main section
    e.g. increase height and width of the report....and then see...
    I had same problem with text output but this method solve my problem hope
    this will help u...
    Enjoy Oracle...

  • How to download the report output  into PDF format

    Hi friedns
    from the report output when user clicks download button
    it has to download to PDF format
    how to do this
    thanks in advance
    venu

    hi venu,
    check this sample code
    Save Report Output to a PDF File
    This report takes another report as input, and captures the output of that report. The output is then converted to
    PDF and saved to a local file. This shows how to use some of the PDF function modules, as well as an easy way to
    create PDF files.
    Source Code Listing
    report zabap_2_pdf.
    *-- Enhancements: only allow to be run with variant. Then called
    *-- program will be transparent to users
    *-- TABLES
    tables:
    tsp01.
    *-- STRUCTURES
    data:
    mstr_print_parms like pri_params,
    mc_valid(1) type c,
    mi_bytecount type i,
    mi_length type i,
    mi_rqident like tsp01-rqident.
    *-- INTERNAL TABLES
    data:
    mtab_pdf like tline occurs 0 with header line,
    mc_filename like rlgrap-filename.
    *-- SELECTION SCREEN
    parameters:
    p_repid like sy-repid, " Report to execute
    p_linsz like sy-linsz default 132, " Line size
    p_paart like sy-paart default 'X_65_132'. " Paper Format
    start-of-selection.
    concatenate 'c:\'
    p_repid
    '.pdf'
    into mc_filename.
    *-- Setup the Print Parmaters
    call function 'GET_PRINT_PARAMETERS'
    exporting
    authority= space
    copies = '1'
    cover_page = space
    data_set = space
    department = space
    destination = space
    expiration = '1'
    immediately = space
    in_archive_parameters = space
    in_parameters = space
    layout = space
    mode = space
    new_list_id = 'X'
    no_dialog= 'X'
    user = sy-uname
    importing
    out_parameters = mstr_print_parms
    valid = mc_valid
    exceptions
    archive_info_not_found = 1
    invalid_print_params = 2
    invalid_archive_params = 3
    others = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
    if mstr_print_parms-pdest = space.
    mstr_print_parms-pdest = 'LOCL'.
    endif.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
    mstr_print_parms-linsz = p_linsz.
    mstr_print_parms-paart = p_paart.
    submit (p_repid) to sap-spool without spool dynpro
    spool parameters mstr_print_parms
    via selection-screen
    and return.
    *-- Find out what the spool number is that was just created
    perform get_spool_number using sy-repid
    sy-uname
    changing mi_rqident.
    *-- Convert Spool to PDF
    call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
    exporting
    src_spoolid= mi_rqident
    no_dialog = space
    dst_device = mstr_print_parms-pdest
    importing
    pdf_bytecount = mi_bytecount
    tables
    pdf = mtab_pdf
    exceptions
    err_no_abap_spooljob = 1
    err_no_spooljob = 2
    err_no_permission = 3
    err_conv_not_possible = 4
    err_bad_destdevice = 5
    user_cancelled = 6
    err_spoolerror = 7
    err_temseerror = 8
    err_btcjob_open_failed = 9
    err_btcjob_submit_failed = 10
    err_btcjob_close_failed = 11
    others = 12.
    call function 'DOWNLOAD'
    exporting
    bin_filesize = mi_bytecount
    filename = mc_filename
    filetype = 'BIN'
    importing
    act_filename = mc_filename
    tables
    data_tab = mtab_pdf.
    FORM get_spool_number *
    Get the most recent spool created by user/report *
    --> F_REPID *
    --> F_UNAME *
    --> F_RQIDENT *
    form get_spool_number using f_repid
    f_uname
    changing f_rqident.
    data:
    lc_rq2name like tsp01-rq2name.
    concatenate f_repid+0(8)
    f_uname+0(3)
    into lc_rq2name separated by '_'.
    select * from tsp01 where rq2name = lc_rq2name
    order by rqcretime descending.
    f_rqident = tsp01-rqident.
    exit.
    endselect.
    if sy-subrc ne 0.
    clear f_rqident.
    endif.
    endform." get_spool_number
    Regards,
    Naveen

  • How can i get the value from a HTML Form

    hi,
    I am using HTML form (logfrm). there are userId field,password field, submit button,reset button, and a link.
    when i click on the link, it should fetch the value of userid.
    How it is possible?
    AE

    use jsp:
    which lets you embed java statments in your html -so you when you click on the link you can use request.getParameter("userID") to get the userid.
    Ideally with html forms use a combination of jsp and java beans, where the fields in the form are also fields in your java bean, which you can access through setters and getters.
    google for some jsp tutorials.

  • Update button in sql report for each row can only get the report value

    I have to added Update for each row of records like:
    select a.*,'Update' button from (
    select c.*,d.login from country c,champ d
    where c.champ_id=d.champ_id(+)
    order by c.name) a
    then go to the report->edit button ->Column Link
    I added some items P40_REGION, P40_CHAMPID,P40_ACTIVE,P40_CODE and assign the value like #region#,#active# ,#code# to these item, but when I click the update button in the report I found the values such as #region#,#active# ,#code# is the report value not the select list selected value(the region, active column are displayed as select list lov).
    Can anyone tell me how to sort this knid of problem?
    Thanks a lot!

    Sorry, it doesn't work. I also tried apex_application.g_f01(i), but not everytime I can get the value or get the incorrect value. If you have time you can try to create it like what I have described. Our team use two days now but still can not sort this problem.

  • How can I get the Conditoned output from PXI 1520 in PXI 1011 combined Chassie?

    Respected Sir,
    I am using PXI-SCXI combined Chassie PXI 1011 for my application. I have placed three SCXI 1520 modules, a motion card PXI 7352 and PXI 6052E DAQ card in the combined chassie. You know the PXI 1520 and PXI 6052E are connected internally using the Backplane of the SCXI and is not user accessable. Now I need the conditioned output of the PXI 1520 to be used as an Analog input for the Motion Control card PXI 7352. How can I do that? Whether PXI 1180 could solve my problem? If so, how do I connect the PXI 1180 to PXI 1011?
    Kindly clarify me as soon as possible.
    Thanking you,
    Ramkumar. D

    Dear Sir,
    I have already placed my DAQ card at the correct place and configured it. I need some more clarification from you. I have attached my Query in .txt format.
    Kindly reply as soon as possible.
    Thanks,
    Ramkumar. D
    Attachments:
    Clarification.txt ‏2 KB

  • Report Output In HTML Format

    Hi,
    i have my report output of 4 paes. when i tried to save them in HTML format , it saves all pages all together in 1 html. i want to save each page in different html.
    like i have 4 pages in report output .. i want 4 html for each different page .
    Can anybody help me ..its urgent

    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

  • Pritn foramt for the report output in Landscape Format

    I have a question about how we can get a spool output switched to fit to a Landscape format - it is currently printing format 90x120 on a Letter size ( Portrait format ) - it's a report output

    Hi
    You can write the code during the PRINT COMMAND  to specify the Size of the Print  Layout(see the F1 help om NEW-PAGE PRINT ON )
    generally when the Size of the report is suitable to LANDSCAPE while printing while selecting the printer we select the printer properlies as LANDscape and print
    Regards
    Anji

  • Scrollbar for reports output in html format

    We are creating reports with fairly large amounts of data being directed to the screen in HTML format. We were expecting to see a scrollbar along the right hand edge of the report window that allows us to see all of our data. Is this possible?
    Alternatively, how would we split this data up into multiple pages? There isn't really anything to break on. We do want our totals on this last page.
    Thanks.

    hello,
    unfortunatly the varying destination types are only valid for bitmap reports.
    regards,
    the oracle reports team

  • Can i get the content of a HTML tag?

    I would like knowing if it is possible,
    instead of getting all the document where the searched string is found,
    i can get only the content of a tag
    in other words, I have defined the following index:
    CTX_DDL.CREATE_SECTION_GROUP('htmlgroup', 'HTML_SECTION_GROUP');
    CTX_DDL.ADD_ZONE_SECTION('htmlgroup', 'titulo', 'TITLE');
    CREATE INDEX index_string ON table(field_to_indexing)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP htmlgroup');
    SELECT field FROM table WHERE CONTAINS('searching string' WITHIN titulo) > 0;
    The index works just fine and makes the searching correctly, but it returns back the whole document,
    and I wanted it to return just the content of the TITLE tag. I would like to know if this is possible.

    It is possible if you are using the XMLType operators available in 9i. A short article describe this approach http://otn.oracle.com/products/oracle9i/daily/nov30.html
    Now, if you are not using 9i you can still do it but at the application level. You need to get a "chunk" of the document and then perform
    substring searching to extract the content of the title tag.
    I would like knowing if it is possible,
    instead of getting all the document where the searched string is found,
    i can get only the content of a tag
    in other words, I have defined the following index:
    CTX_DDL.CREATE_SECTION_GROUP('htmlgroup', 'HTML_SECTION_GROUP');
    CTX_DDL.ADD_ZONE_SECTION('htmlgroup', 'titulo', 'TITLE');
    CREATE INDEX index_string ON table(field_to_indexing)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP htmlgroup');
    SELECT field FROM table WHERE CONTAINS('searching string' WITHIN titulo) > 0;
    The index works just fine and makes the searching correctly, but it returns back the whole document,
    and I wanted it to return just the content of the TITLE tag. I would like to know if this is possible.

Maybe you are looking for

  • Help needed in knowing the B2B Table strucure

    Hi All, I would like to know the tables in the B2B database that stores the ISA,GS,ST,Receiver ID and Ack flag data. Or any document which contains the description of all the tables and what data is stored in them . Thanks in advance. Regards, Kaavya

  • Mapviewer javabean, sessions, state and related

    Hi, i am a scratching my head a little bit regarding the way I use MapViewer. We are building a web-app using a mapviewer for rendering the map, doing queries etc. We are using AJAX for user-interaction, including the map window, identifying objects,

  • Error -3256 Unknown Error

    Ok, I had to reinstall my OS, so I am not happy already. Now I try to get my ipod up and running and it won't let me connect to authorize my computer. It tells me to check my network connectivity. WELL.. I got to the store, the main apple.com website

  • My MackBook Air's keyboard has no backlight, Can I change it to the backlight keyboard?

    Here is my MacBook air. MacBook Air 13-inch, Late 2010 Processor  2.13 GHz Intel Core 2 Duo Memory  4 GB 1067 MHz DDR3 Graphics  NVIDIA GeForce 320M 256 MB Serial Number The keyboard has no backlight, Can I change it to the backlight keyboard?

  • Can I make app icons larger?

    Hi all, Just wondering if it was possible to make the app icons bigger on the ipad screen. Say, only have 2 large icons in a row. The only solution I found was to use the zoom feature but this isnt reall what I want. Many thanks in advance