How to open word document from application server?

hello ,
I want to open a word document that is placed on the application server.
the function module 'ws_execute' works fine for displaying documents placed on ur local file system. But if i want to open from application server, what needs to b done?
i m referring to the following demo program 'SAPRDEMOOFFICEINTEGRATION'
is this the correct reference or there is some other way to do the same?
kindly help.
Regards,
Roshani

Hi Roshani,
          The solution is like this.
1> Execute - this is the solution to your program. The file is generated and put in the Application Server for the data to be sent by some means to the intended Place.
2> To Display/View - This is for the person (who runs the program) to view if the output generated is correct or not.
         So to accomplish this use the same internal table for both Open Dataset and Gui download.
Open dataset puts data onto the Application server and Gui_download puts the data onto the Desktop or Presentation server for the user to see the data thats fetched.
So use them as directed to achieve the desired output.
Reward Points.
Thanks,
Tej..

Similar Messages

  • HOW TO OPEN WORD DOCUMENT FROM JAVA???

    hi everyone! Can you please help me to come with this problem? Let me to set my main target I want to achieve:
    1) In my program user should first press a button;
    2) Then already created Word Document should be opened (I DO NOT NEED to open that Word Document in Java or something like JField). Just simply it should be opened as a Microsoft Word Document.
    I DO NEED YOUR HELP! PLEASE HELP ME....!

    Running cmd using the exec is also a windows only solution, there is no "more" or "less" it that solution compared to the rundll.
    Since word is a windows format its pretty obvious that the application is ran under windows platform.
    If you are running on a different platform (maybe using open office you can open word documents, i'm not sure) you might want to use the JDIC library (https://jdic.dev.java.net/) which enables you to open/edit/browse such files using the default viewer/editor/browser of the system you are working on.
    Look at the org.jdesktop.jdic.desktop.Desktop object for these methods.
    You can also find the Desktop object in J2SE6 but its still in beta.

  • How to upload XML file from Application server.

    Hi,
    How to upload XML file from Application server.Please tell me as early as possible.
    Regards,
    Sagar.

    Hi,
    parameters : p_file type ibipparms-path obligatory.
    ***DOWNLOAD---->SAP INTO EXCEL
    filename1 = p_file.
    call function 'GUI_DOWNLOAD'
      exporting
      BIN_FILESIZE                    =
        filename                        = filename1
        filetype                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      tables
        data_tab                        = it_stock
      FIELDNAMES                      =
    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.
    Regards,
    Deepthi.

  • I can't open word documents from Finder

    I can't open word documents from Finder

    If you mean "I can't double click a *doc file and make word open" then you highlight the file and do a command-I (or get info).  When the window comes up, change the "open with" parameter.  You can also right click and select "other"

  • Open word document from oracle forms 10g

    Hi,
    Could any one please guide me how to open a word document from forms 10g on client machine (windows). My word document resides on application server (unix).
    Thanks for the help in advance.

    I tried that, but it doesn't work.
    What I have done is, I have written a java code that has a function ope_word that opens up a word document. I have created jar out of it called wordbean.jar.
    Add this wordbean.jar in $ORACLE_HOME/forms/java directory and also added in the formsweb.cfg file (archive_jini=wordbean.jar)
    Then I created a form and usinf fbean.register and fbean.invoke functions of forms, I am trying to call wordbean.jar.
    F.bean.register is registering all the components of wordbean.jar but it is not opening the word document.
    Could you please help ??

  • 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

  • How to bring the data from application server to presentation server

    hi,
    i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this  topic.folowing is the code .
    *& Report  ZPFA_HIER_LOAD
    REPORT  ZFPA_HIER_LOAD.
    *---- Declaration of Oracle connectioN
    DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
    DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
    DATA : mfilename type string.
    data: begin of matab1 occurs 0,
          MFL1(9) TYPE C,
          MFL2(5) TYPE C,
          MFL3(9) TYPE C,
          MFL4(2) TYPE C,
          MFL5(8) TYPE C  ,
         end of matab1 .
    data: setid(8) type c.
    data: begin of source occurs 0,
          setid(8) type c,
          end of source.
    *PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
    *PARAMETERS : m_bsenty(8). " type c obligatory.
    *mfilename = P_PFILE.
    EXEC SQL.
      SET CONNECTION :con_name
    ENDEXEC.
    EXEC SQL.
      CONNECT TO :con_name
    ENDEXEC.
    EXEC SQL PERFORMING get_source.
      SELECT set_id FROM UNIT_SET INTO
      :setid
      ORDER BY SET_ID
    ENDEXEC.
    start-of-selection.
    LOOP AT SOURCE.
      REFRESH matab1. CLEAR matab1.
      EXEC SQL PERFORMING evaluate.
    SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
    :MFL5
    where set_id = :SOURCE-SETID ORDER BY MEM_ID
      ENDEXEC.
      if SOURCE-SETID = '80000000'.
       mfilename = '/tmp/aesorg'.
      elseif SOURCE-SETID = '80000006'.
       mfilename = '/tmp/Consolidation_Manager'.
      elseif SOURCE-SETID = '80000010'.
       mfilename = '/tmp/10org'.
      elseif SOURCE-SETID = '80000012'.
       mfilename = '/tmp/20org'.
      elseif SOURCE-SETID = '80000018'.
       mfilename = '/tmp/30org'.
      elseif SOURCE-SETID = '80000025'.
       mfilename = '/tmp/40org'.
      Endif.
      mfilename = '/usr/test.dat'.
    ************************This was i tried***********************
      open dataset mfilename for output in text mode encoding default." IN
    *TEXT MODE ENCODING DEFAULT.
    if sy-subrc <> 0.
    exit.
    endif.
    close dataset mfilename.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         FILENAME         = MFILENAME
         FILETYPE         = 'ASC'
       TABLES
         data_tab         = matab1
       EXCEPTIONS
         file_write_error = 1
         invalid_type     = 2
         no_authority     = 3
         unknown_error    = 4
         OTHERS           = 10.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
      clear matab1.
    ENDLOOP.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
    close dataset mfilename.
         MFL5 = '0'.
       CLEAR MFL5.
    FORM evaluate.
      if MFL5 = -1.
        MFL5 = ''.
      ENDIF.
      concatenate MFL1 ','   into MFL1.
      concatenate MFL1 ','   into MFL3.
      matab1-MFL1 = MFL1.
      matab1-MFL2 = 'ZBUE,'.
      matab1-MFL3 = MFL3.
      matab1-MFL4 = ' ,'.
      matab1-MFL5 = MFL5.
      append matab1 .
      CLEAR MFL1.
      CLEAR MFL2.
      CLEAR MFL3.
      CLEAR MFL4.
      CLEAR MFL5.
    ENDFORM.
                     "evaluate
    *&      Form  GET_SOURCE
          text
    FORM GET_SOURCE.
      source-setid = setid.
      append source.
      clear source.
    ENDFORM.                    "GET_SOURCE

    Hi Rammohan,
    You cannot use OPEN DATASET to transfer data from application server to presentation server.
    You can do the following :
    <b>Do 1st point in BACKGROUND</b>
    1. Read the data file from application server into an internal table using OPEN DATASET
    <b>Do 2nd point in Foreground</b>
    2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
    You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
    Best regards,
    Prashant

  • How to upload .CSV file from Application Server

    Hi Experts,
        How to upload .CSV file separated by ',' from Application server to an internal table.
    Invoice No,Cust No,Item Type,Invoice Date,days,Discount Amount,Gross Amount,Sales Amount,Customer Order No.,Group,Pay Terms
    546162,3233,1,9/4/2007,11,26.79,5358.75,5358.75,11264,HRS,11
    546163,2645,1,9/4/2007,11,3.07,305.25,305.25,10781,C,11
    Actually I read some already answered posts. But still I have some doubts.
    Can anybody please send me the code.
    Thanks in Advance.

    Hi Priya,
    Check this code
    Yhe logic used here is as follows,
    Get all the data into an internal table in the simple format ie: a row with one field contains an entire line
    After getting the data, we split each line of the table on every occurrence of the delimiter (comma in your case)
    Here, I have named the fields as field01, field02 etc, you could use your own names according to your requirement
    parameters: p_file(512).
      DATA : BEGIN OF ITAB OCCURS 0,
              COL1(1024) TYPE C,
             END OF ITAB,
             WA_ITAB LIKE LINE OF ITAB.
      DATA: BEGIN OF ITAB_2 OCCURS 0,
        FIELD01(256),
        FIELD02(256),
        FIELD03(256),
        FIELD04(256),
        FIELD05(256),
        FIELD06(256),
        FIELD07(256),
        FIELD08(256),
        FIELD09(256),
        FIELD10(256),
        FIELD11(256),
        FIELD12(256),
        FIELD13(256),
        FIELD14(256),
        FIELD15(256),
        FIELD16(256),
       END OF ITAB_2.
      DATA: WA_2 LIKE LINE OF ITAB_2.
        OPEN DATASET p_FILE FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
        IF SY-SUBRC = 8.
          WRITE:/ 'File' , p_FILE , 'cannot be opened'.
          LV_LEAVEPGM = 'X'.
          EXIT.
        ENDIF.
        WHILE SY-SUBRC <> 4.
          READ DATASET p_FILE INTO WA_ITAB.
          APPEND WA_ITAB TO ITAB.
        ENDWHILE.
        CLOSE DATASET p_FILE.
      LOOP AT ITAB INTO WA_ITAB.
        SPLIT WA_ITAB-COL1 AT ','    " where comma is ur demiliter
         INTO WA_2-FIELD01 WA_2-FIELD02 WA_2-FIELD03 WA_2-FIELD04
         WA_2-FIELD05 WA_2-FIELD06 WA_2-FIELD07 WA_2-FIELD08 WA_2-FIELD09
         WA_2-FIELD10 WA_2-FIELD11 WA_2-FIELD12 WA_2-FIELD13 WA_2-FIELD14
         WA_2-FIELD15 WA_2-FIELD16.
        APPEND WA_2 TO ITAB_2.
        CLEAR WA_2.
      ENDLOOP.
    Message was edited by:
            Kris Donald

  • How to delete a file from application server?

    Hi gurus,
    i want delete a file from application server . can any one tell me the BAPI/Fm .
    thanks in advance

    See the replies of the thread;
    How to delete  File from the Application Server,ABAP
    But i can smell something fishy in both  The specified item was not found. and The specified item was not found. style of posting questions. Also both of you have similar questions in your profile....
    Hmmm, Mods have to take care of the Rest...
    Regards
    Karthik D

  • How to display a file from Application server without downloading it to local drive

    I want to dispaly a file from Application server without downloading it to my local system.
    i tried the below method but it didn't work.
         CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
          EXPORTING
            APPLICATION            = L_FILE
            DEFAULT_DIRECTORY      = L_DIR

    Hi,
    Use open dataset to read file from application server.
    try like this sample code:
    data : p_file like ibipparms-path.
    data : rec(350) type c.
    data:  g_delimiter(1) type c value ','.
    maintain the file path in p_file. then
    open dataset p_file for input in text mode encoding default.
       IF SY-SUBRC = 0.
    do n times.
    READ dataset p_file into rec.
    split rec at g_delimiter into your internal table fields like it-id it-name it-age.
    append it.
    clear it.
    enddo.
    close dataset p_file.
    Now you have the data in internal table it.

  • How to copy a file from application server to local system

    Guys,
    Need to copy a file from application server to local system.Is there an FM for the same.
    Tried searching for it but couldn't find anything useful.
    Code snippets will be highly appreciated.
    Warm Regards,
    P.
    Moderator message: very frequently asked and answered question, obviously you did not search thoroughly, all points removed.
    Edited by: Thomas Zloch on Dec 3, 2010 4:48 PM

    hi,
    You can use the transactions CG3Y or through program u can do like this..
    DATA: BEGIN OF IT_FILE OCCURS 0,
                    LINE TYPE STRING,
               END OF IT_FILE.
    OPEN DATASET <file_name>  FOR INPUT IN TEXT MODE ENCODING DEFAULT.
            IF SY-SUBRC IS INITIAL.
              DO.
                READ DATASET<file_name> INTO IT_FILE-LINE.
                IF SY-SUBRC = 0.
                  APPEND IT_FILE.
                  CLEAR IT_FILE.
                ELSE.
                  EXIT.
                ENDIF.
              ENDDO.
            ENDIF.
    CLOSE DATASET <file_name>.
    Download it to local system using  FM - GUI_DOWNLOAD

  • How to upload a file from application server?

    Hi experts,
    I am going to create a conversion program using call function 'HR_INFOTYPE_OPERATION'.In my conversion I am going to upload per_area,emp_subgroup,payroll_area,work contract and orgn_key for the infotype IT0001 and the input file is from application server.I am using check boxes for these 5 fields and  for the fields I am selecting the checkbox.I want to upload the datas in the IT0001 using HR_INFOTYPE_OPERATION.That is using the call transaction function.Its urgent give me some ideas or codings for that infotype updating.
    Thanks,
    Sakthi.C

    Hi
    you can use <b>open dataset for input</b>,<b>Read dataset</b> for uploading data from a application server.
    Message was edited by:
            Raghu Reddy

  • How to open word doc. from forms 10g

    hi all
    i am trying to open word doc. from forms 10g using ole2.
    but it is not working.
    basiccaly this command is not working
    app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
    can anybody help
    thanx

    I found this searching this forum and it works..however, my issue is to open up Microsoft Word passing in data from a query.
    I am working on Forms 10g
    DECLARE AppID PLS_INTEGER;
    BEGIN
    AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\OFFICE11\winword.exe C:\test.doc',
    DDE.APP_MODE_NORMAL);
    END;

  • How to open word document in labview

    Hi,
    I want to open word document in labview,well i have done that.
    I want to display only the page part,don't want any editions,formatting to be done.
    please suggest me solution if any.

    How are you displaying your Word document, have you achieved that already?
    As far as I know, there is only one way to display Word documents and that's through the browser ActiveX interface:
    Using the Microsoft Web Browser control to embed a Word Document in LabVIEW
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • How to download a file from application server to presentation server

    Hi experts,
    I want to download a file from application server to presentaion server, file contaims three fields customer name, customer email id and status..
    help me out i m new into sap.

    Dear Aditya,
    Please check below thread
    http://scn.sap.com/thread/1010164
    it will help you.
    BR
    Atul

Maybe you are looking for

  • Best way to deal with Mutating table exception with Row Level Triggers

    Hello, It seems to be that the best way to deal with Mutating Table exception(s) is to have to put all the trigger code in a package & use it in conjunction with a Statement level trigger . This sounds quite cumbersome to me . I wonder is there any a

  • File Adapter - NFS - Windows NT

    I am trying to drop file into another server. Both PI and Target Server are in Windows environment. From PI Server, I am able to reach target folder  from Windows Explorer ( <Target IP>\<folder> ) But when I give the same path in File adapter its shw

  • How to make more space on my startup disk

    I keep getting messages that I don't have enought space on my startup disk, I was wondering if I can download a program so see how I can clean it up, or see which files are using most of my disk to delete them or to put them in an external hard drive

  • 7300GS has died, is it still under warranty?

    My NX7300GS-MD256EH (DVI/HDMI) has died, does not output anything via either socket. The serial no is 602-V080-02SB0611xxxxxx so I take it manufacture date is Nov 06, so would still be under warranty. Is this correct? If so, what should I do about ge

  • Word pagination not correct in converted files

    We use word 2007 pagination in headers of documents, but sometimes when these docments are converted to pdf they don't paginate correctly.  For example the word doc is 20 pages so the pagination say X of 20.  But when converted each page says 1 of 1,