REUSE ALV - different layouts

Hi Gurus,
iam having an ALV report with an ALV display. Form this ALV on click of a button i will navigate to another ALV display.(both ALV's are called within the same program).
Now my problem is with Layout functionalities:
If a layout is saved in the first ALV, then if i go to second ALV and go for the Layout selection, all the layouts saved in the first ALV are coming in the second ALV.
If the user selects a layout of the first alv, obvoiusly, no data will be displayed in the second ALV.
So is there anywy i can go for fresh set of layout's for the two ALV's separately..
(as per my knowledge, the layouts are stored based on the Program name in the database, so if i go to layout option in both the ALV,s... so the common alv's are coming in both displays's.)
the above  issue is causing problems to the user...
iam passing the below data for the ALV..
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program       = sy-repid
      i_callback_pf_status_set = pfstatus
      i_callback_user_command  = c_usercomm1
      i_callback_top_of_page   = l_v_top
      i_grid_title             = text-064
      is_layout                = fp_wa_layout
      it_fieldcat              = fp_i_fieldcat1
      i_default                = c_x
      i_save                   = 'A'
    TABLES
      t_outtab                 = fp_i_item1
    EXCEPTIONS
      program_error            = 1
      OTHERS                   = 1.
so can anyone of you give me a suggestion for different layouts for different ALV's.
one more point: in the selection screen... iam using
SELECTION-SCREEN ULINE.  
which is displaying a black line between the select options.
Now can this color of the black line be changes to grey or white.
Also can a Line can be drawn between two selection fields without wasting the space between the fields(as there are many fields in the selection). the above command is consuming one row. i dont want to waste that space.. so can anyone give code for the same...
Thanks & regards..
Chaitanya..

Hello,
U can populate the below fields of the two layouts  variant structures;
U can find GROUP and HANDLE fields , Just give different names so that u can have different layouts based on u r variants as the above field values distinguish between the alyuts.
Check this link
Re: Change layout button in ALV Grids
Regards
Edited by: shishupalreddy ramreddy on Jun 26, 2009 3:55 AM

Similar Messages

  • Dynamic Headers in ALV Based on Different layouts

    Hi Experts,
    I Have a requirement in an ALV Report wherein After the report run as the user chooses different layouts from saved ones the ALV header should change accordingly.
    I'm using Function modules to write the ALV.
    First of all , is it possible? and if yes how?
    Thanks,
    Sachin Soni

    hi rohit ,
    thanks for replying but i think ppl have not understood it clearly.
    I'm not asking about the variants which the user saves before calling the report but rather the layout which after the report run user creates based on what columns he wishes to see at that moment.
    thanks
    sachin soni

  • ALV with different layouts

    Hi,
    I would like to write an ALV GRID reflecting 5 different layouts. I prefer to use function modules. Is it possible and does anyone have sample code.
    EG:
    field1 field2 field3
    field1 field2 field3
    field001 field000
    field001 field000
    field11 field12
    field 13
    field14 field15 field16
    Thanks,
    Leanne

    Hi,
    Sorry I think I have not expressed the issue properly. I need all five lines display everytime.
    Thanks,
    Leanne

  • Alv grid layout as default.

    In an alv grid you can personalize the layout (Change layout, save layout). Is it possible to somehow add this saved layout to the report so that it will be shown as the defaylt layout for eveyone that runs the report?
    Best Regards Claes

    Hello Rich Heilman and thank you for your help.
    I solved the problem as you suggested in the first example. This has worked great but now i need to set different layouts depending of what the user chooses. This i have not solved yet.
    Is there anything else that I need to do except create the layouts with those names <i>/Y23HPAREsum</i> and <i>Y23HPAREind</i> as you se in the code below?
    data:  variant type disvariant.
           variant-report = sy-repid.
      if p_sum eq 'X'.
           variant-VARIANT = '<i>/Y23HPAREsum</i>'.
           else.
           variant-VARIANT = '<i>Y23HPAREind</i>'.
      endif.
    form reuse_alv_list_display.
      data : l_repid like sy-repid.
      move sy-repid to l_repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program     =   l_repid
          i_callback_top_of_page =   st_formname_top_of_page
          it_fieldcat            =   st_fieldcat[]
            i_save               =   'X'
            is_variant           =   variant
        tables
          t_outtab               = lt_rec.
    endform.                               " REUSE_ALV_LIST_DISPLAY
    Best Regards Claes

  • Use different Layouts for Summary and Details in Drill down report

    Hi All,
    I have a 2 level drill down report in ALV.
    The summary report has certain fields and the Detail report has different fields. Now my problem is that when i use a default layout (with all fields of summary report) for the summary report, and drill down to the detail report i'm missing the fields on detail that are not in Summary. And if i save the default layout as default (with all fields of Detail) and go back to sumary, I'm missing the some other fields on summary (which are not on detail report).
    Is there a way to make different default layouts for each of those summary and detail reports:
    Also as the layouts are choosen by the user, i cannot hardcode any particular layout;
    So if the user chooses a layout for detail; it has to stay the same layout for the detail report if he goes to summary and then back to detail; unless the user changes the layout again.
    I'm using two different Layout types for each report. but i still cannot get the desired effect.
    Data:
          gt_layout_s             type slis_layout_alv,
          gt_layout_d             type slis_layout_alv,
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = g_repid
          is_layout                = <b>gt_layout_s</b>
          i_callback_top_of_page   = g_top_of_page
          i_callback_user_command  = g_user_command
          i_callback_pf_status_set = g_status
          i_save                   = g_save
          is_variant               = gs_variant
          it_fieldcat              = gt_fieldcat[]
          it_events                = gt_events[]
        importing
          es_exit_caused_by_user   = gs_exit_caused_by_user
        tables
          t_outtab                 = it_summary.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = g_repid
          is_layout                = <b>gt_layout_d</b>
          i_callback_top_of_page   = g_top_of_page
          i_callback_user_command  = g_user_command
          i_callback_pf_status_set = g_status
          i_save                   = g_save
          is_variant               = gs_variant
          it_fieldcat              = gt_fieldcat[]
          it_events                = gt_events[]
        importing
          es_exit_caused_by_user   = gs_exit_caused_by_user
        tables
          t_outtab                 = it_detail_disp.

    Here is how you differentiate between the layout of two different grids. There is the parameter, IS_VARIANT in the function. You usually leave it empty or pass only the report name and username. <b>What you need to do is to pass unique string for each grids to the HANDLE field of the parameter IS_VARIANT.</b> You can probably hard code it as HEADER and DETAILS in your case. Once that is done, system identified that these two different layout for different grids.
    Regards,
    Ravi
    Note : Please mark all the helpful answers<u></u>

  • Reuse alv merge

    what is the use of function module reuse alv field catalog merge

    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.
    more info
    DEFININING OUTPUT CHARACTERISTICS: PREPARING DISPLAY FIELDS CATALOG
    A field catalog is prepared using the internal table (I_FIELDCAT) of type SLIS_T_FIELDCAT_ALV. 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 to add desired functionality (i.e. Key, Hotspot, Specific headings, Justify, Col. position etc) to certain fields of the output. If not mentioned specifically, then the defaults are taken. The possible values and defaults are listed below.
    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.
    The minimal field catalog is documented below. This can be done in a routine using a local variable. The user can use the other optional parameters to assign output attributes to different fields in the output, which differ from the default.
    Check...
    Re: What is the use of REUSE_ALV_FIELDCATALOG_MERGE?
    Re: FM: REUSE_ALV_GRID_DISPLAY and  REUSE_ALV_FIELDCATALOG_MERGE
    award points and try to close threads...
    Message was edited by:
            Ramesh Babu Chirumamilla

  • ALV Change layout before Content is displayed

    Hello expert,
    How can i call default button "change layout" before the alv content?. i want that when the alv appear, the initial screen is like below, where user can choose which column he want to be displayed.
    any help please?

    Hi Hassim,
    Miantain in the Reuse Alv Grid display Layout as Save options below
       i_save                           = 'A'
    Example :
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
           i_callback_program                = sy-repid
           i_callback_top_of_page            = 'TOP_OF_PAGE'
           is_layout                         = layout_h
           i_callback_user_command           = 'USER_COMMAND'
           it_fieldcat                       = it_fieldcat
            i_save                           = 'A'
         TABLES
           t_outtab                          = it_final
    *   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.

  • How do I use different Layouts?

    I am trying to make a program that runs in a window like this:
    http://www.exyt-web.com/Window.gif
    The problem I'm having is with the layout.
    How do I have more than one layout ?
    For example - as you can see in the image (hyperlink above) I wish to have a border layout with a JFrame at the North position and then in the South position I want to have buttons laid out in a FlowLayout.
    Also with my radio buttons I want these in a GridLayout(3, 0) layout.
    I made up some example code to test using different layouts - but it seems one layout always overrides the other...
    import java.awt.*;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    public class LayoutTest extends JFrame
        public LayoutTest()
            setTitle("Hello World");
            Container contents = getContentPane();
            Container contents2 = getContentPane();
            contents.setLayout(new FlowLayout());
            contents.add(new JLabel("<FILTER [Type a th|    ]>"));
            contents.add(contents2);
            contents.add(new JLabel("< Filter Button >"));
            contents.add(new JLabel("<  Add Button   >"));
            contents2.setLayout(new GridLayout());
            contents2.add(new JLabel("< Button 1 >"));
            contents2.add(new JLabel("< Button 2 >"));
            contents2.add(new JLabel("< Button 3 >"));
            contents2.add(new JLabel("< Button 4 >"));
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            pack();
        } // HelloWorld
        public static void main(String [] args)
            LayoutTest theLayoutTest = new LayoutTest();
            theLayoutTest.show();
        } // main
    } // class HelloWorldI know this obviously doesn't work but I hoped it would show what I was trying to do.
    I also tried creating a new 'contents2' and then adding it into 'contents'
    e.g. contents.add(contents2); My current code for the window I'm trying to create so far is:
    import java.awt.*;
    import javax.swing.*;
    public class Menus extends JFrame
        public static void Menus()
            // Creates a new JFrame, with the title specified in quotation marks.
            JFrame frame = new JFrame("Film Database");
            // Sets the default close operation of the frame.
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // Creates a new menu bar for the frame.
            JMenuBar menuBar = new JMenuBar();
            // Creates a new menu for the menu bar.
            JMenu menu = new JMenu("File");
            addFrameContents(frame, menuBar, menu);
            // Sets the new menu bar on the frame
            frame.setJMenuBar(menuBar);
            frame.pack();
            frame.setVisible(true);
        } // HelloWorld
        public static void addFrameContents(JFrame frame, JMenuBar menuBar, JMenu menu)
            // Adds the menu to the menu bar.
            menuBar.add(menu);
            // Creates a new item for the menu with a small icon.
            JMenuItem menuLoad = new JMenuItem("Load", new ImageIcon("C:/load.gif"));
            // Adds the new item to the menu.
            menu.add(menuLoad);
            JMenuItem menuSave = new JMenuItem("Save", new ImageIcon("C:/save.gif"));
            menu.add(menuSave);
            JMenuItem menuQuit = new JMenuItem("Quit", new ImageIcon("C:/quit.gif"));
            menu.add(menuQuit);
            // Creates a new container.
            Container contents = frame.getContentPane();
            // Sets a new layout for contents, in this case FlowLayout.
            contents.setLayout(new GridLayout(2, 0));
            // Adds new JLabels to the container.
            contents.add(new JLabel("< JLabel 1 >"));
            contents.add(new JLabel("< JLabel 2 >"));
            contents.add(new JLabel("< JLabel 3 >"));
            contents.add(new JLabel("< JLabel 4 >"));
            JLabel thisLabel = new JLabel("Hello");
            thisLabel.setLayout(new FlowLayout());
            JLabel thisLabel2 = new JLabel("Hello2");
            thisLabel2.setLayout(new FlowLayout());
            contents.add(thisLabel);
            contents.add(thisLabel2);
        public static void main(String [] args)
            Menus();
        } // main
    } // class HelloWorldAny help on how I can use two separate layouts in the same frame would be great!
    Regards,
    Tom

    doing this:
    Container contents = getContentPane();
    Container contents2 = getContentPane();
    does not create 2 different containers. It's just creating 2 variables that refer to the same container. There is only 1 content pane in a window/frame. A container can only have 1 layout.
    If you want to have 2 layouts, you create 2 panels with separate layouts and put what you want in each panel, and put both panels in the content page.

  • ALV Report row grey-out (disable) dynamically -- REUSE ALV!!!

    Hello All,
    Well again a quick question...
    Am using REUSE ALV method to display the ALV report.
    Dynamically by selecting a row in the list (using the checkbox) and by pressing a button on application tool bar, the selected row should be greyed-out(disabled), that is it should not be anymore editable!
    How is it possible?
    Any kind of inputs regarding this will be damn damn helpful.
    Thanks in advance!
    Cheers, Sundar.

    Hi,
    The above solution 1 will be only applicable if using OO ALV!
    above solution 2 will disable the entire column, and then again i need to call the "REUSE ALV"... which i don't want to.. as it opens another screen above the same screen and i have to close it twice!
    I know it is possible to grey out the selected row using OO ALV... i want to know if it is possible in REUSE ALV???
    Keep shooting please....
    Thanks!
    Regards,
    Sundar

  • How can I create multiple pages, with different layouts to the others, in DW fluid grid layouts?

    Hi everyone,  : )
    I am creating a website using FGL in DW CS6, v12.0 build 5808.  I do not have Creative Cloud (do you have to pay to use this service?).
    I have created one layout for my home page.
    I would like to create several more pages, but I want them to use different layouts (as well as different content).
    I tried to do something similar before using 'save as' (this was with a non-FGL), but whenever I changed the original page that I had 'save as'd' from, the layout in all the other pages would change too!
    I found a possibility from someone else online suggesting using a template, but have not tried it yet: http://www.linkedin.com/groups/Adding-second-fluid-page-in-119937.S.192422240
    I'm a bit scared of breaking everything, as I am new to web design and have had to restart the whole process a few times due to messing up the fluid.css etc and other issues, so I am taking baby steps.
    Happy to try whatever's suggested and, while I wait for (I hope) your responses, I think I will try the template thing, but from the reply the person who asked the question gave, it sounds like his subsequent pages changed too, as I mentioned above?  *scared*  ; )
    If anyone can help me with this query I would be very grateful.  Thank you!  : )

    Thanks David.
    I tried using different IDs for the other pages, but eventually one of the divs seems to 'break' - it overlaps other divs, or cannot be moved or resized (you can select the outline and it goes blue, but no 'move up a row' or down a row or 'lock to grid' etc icons appear and it can't be drag-re-sized), plus the green overlay disappears (just from that div.  I'm aware of how to turn visual aids on and off), so it seems broken.  This often seems to happen if you rename a div once it's been created; it does not rename in the layout.css on the right side panel (CSS Styles) in DW and the 'broken' behaviour above is exhibited.  Do you know anything about this?  Is this the 'edit this doc at your peril' stuff that most tutorials seem to mention?  Am I doing something wrong?
    I also tried making an FGL and saving out the original boilerplate.css, layout.css and respond.js.  Then created multiple new FGLs and each time it created new versions of layout.css (called 'untitled-1', 2 etc.).  Once I had created all the FGLs, I deleted all the new boilerplates and untitled.css files.  Then restored the original ones and changed the link at the top of each page's html to refer to the same filename (the original layout.css), rather than untitled.css.  I thought this might work and it seemed to for a while, but then as I had to add new div names for the sections on each page, it eventually broke (as above).
    Anyway, I think you have a good point about different layouts and it occurred to me also while I was exploring and waiting for replies here.  I think I will make one layout for all pages and go with that.  I have a couple of questions about that though:
    1. I think the max number of divs I want for one of the pages is 10, but some pages need less divs.  If I only fill e.g. 8 divs on one page, will the other ones be sat there empty?  I think they will actually...I guess I'm asking because I have not tried it yet (will do after this) and it takes so long to do this trial and error.
    2. If the amount of content in each div is different, e.g.  let's say Page 1 has 6 lines of content in div1, but page 2 may have an unlimited amount of content (I will want to add to it in the future).  Will this result in the div on page 1 being a huge block of empty space after its 6 lines?
    Thanks so much for your help!

  • How do I create a automatic second page with different layout settings?

    Hi there,
    I want to create a business letter template with a different second page. I already managed to create a different layout on page nr two, but
    whenever I write a letter with this template and I reach the end of page one, pages creates a thrid page in between my page nr one and nr two with a mixture of the layout of template page nr two and the footer of page nr one.
    I want pages to take my template page nr two (with different header and footer) as second page instead of creating one itself.
    If I don't need a second page - because my letter is to short - I should not have to delete a second page. It simply should not be there...
    Thanks for Help!
    G4's and 12" PB   Mac OS X (10.4.6)  

    Hello Stefan,
    you achieve this with a little trick. Create your letter and set the layout for the first and the second page by inserting a placeholder text. This placeholder text should fill the first page and the top of the second page, so both pages are build in one section. When the entire letter is layouted well, select the placeholder text and than save the letter as a template.
    Now every time you open this template, you only have to insert the main text (replace the placeholder text with real content), and the second page disappears until the main text overflows the borders of the first page. Than you will get the second page again with the layout you have created for it.
    I hope this will work for you like it works fine for me.

  • Different layouts for different pages

    hi all,
    i have created a form in which there are 5 output pages but the print preview shows only the first page out of 5.i want to go to the next page.plz help how would i do that.and  i want different layouts for different pages.
    thnks n regards,
    mukesh.

    Hi Mukesh,
    Read these lines which has been given in help.sap.com and also go through the link given below.
    Main Window on Several Draft Pages :
    if you want the pages on which a table with items is printed to have different layouts. Height and position of the main window may differ on the different pages, but the width must remain the same throughout.
    [Main Window|http://help.sap.com/saphelp_nw70/helpdata/en/b1/243fdabeee11d4b633006094192fe3/content.htm]
    Regards,
    Sravanthi

  • Alv grid layout display in 2 pages

    Hi All,
    I am presently working in ALV programming.
    The client requierment is "GL line items and summary sheet will be listed in separate pages."
    i am dispalying the output using ALV grid layout display.
    Can you please conform that how to write logic for summary sheet.that will display after the line items and also saparate page.
    Thanks,
    Sridhar

    Hi ,
          Use event END OF PAGE .
    Write a Form for end of page
    then do calcualtions.
    Reward if useful.

  • Flat file with different  layouts in a single file

    Hello Friends,
    Good Morning.
    I am new to ODI - Oralce Data Integrator 11G.
    I have a flat file where I had to load the flat file data to a oracle DB ( 11G ).
    The flat file has 5 different layouts ( Data of 5 different suppliers coming as a single file and each layout is different ) and each layout corrresponds to one supplier information.
    I had to load each layout data into a different table using a single source file ( That has all supplier information).
    Please advice.
    Thanks/Kumar

    Ok below are the layouts.
    BASE record                                                                                                    
    DS01 record                                                                                                              
    RM01 record                                                                                                         
    CR01 record                                                       
    NW01 record                                                       
    Few more question to you.
    Are they always come in sequential like below ?
    BASE record                                                                                                    
    DS01 record                                                                                                              
    RM01 record                                                                                                         
    CR01 record                                                       
    NW01 record
    BASE record                                                                                                    
    DS01 record                                                                                                              
    RM01 record                                                                                                         
    CR01 record                                                       
    NW01 record
    BASE record                                                                                                    
    DS01 record                                                                                                              
    RM01 record                                                                                                         
    CR01 record                                                       
    NW01 record
    Do you want only insert or insert/update as well ?

  • ALV  List Layout add new button  and modify Append Row Button Text and Logi

    Hi All,
    I am working on Employee custom development Application in Webdynpro ABAP>
    In my ALV list Layout  I have to add new  two Buttons  Top or Bottom of the ALV List.
    If I am adding I have to add logic for those Buttons. How to add and add logic for those buttons.
    as well as I have to Change the  Text  for  Existing Button ''Append Row''    to  "ADD NEW ROWS"
    and I have to add logic in this button while Append New Row I have to generate ID no for New Rows .
    Kindly help/advice  me to proceed further.
    Thanks in advance.
    Dav

    Hi Dav,
    To Add buttons please refer this thred,
    ALV with user-defined buttons on toolbar in wd abap
    To change or rename text in ALV standard buttons, please refer this ...
    How can i change the text of an standard button in ALV?
    and also see this article on self defined functions...
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true
    Thanks,
    Kris.
    Edited by: kissnas on Feb 22, 2011 5:59 AM

Maybe you are looking for

  • No Direct support for BlackBerry PlayBook tablet - why not I just bought it?

    I've just bought a playbook. It says it comes with complimentary technical support for 90 days form the date of purchase. I have attempted to register the device using the S/N number as required and I get the following: Unfortunately, your BlackBerry

  • Intercompany payments

    How to configure to make vendor  payments for one company code through another company code?

  • LIS Setup Question

    After you load your data into BW amd  everything is ok.... is it safe to delete the setup data via LBWG?

  • Exception when executing a report: Field I_REPORT_ID not a member of INPUT

    Hello, I created a simple Report with the Report Designer. When I try to execute it in the portal hitting the "Execute"-button i get the following BI Runtime Exception: Exception in BI runtime [code]Initial cause Message: Field I_REPORT_ID not a memb

  • OsbProxy Service not polling Database

    Hi, I have developed a simple application in OSB where My proxy service is polling a database table and after some processing it is writing data in a queue. Earlier It was working fine. But now suddenly my proxy service is not polling data from my so