Change color in alv column

how do change color of a column in ALV.

Hi
The below abap program shows how to change the colour of individual ALV cells /fields. Only a small number of changes are required from a basic ALV grid which include adding a new field to ALV data declaration table(it_ekko), populating this field with the field name identifier and colour attributes and finally adding an entry to layout control work area. These changes are highlighted in bold below.
REPORT  zdemo_alvgrid                 .
REPORT  ZALV_CELLCOLOR.
TABLES:     ekko.
type-pools: slis.                                 "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  statu TYPE ekpo-statu,
  aedat TYPE ekpo-aedat,
  matnr TYPE ekpo-matnr,
  menge TYPE ekpo-menge,
  meins TYPE ekpo-meins,
  netpr TYPE ekpo-netpr,
  peinh TYPE ekpo-peinh,
  CELLCOLOR TYPE LVC_T_SCOL,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid,
      gt_events     type slis_t_event,
      gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
  perform data_retrieval.
  perform build_fieldcatalog.
  perform build_layout.
  perform set_cell_colours.
  perform display_alv_report.
*&      Form  BUILD_FIELDCATALOG
      Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you  more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
              I.e. Field type may be required in-order for
                   the 'TOTAL' function to work.
  fieldcatalog-fieldname   = 'EBELN'.
  fieldcatalog-seltext_m   = 'Purchase Order'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 10.
  fieldcatalog-emphasize   = 'X'.
  fieldcatalog-key         = 'X'.
fieldcatalog-do_sum      = 'X'.
fieldcatalog-no_zero     = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'EBELP'.
  fieldcatalog-seltext_m   = 'PO Item'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'STATU'.
  fieldcatalog-seltext_m   = 'Status'.
  fieldcatalog-col_pos     = 2.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'AEDAT'.
  fieldcatalog-seltext_m   = 'Item change date'.
  fieldcatalog-col_pos     = 3.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MATNR'.
  fieldcatalog-seltext_m   = 'Material Number'.
  fieldcatalog-col_pos     = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MENGE'.
  fieldcatalog-seltext_m   = 'PO quantity'.
  fieldcatalog-col_pos     = 5.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MEINS'.
  fieldcatalog-seltext_m   = 'Order Unit'.
  fieldcatalog-col_pos     = 6.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.
  fieldcatalog-do_sum      = 'X'.
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'PEINH'.
  fieldcatalog-seltext_m   = 'Price Unit'.
  fieldcatalog-col_pos     = 8.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " BUILD_FIELDCATALOG
*&      Form  BUILD_LAYOUT
      Build layout for ALV grid report
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
  gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'.  "CTAB_FNAME
endform.                    " BUILD_LAYOUT
*&      Form  DISPLAY_ALV_REPORT
      Display report using ALV grid
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
           i_callback_user_command = 'USER_COMMAND'
           i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
           it_special_groups       = gd_tabgroup
          it_events               = gt_events
          is_print                = gd_prntparams
            i_save                  = 'X'
           is_variant              = z_template
       tables
            t_outtab                = it_ekko
       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.
endform.                    " DISPLAY_ALV_REPORT
*&      Form  DATA_RETRIEVAL
      Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
  select ebeln ebelp statu aedat matnr menge meins netpr peinh
   up to 10 rows
    from ekpo
    into CORRESPONDING FIELDS OF TABLE it_ekko.
endform.                    " DATA_RETRIEVAL
Form  TOP-OF-PAGE                                                 *
ALV Report Header                                                 *
Form top-of-page.
*ALV Header declarations
  data: t_header type slis_t_listheader,
        wa_header type slis_listheader,
        t_line like wa_header-info,
        ld_lines type i,
        ld_linesc(10) type c.
Title
  wa_header-typ  = 'H'.
  wa_header-info = 'EKKO Table Report'.
  append wa_header to t_header.
  clear wa_header.
Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
               sy-datum(4) INTO wa_header-info.   "todays date
  append wa_header to t_header.
  clear: wa_header.
Total No. of Records Selected
  describe table it_ekko lines ld_lines.
  ld_linesc = ld_lines.
  concatenate 'Total No. of Records Selected: ' ld_linesc
                    into t_line separated by space.
  wa_header-typ  = 'A'.
  wa_header-info = t_line.
  append wa_header to t_header.
  clear: wa_header, t_line.
  call function 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = t_header.
           i_logo             = 'Z_LOGO'.
endform.                    "top-of-page
*&      Form  SET_CELL_COLOURS
      Set colour of individual ALV cell, field
FORM SET_CELL_COLOURS .
  DATA: WA_CELLCOLOR TYPE LVC_S_SCOL.
  DATA: ld_index TYPE SY-TABIX.
  LOOP AT IT_EKKO into wa_ekko.
    LD_INDEX = SY-TABIX.
  Set colour of EBELN field to various colors based on sy-tabix value
    WA_CELLCOLOR-FNAME = 'EBELN'.
    WA_CELLCOLOR-COLOR-COL = sy-tabix.  "color code 1-7, if outside rage defaults to 7
    WA_CELLCOLOR-COLOR-INT = '1'.  "1 = Intensified on, 0 = Intensified off
    WA_CELLCOLOR-COLOR-INV = '0'.  "1 = text colour, 0 = background colour
    APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
    MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
  Set colour of NETPR field to color 4 if gt 0
    if wa_ekko-netpr gt 0.
      WA_CELLCOLOR-FNAME = 'NETPR'.
      WA_CELLCOLOR-COLOR-COL = 4.  "color code 1-7, if outside rage defaults to 7
      WA_CELLCOLOR-COLOR-INT = '0'.  "1 = Intensified on, 0 = Intensified off
      WA_CELLCOLOR-COLOR-INV = '0'.  "1 = text colour, 0 = background colour
      APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
      MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
    endif.
  Set colour of AEDAT field text to red(6)
    WA_CELLCOLOR-FNAME = 'AEDAT'.
    WA_CELLCOLOR-COLOR-COL = 6.  "color code 1-7, if outside rage defaults to 7
    WA_CELLCOLOR-COLOR-INT = '0'.  "1 = Intensified on, 0 = Intensified off
    WA_CELLCOLOR-COLOR-INV = '1'.  "1 = text colour, 0 = background colour
    APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
    MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
  ENDLOOP.
ENDFORM.                    " SET_CELL_COLOURS

Similar Messages

  • Change color in ALV top of page

    Hi all,
    Can anyone tell me how (if it is possible) to change color in ALV top-of-page?
    Thank you in advance,
    Hagit

    Hi,
    It is not possible to change the color in ALV top of page.
    Thanks,
    Sriram Ponna.

  • How to change colors of individual column bar in the same data series

    in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.

    Hi Kiran,
    no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
    Regards,
    Govindu

  • Color in ALV Column

    hi to all,
    I want to display ALV with diffrent colors in column.
    Is it possible.
    If so plz send me the sample code for guidance.
    Thanks in advance.
    Dharmishta

    All info about colour code is in comment in the code.
    Hope it will help a lot of you.
    Report code
    Code:
    REPORT zcuitest_alv_07.
    Use of colours in ALV grid (cell, line and column)            *
    Table
    TABLES : mara.
    Type
    TYPES : BEGIN OF ty_mara,
              matnr         LIKE mara-matnr,
              matkl         LIKE mara-matkl,
              counter(4)    TYPE n,
              free_text(15) TYPE c,
              color_line(4) TYPE c,           " Line color
              color_cell    TYPE lvc_t_scol,  " Cell color
    END OF ty_mara.
    Structures
    DATA  : wa_mara     TYPE ty_mara,
            wa_fieldcat TYPE lvc_s_fcat,
            is_layout   TYPE lvc_s_layo,
            wa_color    TYPE lvc_s_scol.
    Internal table
    DATA : it_mara     TYPE STANDARD TABLE OF ty_mara,
           it_fieldcat TYPE STANDARD TABLE OF lvc_s_fcat,
           it_color    TYPE TABLE          OF lvc_s_scol.
    Variables
    DATA : okcode LIKE sy-ucomm,
           w_alv_grid          TYPE REF TO cl_gui_alv_grid,
           w_docking_container TYPE REF TO cl_gui_docking_container.
    PARAMETERS : p_column AS CHECKBOX,
                 p_line   AS CHECKBOX,
                 p_cell   AS CHECKBOX.
    START-OF-SELECTION.
      PERFORM get_data.
    END-OF-SELECTION.
      PERFORM fill_catalog.
      PERFORM fill_layout.
      CALL SCREEN 2000.
    *&      Module  status_2000  OUTPUT
          text
    MODULE status_2000 OUTPUT.
      SET PF-STATUS '2000'.
    ENDMODULE.                 " status_2000  OUTPUT
    *&      Module  user_command_2000  INPUT
          text
    MODULE user_command_2000 INPUT.
      DATA : w_okcode LIKE sy-ucomm.
      MOVE okcode TO w_okcode.
      CLEAR okcode.
      CASE w_okcode.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " user_command_2000  INPUT
    *&      Module  alv_grid  OUTPUT
          text
    MODULE alv_grid OUTPUT.
      IF w_docking_container IS INITIAL.
        PERFORM create_objects.
        PERFORM display_alv_grid.
      ENDIF.
    ENDMODULE.                 " alv_grid  OUTPUT
    *&      Form  create_objects
          text
    -->  p1        text
    <--  p2        text
    FORM create_objects.
    Ratio must be included in [5..95]
      CREATE OBJECT w_docking_container
        EXPORTING
          ratio                       = 95
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          others                      = 6.
      CREATE OBJECT w_alv_grid
        EXPORTING
          i_parent          = w_docking_container.
    ENDFORM.                    " create_objects
    *&      Form  display_alv_grid
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_grid.
      CALL METHOD w_alv_grid->set_table_for_first_display
        EXPORTING
          is_layout                     = is_layout
        CHANGING
          it_outtab                     = it_mara
          it_fieldcatalog               = it_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
    ENDFORM.                    " display_alv_grid
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      SELECT * FROM mara UP TO 5 ROWS.
        CLEAR : wa_mara-color_line, wa_mara-color_cell.
        MOVE-CORRESPONDING mara TO wa_mara.
        ADD 1                   TO wa_mara-counter.
        MOVE 'Blabla'           TO wa_mara-free_text.
        IF wa_mara-counter = '0002'
        AND p_line = 'X'.
    Color line
          MOVE 'C410' TO wa_mara-color_line.
        ELSEIF wa_mara-counter = '0004'
        AND p_cell = 'X'.
    Color cell
          MOVE 'FREE_TEXT' TO wa_color-fname.
          MOVE '5'         TO wa_color-color-col.
          MOVE '1'         TO wa_color-color-int.
          MOVE '1'         TO wa_color-color-inv.
          APPEND wa_color TO it_color.
          wa_mara-color_cell[] = it_color[].
        ENDIF.
        APPEND wa_mara TO it_mara.
      ENDSELECT.
    ENDFORM.                    " get_data
    *&      Form  fill_catalog
          text
    -->  p1        text
    <--  p2        text
    FORM fill_catalog.
    Colour code :                                                 *
    Colour is a 4-char field where :                              *
                 - 1st char = C (color property)                  *
                 - 2nd char = color code (from 0 to 7)            *
                                     0 = background color         *
                                     1 = blue                     *
                                     2 = gray                     *
                                     3 = yellow                   *
                                     4 = blue/gray                *
                                     5 = green                    *
                                     6 = red                      *
                                     7 = orange                   *
                 - 3rd char = intensified (0=off, 1=on)           *
                 - 4th char = inverse display (0=off, 1=on)       *
    Colour overwriting priority :                                 *
      1. Line                                                     *
      2. Cell                                                     *
      3. Column                                                   *
      DATA : w_position TYPE i VALUE '1'.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'MATNR'    TO wa_fieldcat-fieldname.
      MOVE 'MARA'     TO wa_fieldcat-ref_table.
      MOVE 'MATNR'    TO wa_fieldcat-ref_field.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'MATKL'    TO wa_fieldcat-fieldname.
      MOVE 'MARA'     TO wa_fieldcat-ref_table.
      MOVE 'MATKL'    TO wa_fieldcat-ref_field.
    Color column
      IF p_column = 'X'.
        MOVE 'C610'     TO wa_fieldcat-emphasize.
      ENDIF.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'COUNTER'  TO wa_fieldcat-fieldname.
      MOVE 'N'        TO wa_fieldcat-inttype.
      MOVE '4'        TO wa_fieldcat-intlen.
      MOVE 'Counter'  TO wa_fieldcat-coltext.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position  TO wa_fieldcat-col_pos.
      MOVE 'FREE_TEXT' TO wa_fieldcat-fieldname.
      MOVE 'C'         TO wa_fieldcat-inttype.
      MOVE '20'        TO wa_fieldcat-intlen.
      MOVE 'Text'      TO wa_fieldcat-coltext.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " fill_catalog
    *&      Form  fill_layout
          text
    -->  p1        text
    <--  p2        text
    FORM fill_layout.
    Field that identify color line in internal table
      MOVE 'COLOR_LINE' TO is_layout-info_fname.
    Field that identify cell color in inetrnal table
      MOVE 'COLOR_CELL' TO is_layout-ctab_fname.
    ENDFORM.                    " fill_layout
    Flow logic code
    Code:
    PROCESS BEFORE OUTPUT.
      MODULE status_2000.
      MODULE alv_grid.
    PROCESS AFTER INPUT.
      MODULE user_command_2000.
    plz reward points if useful...
    regards,
    Balaji

  • Change color in alv list header

    hi experts,
    how can i change the color in a alv header... for example...
    number         docum     year  
    001              13245      2006
    002              13245      2007
    the header.. number, docum and year appears in light blue (all the cell) , how can i do that it appears without a color like the regular rows.
    thx in  advance

    Hi Carlos,
    FORM HEADING.
      FORMAT INTENSIFIED OFF.              " Remove any INTENSIFIED
      ULINE AT (WIDTH).                    " Upper frame border
      FORMAT COLOR COL_HEADING INTENSIFIED." Title color
      WRITE: / SY-VLINE.                   " Left border
      WRITE: 'No |Colour        |intensified    |intensified off|',
             'inverse' NO-GAP.
      WRITE: AT WIDTH SY-VLINE.            " Right border
      ULINE AT (WIDTH).                    " Line below titles
      FORMAT COLOR OFF.
    ENDFORM.
    regards,
    Prabhudas

  • Change color of one column in chart

    Hi
    is there a way to change the color of just one column in a column chart? I want to highlight one column but I can't seem to select just that column.
    Thanks

    Welcome to Apple Discussions
    Click on the table to select it then click on the letter column heading to select the desired column. Now go to the object inspector & select Color Fill from the drop-down menu if it's not already chosen then click on the color box to bring up the color chooser. Select the color you want to fill the column.

  • Change color of measures - Column Combination Dual Axis

    Hi,
    I have a couple of graphs of the type Column Combination Dual Axis.
    I want to change the colors for these measures but that does not seem to be possible when using this type of chart?
    I can only change the color of the Axis?
    First, I thought it was something wrong with my chart so I tried to create a new application with this chart type and got the same result.
    Does anyone know if it should be like this?
    Br
    Max

    Hi Max,
    how many measures do you want to use for the Chart type "Column Combination Dual Axis"?
    Do you have tried to swap the axis in your chart type setting?
    In my case it works as expected and I´m able to change the color of the measures ( = the axis)
    I think it´s important to add the measures in the rows at the initial view of the data source (or you can change it by swap the axis in the chart).
    Hope it helps!
    Best regards,
    Michael

  • Style to change color of single column in list

    Hi,
    I need to get below functionality in results list. need to break part of sentence to another line with different color.
    How to achieve this.
    Thanks & Regards,
    Siva

    Hi
    check this solution
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1f2f74b6-9260-4dc4-a093-a36947e1eb29/is-it-possible-to-add-colored-text-to-a-list-column-description?forum=sharepointgenerallegacy
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Need to change color of one column's value depending on the other column

    Hi,
    i have a search form which displays two column values
    First column value's colour should be based on second column's value
    For example, if second column has values 'Active', 'Inactive' and 'Pending'
    If 'Active' , the first column value's color sholud be 'red'
    If 'inacitve, another color ....
    Thanks in advance,

    Hi!
    What we did was we added a column on the VO that returns kind of a css part (for example if a column value is 'Active' the value of this column should be "background-color:rgb(255,0,0);")
    Than you use something like this on your column:
    inlineStyle="#{row.StatusStyle}"where StatusStyle is the name of the column with "background-color:rgb(255,0,0);" value.
    The problem here can be that the background color doesn't cover the whole column but only the text in it (so if it is null, the color is default).
    If you want the whole column to be of this color you use something like this:
                                        <af:column ...>
                                          <afh:tableLayout ...>
                                            <afh:rowLayout ...>
                                              <afh:cellFormat inlineStyle="#{row.StatusStyle}" ...>
                                                <af:outputText ...>
                                                </af:outputText>
                                              </afh:cellFormat>
                                            </afh:rowLayout>
                                          </afh:tableLayout>
                                        </af:column>Basically you put another table layout inside a column instead just a outputText (or whatever control you use)
    Hope this is understandable and it helps :)
    It works for us.
    BB

  • Changing Content of a Column in ALV

    Hello All,
    I just found an approach to solve some of the question posted before but stucked on something else-
    I have an ALV using OOP approach. I have a number of buttons that when clicked -a specific event should take place. One is changes to INCOTERM-
            If Incotern button is clicked, I called  CALL FUNCTION 'POPUP_GET_VALUES' to change the value
           Then  called BDC which has the changes in I_BDCDATA.
           My question is how to use Call transaction method to update the changes in the ALV column from the value in the I_BDCDATA before refreshing the table which activates the changes on the ALV report
    Thanks
    Edited by: possibility on Oct 19, 2009 5:37 PM

    Thanks Max,
    I had that figured out after sending the email out to the forum I have awarded some points to you and Kan.
    Edited by: possibility on Oct 20, 2009 4:22 PM

  • Changing color of columns in CL_GUI_CHART_ENGINE

    Dear Developers,
    I am displaying a Columns Graph using class CL_GUI_CHART_ENGINE. My requirement is to change color of selected columns based on their height. For example if height of the column exceepds 10, then the color of that particular color is to be made red. Is that possible using CL_GUI_CHART_ENGINE ??
    Thanks and Regards,
    kartik

    Hi,
          Refer below link:
    https://forums.sdn.sap.com/click.jspa?searchID=3958197&messageID=2474585
    <b>Reward points</b>
    Regards

  • How can I change the color of a column header?

    I need to change the color for some column header, how can I do it in webdynpro ABAP? Is it possible?

    hi ,
    i have used in alv....
    <font color="RED">text</font>
    but i think it is not possible to change the colour in table ui element.
    regards,
    sahai.s

  • Change  row color on alv

    hi
    how can i change row color on alv.

    Hi
    thanks your answer  Uday Gubbala         
    i was examinated this link  [https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/abapWebDynproALV-ChangeCellColourbasedonContent]
    but i don't  do   this row  wd_this->m_alv_model = lo_value. error message : m_alv_model unknow.
    and this sample change column color but i want to row
    Thanks.

  • How to switch off column coloring of alv grid printouts?

    Hello World!
    Is there any possibility (a customizing option or a parameter) to switch off cell/column coloring of alv grid printouts?
    It is very useful to see colored columns in screens, but they are darkened in printouts. How to avoid it?
    Thanks and regards,
    Vladimir

    Hi,
    You can have different layouts for a ALV report and each layout the look and feel can be different.
    So, the manual activity is the user will have to switch to the B/W layout before printing. I am not sure if you have enabled the LAYOUT option for the user to change it by himself.
    I hope I am able to get across my point.
    If you are using OO ALV control, you can dynamically change the layout using set_frontend_layout  method. The user can also change the layout --
    choose Change layout or Settings ® Layout ® Change.
    The Change Layout dialog box shows you which columns are currently displayed and which additional columns can be displayed.
    Regards,
    Ravi
    Note - Please mark the helpful answers
    Message was edited by: Ravikumar Allampallam

  • How to Change the position of Column in ALV report

    Hi Follks,
        Is is possible to change the position of column in ALV report?.If yes then how?
        Basically my requirement is, that user want afacility where , he should be able to change the position
        of column aftre he runs the report.
        Eg: After running the report , user felt that column 5 should be at position 2 , in that case he should   
               be able to drag column 5 at position 2 and vice versa.
        Please help me, how to solve this issue.
        Note : I am using NW 7.0 SP 9
        Regards
        PG
    Edited by: PG on Apr 13, 2009 11:10 AM

    HI PG,
    do below whie filling the filed catlog
    wa_fieldcat-fieldname        = 'Field1".
    wa_fieldcat-COL_POS = '1',
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname         = 'Field2".
    wa_fieldcat-COL_POS = '2',
    wa_fieldcat-fieldname         = 'Field3".
    wa_fieldcat-COL_POS = '3',
    Thanks!

Maybe you are looking for

  • TS1292 How do i tranfer credits from one account to another ?

    I redeemed credits on an account that is not mine and I need help, is it possible to transfer the credits from that account to my account ??

  • Which table i can get BED and ECS+SHEC values

    Hi all which table i can get BED and ECS+SHEC values and how i link to PO number.. plz help me thanks ramesh

  • How to debug JSP in JDeveloper

    I want to debug a JSP page in JDeveloper. I have put break point in jsp page, but when called from browser, control does not stop at break point in JSP. Please suggest, how to debug a JSP page in JDeveloper

  • Timestamp in stderr.log file

    I have WLS 8.1 setup on Win2k servers. Unlike all the other log files, the stderr.log file does not contain the timestamp in it which makes it very difficult to know at what time a particular error occured. Where can I set this up ? Kindly let me kno

  • Change background of "unlock" screen after iMac is idle

    My iMac is set to require password to "unlock" after it has been sitting idle for a while. When the mouse or a key is moved/pressed, the password box appears with a plain black or dark gray background. I would like to change that color to one that wi