Add columns to EXCEL exported from ALV

Hi,
I'm using the function module REUSE_ALV_GRID_DISPLAY, to display an ALV report. This report shows a standard text when users click on one column.
I wanna know if its possible to add the standard text as a column into the EXCEL exported from this ALV? and if so, how can I do it?
Regards.
Gregory.

Thanks again Raymond,
With internal tables that have a type from ABAP dictionary works fine. My problem is that my internal table is declared into my program's global variables. My code bellow:
DATA: BEGIN OF it_excel OCCURS 0,
         department  TYPE adcp-department,
         bname       TYPE usr02-bname,
         name_text   TYPE adrp-name_text,
         agr_name    TYPE agr_users-agr_name,
         text        TYPE agr_texts-text,
         from_dat    TYPE agr_users-from_dat,
         to_dat      TYPE agr_users-to_dat,
         tcode       TYPE agr_tcodes-tcode,
         ttext       TYPE tstct-ttext,
         tdesc       TYPE string,
      END OF it_excel.
* fills the it_excel table
perform fill_excel_data.
  CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
      window_title         = 'File location'
      file_filter          = cl_gui_frontend_services=>filetype_excel
      prompt_on_overwrite  = 'X'
    CHANGING
      filename             = v_file
      path                 = v_path
      fullpath             = v_fpath
      user_action          = v_useraction
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4.
  CHECK sy-subrc EQ 0 AND v_useraction EQ 0.
  CREATE OBJECT v_excel 'EXCEL.APPLICATION'.
  SET PROPERTY OF v_excel 'VISIBLE' = 0.
  CALL METHOD OF v_excel 'WORKBOOKS' = v_workbooks.
  CALL METHOD OF v_workbooks 'ADD'.
  SET PROPERTY OF v_excel 'SHEETSINNEWWORKBOOK' = 1.
  CALL METHOD OF v_excel 'Worksheets' = v_sheet
    EXPORTING #1 = 1.
  CALL METHOD OF v_sheet 'Activate'.
  CLEAR v_subrc.
  CALL METHOD cl_gui_frontend_services=>clipboard_export
    IMPORTING
      data                 = it_excel[]
    CHANGING
      rc                   = v_subrc
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4.
  CHECK v_subrc EQ 0.
  GET PROPERTY OF v_excel 'ACTIVESHEET' = v_sheet.
  CALL METHOD OF v_sheet 'PASTE' NO FLUSH.
  CALL METHOD OF v_sheet 'SAVEAS'
    EXPORTING #1 = v_fpath #2 = 1.
When calling cl_gui_frontend_services=>clipboard_export method the variable v_subrc is equal to 0 and sy-subrc is equal to 1 and the EXCEL file is not saved.
Can you please tell me, what am I doing wrong?
Regards,
Gregory
Edited by: Gregory Mayorga on Sep 7, 2010 10:56 AM

Similar Messages

  • How to freeze the columns in excel exported from SSRS report??

    We have created a report for our client. The client wants the report in excel format. As there are nearly about 30,000 rows in the excel. Client wants us to freeze the column header names in the excel so that even after scrolling down they
    will be able to see the column names.
    can anybody have idea how to achieve this in SSRS?

    Hi Shard,
    Thanks for your post, You can achive your requiremets by using the below logic. hope this will help you.
    Steps to achieve it
    1. Select the tabix and click on Tablix properties.
    2. In the General tab under Column Headers section you can see "Keep header visible while scrolling" checkbox, check it.
    3. Now the header row will be remain fixed in the report.
    OR
    1.    In the grouping pane, make sure to turn on advanced mode (click on the small black down arrow on the far right of the grouping pane) 
    2.  Select the corresponding (Static) item in the row group hierarchy
    3.  In the properties grid, set RepeatOnNewPage to true
    4. KeepwithGroup to After
    OR
    1)Freeze the header of all columns[ Freezing table header ] : To do select static member of table header row from  row groups [ Advanced Mode ] and set  FixedData to true
    2) Freeze the initial 2 columns : To do select static member of columns in column group and set fixedData to true .
    How do you freeze the tablix header row in an Excel export file in SSRS 2008
    Suhas Kudekar
    Mark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.
    My Blog
    Follow @SuhasKudekar

  • Export from ALV to Excel - problem with numeric values

    hi folks,
    when exporting from alv to excel and we have negative values (and using an u.s.a. setting where . and , are different to r/3) negetive values are not shown correctly in excel.
    when changing in win nt the regional settings to europe one's (e.g. germany) everything works fine.
    any hints welcome,
    kind regards
    oliver

    I guess this has something to do with the excel settings. In the control panel you have regional settings.try some options there. It might work.
    Regards
    Sudhi

  • How to enhance the Excel export from Crystal Reports

    Hello,
    I am new in Crystal Reports and I wonder if it is possible to enhance the Excel export from Crystal Reports with post-processing that would be applied to the Excel exported file.
    By example, is it possible to freeze the window panes, so rows and columns are frozen in place on the screen?
    Is there any possibility to obtain the file exported to excel to work with.
    Or maybe there is some ways to parametrize the Excel export from Crystal Reports?
    Any suggestions are welcomed.

    If you are using Crystal Reports 2008 you can use the Report Application SDK that is now available.
    It has a object called PrintOutputController that has an export method that allows you to get access to the exported file before you send it to the user.
    Check the Developer library and the samples for details.
    <a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/robhorne</a>

  • Collapsed groupings in Excel export from FR

    I am at a client, they are doing variance reporting. Is there a way coming out that will allow groupings to be exported? For example, their report looks at Current forecast and prior year and then prior year variance. When they initially look at the report the prior year columns are hidden. What they are requesting is to export to excel with the prior year hidden columns collapsed.? Any ideas??
    Thanks!

    Hey Guys,
    Just wanted to point out that I know how to do this with a webapplication but I would need that within an excel export from an ordinary web query.
    Could someone help out here?
    Thanks in advance,
    Andreas

  • Excel download from ALV not working inproduction

    Hi all,
    I am using "set_table_for_first_display" for alv display. the excel download from alv is woking fine in development and quality stystem but in production only first 3-4 rows are getting downloaded. Other rows donot appear in excel.
    Any Idea !!!
    Thanks
    Madhu

    Hi Experts,
    I have noticed that same problem is occuring in development system also with same set of data . The ascii file created has some missing rows. I guess its due to some special characters though i am not able to see any special character . Any solution for this.
    Regs
    madhu

  • Execution date in Excel export from a query

    Dear all,
    I am wondering if it is possible to have the query execution date in an exported excel.
    Case: When working in a query it should be possible to export the query to excel. However I am missing the execution date of the query and the last successful data load (which is visible in the webquery).
    Anyone has an idea how to achieve that?
    Thank you in advance,
    Andreas

    Hey Guys,
    Just wanted to point out that I know how to do this with a webapplication but I would need that within an excel export from an ordinary web query.
    Could someone help out here?
    Thanks in advance,
    Andreas

  • How to export from ALV to Excel

    Hi Pals
    I did a alv grid program using classes, but I am unable to export that alv report to excel or some other tools, even though the button in the toolbar it is an active mode. If I click on that it showing empty spreadsheet.
    Please can you help me out as soon as possible.
    Regards
    Praveen

    Hi Praveen,
    Chk out this function module CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    (used to Display a File_Open_Dialog For the User to choose a dest. file)
    put this accordingly
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'DOWNLOAD'.
    perform CL_GUI_FRONTEND.
    IF SY-SUBRC = 0.
    *--- Perform to download the report into an Excel file
         PERFORM DOWNLOAD_REPORT_XL.
    *--- Perform to write the details report
            PERFORM WRITE_REPORT_INTO_XL.
    Hope this would wrk out.
    If you consider this as the right solution please reward points.
    Regards,
    Harini

  • Leading spaces in excel file from ALV

    Hi Guys,
    once I export a record from ALV to excel. Some values I think all values that are TYPE I. How can I remove this leading spaces.
    Ex: '                                                      100'
    something like that.. so if you dont expand the column with you wont see the value 100. I checked the internal table being passed to ALV. It doesnt have leading spaces also in the ALV display. there is no leading spaces. Is there something to to with column width optimization? I need this to optimize the column headers. Thanks in Advance!
    Regards,
    Michael Nacionales

    There is one table CRVS_B with field SFHNR, while creating PRTS I need this field, so I do like this:
    select max( SFHNR ) into l_sfhnr
    from CRVS_B.
    add var to l_sfhnr.
    So for example l_sfhnr is equal to 000000000000000010, then after add, it gives me 11, and surprisingly in database 11 is placing position in such a way that last char is empty so it is not 11 but 00000000000000011 ( 17 chars ) as after 11 one empty space, and when it comes next time:
    select max( SFHNR ) into l_sfhnr
    from CRVS_B.
    add var to l_sfhnr.
    the value of l_sfhnr is still 000000000000000010......
    else try this
    Hi
    Field_catalog:
    Field catalog with field descriptions
    2.7.1. Description
    Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.
    The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module
    See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.
    The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.
    A field catalog need not be built-up and passed explicitly only under the following conditions:
    • The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.
    • all fields in this structure are to be output
    • the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
    See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.
    Positioning
    • row_pos (row position)
    value set: 0, 1 - 3
    Only relevant if the list output is to be multi-line (two or three lines) by default.
    A multi-line list can also be defined by the user interactively if the default list is one-line.
    The parameter specifies the relative output line of the column in a multi-line list.
    • col_pos (column position)
    value set: 0, 1 - 60
    only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.
    Identification
    • fieldname (field name)
    value set: internal output table field name (required parameter)
    Name of the internal output table field which is described by this field catalog entry
    • tabname (internal output table)
    value set: SPACE, internal output table name
    This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.
    Name of the internal output table which contains the field FIELDCAT-FIELDNAME.
    Data Dictionary reference
    • ref_fieldname (reference field name)
    value set: SPACE, Data Dictionary field name
    Name of the Data Dictionary field referred to.
    This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.
    • ref_tabname (reference table/structure field name)
    value set: SPACE, name of a Data Dictionary structure or table
    Structure or table name of the referred Data Dictionary field.
    This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).
    Reference to fields with currency/measurement unit
    Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:
    • the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)
    • There is a field in the internal output table which contains the associated unit.
    • There is also an entry in the field catalog for the unit field.
    (If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.
    The association of a value field to a unit affects the output as follows:
    • appropriate decimal places display for the unit
    • an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.
    • an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.
    • When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.
    Link to currency unit
    • cfieldname (currency unit field name)
    value set: SPACE, output table field name
    Only relevant for amount columns with associated unit.
    Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
    • ctabname (internal currency unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
    Link to measurement unit
    • qfieldname (measurement unit field name)
    value set: SPACE, output table field name
    only relevant for quantity columns with unit link.
    Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME.
    The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
    • qtabname (internal measurement unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    Column output options
    • outputlen (column width)
    value set: 0 (initial), n
    For fields with a Data Dictionary link this parameter can be left initial.
    For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).
    initial = column width is the output length of the referred Data Dictionary field (domain).
    n = column width is n characters
    • key (key column)
    value set: SPACE, 'X' 'X' = kex field (key field output in color)
    Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
    For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
    • key_sel (hideable key column)
    value set: SPACE, 'X'
    only relevant when FIELDCAT-KEY = 'X'
    Key field which can be hidden interactively.
    The key column sequence cannot be changed interactively by the user.
    The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.
    • no_out (field in field list)
    value set: SPACE, 'X' 'X' = field is not displayed in the current list.
    The user can interactively choose the field for output from the field list.
    The user can display the contents of these fields at line level using the 'Detail' function.
    See also the 'Detail screen' documentation of the parameter IS_LAYOUT.
    • tech (technical field)
    value set: SPACE, 'X' 'X' = technical field
    Field cannot be output in the list and cannot be displayed interactively.
    Field can only be used in the field catalog (not in IT_SORT, ...).
    • emphasize (highlight columns in color)
    value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
    'X' = column is colored with the default column highlight color.
    'Cxyz' = column is colored with a coded color:
    • C: Color (coding must begin with C)
    • x: color number
    • y: bold
    • z: inverse
    • hotspot (column as hotspot)
    value set: SPACE, 'X'
    'X' = column cells are output as hotspots
    • fix_column (fix column)
    value set: SPACE, 'X'
    Not relevant for block lists (output of several lists consecutively)
    'X' = column fixed (does not scroll horizontally)
    All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter
    IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.
    • do_sum (sum over column)
    value set: SPACE, 'X' 'X' = a sum is to be calculated over this internal output table field.
    This function can also be called by the user interactively.
    • no_sum (sums forbidden)
    value set: SPACE, 'X' 'X' = no sum can be calculated over this field, although the data type of the field would allow summing.
    • input (column ready for input)
    Function not available
    Format column contents
    • icon
    value set: SPACE, 'X' 'X' = column contents to be output as an icon.
    The caller must consider the printability of icons.
    • symbol
    value set: SPACE, 'X' 'X' = column contents are to be output as a symbol.
    The internal output table column must be a valid symbol character.
    The caller must consider the printability of symbols.
    Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
    • just (justification)
    value set: SPACE, 'R', 'L', 'C'
    Only relevant for fields of data type CHAR or NUMC
    ' ' = default justification for this data type
    'R' = right-justified output
    'L' = left-justified output
    'C' = centered output
    The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.
    • lzero (leading zeros)
    value set: SPACE, 'X'
    Only relevant for fields of data type NUMC
    ALV outputs NUMC fields right-justified without leading zeros by default.
    'X' = output with leading zeros
    Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.
    • no_sign (no +/- sign) Only relevant for value fields
    value set: SPACE, 'X' 'X' = value output without +/ sign
    • no_zero (suppress zeros) Only relevant for value fields
    value set: SPACE, 'X' 'X' = suppress zeros
    • edit_mask (field formatting)
    value set: SPACE, template
    template = see documentation of WRITE formatting option USING EDIT MASK template
    The output conversion conv can be made by template = '== conv'.
    Texts
    The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.
    The 'long field label' is also used in display variant definition, sort, etc. popups.
    • seltext_l (long field label)
    • seltext_m (medium field label)
    • seltext_s (short field label)
    • reptext_ddic (header)
    analogous to the Data element maintenance 'Header'
    The specified text is not necessarily output in the list, an optimum among all texts is sought.
    • ddictxt (specify text)
    value set: SPACE, 'L', 'M', 'S'
    You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.
    Parameters for program fields without Data Dictionary reference
    see also 'Text' parameters
    • datatype (data type)
    value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)
    Only relevant for fields without Data Dictionary reference
    Program field data type
    • ddic_outputlen (external output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-INTLEN = n
    see also the documentation of the parameter FIELDCAT-INTLEN
    n = external format field output length
    The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).
    • intlen (internal output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    • FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    • FIELDCAT-DDIC_OUTPUTLEN = n
    see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN
    n = internal format field output length
    • rollname (data element)
    value set: SPACE, Data Dictionary data element name
    F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.
    When F1 help is called for this field, the documentation of the specified data element is displayed.
    If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.
    Others
    • sp_group (field group key)
    value set: SPACE, CHAR(1)
    Field group key.
    Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).
    When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.
    • reprep (Report/Report interface selection criterion)
    value set: SPACE, 'X'
    Prerequisites:
    • The system contains the Report/Report interface (function group RSTI, table TRSTI)
    • Parameter LAYOUT-REPREP = 'X'
    (see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )
    'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.
    2.7.2. Default
    • The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :
    • fieldname
    • ref_tabname
    Notes:
    ALV gets the remaining information from the Data Dictionary.
    If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.
    REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.
    Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.
    Priority rule:
    Entries in the field catalog have priority over differing entries in the Data Dictionary.
    • The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):
    • fieldname
    • outputlen
    • datatype
    • seltext_s
    • seltext_m
    • seltext_l
    Notes:
    F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.
    If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes.
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    Reward points if useful
    Regards
    Anji
    Vijayendra Rao  
    Posts: 1,699
    Questions: 28
    Registered: 9/14/04
    Forum points: 3,018 
      Re: ALV  
    Posted: May 14, 2007 8:29 PM    in response to: kotireddy       Reply 
    Hi,
    Field catalog defines the attributes and specifies the technical details of the columns displayed in an ALV output.
    You can check the following thread to see how to build a field catalog and how to work with ALV.
    Message was edited by:
            Karthikeyan Pandurangan

  • Downloading records in in excel sheet from ALV.

    Hi,
    I am downloading Records from ALV GRID DIsplay to Excel sheet but i am unable to get all records that are displayed in ALV report.
    I am getting only 73 records if i have only 180
    Any inputs please for correctine the error
    Regards
    Rasheed.

    hi
    you can follow these stapes and get ur work done
    go to List > select Export  > Spreadsheet or just click the excel icon from the tool bar.This would download the data to excel.
    hope this helps
    regards
    Aakash Banga

  • Excel fiel from ALV report

    Hi Gurus,
        is der any way to download data from ALV report to excel sheet depending on  layout set dyanmically.
      I mean to say that if I choose a layout then data has to transfer to excel sheet according to layout fields automaticaly.

    I think this can be done by oops ALV , are u using reusealv F.M to call output in ALV ?
    Try the below kind of ALV
    IN PBO -
    >
    SET PF-STATUS 'PROJREP'.
    SET TITLEBAR text-046.
    DATA: g_container TYPE scrfname VALUE 'ALV',
          g_grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
    IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.  (Name of the container )
    CREATE OBJECT g_grid1
               EXPORTING i_parent = g_custom_container.
    PERFORM create_field_catalog_ce
    CALL METHOD g_grid1->set_frontend_fieldcatalog
          EXPORTING
            it_fieldcatalog = t_fcat_ce.
    ALL METHOD g_grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ST_DISPLAY'
          CHANGING
            it_outtab        = t_display_io
            it_fieldcatalog  = t_fcat_ce.
    ->Create Object to receive events and link them to handler methods.
    When the ALV Control raises the event for the specified instance
    the corresponding method is automatically called.
        CREATE OBJECT g_event_receiver.
        SET HANDLER g_event_receiver->handle_double_click FOR g_grid1.
      ENDIF.
      CALL METHOD cl_gui_control=>set_focus
        EXPORTING
          control = g_grid1.
    IN PAI -->
    CALL METHOD cl_gui_cfw=>dispatch.

  • Unable to perform Calculations on Excel exported from Web Dynpro ABAP

    Hi Gurus,
    I have a custom functionality "Export to Excel" internal table data on my web dynpro application. I dint go with standard ALV feature because it doesnot give flexibility to add colours to excel sheet and add multiple tabs and so i had to write XML ABAP coding in the web dynpro application to achieve this. While passing the internal table data into cells, i created cells with string data type and hence all the fields in the excel are now in char type. Users are unable to perform any calculations because of this issue, i tried to format the cells but it doesnot work. Please help me.
    Regards,
    Pravs.

    Hi,
    Just do the following in excel before downloading and check whether it works.
    Tools->Options->International tab.
    In that mention decimal separator as ,(comma).
    Thousand separator as .(dot).
    Uncheck use system separators.

  • Add column with preq number to ALV grid in me53n

    hi all,
    i am trying to add column with preq number (BANFN) to ALV with preq items in ME53N. it is not available in column set, when trying to add by "change layout" button - i dont understand why, when the strcucture MEREQ3211GRID contains it :-(
    i also tried to add new field ZZBANFN into the structure CI_EBANMEM and after that, i could add the new field to ALV through change layout, but it was empty of course. so i implemented EXIT_SAPLMEREQ_001 from MEREQ001, but ZZBANFN is still empty, because this exit is not called when opening ME53N, but when clicking on tab "customer data" in preq item detail.
    how to solve this? is there any exit that is called before displaying the ALV grid?

    Here is some more detail. I included my code from the Enhancement.
    ENHANCEMENT-POINT MM06EFPO_POT_AUFBAUEN_02 SPOTS ES_MM06EFPO_POT_AUFBAUEN INCLUDE BOUND.
       ENHANCEMENT 1  Z_MM06EFPO_POT_AUFBAUEN_1.    "active version
      SELECT SINGLE zz_old_material FROM mara
        INTO pot-zz_old_material
        WHERE matnr = pot-matnr.
    ENDENHANCEMENT.
    You will also need to change the layout in Item Overview to bring your field in.

  • Questions regarding Excel Export from Table

    Hello,
    i've implemented the Excel Export described in this blog:
    /people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities
    It works fine, but i have 2 question:
    - You have to add your Columns who want to get in Excel in the ArrayList. I have a table with LayoutOption (make Columns Visible/Invisible) and want to get all visible columns in my Excel list. You can i realize that?
    - My Excel List is shown in my existing Browser Window, but i want to open a new Window, how can i do that?
    Kind Regards,
    Christopher

    Hello Cristopher,
    For the first Qst:
      Lets think in this way; you have set two column fields invisible and in wdModifyView() check if the columns are visible set a flag and accordingly you can set the header at the getColumnInfo() function.
    Preferably use switch case to check the ArrayList selection and adding values to it.
    For the second Qst:
      Its all about the Browser property; where you have to set the option New window should be opened in new window. This will work.
    +in case of Mozilla; in Tools->option->Tab->new window should be open in
    new window
    new Tab
    +
    Select new window
    Regards
      -Vinod V

  • How can I add sound to SWF Exported from Imageready

    I am making an animation in image ready, and I would like to ad sound to it.  I am new to Imageready still getting use to making animations.  How can I add sound to my exported animation?

    As Mylenium suggests, using Flash, or Premiere Pro, will allow you to add the Audio. With the SWF, Flash would be the first choice on my system. There are also other programs, with the capability to edit the SWF. Moyea has some, and there are also freeware editors.
    I have an old version of Swish (supplemental to my Flash program), but do not think that my old-timer has any Audio capabilities - maybe I just never looked?
    Good luck,
    Hunt

Maybe you are looking for

  • Error in assign statement

    Hi I am getting dump in following assign statement     assign src+fields_int-offset_src(fields_int-length_src)          to <f> type fields_int-type . Error description: The field symbol is no longer assigned because there was an attempt makde previou

  • Multiple IDOCs based on multiple fields in File to IDOC mapping

    Hello Experts,      I have a requirement to create multiple IDOCs based on multiple fields.      Earlier my requirement is to create IDOCs based on ShipID (i.e., for every ShipID new IDOC...I achieved this).      But now the requirement was to create

  • Photoshop Elements 7 acr 5.4 camera raw plugin won't work

    Hello everyone, I am very frustrated hopefully someone can help me out.  I have PS Elements 7 and installed the camera raw plugin 5.4 per adobe instructions which I followed to the letter.  I still can't open raw files and do not want to use other th

  • Capture table and field of a T-code

    Hi abappers,     I want obtain all table or structure with fields a T-code contain. Exist T-code that it do it? Can you help me please? I can obtain the table that the program is used with the table D010B but I want the table or structure with fields

  • OIM: OID Connector Issue

    Hey all, I downloaded and installed the new 11g version of the OID 11.1.1.5 connector without the connector server on OIM 11g BPO5. While trying to run the group lookup reconciliation scheduled task, it fails with below error: <Oct 30, 2012 8:51:01 P