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...

Similar Messages

  • How to convert xml data into html format in bpel

    Hi ,
    Can any one tel me how to conevrt xml into html in oracle bpel.
    Does bpel support this functionality or not.
    Regards,
    Ana
    Edited by: user10181991 on Apr 5, 2009 11:16 PM

    Ana,
    We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
    Let me know if this helps.

  • 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.

  • 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()

  • How to convert XML content into SQL INSERT statements

    Hi all,
    I'm very new to XML. Forgive me if I don't use technical XML terms. :-)
    We are planning to convert SQL queries into XML format using a third party tool.
    After that we have to read the XML files and use the tokens to insert into custom tables.
    So, basically we have to create INSERT statements using the data stored in the XML file.
    How do we go about reading / parsing the XML file in Java?
    Pls help!
    Regards,
    Sam

    This is the requirement with an example.
    eg. if the following SQL query is fed into the 3rd party system,
    select last_name,job_id,salary from employees a, deptno b
    where a.deptno = b.deptno
    the output would be,
    <?xml version="1.0" ?>
    <sqlscript dbvendor="MSSQL">
    <fullselectstmt nestlevel="0">
    <subselectstmt><selectclause><fieldlist>
    <field><fieldname>
    <attr>
    <sourcetoken toketype="" dbobjtype="field">last_name</sourcetoken>
    </attr>
    </fieldname>
    </field>
    <field><fieldname>
    <attr>
    <sourcetoken toketype="" dbobjtype="field">job_id</sourcetoken>
    </attr>
    </fieldname>
    </field>
    <field><fieldname>
    <attr>
    <sourcetoken toketype="" dbobjtype="field">salary</sourcetoken>
    </attr>
    </fieldname>
    </field>
    </fieldlist></selectclause>
    <fromclause><joinlist><join nestlevel="0">
    <lztable><simpletable><attr>
    <sourcetoken toketype="" dbobjtype="table">employees</sourcetoken>
    </attr><aliasclause withas="false"><sourcetoken toketype="" dbobjtype="table alias">a</sourcetoken></aliasclause></simpletable></lztable></join><join nestlevel="0">
    <lztable><simpletable><attr>
    <sourcetoken toketype="" dbobjtype="table">deptno</sourcetoken>
    </attr><aliasclause withas="false"><sourcetoken toketype="" dbobjtype="table alias">b</sourcetoken></aliasclause></simpletable></lztable></join></joinlist></fromclause>
    <whereclause><expression exprtype="Expr_Comparison" exproop="="><attr>
    <sourcetoken toketype="" dbobjtype="table alias">a</sourcetoken>
    <sourcetoken toketype="" dbobjtype="unknown">.</sourcetoken>
    <sourcetoken toketype="" dbobjtype="field">deptno</sourcetoken>
    </attr><attr>
    <sourcetoken toketype="" dbobjtype="table alias">b</sourcetoken>
    <sourcetoken toketype="" dbobjtype="unknown">.</sourcetoken>
    <sourcetoken toketype="" dbobjtype="field">deptno</sourcetoken>
    </attr></expression>
    </whereclause></subselectstmt></fullselectstmt>
    </sqlscript>
    So, using the output file, the list of columns (under token "field") last_name,job_id and salary should be inserted into LIST_COLUMNS table. So 3 INSERT statements should be created for 3 columns.
    The list of tables (under token "table") employees and dept should be inserted into LIST_TABLES table. So 2 INSERT statements should be created for the 2 tables.
    Regards,
    Sam

  • How to convert BLOB data into string format.

    Hi,
    I have problem while converting blob data into string format.
    for example,
    Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
    will get me the first 4000 byte of BLOB .
    When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
    declare
    my_var CLOB;
    BEGIN
    for x in (Select X from T)
    loop
    my_var:=dbms_lob.substr(x.X,32767,1)
    end loop
    return my_var;
    I comfortably convert 32k BLOB field to string.
    My problem is how to convert blob to varchar having size more than 32K.
    Please help me to resolve this,
    Thanx in advance for the support,
    Nilesh

    Nilesh,
    . . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
    SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
    -- resulting string:
        ☺AW(⌂özßHAA
    Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
    Regards,
    Noel

  • How to write table content into excel quickly?

    Dear gurus, I am fresh to ABAP, could you please so kind advise how can I save a table content into an excel which is stored in certain path efficiently?
    I found a way as following:
    form excel_range_write using lcobj_excel
                                 lc_range
                                 lc_value.
      data: lc_cell type ole2_object.
      call method of
          lcobj_excel
          'RANGE'     = lc_cell
        exporting
          #1          = lc_range.
      perform font using lc_cell 1 '30'.
      set property of lc_cell 'VALUE' = lc_value.
    endform.                    "excel_cell_write
    However if I would like to write everything out, I have to loop the table to fill each cell, is there any easier way? Could anyone kindly help?

    hi Frank
    this is the wiki published by me
    hope it will help u a lot
    https://wiki.sdn.sap.com/wiki/display/Snippets/OLEprogramforconvertingtomultitabexcel
    cheers
    s.janagar

  • How to convert Classical Report into PDF format..........

    Hi Experts,
    I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
    How to convert into PDF format from Classical report ?
    Yusuf

    Hi yusuf,
    please find the below report,,
    please make two include programs before executing it,
    there codes are pasted below,
    INCLUDE zimpr_data_declaration.
    INCLUDE zimpr_performs_wrap.
    REPORT  zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
                INCLUDE for DATA DECLARATION                               *
    INCLUDE zimpr_data_declaration.
                INCLUDE for all performs.                                  *
    INCLUDE zimpr_performs_wrap.
    TOP-OF-PAGE--
    TOP-OF-PAGE.
      PERFORM f_top_page.                     "TOP OF THE REPORT PAGE,I.E. HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'SEL_SCREEN'.             "PF-STATUS OF THE SELECTION SCREEN.
      PERFORM f_data_retrieval.               "PERFORM FOR ALL SELECT STATEMENTS.
      PERFORM f_report_display.               "REPORT DISPLAY,WRITE STATEMENTS.
    --Define the actions to be performed for pf-status-----
    AT USER-COMMAND.
      wf_ok_code = sy-ucomm.
      wf_save_ok = wf_ok_code.
      CLEAR wf_ok_code.
      CASE wf_save_ok.
        WHEN 'PDF'.          "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
          loc_repid  = sy-repid.   "PROGRAM NAME
    --THIS FM SETS  THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              layout                 = loc_paart             "LANDSCAPE LAYOUT
              line_size              = loc_linsz                  "CHARACTER WIDTH OF REPORT
              no_dialog              = 'X'
              user                   = sy-uname              "USERNAME
            IMPORTING
              out_parameters         = loc_print_parms        "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
              valid                  = loc_valid
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    --FOR GENERATING THE SPOOL NUMBER--
          NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms.                        " This allocates the spool no
          "to the screen without the dialog screen.
          PERFORM f_top_page.
          PERFORM f_report_display.
          NEW-PAGE PRINT OFF.                                                      "This marks the end of the screen for which the spool no was generated.
          wf_id = sy-spono.                                                      " This assign the spool no of the screen to the variable.
    --PERFORM FOR GETTING THE PDF OUTPUT--
          PERFORM f_pdf_display.
    --PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
          PERFORM f_download_local.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    include data declaration----
    *&  Include           ZIMPR_DATA_DECLARATION
    TYPE-POOLS : shlp.
    DATA : wf_ordert TYPE aufk-auart.                      "ORDER TYPE
    DATA : wf_order TYPE aufk-aufnr.                       "ORDER NUMBER
    DATA : wf_bdate TYPE afko-gstrp.                       "BASIC START DATE
    DATA : wf_status(4) TYPE c ."rihea-i_astatin.                 "STATUS
    DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'.           "Object number
    DATA : wf_aufnr TYPE aufk-aufnr.
    DATA : wf_name TYPE thead-tdname.                      "NAME TO PASS IN FM READ_TEXT
    DATA : wf_date1(12) TYPE c.                            "DATE
    DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'.      "COUNTERS FOR REPORT DISPLAY
    DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
    DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
    DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
    DATA: wf_id TYPE tsp01-rqident ,                         " For storing Spool request number
          wf_bytes TYPE i .                                  " For storing the bytes of data to be converted to PDF.
    DATA : wf_langu(2) TYPE c VALUE 'EN'.
    DATA: wf_pripar TYPE pri_params,                         " Structure for Passing Print Parameters
          wf_rcpar TYPE arc_params.                          " ImageLink structure
    DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
           wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
    &--SELECTION SCREEN--
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:  s_ordert FOR wf_ordert .                  "ORDER TYPE
    SELECT-OPTIONS:  s_order FOR wf_order OBLIGATORY.          "ORDER NUMBER
    SELECT-OPTIONS:  s_bdate FOR wf_bdate.                      "BASIC START DATE
    SELECT-OPTIONS:  s_status FOR wf_status matchcode object zei_sys .  "SYSTEM STATUS
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK b_1.
    *--INTERNAL TABLES--
    TYPES : BEGIN OF ty_aufk,
          aufnr TYPE aufk-aufnr,              "OREDR NUMBER
          auart TYPE aufk-auart,              "ORDER TYPE
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          ktext type aufk-ktext,              "SHORT TEXT
          gstrp TYPE afko-gstrp,              "BASIC START DATE
          END OF ty_aufk.
    TYPES : BEGIN OF ty_tj02t,
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          txt04 TYPE tj02t-txt04,             "STATUS
          istat TYPE tj02t-istat,             "Object status
          spras TYPE tj02t-spras,             "LANGUAGE KEY
          END OF ty_tj02t.
    TYPES : BEGIN OF ty_temp,
          objnr TYPE aufk-objnr,
          status(300) TYPE c,
           END OF ty_temp.
    TYPES : BEGIN OF ty_wrap,
           line(54) TYPE c,                     "LONG TEXT
           END OF ty_wrap.
    TYPES : BEGIN OF ty_wrap2,
           line(25) TYPE c,                     "STATUS
           END OF ty_wrap2.
    TYPES : BEGIN OF ty_f4,
            txt04 TYPE tj02t-txt04,
            txt30 TYPE tj02t-txt30,
            END OF ty_f4.
    types :  begin of ty_sta,
            istat type tj02t-istat,
            objnr type jest-objnr,
            end of ty_sta.
    data : int_sta type table of ty_sta with header line.
    DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
    DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE.            "TABLE FOR PDF CONVERSION
    DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE.         "TABLE FOR LONGTEXT
    DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE.       "TABLE FOR STATUS
    DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE.         "Table for concatenation of system status.
    DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
    DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
    DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
    DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld.                     " Field Type for FM for F4 help
    DATA :int_return   TYPE TABLE OF ddshretval WITH HEADER LINE .
    DATA:
      loc_print_parms LIKE pri_params,          "PRINT PARAMETERS
      loc_valid(1)      TYPE c,
      loc_file type SDOK_CHTRD,
      loc_bytecount     TYPE i,                 "NUMBER OF BYTES TRANSFERRED
      loc_length        TYPE i,                 "LINE-LENGTH
      loc_rqident       LIKE tsp01-rqident,     "SPOOL NUMBER
      loc_rq2name(12)   TYPE c.
    DATA: loc_filename LIKE rlgrap-filename.     "FILENAME
    DATA:loc_repid LIKE sy-repid,                    " Report to execute
         loc_linsz LIKE sy-linsz VALUE 115,          " Line size
         loc_paart LIKE sy-paart VALUE 'X_65_132'.   " Paper Format
    Include           ZIMPR_PERFORMS_WRAP----
    *&  Include           ZIMPR_PERFORMS_WRAP
    *&      Form  f_top_page
         top-of the page
    -->  p1        text
    <--  p2        text
    FORM f_top_page .
    *--HEADER--
      FORMAT COLOR 1 .
      WRITE : text-010.
      FORMAT COLOR 1 OFF.
      WRITE : / text-011,sy-datum NO-GAP.
      WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
      ULINE .
      FORMAT COLOR 1 INTENSIFIED OFF .
      WRITE : 1 sy-vline,                "HEADINGS
      2 text-014 NO-GAP,
      7 sy-vline,
      8 text-015 NO-GAP,
      20 sy-vline,
      21 text-016 NO-GAP,
      76 sy-vline,
      77 text-017 NO-GAP,
      88 sy-vline,
       89 text-018  NO-GAP,
      115 sy-vline.
      WRITE : /1 sy-vline,
        2 text-019 NO-GAP,7 sy-vline,
        20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
      ULINE.
      FORMAT COLOR 1 OFF.
    ENDFORM.                    " f_top_page
    *&      Form  f_data_retrieval
         select statements
    -->  p1        text
    <--  p2        text
    FORM f_data_retrieval .
    SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
      SELECT  p~aufnr
               p~auart
               p~objnr
               p~ktext
               r~gstrp
               FROM  ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
               INTO TABLE int_aufk
               WHERE p~aufnr IN s_order AND
                     p~auart IN s_ordert AND
                     r~gstrp IN  s_bdate AND
                     p~objnr LIKE wf_objnr.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_aufk BY aufnr.
      DELETE ADJACENT DUPLICATES FROM int_aufk.
      SELECT q~istat
           p~objnr
           FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
           INTO TABLE int_sta
           FOR ALL ENTRIES IN int_aufk
           WHERE p~objnr = int_aufk-objnr
                 AND q~txt04 IN s_status and
                 q~spras = wf_langu and
                 p~inact = ''.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_sta BY objnr.
      DELETE ADJACENT DUPLICATES FROM int_sta.
    *--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
      IF int_sta[] IS NOT INITIAL.
        SELECT p~objnr
               q~txt04
               q~istat
               q~spras
               FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
               INTO TABLE int_tj02t
               FOR ALL ENTRIES IN int_sta
               WHERE p~inact = '' AND
                     p~objnr = int_sta-objnr AND
                     q~spras = wf_langu AND
                    q~txt04 IN s_status AND
                     p~objnr LIKE wf_objnr.
        IF sy-subrc <> 0.
          MESSAGE s101(zipm).               "no values found for selection criteria.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_data_retrieval
    *&      Form  f_report_display
          report display
    -->  p1        text
    <--  p2        text
    FORM f_report_display .
      LOOP AT int_tj02t.              "concatenating the status into a internal table
        AT NEW objnr.
          CLEAR int_temp-status.
        ENDAT.
        CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
        AT END OF objnr.
          int_temp-objnr = int_tj02t-objnr.       "key field.
          APPEND int_temp.
          CLEAR int_temp.
        ENDAT.
        CLEAR int_tj02t.
      ENDLOOP.
      LOOP AT int_aufk.
        CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name .    "concatenating client number and order number
    *--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = wf_kopf         "TEXT ID
            language                = sy-langu       "LANGUAGE
            name                    = wf_name        "TEXT NAME
            object                  = wf_aufk         "TEXT OBJECT
          TABLES
            lines                   = int_tline      "LINES OF LONG TEXT.
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
        IF sy-subrc <> 0.
          int_tline-tdline = int_aufk-ktext.
          APPEND int_tline.
          CLEAR :int_tline.
        ENDIF.
        LOOP AT int_tline.
    *--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
          CALL FUNCTION 'RKD_WORD_WRAP'
            EXPORTING
              textline            = int_tline-tdline          "LONG TEXT LINE
              outputlen           = 54                        "OUTPUT LENGTH
            TABLES
              out_lines           = int_wrap                  "INTERNAL TABLE
            EXCEPTIONS
              outputlen_too_large = 1
              OTHERS              = 2.
          IF sy-subrc <> 0.
            CLEAR :int_tline.
          ENDIF.
        ENDLOOP.
    *-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
        READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
        CALL FUNCTION 'RKD_WORD_WRAP'
          EXPORTING
            textline            = int_temp-status
            outputlen           = 25
          TABLES
            out_lines           = int_wrap2
          EXCEPTIONS
            outputlen_too_large = 1
            OTHERS              = 2.
        IF sy-subrc <> 0.
         CONTINUE.
        ENDIF.
        IF NOT int_wrap2[] IS INITIAL.
          ULINE AT (115).
        ENDIF.
        DESCRIBE TABLE int_wrap LINES wf_i2.         "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
        DESCRIBE TABLE int_wrap2 LINES wf_i1.        "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
        WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
          IF ( wc_i2 LE wf_i2 ).
            READ TABLE int_wrap INDEX wc_i2 .        "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
            wc_i2 = wc_i2 + 1.
          ENDIF.
          IF ( wc_i1 LE wf_i1 ).
            READ TABLE int_wrap2 INDEX wc_i1 .       "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
            wc_i1 = wc_i1 + 1.
          ENDIF.
    *--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
          CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
            EXPORTING
              input  = int_aufk-gstrp
            IMPORTING
              output = wf_date1.
          IF NOT int_wrap2[] IS INITIAL .
    *--REPORT DISPLAY--
            WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
                    7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
                    20 sy-vline,21 int_wrap-line,
                    76 sy-vline ,77  wf_date1 ,
                    88 sy-vline ,89 int_wrap2-line,
                    115 sy-vline.
    *--CLEARING THE VARIABLES--
            wf_date1 = ''.
            CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
          ENDIF.
        ENDWHILE.
        wc_i1 = 1.
        wc_i2 = 1.
        CLEAR :int_wrap,int_wrap2.
        REFRESH : int_wrap,int_wrap2,int_tline.
      ENDLOOP.
      ULINE AT (115).
    ENDFORM.                    " f_report_display
    *&      Form  F_PDF_DISPLAY
         pdf conversion
    -->  p1        text
    <--  p2        text
    FORM f_pdf_display .
    *--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = wf_id                 "SPOOL NUMBER
          no_dialog                = space
          pdf_destination          = 'X'
        IMPORTING
          pdf_bytecount            = loc_bytecount        "NUMBER OF BYTES TRANSFERRED
        TABLES
          pdf                      = int_pdf                                  "TABLE FOR PDF REPORT
        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.
    ENDFORM.                    " F_PDF_DISPLAY
    *&      Form  f_download_local
         download to local system
    -->  p1        text
    <--  p2        text
    FORM f_download_local .
    ---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
    data  loc_ret TYPE iwerrormsg.
      CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
       IMPORTING
         SAPWORKDIR       = loc_file
        ERROR_MSG        =  loc_ret
      loc_filename = loc_file.
      if loc_ret is initial.
      concatenate loc_filename '\work order header long text_  ' sy-timlo '.pdf' into loc_filename.
      endif.
      CALL FUNCTION 'DOWNLOAD'
        EXPORTING
          bin_filesize = loc_bytecount      "NO. OF BYTES
          filename     = loc_filename       "DEFAULT FILE NAME
          filetype     = 'BIN'
        IMPORTING
          act_filename = loc_filename
        TABLES
          data_tab     = int_pdf.
    ENDFORM.                    " f_download_local
    if you have any doubts,,
    please revert
    Regards,
    Talwinder

  • How to convert Smart Form into PDF format and return the result in BAPI?

    I want to convert a Smart Form into PDF format and return the result in BAPI.
    can anyone tell me how it can be done with related example
    regards
    pranay

    hi,
    smart form to pdf--
    All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
    DATA: p_output_options TYPE ssfcompop,
    p_control_parameters TYPE ssfctrlop.
    p_control_parameters-no_dialog = 'X'.
    p_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = p_output_options
    control_parameters = p_control_parameters
    IMPORTING
    job_output_info = s_job_output_info.
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    and if u need more u can check below links also
    Check the below links..
    Re: Smartforms to PDF
    Re: smartform (otf) as pdf and sending as email-attachment
    VISIT THIS LINK
    Re: Smartforms to PDF
    PLZ REWARD POINTS IF IT HELPS YOU
    rgds
    anver

  • How to convert LRAW data into the Format of JPEG TIF

    Hi All,
    I am getting data in LRAW from the table DRAO i want to change it into Binary for display,
    I want to display the content into JPEG TIF
    I am getting error when display that format is not suitable.
    Thanks,

    Hello Shilpi,
    you can use SCMS_XSTRING_TO_BINARY to convert the RAW data to Binary.
    BR, Saravanan

  • 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 saini

    This 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

  • How to convert Labview document into PDF format

    Hi! can any one tell me, can we convert the Labview document (Labview saved files)into PDF format. I wanted to convert it using a VI. If any one suggest me or send me the example vi i will be very thankful.
    Regards
    Ramesh.C

    Hi,
    We have a brand new PDF library for LabVIEW. Release date is in october. The library can create pdfs, with all kinds of text writing and picture stuff. It works stand alone, so there is no need for other programs. It should also be platform independend.
    If your interested, drop me a mail. I can send you mail when it's released. Maybe we can give you a "beta test", if you send use your findings.
    Regards,
    Wiebe. (email is " my name " @ carya . nl )
    "Ramme" <[email protected]> wrote in message news:[email protected]..
    Hi! can any one tell me, can we convert the Labview document (Labview saved files)into PDF format. I wanted to convert it using a VI. If any one suggest me or send me the example vi i will be very thankful. RegardsRamesh.C

  • How to convert a xml string html format

    hi,
    in my jso code i have string with name "content", the value of " content" is a xml format.
    so when i type out.print(content)
    i want display it in html format
    can any one help
    thanks

    Use xml parser to read xml elements... then construct Html elements.
    http://www.devx.com/xml/Article/16921

  • Download table content into CSV format in background

    Hi,
    I would like to download some 50 tables data content locally into csv file format. As the number of tables are quite more, I am planning to run this in background. GUI_DOWNLOAD doesnt help me here. Can you plz suggest how can I go ahead to download files then.
    I am using the FM 'SAP_CONVERT_TO_CSV_FORMAT' for converting the internal table to csv format. Suggest me if there is any other way.
    Your suggestions would be very valuable.
    Thank you in advance.

    go through this  link...
    Re: how to create a CSV file

  • How to convert plain text into html?

    Hi
    I'm looking for a nice method which converts any plain text to html. For example, text: "Me and you\nand a dog named boo."Conversion result should be:
    <html>
    <body>
    Me and you<br>
    and a dog named boo.
    </body>
    </html>I know, I could write such a code myself using regex. But I just wonder whether something like this already exists in the java api?
    Greetings from Switzerland
    Mickey

    Use a StringReader to read the lines and add the lines between <html><pre> ... </pre></html>

Maybe you are looking for

  • Customizing a backup plan for mac osx10.6.8

    What to do to backup all content of every file to an external hard drive Go-Flex Pro for Mac My old back  back up plan is not sufficient.  i dont seem to have Time Machine with my Sno leopard Thank you

  • Syntax for creating foreign key across users in a database

    There are two user present A,B.They are granted all privileges.Now in USER A, there is a table PARENT whose primary key is PARENT_NO.In USER B I have created a table CHILD whose primary key is CHILD_NO. In the CHILD table of USER B, I want to create

  • Issue while passing more than one promt value to bi publisher in 11.1.1.6

    Hi all , i have created a dashboard prompt with two columns . i want them to pass to bi publisher report to filter out the result. but for some reason it's not applying both filters. It just refreshes the page with default value. any idea how to reso

  • Can't get playlist to play

    I'm new to iTunes, so please forgive my ignorance. I have uploaded my cds and created a playlist. I want to simply play all of the songs in the playlist. I open the playlist and press play - and only one song plays. I then try selecting all the songs

  • Download Trial version of Dreamweaver

    Hi There i am trying to Download a Trial version of Dreamweaver . But when i click on a link for Download trial,It doesn't work for me , it just show me new black window on my browser