Loading HTML/WORD Documents in Oracle8i

How do we Load HTML/Word or other content Documents in Oracle8i Database.
And is there a GUI interface available to insert documents.
Genereal users cannot probably use SQL Loader for that
Replies urgetntly required so please kindly mail to [email protected]
thank you
-nandeep

This is documented in http://technet.oracle.com/doc/oracle8i_816/inter.816/a77063/cdefaul5.htm#1000908
examples in http://technet.oracle.com/doc/oracle8i_816/inter.816/a77063/aload.htm#272
easiest is INSERT, frequently done when http-posting text from an html form into a varchar2
iFS also provides several text insert methods.

Similar Messages

  • Using JSP/Servlet to write Word Document to BLOB

    Hi
    I need some help pls
    When I use a normal class with a main method, it loads the word document into a blob and I can read this 100%.Stunning.
    With a JSP/Servlet I cannot get the document out again. The "format" seems to be lost.
    Any ideas,help greatly appreciated:
    Here is the Main class that works:
    package mypackage1;
    import java.io.OutputStream;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.*;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class TestLOB
    //static final Logger logger = Logger.getLogger("test");
    public TestLOB()
    public static void main(String args[])
    TestLOB testLOB = new TestLOB();
    testLOB.TestLOBInsert("c:\\my_data\\callcenterpilot.doc");
    public void TestLOBInsert(String fileName)
    Connection conn = getConnection("wizard");
    BLOB blob = null;
    try
    conn.setAutoCommit(false);
    String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
    PreparedStatement pstmt = conn.prepareStatement(cmd);
    ResultSet rset = pstmt.executeQuery(cmd);
    rset.next();
    blob = ((OracleResultSet)rset).getBLOB(2);
    File binaryFile = new File(fileName);
    System.out.println("Document length = " + binaryFile.length());
    FileInputStream instream = new FileInputStream(binaryFile);
    OutputStream outstream = blob.getBinaryOutputStream();
    int size = blob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    conn.commit();
    closeConnection(conn);
    catch (Exception ex)
    System.out.println("Error =- > "+ex.toString());
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    DriverManager.registerDriver(new OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@oraclu5:1600:dwz110","so_cs","so_cs");
    catch (Exception ex)
    System.out.println("Error getting conn"+ex.toString());
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    System.out.println("Error closing connection in get last imei"+se.toString());
    Works fine:
    Here is the display servlet: Works when main class inserts file
    package mypackage1;
    import java.io.InputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.*;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class DisplayLOB extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    static final Logger logger = Logger.getLogger(DisplayLOB.class);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    //response.setContentType(CONTENT_TYPE);
    //PrintWriter out = response.getWriter();
    Connection conn = null;
    PreparedStatement pstmt = null;
    try
    conn = getConnection("wizard");
    //out.println("<html>");
    //out.println("<head><title>DisplayLOB</title></head>");
    //out.println("<body>");
    //out.println("<p>The servlet has received a POST. This is the reply.</p>");
    InputStream is=null;
    oracle.sql.BLOB blob=null;
    response.setContentType("application/msword");
    //response.setContentType("audio/mpeg");
    OutputStream os = response.getOutputStream();
    String term = "1";
    String query = "SELECT docdetail FROM testlob WHERE docno = 1";
    pstmt = conn.prepareStatement(query);
    ResultSet rs = pstmt.executeQuery();
    while (rs.next())
    blob=((OracleResultSet)rs).getBLOB(1);
    is=blob.getBinaryStream();
    int pos=0;
    int length=0;
    byte[] b = new byte[blob.getChunkSize()];
    while((length=is.read(b))!= -1)
    pos+=length;
    os.write(b);
    }//try
    catch (Exception se)
    se.printStackTrace();
    finally
    try
    pstmt.close();
    catch (Exception ex)
    System.out.println("Error closing pstmt "+ex.toString());
    //out.println("</body></html>");
    //out.close();
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    conn = DataBase.getPoolConnection(dataBase);
    catch (Exception se)
    logger.fatal("Error getting connection: ",se);
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    logger.error("Error closing connection in get last imei",se);
    Here is JSP/Servlet
    <%@ page import="org.apache.log4j.*"%>
    <%@ page contentType="text/html; charset=ISO-8859-1" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    <title>Wizard SMS Interface</title>
    <link rel='stylesheet' type='text/css' href='main1.css'>
    <script language='JavaScript' src='copyright.js'></script>
    </head>
    <pre>
    <%
    //HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    //HTTP 1.0
    response.setHeader("Pragma","no-cache");
    //prevents caching at the proxy server
    response.setDateHeader ("Expires", 0);
    Logger logger = Logger.getLogger("co.za.mtn.wizard.administration.admin01.jsp");
    %>
    </pre>
    <body>
    <FORM ACTION="/WizardAdministration/uploadfile"
    METHOD="POST"
    ENCTYPE="multipart/form-data">
    <INPUT TYPE="FILE" NAME="example">
    <INPUT TYPE="SUBMIT" NAME="button" VALUE="Upload">
    </FORM>
    </body>
    </html>
    <font> <b>Copyright &copy;
    <script>
    var LMDate = new Date( document.lastModified );
    year = LMDate.getYear();
    document.write(display(year));
    </script>
    Mobile Telephone Networks.
    <p align="left"><i><b><font face="Georgia, Times New Roman, Times, serif" size="1"></font></b></i></p>
    package co.za.mtn.wizard.admin;
    import java.io.InputStream;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class UploadFile extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    //static final Logger logger = Logger.getLogger(UploadFile.class);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String headerName = null;
    Enumeration en = request.getHeaderNames();
    try
    while ( en.hasMoreElements() )
    Object ob = en.nextElement();
    headerName = ob.toString();
    System.out.println("Value for headerNAme is >"+headerName+"<");
    String aaa = request.getHeader(headerName);
    System.out.println("Value for aa is >"+aaa+"<");
    catch (Exception ex)
    System.out.println("Error in extracting request headers"+ex.toString());
    Connection conn = getConnection("wizard");
    BLOB blob = null;
    try
    conn.setAutoCommit(false);
    String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
    PreparedStatement pstmt = conn.prepareStatement(cmd);
    ResultSet rset = pstmt.executeQuery(cmd);
    rset.next();
    blob = ((OracleResultSet)rset).getBLOB(2);
    //File binaryFile = new File("h:\\callcenterpilot.doc");
    //System.out.println("Document length = " + binaryFile.length());
    //FileInputStream instream = new FileInputStream(binaryFile);
    response.setHeader("Content-Type","application/vnd.ms-word");
    String contentType = request.getContentType();
    System.out.println("Content type received in servlet is >"+contentType+"<");
    ServletInputStream instream = request.getInputStream();
    OutputStream outstream = blob.getBinaryOutputStream();
    int size = blob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    conn.commit();
    closeConnection(conn);
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    catch (Exception ex)
    System.out.println("Error =- > "+ex.toString());
    //out.println("</body></html>");
    //out.close();
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    conn = DataBase.getPoolConnection(dataBase);
    catch (Exception se)
    System.err.println("Error getting connection: "+se.toString());
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    System.err.println("Error closing connection in get last imei"+se.toString());
    This is what the display servlet is showing when the JSP/Servlet insert the document
    -----------------------------7d31422224030e
    Content-Disposition: form-data; name="example"; filename="H:\(your name) Skills Matrix.doc"
    Content-Type: application/msword
    �� ࡱ � > ��     � � ���� � � ���������������������
    Tks
    Andre

    hello,
    there are multiple documents out there, describing the oracle reports server setup. try doc.oracle.com for documentation.
    also it is part of the online-documentation.
    you need to install 9iAS enterprise edition. the server is pre-configured and will listen to the url http://yourserver/dev60cgi/rwcgi60.exe
    passing only this url you will get a help-screen, describing the syntax.
    regards,
    the oracle reports team

  • Opening an word document in a servlet

    Hi,
    How can i open a word document in servlets. Is any jar file required for opening this. Can anyone help out me ?
    bye

    I will have the same problem in my project: i think that i will load the word document in a jsp.
    Because with word when you can use "save as" and you can save your document as web format.
    The document will be rephrase with html marker.
    You can try to save your document with this format and load it in your web browser to see if the display is good for you.

  • Problems in indexing MS word document. Please help!

    Hi
    I'm using oracle 8.1.6 on solaris 5.7
    I stored a MS word document in a table as a internal blob.
    The word document contains one line:
    "This is test word document." Then I indexed it with inso_filter preference. I created a log file during indexing. The log file showed thatb there was no document indexed. Here was what I did:
    ===============================================================
    --Create preference
    exec CTX_DDL.drop_preference('MY_LEXER');
    exec CTX_DDL.create_preference('MY_LEXER','BASIC_LEXER');
    exec CTX_DDL.set_attribute('MY_LEXER','MIXED_CASE', 'NO');
    exec CTX_DDL.set_attribute('MY_LEXER','INDEX_THEMES','NO');
    exec CTX_DDL.set_attribute('MY_LEXER','INDEX_TEXT', 'YES');
    exec ctx_ddl.Drop_Preference ('MY_FILTER');
    exec ctx_ddl.Create_Preference ('MY_FILTER','INSO_FILTER');
    exec ctx_ddl.drop_section_group ('MY_SECTION');
    exec ctx_ddl.create_section_group ('MY_SECTION','NULL_SECTION_GROUP');
    --Create table
    drop table test;
    create table test
    (id number primary key,
    text blob
    --Initialize blob column with an empty blob
    insert into test (id,text) values (1,empty_blob());
    --Create an directory in which a word file (test.doc) exsits
    create directory filedir as '/home/mydir';
    --Insert the word file
    DECLARE
    lobd BLOB;
    fils BFILE;
    BEGIN
    fils := BFILENAME('FILEDIR','test.doc');
    SELECT text INTO lobd FROM test WHERE id = 1 FOR UPDATE;
    dbms_lob.fileopen(fils, dbms_lob.file_readonly);
    dbms_lob.loadfromfile(lobd, fils, dbms_lob.getlength(fils));
    COMMIT;
    dbms_lob.fileclose(fils);
    END;
    ---Start logging
    exec ctx_output.start_log('index.log');
    ---Create index with INSO_FILTER defined in preference
    create index test_index on TEST(text) indextype is ctxsys.context
    parameters ('lexer MY_LEXER filter MY_FILTER section group MY_SECTION memory 50M');
    ---Stop loggin
    exec ctx_output.end_log;
    =============================================================
    The indes was created. And I open the index.log file. It is:
    ==============================================================
    Oracle interMedia Text: Release 8.1.6.0.0 - Production on Tue Feb 19 16:22:50 2002
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    16:22:50 02/19/02 begin logging
    16:23:48 02/19/02 populate index: CALLOB.TEST_INDEX
    16:23:48 02/19/02 Begin document indexing
    16:23:49 02/19/02 End of document indexing. 0 documents indexed.
    16:24:06 02/19/02 log
    16:24:06 02/19/02 logging halted
    ===============================================================
    I did the query:
    select token_text from dr$test_index$i;
    no rows returned.
    Could anyone tell me why this happened? An advices are appreciated.
    Thansk,
    George

    Hi, Omar:
    I tried use SQL*Loader to load the word document. Part of the loader logging reads as following:
    Table TEST:
    1 Row successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 6720 bytes(64 rows)
    Space allocated for memory besides bind array: 0 bytes
    Total logical records skipped: 0
    Total logical records read: 1
    Total logical records rejected: 0
    Total logical records discarded: 0
    ================================================================
    It seems that the file was sucessfully loaded into the database. Then I created index using the procedure I posted on this thread. I checked the table ctx_user_index_errors.
    select * from ctx_user_index_errors;
    the returns are:
    ERR_INDEX_NAME ERR_TIMES
    TEST_INDEX 20-FEB-02
    ERR_TEXTKEY
    AAAGtpABLAAAAAXAAA
    ERR_TEXT
    ----------------------------------------------------------------DRG-11207: user filter command exited with status 137
    What does this return tell?
    Thanks.

  • Forced open word document when value for merged field required in document is blank

    Is there any way that I can make a word 2010 document open? The word document contains fields which are linked to a window form fields which have values input by users which then are saved to the database and also merged into the document's fields. In other
    word, when the controls (per example a textbox) in the windows form have no value input into them, the word document will not open.
    Thank you in advance

    Hello Amy12,
    Your requirement is still not so clear to me. So I assume you just want to load a Word Document inside WinForm application:
    You can refer this article
    http://www.codeproject.com/Articles/3582/Word-Control-for-NET
    By the way, webbrowser control can also help you open a word document, see MSDN article here:
    https://support.microsoft.com/kb/304662?wa=wsignin1.0
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Email word document as attachment

    I have a template in word document with some variables and text in color, bold, grey etc. stored in UNIX directory.
    My goal is to replace variable with customer name, number dynamically and then
    send email this word document as an attachment in class cl_bcs.
    How can I load this word document into internal table, search and replace the variable dynamically and email the document as an attachment without loosing the color, bold font etc.  I tried the approach Open dataset, read dataset, find and replace variable but when I send email ( using document type = 'DOC' and content as 255 char), I click on the attachment and the file was corrupted.
      Thanks for your input.

    Hi,
    You can try adding the attaching the content in HEX format. Refer to the below source code-
    CALL METHOD document->add_attachment
                EXPORTING
                  i_attachment_type    = ls_attachments-file_type
                  i_attachment_subject = ls_attachments-file_name
                  i_att_content_hex    = ls_attachments-attachx[].
    Refer to this below links for an example-
    http://www.divulgesap.com/blog.php?p=NTA=
    http://www.divulgesap.com/blog.php?p=ODI=
    Hope it helps.
    Cheers,
    Ravikiran

  • How to save and work with a Word document stored in the Oracle 8i Database?

    Hi,
    If you have any experience with saving and working with a Word document (stored in 8i) from Forms 6.0, then please let me know how.
    Thanks ...
    Peter Nielsen

    hi
    i had worked storing word documents in oracle8i.tell me what exactly u want to know.
    null

  • Loading MS Word

    Hi,
    I have Crystal Reports XI, and I need to know if this is possible...
    I want to be able to load a Word document, inside of a report, while it's printing, and yet have it be dynamic. In other words, I want to be able to load a Word document for a network share, and have it displayed in the report. The Word document could change from one instance of the report to another, that is ok. That is what we want. We want the text to be dynamic. I know that it is possible to load an image file dynamically from a file location, but what about a Word document? Is this possible? If so, how can I do it? Thanks...

    Hi Chris,
    If you are placing a word document inside of Crystal Reports and wanting this document to update on a dynamic basis then there are 2 options to do this.
    1. Insert the word document as an ole object and ensure the 'link' option is checked so that the object will get updated when the report is opened. Then manually update this file in a specified location with the necessary document so that when the report is opened it will check the underlying file and update what is seen within the report.
    Note: This will be static for the entire report, so if you want this document to be different for various records or sections in the report then that will not be possible and you will need to insert separate OLE Object and conditionally suppress what is to be displayed.
    2. Convert the word document into text and store this with a database text field (using RTF tags if you want to have formatting in the text such as Bold, font colors etc). This would allow the data to be dynamic and change on a per record basis.
    The dynamic graphic location formula within the picture tab will only work with image files, this formula option will not work to dynamically retrieve Word documents or PDF files based on criteria within the report.

  • Loading image in to a word document

    Hello guys,
    I hava an image( .bmp file) on the desktop, through java program can I create/load the same image in to a word Document?

    JavaBeg_Student wrote:
    I hava an image( .bmp file) on the desktop, through java program can I create/load the same image in to a word Document?Create a new or modify an existing Word document?
    If creating a new, then throw Word out the window and use RTF (give it a .doc extention and no one will ever know). Then maybe the [javax.swing.text.rtf|http://java.sun.com/javase/6/docs/api/javax/swing/text/rtf/package-summary.html] package will do the job, if not create a simple XSL-FO and use FOP.
    If existing then [Java libraries to read and write Word DOC files|http://java.sun.com/javase/6/docs/api/javax/swing/text/rtf/package-summary.html]

  • How to convert a Word document to text or html in an ABAP program

    Hi,
    At my client's site, for the recruitment system, they have the word processing system set to RTF, instead of SAP Script. This means that all the correspondence is in Word format. A standard SAP program takes the word letter, loads word, does the mail merge with the applicant's info and then sends the document to a printer.
    The program name is RPAPRT05. The program creates a document proxy (interface I_OI_DOCUMENT_PROXY) and manipulates the document using the methods of the interface.
    Now what we want to do is to instead of sending the document to a printer, we want to email the document contents to the applicant. But I don't know how to get the content from the Word document into text or html format so that I can make an email from it.
    I know I can send an email with the word document as an attachment, but we'd prefer not to do that.
    I would appreciate any help very much.
    Thanks

    Ok, here's what I ended up doing:
    First of, in order to call FM 'CONVERT_RTF_TO_ITF' you need the RTF document in a table with line length 156. The document is returned from FM 'DP_CREATE_URL' in a table with line length 132. So first I convert the table:
        Transform data table from 132 character lines to
        256 character lines
          LOOP AT data_table INTO dataline.
            IF newrow = 'X'.
            Add row to new table
              APPEND INITIAL LINE TO xdatatab ASSIGNING .
              newrow = space.
            ENDIF.
          Convert the raw line of old table to characters
            ASSIGN dataline TO .
          Check line lengths to determine how to add the
          next line of old table
            newlinelen = STRLEN( newline ).
            ADD addspaces TO newlinelen.
            linepos = linemax - newlinelen.
            IF linepos > datalen.
            Enough space available in new table line for all of old table line
              newline+newlinelen = oldline.
              oldlinelen = STRLEN( oldline ).
              addspaces = datalen - oldlinelen.
              CONTINUE.
            ELSE.
            Fill up new table line
              newline+newlinelen(linepos) = oldline(linepos).
              ASSIGN newline TO .
              newrow = 'X'.
            Save the remainder of old table to the new table line
              IF linepos < datalen.
                oldlinelen = STRLEN( oldline ).
                addspaces = datalen - oldlinelen.
                CLEAR newline.
                newline = oldline+linepos.
              ELSE.
                CLEAR newline.
              ENDIF.
            ENDIF.
          ENDLOOP.
        Write the last line to the table
          IF newrow = 'X'.
            APPEND INITIAL LINE TO xdatatab ASSIGNING .
    Next I call FM 'CONVERT_RTF_TO_ITF' to get the document in SAPScript format:
        Convert the RTF format to SAPScript
          CALL FUNCTION 'CONVERT_RTF_TO_ITF'
            EXPORTING
              header            = dochead
              x_datatab         = xdatatab
              x_size            = xsize
            IMPORTING
              with_tab_e        = withtab
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              missing_size      = 2
              OTHERS            = 4.
    This returns the document still containing the mail merge fields which needs to be filled in:
          LOOP AT itf_table INTO itf_line.
            WHILE itf_line CS '«'.
              startpos = sy-fdpos + 1.
              IF itf_line CS '»'.
                tokenlength = sy-fdpos - startpos.
              ENDIF.
              token = itf_line+startpos(tokenlength).
              REPLACE '_' IN token WITH '-'.
              ASSIGN (token) TO .
              ENDIF.
              MODIFY itf_table FROM itf_line.
            ENDWHILE.
          ENDLOOP.
    And finally I use FM 'CONVERT_ITF_TO_ASCII' to convert the SAPScript to text. I set the line lengths to 60, since that's a good length to format emails to.
        Convert document to 60 char wide ascii document for emailing
          CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
            EXPORTING
              formatwidth       = 60
            IMPORTING
              c_datatab         = asciidoctab
              x_size            = documentsize
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              OTHERS            = 2.
    And then the text document gets passed to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as the email body.

  • How to open word document form html container url iam getting internal_error while opening file

    Hi all,
    By using below code i am able to download word document file from html container. But before downloading i need edit these document to add Macro.
    I am unable to open word document.
    CREATE OBJECT G_HTML_CONTAINER
          EXPORTING
            CONTAINER_NAME = 'PDF'.
       CREATE OBJECT G_HTML_CONTROL
          EXPORTING
            PARENT = G_HTML_CONTAINER.
    * Convert xstring to binary table to pass to the LOAD_DATA method
        CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
          EXPORTING
            BUFFER     = LV_CONTENT
          TABLES
            BINARY_TAB = LT_DATA.
    data_tab = LT_DATA ).
    * Load the HTML
        CALL METHOD G_HTML_CONTROL->LOAD_DATA(
           EXPORTING
             TYPE         = 'application'
             SUBTYPE      = 'DOC'
           IMPORTING
             ASSIGNED_URL         = LV_URL
           CHANGING
             DATA_TABLE           = LT_DATA
           EXCEPTIONS
             DP_INVALID_PARAMETER = 1
             DP_ERROR_GENERAL     = 2
             CNTL_ERROR           = 3
             OTHERS               = 4 ).
    * Show it
        CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
          IN_PLACE = 'X' ).
    Before file download i want edit the file for that i am using below class.
    PROXY TYPE REF TO I_OI_DOCUMENT_PROXY.
    by using (get_document_proxy) method  getting proxy .
    call method control->get_document_proxy
    exporting
    document_format   = 'x'
    document_type      = 'Word.Document'
    register_container  = 'x'
    importing
    document_proxy     = proxy
    after these.
    call method proxy->open_document
    exporting
    document_url    = lv_url
    open_inplace    = 'x'
    hear i m getting retcode as INTERNAL ERROR
    can any one suggest me how to open document from html container.
    Thanks and reagards
    jogu yadav

    I got resolution
    Thanks and regards,
    Jogu yadav

  • Hyperlink on html to a word document does not navigate to the bookmark

    i am trying to navigate to a word document bookmark from an html page
    <p><a href = "file:///D:\temp.docx#my_bookmark">my_bookmark</a></p>
    When we click on the link, we get a pop up from internet explorer asking "What do you want to do with temp.docx?"
    When, we click on "Open", the work document opens up but does not navigate to the bookmark.
    i am able to navigate to the same bookmark when i create a hyperlink inside another word document
    ie. navigation from one word document to another work document bookmark works.
    i am using windows 7  , microsoft office 2010 
    Thanks for your Support

    Hi,
    After adding this link into your HTML page, did you check the URL of the link in browser? Did you see the complete URL with the
    #my_bookmark at the end?
    It should be a query about HTML code, there is not so much we can do on Office client side. For your case, I would suggest you post in the MSDN forum of
    Word for developer, where you can get more experienced responses.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to display word document as a HTML document in portal

    Hi
    I developed a portal application in that i am displaying word document using IFrames, from my application i am uploading word document and saving those document in KM
    Requirement is that i need to provide an option to show this word document in html.
    Thanks
    Rudradev.

    Hi Glenn Mendonca
    I thing it is possible
    Even in SDN search results page, we have option called "HTML version" link
    to see the search document in HTML
    see the below url
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2fforums%2fsdn_forums%2fthread%7b74687265616449443d39313633%7d.jspa
    i hope passing doucment as a query parameter to com.sap.km.cm.highlightedcontent?DocumentUri=
    might solve this
    pls give your inputs
    Thanks

  • How to display a word document in KM as html format

    Hi
    I developed a portal application in that i am displaying word document using IFrames, from my application i am uploading word document and saving those document in KM
    Requirement is that i need to provide an option called "HTML Version" to show this word document in html.
    Thanks
    Rudradev.

    Hi E. van der Palen ,
    I did it using TREX API
    Thanks & Regards
    Rudra

  • Opening a Word document in a form layout html region

    Hi all,
    In an Interactive Report I use
    select '<img src="#WORKSPACE_IMAGES#'||package.f_get_document_type ( doc.id )||'" title="Document" width=20 height=20>'
    ) document
    from table
    to show an icon that eventually downloads (and shows) a word document.
    Now I have a form layout html region and I want to have the same icon\link to show a document.The document however is not in the same table as the rest of the page is based on.
    How can I show the document on this page?
    Kind Regards,
    Maurice
    Environment = Apex 4.0 database 11G
    Edited by: maurice.niezen on Aug 31, 2010 2:10 AM

    One way, create a hidden item, and return the value into it from your package (by having a computation that calls the function package.f_get_document_type(:P1_DOC_ID) . Let's say it's called :P1_DOC_TYPE
    There's a new item type in Apex 4, which is Display Image.
    When you get to settings in the item creation wizard, specify what the image is based on. From there, you can set it to be 'Image URL stored in Page item Value. Then on the source page, you can just specify the URL, #WORKSPACE_IMAGES#&P1_DOC_TYPE.

Maybe you are looking for