Grey out rows in ALV

Hi All,
Following is my requirement.
1. I will have a ALV grid output.
2. By selecting few records, user can click on the push button provided in appilcation tool bar
3. Once he clicks on the push button, the selected records should be greyed out(user can't select them again)
How to achieve this in ALV. I have tried some of the methods related to cell tab styles but none of them worked.
Thanks in advance....

Hello,
You wrote, that you tried to use the cellstyles to grey the rows, but id didn't work.  Recently I did gray some rows in my report (using ALV OO cl_gui_alv_grid), so I know it works.
Additionaly to making cell styles (I assume you know how to do this) for each cell in the row you want to grey, you must do two things more :
1. Provide information in your alv layout structure (it is not field catalog) - structure lvc_s_layo, like below
DATA: gs_layout         TYPE lvc_s_layo.
gs_layout-stylefname = 'CELLSTYLES'.
2. After specifying which cells you want to grey, you have to refresh table display.
Then it works.

Similar Messages

  • Grey-out Row in ALV Grid

    Hi,
    Is it possible that when a user higlights a row in ALV, the entire row will be uneditable? Please teach me how.
    Thanks,
    Jim

    This code works for grey cells...But it could be adapted to lines -;) It uses OO ALV...
    *& Report  Z_DUMMY_ATG
    REPORT  Z_DUMMY_ATG NO STANDARD PAGE HEADING.
    TABLES: SPFLI.
    *============================================================
    * Variables
    *============================================================
    DATA: OK_CODE TYPE SY-UCOMM,
          L_MODE TYPE RAW4,
          W_TABIX TYPE SY-TABIX.
    *============================================================
    * Tablas internas
    *============================================================
    DATA: L_S_LAYO TYPE LVC_S_LAYO.
    DATA: WA_EDIT TYPE LVC_T_STYL WITH HEADER LINE.
    DATA: IT_EDIT TYPE LVC_T_STYL WITH HEADER LINE.
    DATA: BEGIN OF G_WA_SFLIGHT.
            INCLUDE STRUCTURE SPFLI.
    DATA: CELL_TAB TYPE LVC_T_STYL.
    DATA: END OF G_WA_SFLIGHT.
    TYPES: BEGIN OF SPFLI_TAB.
            INCLUDE STRUCTURE SPFLI.
    TYPES: CELL_TAB TYPE LVC_T_STYL.
    TYPES: END OF SPFLI_TAB.
    TYPES: SPFLI_TABS TYPE STANDARD TABLE OF SPFLI_TAB.
    DATA: GI_SFLIGHT TYPE SPFLI_TABS.
    DATA: BEGIN OF AUX_TAB OCCURS 0,
          CARRID LIKE SPFLI-CARRID,
          CONNID LIKE SPFLI-CONNID,
          CITYFROM LIKE SPFLI-CITYFROM,
          AIRPFROM LIKE SPFLI-AIRPFROM,
          CITYTO LIKE SPFLI-CITYTO,
          AIRPTO LIKE SPFLI-AIRPTO,
          END OF AUX_TAB.
    DATA: SPFLI_TAB_WA LIKE G_WA_SFLIGHT.
    FIELD-SYMBOLS: <SF> STRUCTURE G_WA_SFLIGHT
                   DEFAULT SPFLI_TAB_WA.
    *============================================================
    * Objetos
    *============================================================
    DATA: CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          ALV_LIST TYPE REF TO CL_GUI_ALV_GRID.
    *============================================================
    * Selección de Datos
    *============================================================
    SELECT *
    FROM SPFLI
    INTO CORRESPONDING FIELDS OF TABLE AUX_TAB .
    LOOP AT AUX_TAB.
      MOVE-CORRESPONDING AUX_TAB TO <SF>.
      APPEND <SF> TO GI_SFLIGHT.
    ENDLOOP.
    *============================================================
    * Instancimiento de Objetos
    *============================================================
    CREATE OBJECT CONTAINER
           EXPORTING CONTAINER_NAME = 'LIST_AREA'.
    CREATE OBJECT ALV_LIST
           EXPORTING I_PARENT = CONTAINER.
    *============================================================
    * Procesamiento
    *============================================================
    LOOP AT GI_SFLIGHT INTO G_WA_SFLIGHT.
      W_TABIX = SY-TABIX.
      IF G_WA_SFLIGHT-CITYTO EQ 'SAN FRANCISCO'.
        L_MODE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
        MOVE 'CITYTO' TO WA_EDIT-FIELDNAME.
        MOVE L_MODE TO WA_EDIT-STYLE.
        INSERT WA_EDIT INTO IT_EDIT INDEX W_TABIX.
        G_WA_SFLIGHT-CELL_TAB[] = IT_EDIT[].
      ENDIF.
      MODIFY GI_SFLIGHT FROM G_WA_SFLIGHT.
    ENDLOOP.
    MOVE 'CELL_TAB' TO L_S_LAYO-STYLEFNAME.
    CALL METHOD ALV_LIST->SET_READY_FOR_INPUT
          EXPORTING I_READY_FOR_INPUT = 1.
    CALL METHOD ALV_LIST->SET_TABLE_FOR_FIRST_DISPLAY(
                          EXPORTING I_STRUCTURE_NAME = 'SPFLI'
                                    IS_LAYOUT = L_S_LAYO
                          CHANGING IT_OUTTAB = GI_SFLIGHT ).
    *============================================================
    * Dynpro
    *============================================================
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '100'.
    ENDMODULE.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      OK_CODE = SY-UCOMM.
      IF OK_CODE = 'BACK'.
        SET SCREEN 0.
        LEAVE SCREEN.
        CLEAR OK_CODE.
      ENDIF.
    ENDMODULE.
    Greetings,
    Blag.

  • 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

  • REUSE ALV -- To make a row grey out (disable/non-editable) dynamically!!!

    Hello All,
    Well again a quick question...
    Am using REUSE ALV method to display the ALV report. There are few fields which i've made editable while building the field catalog!
    Now by, 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

  • Webdyn Pro - Grey out certain rows in ALV?

    Hi guys,
    I'm quite new to webdyn pro. So please bear with me
    I've a webdyn pro component which displays a simple alv output on screen.
    I have a requirement where I need to check if lets say Status = 1 or 2 or 3 or 4.
    If its either one of those status, grey out those row.
    How I'm displaying it is
    node_searchinfo = wd_context->get_child_node( name = `SEARCH_DATA` ).
      node_searchinfo->bind_table( it_searchdata ).

    Hi,
    You can add new attribute "CellDesign" of type WDUI_TABLE_CELL_DESIGN to your structure.
    bind this attribute to alv  columns cell design. Something like this
      field-symbols <wa_colum> like line of lt_columns.
      lt_columns = l_table->if_salv_wd_column_settings~get_columns( ).
      loop at lt_columns[] assigning <wa_colum>.
    <wa_colum>-r_column->set_cell_design_fieldname( value = 'CELLDESIGN' ).
    endloop.
    fill the celldesign value 00 (standard) and according to your status fill celldesign value (see domain WDUI_TABLE_CELL_DESIGN ).
    This has been discussed many times in SCN , so you could easily find resources if you do a search.

  • Grey out a particular row in ALV based on some condition.

    Hi All,
    How can we grey out the particular row in ALV based on some condition( I am using the function modules and not OOPS).
    Regards
    Ramesh.

    Hello Ramesh
    In this case you need to add a specific field to your structure:
    TYPES: BEGIN OF ty_s_outtab.
    INLCUDE TYPE <my table or structure>.
    TYPES: CELLTAB   TYPE lvc_t_styl.  " name is arbitrary but this one is most frequently used
    TYPES: END OF ty_s_outtab.
    DATA: gt_outtab  TYPE STANDARD TABLE OF ty_s_outtab
                                 WITH DEFAULT KEY.
    You can use the fieldcatalog to make an entire column non-editable (LVC_S_FCAT-EDIT = ' ' ).
    However, in case of rows you need to inactivate all cells of this row. For sample coding please refer to thread:
    How to conditionally set ALV field as hotspot
    Regards
      Uwe

  • Grey out(disable) a row in ALV grid

    Hi,
    I want to know how to grey out(disable) row wise in ALV grid display.
    i..e.. Few rows in ALV grid display shoud be editable and few rows non editable based on certain condition.
    How do we do that....Please help.
    Thanks in advance.

    Hi,
    Since fieldcatalog is used to modify coloum and not the row, the fieldcatalog would not solve the problem.
    Thankyou.

  • Checkbox needs to be greyed out in ALV List display

    Hi Experts,
    I am using u2018 REUSE_ALV_HIERSEQ_LIST_DISPLAY' and I need to make the  checkboxes greyed out based on certain conditions. For eg --Say if the field 'status' is 51 in my internal table then the checkbox should be editable  in the List display otherwise the checkbox should be greyed out .. Can this be achieved? Or should I use Classes to do it. Please adviceu2026

    Hi Shankar,
    This is possible using CELLSTYLES (lvc_t_styl), which can fulfill the behaviour you require for your scenario.  I would suggest you to go through the below mentioned link posted on SCN which to asked for the same set of requirement.
    Disabling certain rows in editable oo alv ?
    Please validate the same at your end and let know on this.
    BR/Thanks
    Pranav Agrawal

  • BCALV_EDIT_02 - Edit button making the ALV grey out, i want to retain??

    Dear Friends,
    My problem:
    want to retain the appearance of ALV with a column Editable.
    I observe same thing is happening with example program BCALV_EDIT_02, when we click 'Edit' button, it is making Airfare Editable but all other columns are greyed out.
    My problem is v similar. I want to retain the apprearance as it used to be when non-editable mode, but i want a column to be editable.
    What is the solution. Do i have to  pass any other things?
    Regards,
    Simha

    On clicking on EDIT button, you have to enable only the column which you want to edit and make it ready for input.
    Refer to the below thread for more information:
    [Re: Alv grid: editable individaul fields or editable rows]
    Get back to me if you still have doubts.
    Regards,
    Lakshmi.

  • How to Gray out a row in ALV ?

    Hi Experts,
    I am having a requirement to gray a specific row in ALV . Is it possible through List Display  ? Or Is it possible through Grid Display ?
    If it is possible, please let me know how to achieve this .
    Thanks and regards,
    Kiran.

    Hello kiran kumar  ,
    you can colour a cell in AlV ie.  in turn you can colour entire row in one  Colour...just check out the blew given link
    http://wiki.sdn.sap.com/wiki/display/Snippets/ColorindividualcellsofanALVGRID
    Hope it helps.

  • Disable/Grey out a row in ABAP Objects

    HI,
    I have a reqmt where in which in the report -
    when check box display BOM is checked only BOM components needs to be displayed in the output but should not allow user to select the row and make changes by pressing anybutton.
    The display rows should get greyed out. How to achieve this functionality thru ABAP objects.
    Thanks

    Hi Namit,
    Open the particular page , and select dynamic navigation (from the right hand side corner Display drop down menu ) .
    U will get all the links which r there in the detailed navigation.
    and uncheck the visible property .
    Surekha.

  • When using private browsing to view image results in Safari 5.1.3, only the first two rows of results are visible, the following four or so rows display greyed out place holders, and the safe search button is inoperable. Suggestions?

    When using private browsing to view image results in Safari 5.1.3, only the first two rows of results are visible, the following four or so rows display greyed out place holders, the remainder of the results page is blank, and the safe search button is inoperable. When I turn off private browsing and refresh the page, everything works again.
    Anyone else having this problem?

    I have got the same behaviour after the last Safari Update to 5.1.3. It seems that Safari now handles some scripts in a new way. If you debug the Google Website, you will see, that there is some Javascript Error, that seems to prevent to write into local cache. After some searching I wasn't able to finde a solution for this problem, other then disabling Javascript while private browsing to prevent the script loading. You then are able to use Google with the old layout. The option to disable JavaScript can be found in the Menu "Developer", wich has to be enabled in Safari in the options first.
    In my opinion this is a bug that is now occuring, because Apple changed something in private browsing and that has to be fixed by Google now, to run again. Or we will have to wait for 5.1.4, as you can read online Apple will change and bugfix the javascript engine in that version, perhaps this fixes the problem as well. I hope so!
    If anyone is in the developer program perhaps you could test this with the beta of 5.1.4 and tell us if it works.

  • The number of rows per page is greyed out when running in background?

    Hi,
    For a customized transaction the number of rows per page cannot be set when running in background.
    While a background job is created in SM36 after entering the report name and the selection variant name in the properties of Format the rows and columns field is greyed out.It was not editable.
    Is there any settings to be done or in the custom program any code change needs to be done?
    Thanks in advance.
    Regards,
    Sharon.

    Hi Gabriel,
    After double clicking the format only the rows field is not set to edit.It was greyed out.Is it anything related to the printer settings that will be maintained for a user?
    Regards,
    Sharon.

  • 'add row' in Modify Table greyed out?

    I've got a table (35 rows, two columns each with pics) in my
    web page that when I update it- I generally (in Layout view) go to
    Modify&gt;Table&gt;add row -- but now all the choices in
    this dropdown submenu have been greyed out, except the top one
    'Select Table'-- Have I reached a row limit or something?

    > Have I reached a row limit or something?
    Does your table contain colspans or rowspans (hint - look at
    the code)? If
    so, then that's the reason.
    If you want to know more about colspans/rowspans, read this -
    http://apptools.com/rants/spans.php
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "victory-girl" <[email protected]> wrote in
    message
    news:fod9gs$csa$[email protected]..
    > I've got a table (35 rows, two columns each with pics)
    in my web page that
    > when
    > I update it- I generally (in Layout view) go to
    Modify>Table>add row --
    > but now
    > all the choices in this dropdown submenu have been
    greyed out, except the
    > top
    > one 'Select Table'-- Have I reached a row limit or
    something?
    >

  • Bottom row greyed out and apps moved - why ? How do I get them back to where they belong ?

    bottom row greyed out and apps moved - why ? How do I get them back to where they belong ? Have no idea how this happened.  At first it seemed the apps - phone, safari, mail - were LOST.  But they were moved up with all the others. 

    Thanks for your response.
    However I managed to figure out how to recover - it's just a matter of moving them back to the bottom row 'dock' !  So it's actually very easy.  I was 'thrown' by this unexpected development - don't know how it happened - but it's a 'non-issue' now.  Hopefully my next post or question - if I have one - will be more 'substantive'!

Maybe you are looking for

  • P7n diamond - no bios - 2 of them - fun troubleshooter

    Hello, I write fun troubleshooter because I went so far as to try my friends "working for years" Asus P5B-Plus mobo and CPU and RAM and had same results... Specs:  P7n Diamond - OCZ GameXstream 700W PSU - E8400 Wolfdale - G.Skill 4gb RAM (2x2) - MSI

  • Format changed from 3 to 4 pages

    A three page CV/Resume changed formatting, the lines ran over creating four pages instead of three. Document created in Word 2007 (.docx) back saved to Word 2003 (.doc). This does not happen in Adobe 5. Just used Adobe online conversion trial. First

  • DB View with Sales and Finance Data

    Team, Is there a DB view with Sales and Finance data? -Cust No. -PO# -Invoice -Clearing Doc -Ship From -Unit Price Etc. Thanks Naved

  • Create inbound delivery for movement type 542 in version 4.7

    I have been given a requirement for a third party managed warehouse to receive notification of pending return of unused subcontract materials via movement type 542.  A trigger in the SAP system, whatever it may be, would be transmitted to the warehou

  • Transparency and masks???

    how do i erase lower layers seen through the transparent areas of an upper layer - i only want to mask or hide or erase the areas of a lower layer seen through the transparent areas of an upper layer.  sorry if this is easy - i'm a bit of a newbie.