Using Change Layout Tab on ALV to Export to Excel

Hi Forms!
I have an ALV grid that I export to excel to allow users to manipulate the data exported further.
i do this by clicking change layout -> View -> 'Microsoft Excel' -> click on the template you want to use and click the check mark to export.
My problem is I have a header on the ALV that display's the user selection screen options... all my data shows in excel correctly except that my selection screen header which I would expect in the 'Raw Header' Tab in excel.
If I export to excel using excel export button the header shows up, however this does not help as we like using the pivot table setup from the change layout option.
thank you,
Here is my code for producing the header...
ATA: lo_header  TYPE REF TO cl_salv_form_layout_grid,
        lo_h_label TYPE REF TO cl_salv_form_label,
        lo_h_flow  TYPE REF TO cl_salv_form_layout_flow,
        lv_i TYPE i,
        lv_mtart LIKE LINE OF s_mtart,
        lv_auart LIKE LINE OF s_auart,
        lv_bkbez LIKE LINE OF s_bkbez,
        lv_lines TYPE i.
*   header object
  CREATE OBJECT lo_header.
  lo_header->set_column_count( 10 ).
  lo_h_label = lo_header->create_label( row = 1 column = 1 ).
  lo_h_label->set_text( 'Selection Screen Values' ).
*   information in tabular format
  CONCATENATE 'Dates: ' s_date-low  ' ' ' to ' s_date-high ' ' INTO l_text RESPECTING BLANKS.
  lo_h_flow = lo_header->create_flow( row = 2  column = 1 ).
  lo_h_flow->create_text( text = l_text ).
  CONCATENATE 'Plant: ' p_werks ' ' INTO l_text RESPECTING BLANKS.
  lo_h_flow = lo_header->create_flow( row = 3  column = 1 ).
  lo_h_flow->create_text( text = l_text ).
  CONCATENATE 'Costing Variant: ' p_klvar INTO l_text RESPECTING BLANKS.
  lo_h_flow = lo_header->create_flow( row = 4  column = 1 ).
  lo_h_flow->create_text( text = l_text ).
  CONCATENATE 'Costing Version: ' p_tvers INTO l_text RESPECTING BLANKS.
  lo_h_flow = lo_header->create_flow( row = 5  column = 1 ).
  lo_h_flow->create_text( text = l_text ).
*there can be 1 or many Material Types need to check
  DESCRIBE TABLE s_mtart LINES lv_i.
  IF lv_i > 1.
    lv_lines = 1.
    CONCATENATE 'Material Type(s): ' s_mtart-low INTO l_text RESPECTING BLANKS.
    lo_h_flow = lo_header->create_flow( row = 6  column = lv_lines ).
    lo_h_flow->create_text( text = l_text ).
    LOOP AT s_mtart INTO lv_mtart .
      IF lv_lines > 1.
        lo_h_flow = lo_header->create_flow( row = 6  column = lv_lines ).
        lo_h_flow->create_text( text = lv_mtart-low ).
      ENDIF.
      lv_lines = lv_lines + 1.
    ENDLOOP.
  ELSE.
    CONCATENATE 'Material Type(s): ' s_mtart-low INTO l_text RESPECTING BLANKS.
    lo_h_flow = lo_header->create_flow( row = 6  column = 1 ).
    lo_h_flow->create_text( text = l_text ).
  ENDIF.
*   set the top of list using the header for Online.
  cr_content = lo_header.

Hello Re_flex....thanks again but I am missing a step here as I was able to hide the column by right-clicking but when I click on the layout there is no layout that I can select. Do you know if these layouts are set in config or not as my layout setting displays 'X' user specific or 'A' ALL but when I select these nothing is displays and when I save I get a message back 'No selection'

Similar Messages

  • Hide Change Layout Button in ALV report o/p for MB52 Tcode

    Hi,
    Is it possible to Hide Change Layout Button in ALV output for Report MB52 using authoriztaion.
    We have created a layout in which we are hiding some coloumns which the user should not see.
    But if the change layout button is active then the user can add those coloumns to output.
    Is this possible through authorizations. I want to avoid doing any chnages to the std sap program.
    Thanks & Regards,
    Fawaz

    Check the object S_ALV_LAYO

  • Saving Option in Change layout TAB

    Hi ,
    I am taking Sales order list in VA05
    I clicked on change layout tab n Selct field as per my requirements
    but Now I want to save that layout but I am not getting any saving option
    in menu bar Settings - layout - saving this option is in grey
    How to activate this option?
    Regards,
    Akshay

    Hi,
    check this thread, you have only answered this questions answer
    VA05 :  Save Layout Option is deactive..
    Thanks,
    Raja

  • What is the constant name for Change layout Button in ALV Grid ABAP Objects

    Dear All,
    I have one query please help me.
    what is the constant name for Change layout Button in ALV Grid ABAP Objects.
    With Rgds,
    Babu

    Halo Vinod,
    The consant name is cl_gui_alv_grid=>mc_fc_current_variant.
    Regards
    Arshad

  • Use of layout tabs in IS RETAILS

    Hi  Guru,
    can u tell what is use of layout tabs in IS RETAILS.

    In IS retail the enterprice architecture will have a DC associate with several stores (in sap terms these store and DC all are plants only). Practically in retail scenario, every month or fortnight a new store would be opened. These store would maintain material in a special order to improve the customer attraction.
    Based on the consumer behaviour in a particular region the products will be kept in shelf in some order. For example if the organisation gets Rs.10 profit / Medimix soap where as it gets Rs 15 Profit / Lifebouy. So the company needs to arrange the shelf in store in such a way it contains more no of Lifebouy in Row with some special tags and some less no of Medimix. This will enhance the customers interest in purchasing new attractive one which is available plenty in quantity.
    The model that is used for arranging the products in shelf or rack or cupboard of store in such a way to increase the profit and presentability is called layout. It is also called planogram. Because this layout will be planned few months in advance. This is done in advance to intiate procurement and replenishment of product for new store.
    Hope I clarified you.
    Reward if useful.
    Regards
    edwin

  • Change layout Button In ALV Grid

    Hi all,
    I have a requirement where I am creating Field Catalogue from Z Table(has 60 fields) for few(12) fields.
    The user would like to have the option to add more fields by changing the Layout. But I dont see the Fields in Hidden Column when I click the Change Layout Button in ALV Toolbar. It just displays the Field based on Field Catalogue defined.
    Is there a way I can maintain all the fields without being displayed in ALV initally and letting the user select the hidden fields as per their requirement. As happens in SE16 where we can select the fields to be displayed.
    Thanks for the support.

    Hi Abhilasha,
    In the reuse_alv function module we can see a field I_SAVE.If you pass this as 'X' then the option of saving the layout variants are available.
    Create a layout by,selecting just the fileds required for display and set it as the default variant.It can be made Global or user-specific.But  we need to declare all fields in the fieldcatalog.
    So if the default variant is set,everytime the program is run it shows only the fields selected in it but can select more form the change layout option.
    Hope it helps.
    Regards
    Byju

  • ALV grid export to Excel 2003-f.01

    Hi all,
    I have an issue with ALV grid export to excel 2003 ,when i tried to download with the option as local file > xls file ,the report downloads with page breaks which the user does not want , each break comeswith header .
    With the option of list>export>xml sheet - the report downloads with out page break but with no header information like the name of the report and reporting period .The tcode is f.01 and the system is ECC6.
    Can any one suggest  how to download the report with tiltle of the report with no page break ?
    Thanks
    ske

    Hi
    What happens if you use the export/local file option - does that help at all or can you change the layout? Haven't got access to your release to check.
    Cheers
    David
    Edited by: David Berry on Oct 28, 2010 9:38 PM

  • How to add Change Layout Button to ALV Toolbar?

    Hi All,
    I am using a SAP GUI STATUS 'STANDARD' that has almost all the funcationality needed except for the change layout button.
    I have tried changing the GUI STATUS to 'STANDARD_FULLSCREEN' which has the button I am looking for but it does not show up.
    What am I missing to have the 'Change Layout' Button show on the toolbar?
    thank you

    I am using Classes.
    I did not specify any type of table of 'exclude' buttons.
    here is my code that display the ALV
    DATA gr_alv TYPE REF TO cl_salv_table.
    DATA gr_functions TYPE REF TO cl_salv_functions_list.
    DATA gr_selections TYPE REF TO cl_salv_selections.
    DATA gr_events TYPE REF TO cl_salv_events_table.
    DATA gr_settings TYPE REF TO cl_salv_display_settings.
    DATA gr_layout TYPE REF TO cl_salv_layout.
      TRY.
          cl_salv_table=>factory(
           IMPORTING r_salv_table = gr_alv
           CHANGING  t_table      = gt_rpt_details ).
          PERFORM f_display_settings.
          gr_alv->set_screen_status(
          "pfstatus = 'Z_STANDARD'
          pfstatus = 'ZSTANDARD_FULLSCREEN'
          report = sy-repid
          "i_save = 'A'
          set_functions = gr_alv->c_functions_all ).
          gr_events = gr_alv->get_event( ).
          "create layout object
          CREATE OBJECT gr_layout.
          gr_layout->get_current_layout( ).
          CREATE OBJECT event_handler.
          SET HANDLER event_handler->on_user_command FOR gr_events.
          gr_functions = gr_alv->get_functions( ).
          gr_functions->set_all('X').
          gr_functions->set_group_filter( value = if_salv_c_bool_sap=>false ).
    *       Set print preview
          gr_functions->set_print_preview( ).
          gr_alv->get_display_settings( ).
          gr_alv->display( ).

  • Hide 'Change Layout' button from alv toolbar

    Hello All,
    can anyone let me know how can we hide the change layout button or exclude the change layout button from the ALV tool bar using OOPS . what's the fcode for it.
    Thank You !
    Ravi

    Hi Ravi,
    Please refer to this [Program|http://www.saptechies.com/disable-some-standard-buttons-from-alv-display/].
    Hope this helps.
    Regards,
    Chandravadan

  • Why miss change layout button in ALV report

    Hello Experts,
    I have strange problem, I run the same transaction two times, one I have the change layout button but another I miss it...
    Anything control this button?
    thanks a lot for your help!

    Hi,
    Is this standard Tcode or customized Tcode?
    If it is standard tcode, what is the tcode?
    If it is customized tcode, can you post some code for us to analyse?
    Thanks.
    Regards,
    Keng Haw

  • ALV List export to Excel when program is run in background

    Hello,
    I am running into an issue with a custom ALV report which contains an export to Excel option on the input screen. However, when I attempt to run the report in background due to high volume of records/expected performance constraints, the job fails to produce a spool when the "export to Excel" option is selected. When I deselect that option, the background job successfully generates a spool, which I can then export to Excel (albeit the formatting will not look the same).
    Is the above an accurate statement or does anyone know of a way where either;
    1) The background job can create and store the Excel output into a cached directory?
    2) The spool generated, when exported to Excel, can match the format of the foreground Excel output?
    Thanks in advancce.

    Check out the sample program of the provided link ..
    http://www.sap-img.com/abap/download-in-background-in-excel-format.htm

  • ALV Grid Exporting to Excel - Columns out of order

    Hi,
    In my ALV grid everything is in order as it is in the structure. When however I export to excel from ALV grid, the columns are out of order. First it lists the string columns, then number columns and lastly date columns. Is there a way to make excel keep the same order as it is in ALV grid?
    Thanks,
    Sergiy

    I am not much of an ABAPer but I was able to set the column position during data declaration with
    gs_fcat_line-col_pos = 1, for example.
    That would put the column in the first position in ALV as well as the excel export.
    Thanks for your inputs.
    Sergiy

  • ALV GRID Export to Excel button Missing

    HI All,
    I am facing some problem with ALV GRID. When excuting the report with my user id I am able to see the 'Export to Local file' button in the ALV GRID where as if i am excuting with another user id which is having less authorisations than the button is greyed out.  I checked by giving all authorisation than we are able to see the button.
    Could anyone please tell me which authorisation object we have to assign to see the buttons.
    Thanks & Regards,
    Murali.

    Hi,
    Before clicking on the Export to Excel button, start the debugging session by placing the command /H in the command prompt.
    Now, put the break point at statement AUTHORITY-CHECK. Now it will trigger all the authorization objects relevant to this.
    check the sy-subrc value gets failed.
    Regards,
    Santhosh.

  • Problem in ALV Data Exported to Excel

    Dear all,
    When an ALV data is exported to Excel i see that the data is shown in 2 lines
    and a blank line is inserted between each data.
    Can any body please help.
    with rgds
    Ranjith Singh

    Hi Ranjith,
    How many columns that you extracted to excel from ALV?
    Would you give more specific to your case?
    As I remember, ALV has its limits for extracting number length of column to excel.
    Regards,
    Dondi.

  • Cross Tab Formatting Problem when exported to excel

    Hi There,
    I got a problem with cross tab when exported to excel, Call_id field is occupying 4 cells. Below is the structure
    AssignedGroup-Call_Id-Total
    A--1001-
    A--1011-
    Total-----2-
    B--1021-
    B--1031-
    Total-----2-
    C--1041-
    Total-----1-
    can anyone help? How to restrict call_id to fit in single cell?
    Thanks,
    Jyothi
    Edited by: Jyothi Yepuri on Sep 16, 2009 7:50 AM

    Yeah.. crystal has giving  some issues while exporting reports without SPs, especialy previous versions.
    So  Better to install latest SP or patches for CR 10.0. I think SP 6 is the updated one for CR10.0.
    For More info Go through this link,
    http://resources.businessobjects.com/support/additional_downloads/service_packs/crystal_reports_en.asp#CR10
    Regards,
    Salah

Maybe you are looking for

  • IMac late-2006, cannot boot, white screen. Please help!

    I got white screen whenever I boot the computer. I have tried all of the followings. - detach all peripherals - safe boot - reset PRAM / NVRAM - boot from Recovery HD - boot from USB Recovery drive - boot from Snow Leopard installation disc - boot fr

  • Flex 2.0 and Flex 3.0

    Hi, My application was developed in Flex 2.0, But our team using flex 3.0. Can i use flex 3.0 to record scripts in QTP(Automation). Reddy

  • Compaq x6000 video driver

    Is there a video driver for Windows 8.1 now loaded on my Compaq X6000 and working great , that will allow me to project to a second screen? The one now loaded, basic driver, will not.

  • Mod_perl/Installing RT Request Tracker

    Hi, I'm trying to install RT Tracker on Mac OS X 10.5 following these instructions: http://wiki.bestpractical.com/view/MacOSXServerInstallGuide I don't want to build apache, I just want to install mod_perl running side by side w/ mod_php, is there an

  • Crackling/substandard sound in flash videos (YouTube etc) regardless of video quality setting.

    Hi all, I hope you can help! Apologies if this is in the wrong forum, I'm struggling to find the best place to put this. 1. a summary of your issue Crackling/substandard sound in flash videos (YouTube etc) regardless of video quality setting. 2. the