How to remove values formatting in export to excel from ALV grid

Hi all,
I have small issue, I have ALV Grid with some data, but the problem is with columns containing e.g. gross amounts, because it is displayed in the grid as e.g. 1.764,81, and after export to excel it is still in this format (with dot and comma), so excel doesn't treat it as numeric value but as text, and then when I try to calculate total on the column then this values are not taken to the total. Do you know if that is possible to remove column formatting?
kind regards,
Marcin

I replied too soon to Peter's suggestions.  For some reason, I was able to add new info. to my first new row, but not the second.  However, I finally figured out the problem.
I found the Help Center page on: "Here are ways to change custom formats and apply changes to table cells:"
To change the elements associated with a custom format that’s been applied to cells, select the cells and click Show Format in the Format pane of the Table inspector.
I saw that the "cell format" was listed as "automatic," so I changed it to "Custom;" then left the new custom window at it's default settings. Now my cells would accept pasted info. without spreading it through the lower rows.  Whatever automatic was in the table, it was not what I wanted. Doing this to other new cells, solved my problem.  Thanks again.

Similar Messages

  • Error while Exporting to Excel from ALV Report

    Dear Experts,
    When I am exporting my report output to an Excel Sheet  directly some of the headers are appearing in Row No 1 and some are displaying in Row No. 2. Hence the corresponding values are also showing in the same manner.
    I want to show all the Rows in a single row in row No 1. I am unable to find the solution for this.
    But when I am exporting the same report into the MHTML Excel format the Report Headings are showing correctly in a single row and hence the respective values are also showing correctly in a single row. And if I save the same MHTML Excel as normal EXCEL(97-2003) format then also it is showing correctly.
    The problem comes only when I as exporting it directly into EXCEL(97-2003) format. 
    Plz help.

    Hi,
    This is the Technical limitation of ABAP list export to local file.
    ALV grid greater than 1023 characters per line will be split into 2 lines.
    To prevent a line break occuring when you download the list as a local spreadsheet file, you must reduce the width of the list in ALV. You can do this either by hiding columns or by changing the column widths in the ALV. Take care that the column heading characters also dont exceed 1023 characters. This will work.
    Thanks
    LG

  • Export TO XXL from ALV Grid - Column order mismatch

    Hi All,
    The user is trying to download data from Option -> Export -> Spreadsheet which will create XXL.
    But while downloading there is mismatch in the order of columns displayed on the alv grid & columns downloaded.
    All character fields are displayed on left, then date fields then quantity fields are downloaded to XXL. but in ALV Grid user has chosen a layout in which date fields come first.
    Please help me to find solution

    Grid display using    'REUSE_ALV_GRID_DISPLAY'. From the alv grid output, user is trying to download data using export -> Excel . so for download there is no custom code.
    We have copied standard report and added few more fields to the custom report. strangely Standard report also has this issue.
    I searched for SAP notes also..no clue

  • How to remove ' undefined exceptions', when export to excel within portal ?

    hi friends :
       when I export sth to excel within portal , there always appeared  'undefined exceptions' , sure . im not define excepthions but i do not wanna dislay it , coz it distoyed the the overall sense of the report , and others do not understand what's that mean
       i think it should be configured somewhere ?
       thanks very much :L

    Hello Bruce.
    I just want to clarify the situation that you are referring to...  Are you saying that when you log into the Infoview application and view a report, then click the "Export this report" button from the viewer.  Then it gives you all of the various "File Formats" that you can export to.  In that situation, you wish to only see PDF and Excel as options.
    If that is the situation that you are referring to, then there is no documented or supported way to remove the "File Formats" that can be exported to from the Crystal Reports viewer.  The Infoview application is a "black box" that is provided as-is by SAP BusinessObjects for customers to make use of.  For that reason, there is no documented way to make changes to it.
    Regards.
    - Robert

  • Column values truncating when exported to excel from OBIEE dashboard

    Hi,
    I am fairly new to OBIEE. recently I am facing an issue, when I try to export a report using the download to Excel or download to excel2000 option, one of the 18 digit column value is truncated to exponential value. Like for example the column is ESN with 18 digit numbers like 268235457500823991. But when I export it I get only 268235457500823000 or 2.68235E+17. Please help what could have been the issue.....
    Thanks in advance!

    Convert it to text before you export it.
    regards
    John
    http://obiee101.blogspot.com

  • Problem with Export to Excel from ALV view.

    Hello @all,
    i have a problem on my webdynpro application. I use the component SALV_WD_TABLE. I become display my data but when i want to export the table to ecel, i became a short dump with the message in the browser: Access via 'NULL' object reference not possible.
    When i look at ST22. The system show this text.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was no
         caught in
        procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)
         was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component (variable: "LR_HEADER").
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    How to correct the error
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "OBJECTS_OBJREF_NOT_ASSIGNED" "CX_SY_REF_IS_INITIAL"
        "CL_SALV_WD_A_MODEL_TABLE======CP" or "CL_SALV_WD_A_MODEL_TABLE======CM0
        "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
        4. Details about the conditions under which the error occurred or which
        actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", or its
      possible occurrence must be declared in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    Information on where terminated
        Termination occurred in the ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" -
         in "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD".
        The main program was "SAPMHTTP ".
        In the source code you have the termination point in line 19
        of the (Include) program "CL_SALV_WD_A_MODEL_TABLE======CM030".
        The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
        procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", but
         it was neither handled locally nor declared
        in the RAISING clause of its signature.
        The procedure is in program "CL_SALV_WD_A_MODEL_TABLE======CP "; its source
         code begins in line
        1 of the (Include program "CL_SALV_WD_A_MODEL_TABLE======CM030 ".
    Source Code Extract
    Line  SourceCde
        1 method if_salv_bs_model_column~get_header_bind_ddic_field.
        2
        3   data:
        4     ls_column type if_salv_bs_model_columns=>s_type_column.
        5
        6   ls_column = me->if_salv_bs_model_columns~get_column( column ).
        7
        8 *... get column
        9   data:
       10     lr_column type ref to cl_salv_wd_column.
       11
       12   lr_column ?= ls_column-r_column.
       13
       14   data:
       15     lr_header type ref to cl_salv_wd_column_header.
       16
       17   lr_header = lr_column->get_header( ).
       18
    >>>>>   value = lr_header->get_ddic_binding_field( ).
       20
       21 endmethod.
    i hope anybody can help me.
    Regards
    Chris

    Dear
    How you resolved this issue please let us know.
    Thanks

  • Unable to export to excel from ALV

    Hi,
    i was trying to display information in an ALV report and it shows up properly. however, when i click on the excel icon it is not populating the data in the spread sheet though the excel window shows up in place of the report.
    any suggestions will be rewarded. i attached the code below
    Regards,
    ravi.
                F O R M    F I L L _ A L V _ D A T A                    
    FORM fill_alv_data.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv,
            ls_sort TYPE slis_sortinfo_alv.
      CLEAR ls_fieldcat.
    field catalog information
    Purchase order number
      ls_fieldcat-fieldname = 'EBELN'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'P.O NUMBER'.
      ls_fieldcat-key = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    P.O line item
      ls_fieldcat-fieldname = 'EBELP'.
      ls_fieldcat-datatype  = 'NUMC'.
      ls_fieldcat-seltext_m  = 'P.O Line item'.
      ls_fieldcat-key = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Doc. condition number
      ls_fieldcat-fieldname    = 'KNUMV'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'doc. conditon no'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    P.O date
      ls_fieldcat-fieldname    = 'BEDAT'.
      ls_fieldcat-datatype  = 'DATS'.
       ls_fieldcat-seltext_m  = 'P.O date'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    purchasing org
      ls_fieldcat-fieldname    = 'EKORG'.
      ls_fieldcat-datatype  = 'C'.
       ls_fieldcat-seltext_m  = 'Purchasing org.'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    purchasing group
      ls_fieldcat-fieldname    = 'EKGRP'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'Purchasing group'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    vendor number
      ls_fieldcat-fieldname    = 'LIFNR'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'Vendor number'.
    ls_sort-subtot    = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    company code
      ls_fieldcat-fieldname    = 'BUKRS'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'Company code'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    short text
      ls_fieldcat-fieldname    = 'TXZ01'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'Text'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Material group
      ls_fieldcat-fieldname    = 'MATKL'.
      ls_fieldcat-datatype  = 'C'.
      ls_fieldcat-seltext_m  = 'Material group'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    order quantity
      ls_fieldcat-fieldname    = 'MENGE'.
      ls_fieldcat-datatype  = 'QUAN'.
      ls_fieldcat-seltext_m  = 'order quantity'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    order unit
      ls_fieldcat-fieldname    = 'MEINS'.
      ls_fieldcat-datatype  = 'UNIT'.
      ls_fieldcat-seltext_m  = 'order unit'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Gross amount
      ls_fieldcat-fieldname     = 'BRTWR'.
      ls_fieldcat-datatype      = 'CURR'.
      ls_fieldcat-outputlen = '15'.
      ls_fieldcat-seltext_m  = 'Gross amount'.
      ls_fieldcat-do_sum = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Discount Condition
      ls_fieldcat-fieldname     = 'KSCHL'.
      ls_fieldcat-datatype      = 'C'.
      ls_fieldcat-do_sum = 'X'.
      ls_fieldcat-seltext_m  = 'Discount Cond.'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Discount amount
      ls_fieldcat-fieldname     = 'DISV'.
      ls_fieldcat-datatype      = 'CURR'.
      ls_fieldcat-outputlen = '15'.
      ls_fieldcat-do_sum = 'X'.
      ls_fieldcat-seltext_m  = 'Discount amount'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Net amount
      ls_fieldcat-fieldname     = 'NETWR'.
      ls_fieldcat-datatype      = 'CURR'.
      ls_fieldcat-outputlen = '15'.
      ls_fieldcat-seltext_m  = 'Net amount'.
      ls_fieldcat-do_sum = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Tax code
      ls_fieldcat-fieldname     = 'MWSKZ'.
      ls_fieldcat-datatype      = 'C'.
      ls_fieldcat-seltext_m  = 'Tax code'.
      ls_fieldcat-do_sum = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Tax amount
      ls_fieldcat-fieldname     = 'NAVNW'.
      ls_fieldcat-datatype      = 'CURR'.
      ls_fieldcat-outputlen = '15'.
      ls_fieldcat-seltext_m  = 'Tax amount'.
      ls_fieldcat-do_sum = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
    Striped pattern
      gs_layout-zebra = 'X'.
    sort by p.o number
      ls_sort-fieldname = 'LIFNR'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
      ls_sort-subtot    = 'X'.
      APPEND ls_sort TO gt_sort.
    ENDFORM.                    "fill_alv_data
                F O R M   A L V _ D I S P L A Y                         
    FORM alv_display.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = 'zreport'
          is_layout          = gs_layout
          it_fieldcat        = gt_fieldcat[]
          it_sort            = gt_sort
          it_events          = gt_events[]
        TABLES
          t_outtab           = T_PO.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "alv_display

    Hi Ravi,
    Normally we dont have to write any code for getting data in ALV's Excel inplace View. It is taken by SAP itself.
    Any way waht we can try is just comment
       <b>it_events = gt_events[]</b>
    and test whether the data is getting populated in excel..

  • Leading Zeros Missing - When exporting data from ALV grid display to Excel

    Hi,
    Am exporting the data from ALV GRID DISPLAY to Excel sheet using standard toolbar icon 'Local file'
    the leading zeros displayed in the ALV output is missing in the EXCEL sheet.
    (eg)  in ALV o/p - 0029. 
            in Excel - Only 29 is appearing.
    As per the requiement i have to show the leading zeros in excel also.
    Pls help on this issue.
    Thanks in advance..

    Hi ,
      Please set the property  :
      wa_fieldcat-lzero = 'X' .
    when you are creating field catalog for display alv data .
    your prob will solved .
    Regards ,
    Nilesh Jain

  • Formatting an Export to Excel

    Can anyone tell me how to force a column being exported to Excel to be interpreted by Excel as a text field? The column contains only digits, but has values such as '0000' where all four zeroes are to be considered significant.

    Thanks for your replies. Unfortunately, enclosing values in quotes won't work. To give you a simple example, imagine the source for an interactive report is:
    select '0180' account_code, 145.23 amount from dual;
    When the user views the interactive report, they should see 0180 for the account code and 145.23 for the amount...and they do. So far so good.
    Now, they click the tool widget and select to download the report to Excel. Here's where the wheels come off. I need the account code to be interpreted by Excel as text and amount to be interpreted as numeric. Anything I apply at the download-level, like enclosing the columns with single quotes will apply to both account_code and amount. I need a granular way to specify formatting on a field-by-field basis, only to be used when downloading the data.

  • How to remove the default members of a dimension from the control table?

    Hi all,
    I am new to hyperion FDM 11.1.1.2.0.0 .
    When I navigate to Metadata>Control Tables and try to delete the default memmbers
    for the dimension like category and period i got the following error.
    Error: Period( 8/31/2009 ) is an active Global or Local Period and cannot be deleted.
    Then again i unchecked active checkbox for that dimension from Hyperion Essbase Integration Setup of Workbench Client.
    After doing that i got the following error
    Error: Unable to retrieve target System Data.
    Can anyone tell me how to remove the default members of a dimension from the control table?
    Thanks

    Create a new record for the table.
    Go change the POV to the new record.
    Return to the control table and delete the default record.

  • Exporting to Excel from Aria People Search

    Is it possible to export to Excel from Aria People Search.
    I would like to output the Org Chart (built in) and the Tree (I created) to an Excel file.
    Does anyone know how to do this?
    Thanks,
    Tom

    Hi,
    If you are using 10g, then OLE2 is supported. However, it will be executed in the App Server Machine.
    If you want to do the operation in the Client machine (as how it was done in the Client / Server), you need to use Client_OLE (Which is part of WebUtil).
    Look at
    http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
    for more details on WebUtil.
    HTH.
    Regards,
    Arun

  • Download from ALV grid to PDF format

    hai Friends!
       plz tell me how can i download from ALV grid to PDF format..
    send me some sample codes

    check this thread
    ALV Grid to PDF
    and do use the search functionality from next time and post the question only wheb u dont find the answer
    кu03B1ятu03B9к

  • How to give colors to the top-of-page in ALV Grid

    How to give colors to the top-of-page in ALV Grid
    in table GT_LIST_TOP_OF_PAGE i am filling 3 rows ,i need 3 different colors to be displyed on top-of-page(one color to one row)
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    I_LOGO = 'ENJOYSAP_LOGO'
    IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    please help mee

    HI Kranthi,
    Check out teh foll. link,
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Hope this helps.

  • Any method to Import & Export to Excel from Client Side

    Hi,
    Is there any method to Import and Export to Excel from the Client side. I have one procedure to export to Excel , but the excel file will be opened in the Application Server only, even if it executed from the client side. Also this procedure will not work if OLE2 chnaged CLIENT_OLE2. I am writing my procedure, Is there any idea to get it in the client side.
    PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    range OLE2.OBJ_TYPE;
    range_col OLE2.OBJ_TYPE;
    -- Declare handles to OLE argument lists
    args OLE2.LIST_TYPE;
    -- Declare form and block items
    form_name VARCHAR2(100);
    f_block VARCHAR2(100);
    l_block VARCHAR2(100);
    f_item VARCHAR2(100);
    l_item VARCHAR2(100);
    cur_block VARCHAR2(100) := NAME_IN('system.current_block');
    cur_item VARCHAR2(100) := NAME_IN('system.current_item');
    cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
    item_name VARCHAR2(100);
    baslik VARCHAR2(100);
    row_n NUMBER;
    col_n NUMBER;
    filename VARCHAR2(100);
    ExcelFontId OLE2.list_type;
    BEGIN
    -- Start Excel
    application:=OLE2.CREATE_OBJ('Excel.Application');
    OLE2.SET_PROPERTY(application, 'Visible', 'True');
    -- Return object handle to the Workbooks collection
    workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    -- Add a new Workbook object to the Workbooks collection
    workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
    -- Return object handle to the Worksheets collection for the Workbook
    worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    -- Get the first Worksheet in the Worksheets collection
    -- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
    OLE2.DESTROY_ARGLIST(args);
    -- Return object handle to cell A1 on the new Worksheet
    go_block(p_block_name);
    baslik := get_block_property(p_block_name,FIRST_ITEM);
    f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
    l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
    first_record;
    LOOP
    item_name := f_item;
    row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
    col_n := 1;
    LOOP
    IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
    get_item_property(item_name,VISIBLE)='TRUE'
    THEN
    -- Set first row with the item names
    IF row_n=1 THEN
    ------updated by faisal-to give Bold font-----
    --FOR k IN 1 .. 3 LOOP
         args := OLE2.create_arglist;
         OLE2.add_arg(args, 1);
         OLE2.add_arg(args, col_n);
         cell := OLE2.get_obj_property(worksheet, 'Cells', args);
         OLE2.destroy_arglist(args);
         --cell_value := OLE2.get_char_property(cell, 'Value');
         ExcelFontId := OLE2.get_obj_property(Cell, 'Font');
         OLE2.set_property(ExcelFontId, 'Bold', 'True');
    --END LOOP;
    baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(cell, 'Value', baslik);
    OLE2.RELEASE_OBJ(cell);
    END IF;
    -- Set other rows with the item values
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n+1);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
    OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
    END IF;
    OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
    OLE2.RELEASE_OBJ(cell);
    END IF;
    IF item_name = l_item THEN
    exit;
    END IF;
    baslik := get_item_property(item_name,NEXTITEM);
    item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
    col_n := col_n + 1;
    END LOOP;
    EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    -- Autofit columns
    range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
    range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
    OLE2.INVOKE( range_col,'AutoFit' );
    OLE2.RELEASE_OBJ( range );
    OLE2.RELEASE_OBJ( range_col );
    -- Get filename and path
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args, p_block_name );
    OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
    filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
    OLE2.DESTROY_ARGLIST( args );
    -- Save as worksheet
    IF NVL(filename,'0')<>'0' THEN
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args,filename );
    OLE2.INVOKE( worksheet,'SaveAs',args );
    OLE2.DESTROY_ARGLIST( args );
    END IF;
    -- Close workbook
    --OLE2.INVOKE( workbook ,'Close');
    -- Release the OLE objects
    OLE2.RELEASE_OBJ(worksheet);
    OLE2.RELEASE_OBJ(worksheets);
    OLE2.RELEASE_OBJ(workbook);
    OLE2.RELEASE_OBJ(workbooks);
    --OLE2.INVOKE(application, 'Quit');
    OLE2.RELEASE_OBJ(application);
    -- Focus to the original location
    go_block(cur_block);
    go_record(cur_record);
    go_item(cur_block||'.'||cur_item);
    END;
    Thanks in advance.
    Rizly Faisal

    Alternatively you could use OLE2 to do the bulk of the importing and exporting and then use the webutil file transfer functions to move the file to the client and then simply open the file there...That might be more efficient in terms of performance as well.
    Regards
    Grant

  • How to insert the checkbox as a separate column  in alv grid display

    Hi
    How to insert the checkboxes as a separate column  in alv grid display with using the reuse_alv_fieldcatlog_mege.
    example
    matnr    maktx  ersda                 checkbox
    10        books  28/03/2009          checkbox
    Thanks
    chinnu

    Hi,
        Check the following code.
    TYPE-POOLS: slis.
    TYPES:
          BEGIN OF ty_output,
          chk TYPE c,
          number TYPE i,
          name(20) TYPE c,
          END OF ty_output.
    DATA: gt_output TYPE STANDARD TABLE OF ty_output,
          gs_output TYPE ty_output.
    DATA: wa_layout           TYPE slis_layout_alv.
    DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
    After you populate the data, build the field catlog like shown below.
    wa_fieldcatalog TYPE slis_fieldcat_alv.
    wa_fieldcatalog-fieldname = 'CHK'.
      wa_fieldcatalog-outputlen = '3'.
      wa_fieldcatalog-col_pos = '1'.
      wa_fieldcatalog-seltext_m   = 'CHK'.
      wa_fieldcatalog-checkbox = 'X'.
      wa_fieldcatalog-edit = 'X'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
    wa_fieldcatalog-fieldname = 'NUMBER'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-seltext_m   = 'NUMBER'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
      CLEAR  wa_fieldcatalog.
      wa_fieldcatalog-fieldname = 'NAME'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '3'.
      wa_fieldcatalog-seltext_m   = 'NAME'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
      CLEAR  wa_fieldcatalog.
      wa_layout-box_fieldname     = 'CHK' .
      wa_layout-box_tabname       = 'GT_OUTPUT' .
    Now call the FM
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = sy-repid
          i_callback_pf_status_set          = 'PF_STATUS'
          i_callback_user_command           = 'USER_COMMAND_GRID'
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
          is_layout                         = wa_layout
          it_fieldcat                       = it_fieldcatalog
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_output
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

Maybe you are looking for

  • New Iphone 4S - Will not slide, white line appears around it like a box

    I bought an Iphone 4S yesterday and when I try unlock it will not allow me. I try to slide across and the box appears around it. If I happen to get it unlocked after pressing for awhile it does the same with any apps I press on. The white link/box ap

  • TRM - Accruals and deferrals aren't posting

    Hi everybody, I'm trying to launch accruals and deferrals of comissons related to financing products. I already, IN MONEY MARKET - Created flow type (XXX-Comissions) relevant to acc/defer. - Associated flow type to an update type IN GENERAL SETTINGS

  • Macbook pro will not save what I was working on when in sleep mode

    Everytime my computer goes into sleep mode or battery dies, it does not remember what I was last working on. It starts all over again

  • T-CODE CREATION

    Hi All,         How to create T-code for Webdynpro application, Please explain step by step. Regards Suprith

  • Date Formatting - Day and Month Switching Places

    I am starting to get really frustrated with this problem; at first it was just a nuisance, but now when I actually want and need to do something important with Numbers it has become a major headache. When I first select a formatting and enter a date