Color code table (optimizat​ion)

I want to be able to color code a large table. it takes a very long time to do this. i assume it takes a lot of time because each change in color generates a paint event. i am trying to avoid the same by one of the following approaches
1) hide the table, update colors and show table
2) disable front panel updating of the vi and updte the table and enable front panel updating
Neither of the approches give me much performance gain. is there a way to make it faster?

Hi Anand
I am surprised that "Defer Panel Update" is not speeding the process for you.
I also have to update large table cell color, and "Defer Panel Update" does make a difference. One think to note, if your table is in a Subpanel, it seem that "Defer Panel Update" does NOT work in subpanel (LV7.0, have not tested in LV7.1)
Another trick that I used (and it is not mentionend in the table help but in the multi column list box help) is that you can paint full rows (or cols) in one single shot (of course if you do not have rows/cols of the same color, it is not very usefull).
Here is a snapshot of the multi column list box help
Active Cell Property
Property of MulticolumnListbox.
"Sets the row and column of the cell(s) to which you want to apply
subsequent property changes. The following table lists example values for this property.
Row Column Result
�2 0 Selects all cells in the first column, including the column header.
�2 �2 Selects all rows and columns, including column headers.
�1 0 Selects the header of the first column.
�1 �2 Selects the headers of all columns.
0 �2 Selects all cells of the first row, including the row header.
0 �1 Selects the header of the first row."
Hope it help.
PJM
Got EasyXML?
JKI.VIPM.EasyXML.OpenG.LAVA.Builder.blog

Similar Messages

  • Color code in Table Edit Control

    Hi Abapers,
    This is Arvind, I have created a table control, i displayed Material code from Mara.
    My requirement is i need to display those material code in Color in Table control.
    Is it possible if so, Let me know the code.
    Thanks and Regards
    Arvind
    Edited by: arvind nn on Aug 24, 2010 11:41 AM

    Hi sir
    I ave given as u said, its not working. kindly give some other possibilities.
    I am displaying Material code from Mara in Table control.\
    In PBO
    Ave given
    loop at ijtab cursor tab-current_line with control tab.
        module lines.
        module modify_screen.
    endloop.
    For Module Modify_screen Output.
    Following code ave given..
    module MODIFY_SCREEN output.
         Loop at screen.
          screen-INTENSIFIED  = 1  .   
          screen-COLOR        = 10 .   
         ENDLOOP.
    endmodule.
    THANKS AND REGARDS
    ARVIND

  • 3D Map - Color Code and Cursor Tracking

    Hi, I need some help trying to implement some user interface functionality for a program I am developing.
    This will be a tuning tool for automotive ECU. The program will be reading in two signals (Y-axis is RPM, X-Axis is manifold pressure) and use a 2D interpolation to output a Z value to be used in a calculation. There are two pieces I'd like to add to this. 
    1. Color code the cells based on the cell value in relation to the max and in of the entire 2D-Array
    2. Have a live currsor that tracks the current cell of the 2D array and highlights the cells that are being used in the interp calculation so it makes it easier for the user to make changes and calibrate the tables. 
    3. BONUS: An easy way to be able to select a range of cells and increment them by a set amoun or scale them all by an imput amount (like scale range by 90%).
    Basicly, I'd like to recreate some of the user interface functionality of the software shown below in the second picture and the video linked below. 
    VIDEO:    https://www.youtube.com/watch?v=OkVUJCy0sJ4
    VIDEO:   https://www.youtube.com/watch?v=oeZc-ka6ago      (at 16:45 you can see a good example of the currsor tracking through the cells as teh two inputs change)
    -As you drive and the RPM and loading changes there is a blue ball that tracks on the table the current x-y location of the 2D map and the four coresponding cells around the ball are highlighted to show witch of these cells are being used in the calculation so the user can easily alter these cells in real time to tune the output he is looking for. I'd like to be able to highlight, or blink either a single cell closest to the current value, or the 4 corners around it and have it update real time as the user drives the car. 
    Any ideas of how to implement this kind of functionality? The current VI is attached. I should note the x-array and y-array won't necessarily always be constant spacing between cells.
    Thank you for any help in advance!
    Attachments:
    3D Map Color Coded & Currsor.vi ‏17 KB

    Okay, so I made some progress on this. I was able to use an intensity graph to visually color code the relative position of the cells. Is there a way to make the 2D array translucent and overlay the color array intsity graph behind it? is there a better way to do this. 
    I was able to get the closest current cell value to update as black and track around live on the intensity graph. I did this by temporarily setting the cell's value to 0. Is there a way to somehow highlight the actual cell on the 2D-Array instead? 
    The code is attached. I added a random sine wave input to simultate some signals for the x and y input. The Y array now runs in reverse order which made it tricky to get some of the functions to work properly so I had to use a 2D transpose and 1D reverse array to get it back in the right form. There's probably a better way to do this. 
    Any help is great appreciately and rewarded with Kuddos!  
    Attachments:
    3D Map Color Coded & Currsor (Rev B).vi ‏33 KB

  • Why color code css using powershell command is not visible in email ?

    Hello,
    I am applying color code for disabled status in PS script as  written below :
    $ReportData = Get-SPServiceInstance | Select Server,TypeName,Status,NeedsUpgrade | ConvertTo-Html -Fragment
    $DisabledStatus='<td>Disabled</td>'
    $DisabledColorStyle='<td style="background-color:red !important;color:white !important" >Disabled</td>'
    $ReportData = $ReportData -replace $DisabledStatus,$DisabledColorStyle
    ConvertTo-Html -Body "<font color = blue><H4><B>Report </B></H4></font>$ReportData" -Title "Test Report" -CssUri C:\style.CSS | Out-File "E:\Reports\TestReport.html"
    This report shows perfect on system where report file is located at E:\Reports\TestReport.html location as below :
    However , when I send this report via email using following command
    $Report = Get-Content "E:\Reports\TestReport.html"
    Send-MailMessage -To $To -SmtpServer $SMTP -From $From -Subject $Subject -BodyAsHtml "$Report"
    I dont see disabled as red color in email , while table's style is working which is stored at C:\style.CSS
    Would you please let me know the reason behind same ?
    Thanks and Regards,
    Dipti
    Dipti Chhatrapati

    Hi Dipti,
    I‘m writing to check if the suggestions were helpful, if you have any questions, please feel free to let me know.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to add colors to table cells

    Hi ALL,
    Does anyone have any idea of adding colors to table cells?For example i am displaying monthly chart in a table view i want to fill the cells with colors when columns are saturday and sunday.
    Thanks in advance

    Hi,
    I want to pass the colors at bean level.For example
    private DefaultTableViewModel createNewTable
                                      (DefaultTableViewModel model) {
            Vector data = createData();
            Vector colName = new Vector();
            /* Define column names */
            colName.addElement("1stColumn");
            colName.addElement("2ndColumn");
            colName.addElement("3rdColumn");
            model = new DefaultTableViewModel(data, colName);
            return model;
        private Vector createData() {
            Vector dataVec = new Vector();
            Vector retVector = new Vector();
            /* 1st entry */
            dataVec.addElement("Row 1, Column 1");
            dataVec.addElement("Row 1, Column 2");
            dataVec.addElement("Row 1, Column 3");
            retVector.addElement(dataVec);
            /* 2nd entry */
            dataVec = new Vector();
            dataVec.addElement("Row 2, Column 1");
            dataVec.addElement("Row 2, Column 2");
            dataVec.addElement("Row 2, Column 3");
            retVector.addElement(dataVec);
            /* more entries */
            return retVector;
    suppose I want to pass the color at Row2,Column1.Can anyone post the sample code ?
    its little urgent.Thanks in advance

  • Color code logic not feasible in Pocket Browser

    Hi Team,
    We had a requirement in which we need to color the rows of SAP SRS application's ItemOverView table based on SalesOrder in a particular Purchase Order. My ex-colleague, did a solution with CellVariant that ran excellently well with Desktop applications.
    Client never tested this application in latest Mobile devices with the Pocket Browser and compatible OS.
    Now, when they tested it. First, I came to know that the standard functionality of SAP SRS MDE like GoFunctionKey is not working.
    Then, my onsite lead installed the Proper OS and Compatible Browser Pocket Browser and all the standard functionalities are working fine in SAP SRS MDE application.
    SAP had clearly mentioned to me that Cellvariant logic will not work with the Mobile Device and the Pocket Browser and also; I implemented the color code logic in the desktop application with cell design but the color code did not work with Cell Design and SAP also verified it.
    Now, please tell me how to differentiate the rows based on PO Number and the SalesOrder. They want it to be marked differently for one range and different for another range.
    OSS Message: ( 471108 / 2011 )
    17.06.2011 - 14:27:08 CET - Reply by SAP              
    Dear Kaushik,
    As mentioned in my reply dated:13.06.2011 14:28:53, yes the cell
    variants in the table UI is ignored., this is due to rich JavaScript
    and HTML support.
    Kindly close the message at your earliest.
    Thanks, Siraj
    OSS Message: ( 421670 / 2011 )
    SAP gave this link.
    https://websmp203.sap-ag.de/~sapidb/011000358700000304702008E
    UI Element Restrictions       Ignored Properties
    Table                                   design, enabled, readOnly, tooltip, width
    Thanks & Regards
    Kaushik Banerjee
    SAP Portal

    Not sure if you want to apply the blue/teal color to the name of the executive or the whole first paragraph, but you could try the following for just the name color change.
    Add this style rule:
    span.name {color: #258dbe; font-weight:bold;}
    and then for the html:
    <p><span class="name">Sandra Kozusko, President & CEO,</span> started her training and consulting career in 1988.  With more than 20 years experience in the design, development and delivery of leadership, price and profit management, change management, customer service, sales, retention, operations and technical training programs, Mrs. Kozusko has held various teaching positions at Union County College, Edison Township Adult School of Education, and The Cittone Institute.</p>
    This will change the title of the executive to blue.
    As for divs and classes... the important thing to remember is that you can use an ID (#nameofdiv) once per page, but a class can be used as many times as you like per page.

  • Getting error while setting color to table rows?

    Hi All
    I am trying to setting colors to table rows based on dropdown value.
    lv_Dropdown vaue =1 i want to set one color, 2-another color like that.
    For this I create attribute CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN in node, and i bind this attribute to every column celldesign property in table. and my code in on select of dropdown.
      data lr_column type ref to cl_wd_table_column.
    data:obj_table type ref to cl_wd_table.
    lr_column = obj_table->get_column( id = 'TABLE_WEEK1' ).
    if lv_dropdown = 1.
       lr_column->set_cell_design(
    cl_wd_table_column=>e_cell_design-badvalue_dark ).
    endif.
    lr_column->bind_cell_design( path = 'SEGMENT1.CELL_DESIGN'  ). ...Giving dump at r_colum = get_column( )
    I follow correct code or not??
    Cheers,
    Venkys.

    Sorry Sarbjeet and baskaran i am not getting,
    I want to set colors to row of a table on dropdown selection. In dropdown i ahve a code like
    DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
      DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
      DATA ls_segment1 TYPE wd_this->Element_segment1.
      data lt_segment1 type wd_this->elements_segment1.
      DATA lv_segment TYPE wd_this->Element_segment1-segment.
    navigate from <CONTEXT> to <SEGMENT1> via lead selection
      lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
    get element via lead selection
      lo_el_segment1 = lo_nd_segment1->get_element( ).
      lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
      lo_el_segment1->get_static_attributes(
        IMPORTING
          static_attributes = ls_segment1 ).
    DATA : lv_dropdown type string .
    lv_dropdown =  ls_segment1-segment.
    if lv_dropdown = 1.  SET ONE COLOR TO THAT ROW
    endif.
    if lv_dropdown = 2.  SET ONE COLOR TO THAT ROW
    endif.
    Now what should be the code in WDMODIFYVIEW method to set table row with colors.
    Cheers,
    Venkys.

  • Color code strips in JTable cell

    Hi,
    i want a table which has color codes in a cell like this [http://cid-bc2f07e59ddd1ff9.skydrive.live.com/self.aspx/ImageForJTable/tableImage.bmp]
    I this small vertical color bar comes in very first cell.
    How should i make this working.
    I will be highly gracefull to you........

    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableTest {
      public TableTest() {
        String[] columnNames = {"FileName", "Integer"};
        Object[][] data = {
          {new FileName("AAA.jpg", Color.YELLOW), 2},
          {new FileName("BBB.png", Color.GREEN), 1},
          {new FileName("CCC.jpg", Color.RED), -1},
        DefaultTableModel model = new DefaultTableModel(data, columnNames) {
          @Override public Class<?> getColumnClass(int column) {
            return getValueAt(0, column).getClass();
        JTable table = new JTable(model);
        table.setDefaultRenderer(FileName.class, new FileNameCellRenderer());
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.add(new JScrollPane(table));
        frame.setSize(320, 160);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      static class FileNameCellRenderer extends DefaultTableCellRenderer {
        public Component getTableCellRendererComponent(JTable table, Object v,
               boolean isSelected, boolean hasFocus, int row, int column) {
          super.getTableCellRendererComponent(
            table, v, isSelected, hasFocus, row, column);
          FileName fn = (FileName)v;
          setBorder(BorderFactory.createMatteBorder(0,2,0,0,fn.color));
          return this;
      static class FileName{
        public final Color color;
        public final String label;
        FileName(String l, Color c) {
          this.label = l;
          this.color = c;
        @Override public String toString() {
          return label;
      public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
          @Override public void run() {
            new TableTest();
    }

  • Diaplaying color in table

    hi i created one panel in my project using netbeans.now i want to display the color in my table i tried but i am getting color code insted of
    color ...
    here is my code
    package pckRender;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.DefaultTableModel;
    * @author admin
    public class pnlRender extends javax.swing.JPanel {
    Object[][] data = {{"Shashi", "24", Color.red}};
    String [] columnnames= {"Name", "Age", "Color"};
    /** Creates n
    * ew form pnlRender */
    public pnlRender() {
    super(new GridLayout(1,0));
    initComponents();
    javax.swing.table.AbstractTableModel model = new javax.swing.table.DefaultTableModel(data, columnnames);
    javax.swing.JTable table = new JTable(model);
    table.setFillsViewportHeight(true);
    table.setOpaque(true);
    JScrollPane scrollPane = new JScrollPane(table);
    scrollPane.setOpaque(true);
    scrollPane.setViewportView(table);
    table.setDefaultRenderer(Color.class,
    new ColorRenderer(true));
    add(scrollPane);
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    setLayout(new java.awt.GridLayout());
    }// </editor-fold>
    private static void createAndShowGUI() {
    //Create and set up the window.
    JFrame frame = new JFrame("TableDialogEditDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    JComponent newContentPane = new pnlRender();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    // Variables declaration - do not modify
    // End of variables declaration
    And To display the Color in tabel i created one class here is that Code
    package com.aerron.coconut;
    * ColorRenderer.java (compiles with releases 1.2, 1.3, and 1.4) is used by
    * TableDialogEditDemo.java.
    import javax.swing.BorderFactory;
    import javax.swing.JLabel;
    import javax.swing.JTable;
    import javax.swing.border.Border;
    import javax.swing.table.TableCellRenderer;
    import java.awt.Color;
    import java.awt.Component;
    public class ColorRenderer extends JLabel
    implements TableCellRenderer {
    Border unselectedBorder = null;
    Border selectedBorder = null;
    boolean isBordered = true;
    public ColorRenderer(boolean isBordered) {
    this.isBordered = isBordered;
    setOpaque(true); //MUST do this for background to show up.
    public Component getTableCellRendererComponent(
    JTable table, Object color,
    boolean isSelected, boolean hasFocus,
    int row, int column) {
    Color newColor = (Color)color;
    setBackground(newColor);
    if (isBordered) {
    if (isSelected) {
    if (selectedBorder == null) {
    selectedBorder = BorderFactory.createMatteBorder(2,5,2,5,
    table.getSelectionBackground());
    setBorder(selectedBorder);
    } else {
    if (unselectedBorder == null) {
    unselectedBorder = BorderFactory.createMatteBorder(2,5,2,5,
    table.getBackground());
    setBorder(unselectedBorder);
    // setToolTipText("RGB value: " + newColor.getRed() + ", "
    // + newColor.getGreen() + ", "
    // + newColor.getBlue());
    return this;
    so how to display the Color.
    Thank You in Advance

    Take a look here, you might find something usefull for you
    [All about JTables|http://www.java2s.com/Code/Java/Swing-JFC/Table.htm]
    Never forget to use the code tag on your messages, if you dont people will not read your code.

  • Color Codes for ALV

    Dear All,
    I want to show the colored rows on ALV depending on conditions.
    Depending upon the conditions, row may have different colors.
    So, from where I can find that color codes (Like for Green - Color Code is 'C500')?
    I anyone have the Codes please provide the color Code else, please provide the reference link or reference Document.
    Waiting for reply.
    Thanks and Best regards,
    Prasad

    The follow program demonstrates how to change the colour of individual rows of an ALV grid. Changes required
    from a basic ALV grid include adding a new field to ALV grid data table(it_ekko), Populating this field with color
    attribute and adding an entry to layout control table.
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic ALV grid, Enhanced to display each row in a different     *
    *& colour                                                              *
    REPORT  zdemo_alvgrid                 .
    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,
      line_color(4) type c,     "Used to store row color attributes
    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.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    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-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).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    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_XEVENTS
                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.
    data: ld_color(1) type c.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    *Populate field with color attributes
    loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
      ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
      if ld_color = 8.
        ld_color = 1.
      endif.
      concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
      modify it_ekko from wa_ekko.
    endloop.
    endform.                    " DATA_RETRIEVAL

  • ALV color codes

    Hi all,
    I understand that the ALV grid color codes consists of the following format:
    CXYZ
    X = 0 - 7
    Y,Z = 0 - 1
    Is there any way to display color other than the above? I need a dark grey color (the color when the grid is set to not editable). Is there anywhere to do that? The intensity option is not helping much.
    Thanks in advance.

    Hi,
    Herewith i am sending for the sample code with alv grid report.
    REPORT  YMS_COLOURALV NO STANDARD PAGE HEADING.
    TYPE-POOLS: SLIS, ICON.
    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF IMARA OCCURS 0,
              LIGHT(4) TYPE C,
              MATNR TYPE MARA-MATNR,
              MTART TYPE MARA-MTART,
              MAKTX TYPE MAKT-MAKTX,
              COLOR_LINE(4) TYPE C,
              TCOLOR TYPE SLIS_T_SPECIALCOL_ALV,  "cell
          END OF IMARA.
    DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM WRITE_REPORT.
    Get_Data
    FORM GET_DATA.
      WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
          IMARA-MATNR = 'ABC'.
          IMARA-MTART = 'ZCFG'.
          IMARA-MAKTX = 'This is description for ABC'.
      APPEND IMARA.
      WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.
          IMARA-MATNR = 'DEF'.
          IMARA-MTART = 'ZCFG'.
          IMARA-MAKTX = 'This is description for DEF'.
      APPEND IMARA.
      WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.
          IMARA-MATNR = 'GHI'.
          IMARA-MTART = 'ZCFG'.
          IMARA-MAKTX = 'This is description for GHI'.
      APPEND IMARA.
      LOOP AT IMARA.
        IF SY-TABIX = 1.
          IMARA-COLOR_LINE = 'C410'.     " color line
        ENDIF.
        IF SY-TABIX = 2.                "  color CELL
          CLEAR XCOLOR.
          XCOLOR-FIELDNAME = 'MTART'.
          XCOLOR-COLOR-COL = '3'.
          XCOLOR-COLOR-INT = '1'.       " Intensified on/off
          XCOLOR-COLOR-INV = '0'.
          APPEND XCOLOR TO IMARA-TCOLOR.
        ENDIF.
        MODIFY IMARA.
      ENDLOOP.
    ENDFORM.                    "get_data
    WRITE_REPORT
    FORM WRITE_REPORT.
      DATA: LAYOUT TYPE  SLIS_LAYOUT_ALV.
      LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.
      LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.
      PERFORM BUILD_FIELD_CATALOG.
    CALL ABAP LIST VIEWER (ALV)
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FIELDCAT
        TABLES
          T_OUTTAB    = IMARA.
    ENDFORM.                    "write_report
    BUILD_FIELD_CATALOG
    FORM BUILD_FIELD_CATALOG.
      DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
      CLEAR: FIELDCAT. REFRESH: FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Status'.
      FC_TMP-FIELDNAME  = 'LIGHT'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '4'.
      FC_TMP-ICON       = 'X'.
      APPEND FC_TMP TO FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Material Number'.
      FC_TMP-FIELDNAME  = 'MATNR'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '18'.
      APPEND FC_TMP TO FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Material Type'.
      FC_TMP-FIELDNAME  = 'MTART'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '10'.
      APPEND FC_TMP TO FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Material'.
      FC_TMP-FIELDNAME  = 'MAKTX'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '40'.
      FC_TMP-EMPHASIZE = 'C610'.   " color column
      APPEND FC_TMP TO FIELDCAT.
    ENDFORM.                    "build_field_catalog
    Thanks,
    Shankar

  • Why won't the color code I am trying to use from a windows machine work on my Mac? Code: PMS7409

    Hi I'm an intern at a telecommunications and management company who are about to release an update on their website and server screens. My job is to create the new graphics and remake the presentation layers. I am also assigned to create a business card template, which is where my question comes. I am give a color code, from a Windows OS, and try to input that code into Photoshop CS6. That color code won't appear. It's a deep orange and the code I am being told is; PMS7409. I'm not sure thats a code (atleast on the Mac), but I haven't used a Windows OS in so long I don't even know if Windows has their own color coding system or what. Can someone help me out and tell me if this is me, my boss, or we're missing something and I'm going to look like an idiot?

    Definitely not a colour code for mac, the only thing I suggest you do is if you get the code on your windows version is to get the other values i.e
    instead and input those into it rather than the #colour code (Hue, Sat, B, R, G B) etc.
    Also ... Colour codes are 6 figures long i.e the one displayed and also black #000000 and white #ffffff
    however the one you gave is 7!
    Message was edited by: ConstantAngel

  • How can i 'translate' the formules in Rep S_ALR_87013532 to code (tables) ?

    Hi
    I'm creating a report wich shows the Commit, Paid, Budget, etc. in PS module.   I will take these column values from severel PS reports generated with the 'Report Printer' tool, wich allow to calculate the values vía a 'semantic formules' using key figures, Characteristic values, etc.  (For example report S_ALR_87013532).
    I need to know how to translate these formules to code (tables); but i really don't know anything about Report Printer, Key Figures, etc.
    Any idea ?    Does somebody knows how to translate the Report Printer formules to code reading tables ?  
    Any help will be apretiated !!
    Regards
    Frank

    Hi Frank,
    I saw your earlier post for Changes a peport created via Report painter. You can do via T/code GRR2.
    Please go thru the documantation this will provide you step by step approach on Report painter.
    <a href="http://www.virtuosollc.com/PDF/Get_Reporter.pdf">Peport painter</a>
    <a href="http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp">Report painter--test report</a>
    Need more information please let me know.
    Lanka
    Ps: Please allocate the points if this answer helps you.

  • How do I replace image color with an exact html color code?

    I simply want to change the color of a small pic to an existing html color code, 3399CC.  The pic is very simple, and only has one color.  In Photoshop CS4, I go to:  Image -> Adjustments -> Replace Color.  For the new replacement color, when I type in 3399CC, it doesn't give me that color - it gives some other shade of that color.  (I can tell because I use a program that tells me the exact html code a color is when I hover my mouse over it).  It seems the only way to really get the color you want is to adjust the sliders (hue, saturation, and lightness).  But it'd be practically impossible to play around with every increment of those sliders until I get the exact color code.  
    There's got to be a way to simply enter the html color code and have the pic changed to that color.  Does anyone have any idea?

    Turns key.  WhirrRRRrrrrRRRrrrr....  Nothing.  (I answered in the other thread)
    Perhaps I've had too much coffee today, because I just got a clear vision of Bart Simpson, at the board, chalk in hand...
    SRGB IS KING!!!  SRGB IS DEAD!!!  LONG LIVE SRGB!!!
    SRGB IS KING!!!  SRGB IS DEAD!!!  LONG LIVE SRGB!!!
    SRGB IS KING!!!  SRGB IS DEAD!!!  LONG LIVE SRGB!!!
    SRGB IS KING!!!  SRGB IS DEAD!!!  LONG LIVE SRGB!!!
    SRGB IS KING!!!  SRGB IS DEAD!!!  LONG LIVE SRGB!!!
    SRGB IS KING!!!  SRGB IS DEAD!!!  LONG LIVE SRGB!!!
    -Noel

  • How can i Change Text Color in table

    How can i change the text color i table, the true becoming GREEN, and the text in Fals becoming RED.
    Someone can help me to resolve this problem with a sample, because when i run the program all text becoming green in (TRUE) and than when i chang it to the (fals) all becoming Red.
    Attachments:
    Color.vi ‏38 KB

    Modifying the properties of a control in a subVI do not modify the properties of a different control in the main VI. The data is the only thing passed back from the subVI. To modify the properties of the table in the main, you need to pass a reference to it to the subVI and modify it's properties. I've attached a modified llb that does what you want.
    Attachments:
    Main_color_Table_mod.llb ‏41 KB

Maybe you are looking for

  • InDesign CS4 rotated graphic content offsets

    Has anyone noticed problems with the xy co-ordinates of graphics within picture boxes when they're rotated? I've asked Adobe Support about this, and uploaded a test file for them to look at but not had a meaningful response. Firstly, my page crosshai

  • Gdm 1080p small font

    Hi fellas, I got arch installed on my media pc hooked up to a 1080p lcd TV (using dvi to hdmi cabling).  The problem i have is that in gdm, the fonts are inscrutably small and unlegible.  They are just tiny...  I'm using 1920x1080 and the text look l

  • SERVICE SCENARIO

    Hi Gurus, I am mapping service scenario with reference to sales Order for my client. In that only activity charges will be captured against production order & settlement is to be done. When I convert plan order into production Order by CO08, I get an

  • Getting error in VS while trying to include boss class in  resource (.fr) file

    Hi I am trying to include a boss class in my resource file but I am getting the below error while trying to build my project. error R32691: # Error: Custom type name expected, but 'kGTTxtEdtResponderServiceBoss' found. Any one faced such issue before

  • Need FM for displaying date as output  EX:april 07

    Hi All, I have a problem in displaying date for example: If i give period as 3 and year as 2007, the output should be displayed as april-07. Can any one help me out in finding a solution. Thanks in advance.