How to set color to a column in ALV?

Based on standard example BCALV_GRID_01 to modify,
how to set color to a column???
Moderator message: please search for available information/documentation before asking.
Edited by: Thomas Zloch on Nov 6, 2010 9:43 AM

Hi Sai ,
you are posting the querry in the wrong forum ..
but still I will answer ur querry...
Incase you are not using the standard class to make your ALV then u can set the color of each column in the propertiesof column in the design time .
Incase u see the colors in the design time but is not able to see the colors at the run time then you check the settings of the table I dont have system right now else I could have told you exact property...
else if u r amking alv from the standard class then u will have to search the net for the method to color the same ..
Thanks
Sahil.

Similar Messages

  • How to set colors to table control?

    Hi all,
    can we set colors to tables columns and rows?? How can we acieve this? Any help please
    Thanks,
    Madhan.

    Hi All
    thanks for your replies..
    data tab type IF_main_view=>Elements_segment.
      data line type IF_main_view=>Element_segment.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      data wd_standard_cell type ref to cl_wd_table_standard_cell.
      data component like line of cl_abap_structdescr=>components.
      data wd_table_column type ref to cl_wd_table_column.
      node_info = lo_nd_segment->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
    if component-name = 'SEGMENT'.
      wd_standard_cell->set_cell_design( CL_WD_ABSTR_MASTER_TABLE_COL=>E_CELL_DESIGN-BADVALUE_MEDIUM ).
    endif.
    i am trying to set color for  some colomns, but i am not getting any colors??? anything wrong in this.. please help
    thanks,
    Madhan.

  • 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

  • How to set color for a tabstrip in BSP

    Hello all,
    Can anyone please let me know how to set color for a tabstripn in BSP?
    I am using the below syntax but it still gives me the default color.
    <htmlb:content design="design2003" >
      <htmlb:page title="test " >
        <htmlb:form>
    <htmlb:tabStrip id         = "TabStrip"
                          bodyHeight = "200"
                          bodyColor  = "red"
                          width      = "700" >
    </htmlb:tabStrip>
    </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks,
    Sandeep

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • How to set the data fields column wide at sqlplus

    Dear Sir/Madam
    I would like to know how to set the data fields column wide at sqlplus
    Thanks
    Francis

    see
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm#sthref1131
    and the FORMAT clause of the COLUMN command in
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#BACHCABF

  • How to set colors in cells depending the conditions  in alvtree

    Hi All,
    Could you please provide me idea or sample program how to set colors in cells depending the conditions  in alvtree.
    Thanks,
    Suresh

    When running vim in a terminal, it will use whatever colour scheme is defined by the terminal.  You should have a look at this thread:
    http://bbs.archlinux.org/viewtopic.php?id=51818
    Also, check the wiki article on Xdefaults.

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

  • How to display subtotals in separate column in alv report?

    hi,
    I am displayed the subtotals  for QUantity field BDMNG in Reuse_alv_grid_display  in the same column.
    but I want to display subtotal in separate column.
    How to display subtotals in separate column in alv report?
    thanks&regards.
    samba.k

    Hi
    As far as i know you can't do this,the option you have is to create one more column (subtotal) and populate it by manual calculation at every subtotal (not alv subtotal but yours) .
    Best Regards
    Yossi

  • HELP Friends!!! How to set the width of columns of JTABLE?

    Hi!
    How to set the width of a particular column in JTable?
    I tried using headerRenderers and though I'm able to set the color and font of the header (using getTableCellRendererComponent method)I can't change the size.
    Pls some one help me..it's very urgent.
    Thanks in advance.
    Regards,
    Naval

    JTable.getColumnModel().getColumn(i).setWidth(width). There are also setPreferredWidth, setMaxWidth and setMinWidth methods.

  • How to set value of a column in report region

    Hi,
    I have a report region based on a query.In this my first column is selectlist "select row" having to values "yes" & "No".
    I have two buttons on top of the region "Check all" and "uncheck all".
    My requirement is when I click check all button all rows corresponding to "select row" column gets selected to Yes and when I click No all rows gets selected to "No".
    Thanks
    Vikram

    Actully I want to set the value of a column in report region.
    There are replies in the forum but in those the item is in form but not in the report region.
    I am generating report region by using htmldb_item.selectlist and i dont know how to set value in these type of items.

  • How to set color profile when exporting a RAW file version as a JPEG?

    I import my raw files to Aperture and when exporting as a JPEG I want to specify a color profile of sRBG. I cannot see how to set the color profile for the export. Does anyone know how to do this?

    When you go to export versions, edit the presets, and there is a drop down box that lets you select the profile.
    I'd suggest picking up the Aperture book by Luna, Long, and Harrington. Lots of great info there.

  • [AS][INDCC] How to set Color Conversion field to No Color Conversion when creating PDF Export preset

    How can i set Color Conversion field in Export to PDF dialog to No Color Conversion when creating PDF Export preset? i have done a bit of searching and have found where it has been recommended to set effective pdf destination profile to use no profile but it doesn't seem to be producting the expected results.

    Yes, it seems that i had to make the change after creation, not while creating the preset. thank you.
    tell application "Adobe InDesign CC"
         set newPreset to make new PDF export preset with properties ¬
              {name:"preset name", standards compliance:none, acrobat compatibility:acrobat 7}
         tell newPreset to set PDF color space to unchanged color space
    end tell

  • How to set color of our specified JTable's row

    i need to set color of our specified JTable's row.so send the coddings of that part.

    i need to set color of our specified JTable's row.so
    send the coddings of that part.I think you misunderstand how this forum works...
    If you have a problem, you post your problem here with example code which demonstrates said problem...
    The people here then attempt to help you if they want to.
    You do not post demands for code examples

  • JTable Model   --  How to set the width of columns

    Hello,
    This project of mine is due in 2 days. :(
    I am using AbstractTableModel and I can't figure out how to set the columns' width inside my JTable?
    This following code does not work.
    int vColIndex = 1;
    TableColumn col = table.getColumnModel().getColumn(vColIndex);
    int width=399;
    col.setPreferredWidth(width);Please remember, that I'm using AbstractTableModel and not just simple JTables.
    Thanks in advance.

    The DataModel (AbstractTableModel or otherwise) has nothing to do with the table column size. The DataModel is used to store data.
    When you create a JTable using a DataModel then a TableColumn is created for each column in the DataModel using a default column size. The normal order of creation would be:
    TableModel model = new DefaultTableModel(...);
    JTable table = new JTable(model);
    Now that the table and table columns are created you can change the size of the columns:
    int vColIndex = 1;
    TableColumn col = table.getColumnModel().getColumn(vColIndex);
    int width=399;
    col.setPreferredWidth(width);
    So your code looks ok.
    However, if somewhere in you code you do:
    a) table.setModel(...)
    b) fireTableStructureChanged();
    then the table columns are recreated based on the current DataModel and the table column size would be reset to the default values.

  • How to put colours for a column in ALV

    Dear All,
    I need to put green colour for 1 column in an ALV report.
    Can anybody tell me how we can do that ...
    Thanking you in advance,
    Shankar

    Here's a little sample program.....  this illistrates coloring at the column, row, and cell level.
    report zrich_0002 .
    * 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.
    at selection-screen output.
      perform get_data.
      perform fill_catalog.
      if w_docking_container is initial.
        perform create_objects.
      endif.
    *&      Form  create_objects
    form create_objects.
      create object w_docking_container
        exporting
          ratio                       = 60
        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.
    * 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.
      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.
    *&      Form  get_data
    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 '6'         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.
    *&      Form  fill_catalog
    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.
    Regards,
    Rich HEilman

Maybe you are looking for