OLE object -Properties/Parameters of a method

HI,
  Sample code,
CREATE OBJECT application 'excel.application'.
SET PROPERTY OF application 'visible' = '1'.
CALL METHOD OF application 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
GET PROPERTY OF cells 'Font' = gs_font .
SET PROPERTY OF gs_font  'Bold' = 1.
SET PROPERTY OF gs_font 'ColorIndex' = 5.
SET PROPERTY OF cells 'Value' = 'Server name'.
In this sample code , properties Visible, Bold, Colorindex, Value are set to some values.
How to find these properties ?
In which DB Table they are stored ?
How to get all the properties/parameters of a method ?
All are concerned with ABAP OLE Objects .
Pls help regarding this .

Hi
Try make in Excel a macro, which do what you need  and analyse than the code of the macro.
It is very helpfull to find the properites.
JS

Similar Messages

  • OLE objects and OO methods - Error using OLE automation

    Hi,
    I'm developing an class to read/write excel sheets and i'm getting an error on the OLE method that is:
    on this instruction
    call method of l_obj_excel 'WORKBOOKS' = l_workb_col.
    i got a dump that give me the following error UC_OBJECTS_NOT_CONVERTIBLE
    The strange is that i've got the same code running on reports and it works fine only when passing it to a oo method i get that dump.
    Thzs in advanced to all
    Best regards
    Jaime

    hi check this..
    Report ZMULTICOLOR_TEST no standard page heading.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    include ole2incl.
    handles for OLE objects
    data: h_excel type ole2_object,        " Excel object
          h_mapl type ole2_object,         " list of workbooks
          h_map type ole2_object,          " workbook
          h_zl type ole2_object,           " cell
          h_f type ole2_object,            " font
          h_c type ole2_object.            " color
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    tables: spfli.
    data  h type i.
    table of flights
    data: it_spfli like spfli occurs 10 with header line.
    *&   Event START-OF-SELECTION
    start-of-selection.
    read flights
      select * from spfli into table it_spfli.
    display header
      uline (61).
      write: /     sy-vline no-gap,
              (3)  'Flg'(001) color col_heading no-gap, sy-vline no-gap,
              (4)  'Nr'(002) color col_heading no-gap, sy-vline no-gap,
              (20) 'Von'(003) color col_heading no-gap, sy-vline no-gap,
              (20) 'Nach'(004) color col_heading no-gap, sy-vline no-gap,
              (8)  'Zeit'(005) color col_heading no-gap, sy-vline no-gap.
      uline /(61).
    display flights
      loop at it_spfli.
        write: / sy-vline no-gap,
                 it_spfli-carrid color col_key no-gap, sy-vline no-gap,
                 it_spfli-connid color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityfrom color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityto color col_normal no-gap, sy-vline no-gap,
                 it_spfli-deptime color col_normal no-gap, sy-vline no-gap.
      endloop.
      uline /(61).
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-007
           exceptions
                others     = 1.
    start Excel
      create object h_excel 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      set property of h_excel  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'  .
    PERFORM ERR_HDL.
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-008
           exceptions
                others     = 1.
    get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
      perform err_hdl.
    add a new workbook
      call method of h_mapl 'Add' = h_map.
      perform err_hdl.
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-009
           exceptions
                others     = 1.
    output column headings to active Excel sheet
      perform fill_cell using 1 1 1 200 'Carrier id'(001).
      perform fill_cell using 1 2 1 200 'Connection id'(002).
      perform fill_cell using 1 3 1 200 'City from'(003).
      perform fill_cell using 1 4 1 200 'City to'(004).
      perform fill_cell using 1 5 1 200 'Dep. Time'(005).
      loop at it_spfli.
    copy flights to active EXCEL sheet
        h = sy-tabix + 1.
        if it_spfli-carrid cs 'AA'.
          perform fill_cell using h 1 0 000255000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'AZ'.
          perform fill_cell using h 1 0 168000000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'JL'.
          perform fill_cell using h 1 0 168168000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'LH'.
          perform fill_cell using h 1 0 111111111 it_spfli-carrid.
        elseif it_spfli-carrid cs 'SQ'.
          perform fill_cell using h 1 0 100100100 it_spfli-carrid.
        else.
          perform fill_cell using h 1 0 000145000 it_spfli-carrid.
        endif.
        if it_spfli-connid lt 400.
          perform fill_cell using h 2 0 255000255 it_spfli-connid.
        elseif it_spfli-connid lt 800.
          perform fill_cell using h 2 0 077099088 it_spfli-connid.
        else.
          perform fill_cell using h 2 0 246156138 it_spfli-connid.
        endif.
        if it_spfli-cityfrom cp 'S*'.
          perform fill_cell using h 3 0 155155155 it_spfli-cityfrom.
        elseif it_spfli-cityfrom cp 'N*'.
          perform fill_cell using h 3 0 189111222 it_spfli-cityfrom.
        else.
          perform fill_cell using h 3 0 111230222 it_spfli-cityfrom.
        endif.
        if it_spfli-cityto cp 'S*'.
          perform fill_cell using h 4 0 200200200 it_spfli-cityto.
        elseif it_spfli-cityto cp 'N*'.
          perform fill_cell using h 4 0 000111222 it_spfli-cityto.
        else.
          perform fill_cell using h 4 0 130230230 it_spfli-cityto.
        endif.
        if it_spfli-deptime lt '020000'.
          perform fill_cell using h 5 0 145145145 it_spfli-deptime.
        elseif it_spfli-deptime lt '120000' .
          perform fill_cell using h 5 0 015215205 it_spfli-deptime.
        elseif it_spfli-deptime lt '180000' .
          perform fill_cell using h 5 0 000215205 it_spfli-deptime.
        else.
          perform fill_cell using h 5 0 115115105 it_spfli-deptime.
        endif.
      endloop.
    EXCEL FILENAME
      CONCATENATE SY-REPID '_' SY-DATUM6(2) '_' SY-DATUM4(2) '_'
                  SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
      CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
      free object h_excel.
      perform err_hdl.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    form fill_cell using i j bold col val.
      call method of h_excel 'Cells' = h_zl
        exporting
          #1 = i
          #2 = j.
      perform err_hdl.
      set property of h_zl 'Value' = val .
      perform err_hdl.
      get property of h_zl 'Font' = h_f.
      perform err_hdl.
      set property of h_f 'Bold' = bold .
      perform err_hdl.
      set property of h_f 'Color' = col.
      perform err_hdl.
    endform.                    "FILL_CELL
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    form err_hdl.
      if sy-subrc <> 0.
        write: / 'OLE-Automation Error:'(010), sy-subrc.
        stop.
      endif.
    endform.                    " ERR_HDL
    regards,
    venkat

  • Methods of OLE-objects with IN OUT parameter

    How can I invoke a method of an OLE-object with IN OUT parameter?
    Trying
    obj := CREATE_OLEOBJ(localobject VARCHAR2, TRUE);
    INIT_OLEARGS (n+1);
    ADD_OLEARG (newvar_1 NUMBER/VARCHAR2, vtype VT_TYPE := VT_R8/VT_BSTR);
    ADD_OLEARG (newvar_n NUMBER/VARCHAR2, vtype VT_TYPE := VT_R8/VT_BSTR);
    CALL_OLE(obj OLEOBJ, memberid PLS_INTEGER);
    newvar_x := GET_OLEARG_<type>(x);
    I get the old value of newvar_x, but it must be changed
    Methods with only IN parameter work fine.
    I've tried this with OLE2-package, but it hasn't worked too
    Can somebody help
    Thanks

    Hi Gurus
    I know this is very old post.
    but dose anybody know the answer.
    thanks

  • Header and footer in excel sheet (ole object)

    How can we generate footer and header in an excel sheet with ole object ?
    Thanks

    hi brian,
    Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT
    *Title : Excel Uploading
    TYPES:   BEGIN OF t_datatab,
             col1(25)  TYPE c,
             col2(30)  TYPE c,
             col3(30)  TYPE c,
             col4(30)  TYPE c,
             col5(30)  TYPE c,
             col6(30)  TYPE c,
             col7(30) TYPE c,
             col8(30)  TYPE c,
             col9(30)  TYPE c,
             col10(30)  TYPE c,
             col11(30)    TYPE c,
           END OF t_datatab.
    DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
          wa_datatab TYPE t_datatab.
    Data : p_table type t_datatab occurs 0 with header line.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '1',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i.
    field-symbols : <fs>.
    *Selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_file LIKE rlgrap-filename
                   DEFAULT 'c:\test.xls' OBLIGATORY.   " File Name
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      REFRESH: it_tab.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select File'
          default_filename = '*.xls'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      LOOP AT it_tab INTO p_file.
       so_fpath-sign = 'I'.
       so_fpath-option = 'EQ'.
       append so_fpath.
      ENDLOOP.
    START-OF-SELECTION.
      PERFORM upload_excel_file TABLES   it_datatab
                                 USING   p_file
                                         gd_scol
                                         gd_srow
                                         gd_ecol
                                         gd_erow.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3,
                wa_datatab-col4,
                wa_datatab-col5,
                wa_datatab-col6,
                wa_datatab-col7,
                wa_datatab-col8,
                wa_datatab-col9,
                wa_datatab-col10,
                wa_datatab-col11.
      ENDLOOP.
    *&      Form  UPLOAD_EXCEL_FILE
          upload excel spreadsheet into internal table
         -->P_TABLE    Table to return excel data into
         -->P_FILE     file name and path
         -->P_SCOL     start column
         -->P_SROW     start row
         -->P_ECOL     end column
         -->P_EROW     end row
    FORM upload_excel_file TABLES   p_table
                           USING    p_file
                                    p_scol
                                    p_srow
                                    p_ecol
                                    p_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
    Has the following format:
                Row number   | Colum Number   |   Value
         i.e.     1                 1             Name1
                  2                 1             Joe
      DATA : ld_index TYPE i.
    Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename                = p_file
          i_begin_col             = p_scol
          i_begin_row             = p_srow
          i_end_col               = p_ecol
          i_end_row               = p_erow
        TABLES
          intern                  = LT_INTERN
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'Error Uploading file'.
        EXIT.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
         MOVE lt_intern-col TO ld_index.
         assign component ld_index of structure
         p_table to <fs>.
    move : lt_intern-value to <fs>.
        MOVE lt_intern-value TO p_table.
          AT END OF row.
            APPEND p_table.
            CLEAR p_table.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "UPLOAD_EXCEL_FILE
    thanks
    abdul

  • Automating Importing a Visio OLE Object or Changing the Source of a Previously Imported OLE Object

    My colleagues and I import our Visio files into FrameMaker 10 via the following mechanism: File > Import > Object... > Create from File (with Link checked).  We do this because, for us, the benefits of object linking and embedding outweight the pitfalls. In order to institute and automate a graphic file naming convention, I want to be able to do one of the following using ExtendScript:
    Replace each Visio OLE object with that of a renamed or new Visio file. (I've tried using the Import() method  with many different import-script settings, but have not found the correct import-script, if such a thing exists for importing Visio files  imported by reference and linked as OLE objects. My typical error when attempting this is FV_DisallowedImportType, which indicates the source file type is disallowed by my import-script settings. When I talk about my import-script settings, I'm referring to the adjustments that I make to the parameters returned from a call to GetImportDefaultParams().  I've tried numerous import-script combinations but have had no luck. )
    Rename the Visio source file and change the source file of an already-linked Visio OLE object.  (To do this, I need to determine how to implement a script that equals the following user actions while a FM document is open: clicking on Links... under the Edit menu to bring-up the Links window; selecting each link displayed in the Links window; clicking the Change Source button for each selected link; entering the new file name in the File name field of the Change Source window; clicking Open.  Needless to say, I found nothing in the ExtendScript capabilities that indicates that this approach is doable. It may be doable using FDK F_Codes, I haven't explored that avenue and would like to avoid it.)
    Modify the OLE2 facet such that it points to the renamed file instead of the previous name for the file.  (This does not seem like a clean approach.  As is the case now, I don't know how to properly update the facet with the new file name.  I've experimented with simply changing the file name strings from new to old, but that does not work.  There's probably some error-checking or checksum that needs to be recomputed.  Bottom line: I don't know enough about facets.)
    Any help would be greatly appreciated.
    Thanks, Paul

    Hi Paul,
    I tried doing something like this years ago with FrameScript, but found out that the OLE stuff is not exposed to FrameScript or the FDK. So it is probably not exposed to ExtendScript either. When you query an OLE graphic's InsetFile property, it returns a null string, the same as a graphic Imported by Copy would. As far as I can see, importing as an OLE object is only available through the Windows FrameMaker interface.
    Rick

  • Invoking Openoffice calc through ABAP OLE Object

    I want to show the output of my ABAP process  through openoffice calc worksheet.
    I tried to invoke calc using ABAP OLE object.
    But even a blank calc sheet is not getting opened with the following statements.
    Type-pools: OLE2.
    TYPES:
    service_manager type OLE2_OBJECT,
    DESKTOP type OLE2_OBJECT,
    DOCUMENT type OLE2_OBJECT.
    CREATE OBJECT service_manager 'com.sun.star.ServiceManager'.
    CALL METHOD OF SERVICE_MANAGER 'createInstance' = DESKTOP
    EXPORTING #1 = 'com.sun.star.frame.Desktop'.
    CALL METHOD OF DESKTOP 'loadComponentFromURL' = DOCUMENT
    EXPORTING #1 = 'private:factory/scalc'
              #2 = '_blank'
              #3 = 0
              #4 = '' .
    What is wrong with this code?. Is there any other setting required at the system/OS/ABAP/BASIS
    level to invoke openoffice applications?.
    I have registered the classid for openservice manager in the transaction SOLE. Still it is not working.
    Iam able to invoke openoffice applications with Visual Basic/Power builder lanaguages.
    Please respond.
    Thanks in advance
    Liju

    I don't think it's possible.
    4th parameter of loadComponentFromURL method is an array ( http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XComponentLoader.html )
    Arrays are not supported as parameters in ABAP OLE Automation. (see note [633105|https://service.sap.com/sap/support/notes/633105] - OLE automation: ABAP type for OLE array parameters )

  • Error while creating the Ole Object (MSN Messenger)

    Hi,
    We are trying to send a mail by invoking MSN Messenger. We have imported "Messenger.MsgrObject" OLE Object and written the following code to logon to the Messenger.
    DECLARE
         MSGOBJ123 OLEOBJ;
         SRVOBJ123 OLEOBJ;
         SRVOBJ1234 OLEOBJ;
    BEGIN
         MSGOBJ123 := CREATE_OLEOBJ('Messenger.MsgrObject');
    -- Get all the services from the Messenger Object
         SRVOBJ123 := Messenger_IMsgrObject.Services(MSGOBJ123);
    -- Get one of the services
         SRVOBJ1234 := Messenger_IMsgrServices.Item(SRVOBJ123, 0);
         IF :TXTUSR = NULL THEN
         MESSAGE('User Name cannot be null');
         RAISE FORM_TRIGGER_FAILURE;
         ELSIF :TXTPWD = NULL THEN
         MESSAGE('Password cannot be null');
         RAISE FORM_TRIGGER_FAILURE;
         ELSE
    -- Log on to the Messenger By passing the MsgObject,
    -- User Name, password, Service Object
         Messenger_IMsgrObject.LogOn(MSGOBJ123, :LOGINBLK.TXTUSR, :LOGINBLK.TXTPWD, SRVOBJ1234);
         END IF;
    END;
    We get this error while executing this program
    "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-100504"
    Please advice whether there is way to solve this problem or any other method of accessing MSN Messenger.
    Thanks
    Vishwanath

    do a check on the wsdl file and how you are passing values in the proxy. The tags for XML are not correct. Open the WSDL in IE and see there must be an error. Or probably when passing the actual values to the XML generated each element is not closed properly. Error says tags dont match.
    Edited by: Kshamatha Eda on Mar 5, 2010 10:54 AM

  • Truncation of leading Zeros when Down Loading into Excel - OLE Objects

    Hi,
    Can any one help me on this.
    I am using <b>OLE Objects</b> to download Data into Excel Sheet. Data with leading Zeros is getting truncated in Excel.
    Ex: Report Output is showing Plant Number as 0002. But when i am downloading to Excel Plant value will become 2 .
       I would like to have it as 0002 in Excel.
    I have declared Werks as CHAR of 4.I am using OLE Obects for Downloading into Excel Sheet.
    I am using "OLE2_OBJECT" I can not use any other FMs to down load to Excel.As i am modifying this program not creating.
    Thanks In Advance.
    K.Nirmala
    Message was edited by: Nirmala Reddy

    Hi Nirmala,
    While downloading to excel sheet, u need to change the number format of cell from General to Text, then leading zero's won't get deleted. For that u need to set the property of the cell. Please check this sample code,
    INCLUDE OLE2INCL.
    tables : zobrent.
    data : it_kna1 type table of zobrent with header line.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    DATA  H TYPE I.
    DATA: cell1 TYPE ole2_object.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
      select * from zobrent into table it_kna1
               where zopanid = '10001'
                and zo_brent = '050'.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'EDate'.
      PERFORM FILL_CELL USING 1 2 1 'Brent'.
      PERFORM FILL_CELL USING 1 3 1 'Zopanid'.
      PERFORM FILL_CELL USING 1 4 1 'Contract Type'.
      PERFORM FILL_CELL USING 1 5 1 'Price Type'.
      PERFORM FILL_CELL USING 1 6 1 'Installation Type'.
      PERFORM FILL_CELL USING 1 7 1 'Volume'.
      PERFORM FILL_CELL USING 1 8 1 'AQ'.
      PERFORM FILL_CELL USING 1 9 1 '00000123'.
      LOOP AT IT_KNA1.
    copy values to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_KNA1-zo_effdat.
        PERFORM FILL_CELL USING H 2 0 IT_KNA1-zo_brent.
        PERFORM FILL_CELL USING H 3 0 IT_KNA1-zopanid.
      ENDLOOP.
      CALL METHOD OF h_excel 'Cells' = cell1
        EXPORTING
          #1 = 1
          #2 = 1.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
      if sy-subrc eq 0.
       write : / 'year'(001).
      endif.
         FORM FILL_CELL
    sets cell at coordinates i,j to value val boldtype bold
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ***Changing the format of the cell from General to Text
      <b>SET PROPERTY OF H_ZL 'NumberFormat' = '@'.</b>
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    U just paste this code in a sample program & see.
    Please reward, if found helpful.

  • OLE object using MS Word -- Unprotect/Protect document

    Hi.
    I'm on ECC6.0. I need a functionality to open a Word file (.rtf / .doc) on user's temp folder, unprotect it (like using Word's Tools -> Unprotect Document because, by default, the doc is protected w/o a password) to be able to protect it with a password, and then save it. I tried the following code but it's not working as I expected for the requirement:
    TYPE-POOLS: ole2.
    DATA:
    lo_word TYPE ole2_object,
    lo_worddocs TYPE ole2_object,
    lo_worddoc TYPE ole2_object.
            CREATE OBJECT lo_word 'WORD.Application'.
            GET PROPERTY OF lo_word 'Documents' = lo_worddocs.
            CALL METHOD OF lo_worddocs 'OPEN'
              EXPORTING
              #1 = lv_file_source.
            GET PROPERTY OF lo_word 'ActiveDocument' = lo_worddoc.
            CALL METHOD OF lo_worddoc 'UNPROTECT'.
            CALL METHOD OF lo_worddoc 'PROTECT'
              EXPORTING #1 = 'password'.
            CALL METHOD OF lo_worddocs 'SAVE'.
            CALL METHOD OF lo_worddocs 'CLOSE'.
    In tcode SOLE, I found two relevant entries:
    OLE application      WORD.BASIC
    Version number       6
    CLSID                {000209FE-0000-0000-C000-000000000046}
    CLSID LibType        {000209FE-0000-0000-C000-000000000046}
    OLE object name      WORDBASIC
    Type Info key        NO_TYPELIB
    Include program
    Language             EN
    Check authorization
    Text Microsoft Word 6.0 Wordbasic
    OLE application      WORD97
    Version number
    CLSID                {000209FF-0000-0000-C000-000000000046}
    CLSID LibType
    OLE object name
    Type Info key        NO_TYPELIB
    Include program
    Language
    Check authorization
    Text
    Pls help me to the right track.
    Thanks.

    Post Author: fwinter
    CA Forum: .NET
    We have the same problem. A page footer generated in Word, embedded in a CR-Report shows in the report viewer with overlapping characters. This is "a known limitation" we were told. Not really a problem, but when exported to PDF, the PDF also shows the overlapping characters and prints with overlapping characters as well. This is our problem!We've tried different fonts, different font- an pagesizes in Word, the "can grow" checkbox etc. We believe, the result is affected by the printer driver but cannot really find a way, to avoid the problem and get a clear print at all of our customers.Anyone figured out how to solve the problem? CA Support unfortunatly couldn't help   We are using CR Merge Moduls XI R2 in our Report Viewer, Word 2003, Problem appears on local machines as well as on Citrix.

  • Retrieving an image stored as OLE Object in the Ms Access database

    I stored an image as an OLE Object in Ms Access Database so I want to retrieve it using java.I tried to get it using the getBlob method from the ResultSet but it didn't show up.I'm so confused i don't know what to do.Please anyone familiar with ma problem try to help me.

    try getBinaryStream() instead of getBlob()

  • Properties does have getProperty method

    I have this code but the Properties does have the method getProperty()
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class TestCode {
        static final String PROPERTY_FILE="JDBC-ODBC Driver.properties";
        String driverName, url, user, password;
        /** Creates a new instance of TestCode */
        public void access() {
            try{
                /* Create an object of the Properties class and load properties. */
                Properties prop=new Properties();
                prop.load(new FileInputStream(PROPERTY_FILE));           
                driverName=prop.getProperty("driver");  // Retrieve driver information.           
                url=prop.getProperty("url");    // Retrieve JDBC URL.
                user=prop.getProperty("user");  // Retrieve user name.
                password=prop.getProperty("password");  // Retrieve password.
                /* Initialize and load a driver. */           
                Class.forName("driverName");
                /* Establish a connection with a database. */
                Connection con=DriverManager.getConnection(url,user,password);
                /* Create Statement object. */
                Statement stmt=con.createStatement();
                /* Executes a SQL query to retrieve a ResultSet. */
                ResultSet rs=stmt.executeQuery("SELECT * FROM Registered_Users_Information");
                /* Iterate through the ResultSet to display data. */
                while(rs.next()){
                    System.out.println(rs.getString("UserName"));
                    System.out.println(rs.getString("Password"));
                con.close();
            }catch(Exception ex){
                ex.printStackTrace();
        public static void main(String args[]){
            TestCode t=new TestCode();
            t.access();
    }Please show me the problem.
    Thanks.
    Nguyen_Tom

    I used this code but it does not exist. Has anyone
    tell me why or please five me an advise? The object
    prop does not has the method load.
    Properties prop=new Properties();
    prop.load(new FileInputStream(PROPERTY_FILE));Thanks a lot.
    Nguyen_TomRefer to the JDK spec since 1.0, Properties should have all the methods you said you didn't have.
    Did your program throw any error messages?? Could you show me?
    :D

  • OLE objects & scaning in Acrobat 8.0

    Hello!
    In forums (May 3, 2007) I have read the question:
    " How to avoid dialogue of saving in a file before scanning in Acrobat 8"?
    Leonard Rosenthol has answered, that there is no way because
    now developers changed from "Scan & Save" to "Save & Scan".
    It is very surprising!!!
    I have the application which uses OLE automation for scanning documents in Acrobat and place them in
    database as OLE objects.
    In database the object is created on the basis of an PDF file with one empty page and then activated in
    window of Acrobat.
    Then menu item "Scan" is carried out.
    Fragment of VBA code (properly work in Acrobat 6):
    Set GL.Acr = CreateObject("AcroExch.App")
    GL.Acr.Show
    GL.Acr.Minimize 0
    Me!DocImage.Class = "AcroExch.Document" 'set class of OLE object
    Me!DocImage.SourceDoc = "c:\applicants\empty.pdf" 'source file with empty sheet
    Me!DocImage.Action = acOLECreateEmbed 'creation on basis of source file
    Me!DocImage.Verb = acOLEVerbOpen 'command - open
    Me!DocImage.Action = acOLEActivate 'activation in Acrobat
    ScanExe = GL.Acr.MenuitemExecute("Scan")
    If ScanExe = False Then
    But Acrobat 8.0 does not understand, that document is open from OLE object
    and always gives out save dialog before scaning.
    Menu items -"Update" (instead of "Save") and "Exit and Return to ..."
    (instead of "Exit") are absent.
    It turns out, that in Acrobat 8 you have destroyed an opportunity of work with
    documents contained in OLE objects in other applications. It is absolutely not clear.
    Please answer what to do???

    Dear Leonard!
    I disagree with your answer.
    OLE automation is used by many programs.
    Within the framework of this technology is widely used:
    - creation and preservation of object in the application - client (database in my case),
    - then opening of object in application - server (Acrobat in my case)
    - and applying methods described in the documentation of application - server to open object.
    In my code is used the standard technology of OLE automation and ONLY!!! the methods described in the documentation of Acrobat.
    My code works in Acrobat 6 and Acrobat 7.
    I have written previous message to make Acrobat better!!!
    I so understand, that you answer on behalf of developers, but your answer not worthy the world famous name - "Adobe".
    I think, that developers of new scan plug-in for Acrobat 8 simply did not consider, that the document can be open from the object stored in application - client.
    And as representative of developers it is necessary for you either to recognize publicly a problem or publicly to declare, that "Adobe" will not solve it, instead of to write, that not documentary opportunities have been used.
    Yours faithfully,
    Victor.

  • Passing input parameters to the method call in ADF task flow.

    Hi,
    I have the following use case:
    There is a task flow with 2 jspx pages. In the first page I have 2 input search parameters and search button. the search button calls the webservice data control execute (GET_ACCOUNTOperation) method .
    Displaying the search results in the same page is not a problem , but my requirement is that the search results are to be displayed in the second page in tabular form.
    To achieve this, I dragged the execute method as the method call in the task flow and specified the input parameters for the method call (right click and add parameters) . I am getting the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.lang.String, java.lang.String)
         at com.sun.el.util.ReflectionUtil.getMethod(Unknown Source)
         at com.sun.el.parser.AstValue.getMethodInfo(Unknown Source)
         at com.sun.el.MethodExpressionImpl.getMethodInfo(Unknown Source)
         at oracle.adf.controller.internal.util.ELInterfaceImpl.getReturnType(ELInterfaceImpl.java:214)
         at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:135)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:921)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:820)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:552)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:148)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
         at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    even though the execute method is there and the service is up and running. I am not sure whether its the correct way of doing it. Please shed some light on how to solve this use case
    Some additional info:
    Under the data controls pallete, the GET_ACCOUNTOperation method has a parameters section , which has "part" (java.lang.Object) as
    the input parameter.
    Regards,
    Rampal

    Hi,
    thanks for the quick turn-around. Jdev version that i am using is Studio Edition Version 11.1.1.6.0. And i am using SOAP. Isnt there a way without using a backing bean? I am planning to use it as a portlet. Would'nt creating a backing bean cause a problem in that case?? Also i am confused here . The method that i am dragging is GET_ACCOUNTOperation(Object). I tried passing the hashmap . It gave the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.util.HashMap)
    Rampal

  • Non-string objects as parameters to an applet

    how can i pass non-string objects as parameters to an applet?
    thanks in advance...

    those are some objects that i wroteThen, you could use Class.forName() method for your string parameters.
    If you get the classes, then you can call newInstance() method on them to get objects.
    Alternative way could be using your string parameter as index or keys for some
    data structures that contains ready-made objects.

  • ABAP OLE Objects

    Hi ,
      I have used OLE Objects to move data from  5 internal tables to 5 sheets in a single XL file , but i am not able to get 4th and 5th sheet newly created , instead they are getting over writed in the third sheet itself.
    so how to resolve this.
    help reg this.

    Hi,
      I think  you have given the third  sheet name  for fourth and fifth.
    call method of application 'Worksheets' = sheet
          exporting
          #1 = 1.
          set property of sheet 'Name' = sheet_name.
          call method of sheet 'Activate'.
    OR
    you might have missed to add sheet.
    CALL METHOD OF application 'Sheets' = sheets.
       CALL METHOD OF sheets 'Add'.
    Run my program:
    REPORT ZP_EXCEL .
    *& Report ZP_EXCEL *
    include ole2incl.
    data: application type ole2_object,
    workbook type ole2_object,
    sheet type ole2_object,
    cells type ole2_object,
    sheets TYPE ole2_object.
    constants: row_max type i value 256.
    data index type i.
    data : det type ref to CL_ABAP_structDESCR,
           wa like line of det->components.
    data: begin of i_finaltab occurs 0,
           Col1 type i,
           col2 type i,
           col3 type i,
           col4 type i,
          end of i_finaltab.
    data : count type i,
            v_excel_count(3), " type i value 1,
            sheet_name(15)  .
    *START-OF-SELECTION
    start-of-selection.
    do 100 times.
      count =  count + 1.
      i_finaltab-col2 = 5 * count.
      i_finaltab-col3 = 10 * count.
      i_finaltab-col4 = 20 * count.
      move : count to i_finaltab-col1.
      append  i_finaltab.
      clear i_finaltab.
    enddo.
    clear count.
    create object application 'excel.application'.
    set property of application 'visible' = 1.
    call method of application 'Workbooks' = workbook.
    call method of workbook 'Add'.
    Create first Excel Sheet
    call method of application 'Worksheets' = sheet
    exporting
    #1 = 1.
      call method of sheet 'Activate'.
      set property of sheet 'Name' = 'EXCEL0'.
         count = 1.
         index = row_max * ( count - 1 ) + 1.
         perform header_details.
    DATA FNAME(60) VALUE '/data/sapdata/mk112.xls'.
    OPEN DATASET FNAME FOR OUTPUT.
    loop at i_finaltab.
       count = count + 1.
      if count LE 6.
        index = row_max * ( count - 1 ) + 1. " 1 - column name
        call method of sheet 'Cells' = cells
        exporting
         #1 = index.
        set property of cells 'Value' = i_finaltab-col1.
         index =  index + 1.
        call method of sheet 'Cells' = cells
        exporting
         #1 = index.
        set property of cells 'Value' = i_finaltab-col2.
        index =  index + 1.
        call method of sheet 'Cells' = cells
        exporting
         #1 = index.
        set property of cells 'Value' = i_finaltab-col3.
        index =  index + 1.
        call method of sheet 'Cells' = cells
        exporting
         #1 = index.
        set property of cells 'Value' = i_finaltab-col4.
      else.
        v_excel_count =  v_excel_count + 1.
       CALL METHOD OF application 'Sheets' = sheets.
       CALL METHOD OF sheets 'Add'.
       concatenate 'EXCEL' v_excel_count into sheet_name.
         clear count.
         count =  count + 1.
         call method of application 'Worksheets' = sheet
          exporting
          #1 = 1.
          set property of sheet 'Name' = sheet_name.
          call method of sheet 'Activate'.
          index = row_max * ( count - 1 ) + 1.
          perform header_details.
          count =  count + 1.
          index = row_max * ( count - 1 ) + 1. " 1 - column name
          call method of sheet 'Cells' = cells
          exporting
           #1 = index.
         set property of cells 'Value' = i_finaltab-col1.
          index =  index + 1.
          call method of sheet 'Cells' = cells
          exporting
           #1 = index.
          set property of cells 'Value' = i_finaltab-col2.
        index =  index + 1.
        call method of sheet 'Cells' = cells
        exporting
         #1 = index.
        set property of cells 'Value' = i_finaltab-col3.
        index =  index + 1.
        call method of sheet 'Cells' = cells
        exporting
         #1 = index.
        set property of cells 'Value' = i_finaltab-col4.
       endif.
    endloop.
    *&      Form  header_details
          text
    -->  p1        text
    <--  p2        text
    form header_details.
    det ?= cl_abap_typedescr=>describe_by_DATA( i_finaltab ).
    loop at det->components into wa.
      call method of sheet 'Cells' = cells
      exporting
      #1 = index.
      set property of cells 'Value' = wa-name.
      index = index + 1.
    endloop.
    endform.                    " header_details

Maybe you are looking for

  • Do INSERT if value do not exist

    Hi. I am trying to create sql that does the following: if db1..names.cpr not in db1..people.cpr then: INSERT INTO db1..People(cpr,type) VALUES (db1..names.cpr,1) * type should have the default value 1 Can anybody give me an idear on how to do that. B

  • Connect to VGA-flat screen monitor ?

    my ibook G3 (dual USB) has a RGB display, out , I m not sure which adapter to get to have to connect to a standard dell VGA-flat screen monitor ? second question: how do you increase screen brightness? it is so dim,have to squint to see screen

  • Want to learn BSP in details

    Hi all,           I am new to BSP and want to learn all the concepts in details.            How the events are triggered,how to display User id and password in the login page and try to navigate in the following pages. Where to write the select state

  • HR_ECM_INSERT_INFOTYPE produces runtime error

    Hi All,      Good Afternoon. I have been trying to us the FM HR_ECM_INSERT_INFOTYPE or the FM HR_INFOTYPE_OPERATION and I am receiving runtime errors such as CX_HRPA_VIOLATED_ASSERTION or CX_SY_REF_IS_INITIAL it seems that the message handler is not

  • Dynamic entry list in Dropdown List Box

    Hi All, I need to create a dropdown box in a form whose input is connected to the output of a bapi/query. I want the values of a field in the bapi to the elements of the entry list. Can anyone tell me how to create the entry list dynamically? Thanks,