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.

Similar Messages

  • 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

  • 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

  • Disable delete button in ALV grid

    Hi Experts,
    I have a functionality to disable some buttons in alv grid such as delete row,cut,print etc.
    I know how to exclude them by using it_toolbar_excluding , but I need to disable them.
    Can you please let me know how to handle this.
    I am displaying the ALV grid by calling the method set_table_for_first_display.
    Thanks in Advance
    Prasanth

    Hi,
    By using below code you can disable any button in ALV display
    data : tool_wa_exclude  type ui_func.
      tool_wa_exclude  = cl_gui_alv_grid=>mc_fc_loc_delete_row.
    append tool_wa_exclude  to tool_it_exclude .
      call method grid2->set_table_for_first_display
        exporting
          it_toolbar_excluding          = tool_it_exclude
        changing
          it_outtab                            = it_ekpo
          it_fieldcatalog                    = it_fcat
        exceptions
          invalid_parameter_combination = 1
          program_error                           = 2
          too_many_lines                         = 3
          others                                        = 4.
    U need to pass tool_it_exclude internal table to  method for displaying

  • Color a row with ALV GRID

    Hi my friends,
    I have written a small ALV Grid where some rows should be colored, dependend on their status in a table. But it's not working and I can't find out, why it is not working. I've already studied all the topics in this forum, which are related to 'row color alv grid', but I can't find the mistake in my code. Is anyone able to find out what is wrong here?
    Thanks a lot for your help!
    *& Report  /BMC_TST_SHOWLOG
    REPORT  /BMC_TST_SHOWLOG.
    TYPES: BEGIN OF log_table.
      TYPES:  log_level TYPE /bmc_log_message,
              cr_date TYPE /bmc_cr_date,
              message TYPE /bmc_log_message,
              linecolor(4) TYPE c.
    TYPES: END OF log_table.
    DATA: lt_log TYPE TABLE OF log_table with HEADER LINE,
          lt_log2 TYPE TABLE OF log_table with HEADER LINE,
          lt_log_list TYPE TABLE OF log_table,
          lt_line LIKE LINE OF lt_log_list,
          container_r TYPE REF TO cl_gui_custom_container,
          grid_r TYPE REF TO cl_gui_alv_grid,
          gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_LOG',
          fieldcat_r TYPE lvc_t_fcat,
          layout_r TYPE lvc_s_layo,
          logA TYPE /bmc_log_level,
          logB TYPE /bmc_log_level,
          logC TYPE /bmc_log_level,
          logD TYPE /bmc_log_level,
          logE TYPE /bmc_log_level,
          ls_ct TYPE lvc_s_scol,
          ok_code LIKE sy-ucomm.
    *DATA BEGIN OF ls_log_list OCCURS 0.
    *DATA: log_level TYPE /bmc_log_message,
    *      cr_date TYPE /bmc_cr_date,
    *      message TYPE /bmc_log_message,
    *      rowcolor(4) TYPE c.
    *DATA END OF ls_log_list.
    *DATA: lt_log_list TYPE TABLE OF log_table.
    PARAMETERS: loglevlA  TYPE c AS CHECKBOX,
                loglevlB  TYPE c as CHECKBOX,
                loglevlC  TYPE c As CHECKBOX,
                loglevlD  TYPE c aS CHECKBOX,
                loglevlE  TYPE c AS CHECKBOX,
                dateA     TYPE /bmc_cr_date OBLIGATORY,
                dateB     TYPE /bmc_cr_date.
    CALL SCREEN 0200.
    MODULE user_command_0200 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          SET SCREEN 0.
          MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.
    MODULE status_0200 OUTPUT.
      SET PF-STATUS 'DYNPRO200'.
      SET TITLEBAR 'D0200'.
    ENDMODULE.
    MODULE display_alv OUTPUT.
      PERFORM display_alv.
    ENDMODULE.
    FORM display_alv.
      IF grid_r IS INITIAL.
    *----Creating custom container instance
      CREATE OBJECT container_r
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid_r
        EXPORTING
          i_parent = container_r
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          PERFORM get_log_data.
    *----Preparing field catalog.
          PERFORM prepare_field_catalog CHANGING fieldcat_r.
    *----Preparing layout structure
          PERFORM prepare_layout CHANGING layout_r.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
          CALL METHOD grid_r->set_table_for_first_display
          EXPORTING
            is_layout = layout_r
          CHANGING
            it_outtab = lt_log2[]
            it_fieldcatalog = fieldcat_r
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
            OTHERS = 4.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          ELSE.
            CALL METHOD grid_r->refresh_table_display
          EXCEPTIONS
            finished = 1
            OTHERS = 2.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
        ENDIF.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDFORM.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
        DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = '/BMC_LOG'
      CHANGING
        ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
      IF sy-subrc ne 0.
    *--Exception handling
      ENDIF.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'UUID'.
            ls_fcat-no_out = 'X'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'LOG_LEVEL'.
            ls_fcat-coltext = 'Meldungsart'.
            ls_fcat-outputlen = '25'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CR_DATE'.
            ls_fcat-coltext = 'Erstellungsdatum'.
            ls_fcat-outputlen = '20'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CR_TIME'.
            ls_fcat-no_out = 'X'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'MESSAGE'.
            ls_fcat-coltext = 'Nachricht'.
            ls_fcat-outputlen = '50'.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
    *    CASE ls_fcat-value.
    *      WHEN '1'.
    *        ls_fcat-line_color = 'c100'.
    *    ENDCASE.
      ENDLOOP.
    ENDFORM.
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X'.
      ps_layout-grid_title = 'Log'.
      ps_layout-smalltitle = 'X'.
      ps_layout-info_fname = 'linecolor'.
    ENDFORM.
    FORM get_log_data.
      if loglevlA = 'X'.
        logA = '1'.
      ENDIF.
      if loglevlB = 'X'.
        logB = '2'.
      ENDIF.
      if loglevlC = 'X'.
        logC = '3'.
      ENDIF.
      if loglevlD = 'X'.
        logD = '4'.
      ENDIF.
      if loglevlE = 'X'.
        logE = '5'.
      ENDIF.
      IF dateB ne 0.
        SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
          OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA and cr_date <= dateB.
      ELSE.
        SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
          OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA.
      ENDIF.
    *    and cr_date >= dateA.
        SORT lt_log_list ASCENDING.
        LOOP AT lt_log_list INTO lt_line.
        IF lt_line-log_level = '1'.
          lt_line-log_level = 'Info'.
          lt_line-linecolor = 'C100'.
        ENDIF.
        IF lt_line-log_level = '2'.
          lt_line-log_level = 'Warning'.
          lt_line-linecolor = 'C200'.
        ENDIF.
        IF lt_line-log_level = '3'.
          lt_line-log_level = 'Error'.
          lt_line-linecolor = 'C300'.
        ENDIF.
        IF lt_line-log_level = '4'.
          lt_line-log_level = 'Debug'.
          lt_line-linecolor = 'C400'.
        ENDIF.
        IF lt_line-log_level = '5'.
          lt_line-log_level = 'Trace'.
          lt_line-linecolor = 'C500'.
        ENDIF.
        APPEND lt_line TO lt_log2.
        ENDLOOP.
    ENDFORM.
    SELECTION-SCREEN BEGIN OF SCREEN 0100 TITLE text-001 AS WINDOW.
    SELECTION-SCREEN END OF SCREEN 0100.

    > change to this
    >
    > <b>ps_layout-stylefname = 'LINECOLOR'.</b>
    >
    > sorry ignore the above line
    >
    > just debug and check what is happening
    >
    > Message was edited by:
    >         Chandrasekhar Jagarlamudi
    Hi,
    I've changed the line to <b>ps_layout-stylefname = 'LINECOLOR'.</b>, but then I'm getting a runtime error 'ASSIGN_TYPE_CONFLICT' in program 'SAPLSLVC in line 2975'...
    I don't have any idea what is causing that.

  • Set specific rows in ALV grid ready for input

    Hi everyone,
      I have a question about how to set specific rows in ALV grid ready for input.
      I know that I can make some columns ready for input before the ALV displayed,but I have no idea how to make specific rows displayed in the ALV ready for input.

    Hello Aaron
    For editable columns we can use the fieldcatalog (LVC_S_FCAT-EDIT = 'X') but for rows you need to define editability on cell level.
    The required steps are documented in sample report BCALV_EDIT_02. Below I point out a few crucial points:
    *§1.Extend your output table for a field, e.g., CELLTAB, that holds
    *   information about the edit status of each cell for the
    *   corresponding row (the table type is SORTED!).
    DATA: BEGIN OF gt_outtab occurs 0.  "with header line
            include structure sflight.
    DATA: celltab type LVC_T_STYL.
    DATA: END OF gt_outtab.
    *§3.Provide the fieldname of the celltab field by using field
    *   STYLEFNAME of the layout structure.
       gs_layout-stylefname = 'CELLTAB'.
       CALL METHOD grid1->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gt_outtab[].
    Note: in the sample report only field SEATSMAX is editable. In your case you need
    to fill CELLTAB for all fields in a row.
    *§2.After selecting data, set edit status for each row in a loop
    *   according to field SEATSMAX.
      LOOP AT gt_outtab.
        l_index = sy-tabix.
        refresh lt_celltab.
        if gt_outtab-seatsmax ge 300.
            perform fill_celltab using 'RW'
                                 changing lt_celltab.
        else.
            perform fill_celltab using 'RO'
                                 changing lt_celltab.
        endif.
    *§2c.Copy your celltab to the celltab of the current row of gt_outtab.
        INSERT LINES OF lt_celltab INTO TABLE gt_outtab-celltab.
        MODIFY gt_outtab INDEX l_index.
      ENDLOOP.
    ENDFORM.                               " SELECT_DATA_AND_INIT_STYLE
    NOTE: LVC_T_STYL is a SORTED table type. Thus, take care that you are using the
    INSERT ... INTO TABLE statement and not APPEND (because then nothing is appended
    to the CELLTAB itab).
      IF p_mode EQ 'RW'.
    *§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell
    *    to status "editable".
        l_mode = cl_gui_alv_grid=>mc_style_enabled.
      ELSE. "p_mode eq 'RO'
    *§2b.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_DISABLED to set a cell
    *    to status "non-editable".
        l_mode = cl_gui_alv_grid=>mc_style_disabled.
      ENDIF.
      ls_celltab-fieldname = 'SEATSMAX'.
      ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
      INSERT ls_celltab INTO TABLE pt_celltab.
    Regards
      Uwe

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • Deactivate the double click/ hot spot for a particular row in alv grid.

    Hello,
       As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
    Regards,
    Saroj

    where u define layout there is a field hotspot.like
    data: var.
    if con is true
    var = 'X'. (show hotspot)
    else.
    var = ' '. (deactive hotspot)
    elseif ws_fieldcat-fieldname = 'DMBTR'
                    AND ws_fieldcat-tabname = 'T_MTAB'.
          ws_fieldcat-do_sum = C_X.
          <b>ws_fieldcat-hotsopts = var.</b>
          MODIFY Wt_fieldcat FROM ws_fieldcat
                  TRANSPORTING   DO_SUM.
    It is helpful for u. if any problen send me ur coding i will change it.
    Regards
    Manish Kumar

  • How to change a color for a row in ALV grid display

    Hi,
       how to change a color for a row in ALV grid display based on a condition.Any sample code plz

    Hello Ramya,
    Did you check in [SCN|How to color a row of  alv grid]
    Thanks!

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • Changing font size(bold) or color of a particular row in ALV Grid Digplay

    Hi Experts ,
    I am having a requirment to highlight some particular rows in ALV Grid Display . To achieve this i need to change font size or make it bold or change color of that row .
    Please give me some inputs .
    Thanks in Advance.
    Vijyeta

    Hi
    Coloring An Entire Row
    Coloring a row is a bit (really a bit) more complicated. , you should add an additional field to your list data table. It should be of character type and length at least 4. This field will contain the color code for the row.
    First you have to declaration of our list data table u201Cgt_listu201D.
    DATA BEGIN OF gt_list OCCURS 0 .
    INCLUDE STRUCTURE SFLIGHT .
    DATA rowcolor(4) TYPE c .
    DATA END OF gt_list .
    Adding the field that will contain row color data
    As you guess, you should fill the color code to this field.  But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing the name of the field containing color codes to the field u201CINFO_FNAMEu201D of the layout structure.
    e.g.
    ps_layout-info_fname = <field_name_containing_color_codes>. u201Ce.g. u2018ROWCOLORu2019
    You can fill that field anytime during execution. But, of course, due to the flow logic of screens, it will be reflected to your list display as soon as an ALV refresh occurs.
    Try this link also:
    Possible functionalities in ALV
    Regards
    Neha

  • Default 10 rows in ALV grid

    Hi Group,
    My requirement is to show 10 default rows in ALV grid (with 4 fields in ALV grid), whenever Create radio button is selected in Selection Screen.
    Please could you help me with this.
    Thanks and Regards,
    Kumar.

    Thanks for your reply.
    Sorry I forgot to mention earlier.
    I have to show default 10 empty rows (editable) whenever the Create radio button is selected on the Sel Screen.
    Kindly assist with this regard.
    Thanks and Regards,
    Kumar.

  • 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.

  • How to color a row in ALV grid display

    Hi,
    A few rows in the output of ALV grid display should be shown in different color.How can I achieve this?

    Hi,
    Try out this code
    DATA : BEGIN OF G_T_CASH OCCURS 0,
           PARTICULARS TYPE CHAR120,
           AMOUNT1 TYPE CHAR20,
           AMOUNT2 TYPE CHAR20,
           AMOUNT3 TYPE CHAR20,    
           ROW_COLOR TYPE CHAR4,----
    add this in the internal table for alv
          END OF G_T_CASH.
      CLEAR G_WA_CASH.
      G_WA_CASH-PARTICULARS = 'Opening Cash Balance'.
      G_WA_CASH-AMOUNT1 = G_DMBTR.
      G_WA_CASH-AMOUNT2 = ''.
      G_WA_CASH-AMOUNT3 = ''.
    while appending other values also add the following code
      G_WA_CASH-ROW_COLOR = 'C200'.----- C200 depicts light gray color
      APPEND G_WA_CASH TO G_T_CASH.
    add the following code in layout
    MOVE 'ROW_COLOR' TO WA_LS_LAYOUT-INFO_FIELDNAME.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_BYPASSING_BUFFER = ' '
          I_SAVE             = 'A'
        I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         IS_LAYOUT                        = WA_LS_LAYOUT
         IT_FIELDCAT                      = G_T_CATALOG
         IT_EVENTS                         = GT_EVENTS
         TABLES
           T_OUTTAB                       = G_T_CASH[]
    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.
    Let me know if the problem still persist.
    Regards,
    Janaki

Maybe you are looking for

  • Sp_addscriptexec is not working with FTP Snapshot delivery

    Hi, We have a SQL Server Merge Replication topology. Both Publisher a Subscribers are using SQL Server 2012. As I have seen in http://msdn.microsoft.com/en-us/library/ms174360(v=sql.120).aspx "Using sp_addscriptexec to post a script file for publicat

  • IPad zoom stuck and unresponsive

    My daughter has done it this time.  She has turned on the zoom and it is at the max. The old three finger double tap and the home button fast three times does nothing.  I can't power it off.  Once in twenty tries, I can get to settings but scrolling

  • List Customer master Filelds (URGENT)

    Dear All, Can you Please provide the list of Customer master fields in one Place. Please Do the Needful (IT IS URGENT) Regards, Vinay

  • How to upgrade the memory in the Satellite L75-B7270

    I recently purchased this laptop for my son for his school work. It onlyt came with 4GB of memory and says it is upgradable to 16GB of memory. However, I do not know where to install it! This paricular laptop has a smooth bottom except for the batter

  • Oracle Marketing & Field Sales Implementation

    Hi Experts I'm a complete newbie to CRM and Marketing & Field Sales module. Working hard to grasp and understand the architecture and implementation process of CRM and Marketing & Field Sales module. Plz guide me to start this experience. The major q