<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314353#M793849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Coloring an Entire Row&lt;/P&gt;&lt;P&gt;Coloring a row is a bit (really a bit) more complicated. To enable row coloring, 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. modify declaration of our list data table &amp;#147;gt_list&amp;#148;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table holding list data &lt;/P&gt;&lt;P&gt;DATA BEGIN OF gt_list OCCURS 0 .&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SFLIGHT .&lt;/P&gt;&lt;P&gt;DATA rowcolor(4) TYPE c .&lt;/P&gt;&lt;P&gt;DATA END OF gt_list .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you pass the name of the field containing color codes to the field &amp;#147;INFO_FNAME&amp;#148; of the layout structure.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;ps_layout-info_fname = &amp;lt;field_name_containing_color_codes&amp;gt;. &amp;#147;e.g. &amp;#145;ROWCOLOR&amp;#146;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coloring Individual Cells&lt;/P&gt;&lt;P&gt;-&amp;gt; The procedure is similar to coloring an entire row. However, since an individual cell can be addressed with two parameters we will need something more. What is meant by &amp;#147;more&amp;#148; is a table type structure to be included into the structure of the list data table. It seems strange, because including it will make our list data structure deep. But anyhow ALV Grid control handles this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structure that should be included must be of type &amp;#147;LVC_T_SCOL&amp;#148;. If you want to color the entire row, this inner table should contain only one row with field &amp;#147;fname&amp;#148; is set to space, some color value at field &amp;#147;col&amp;#148;, &amp;#147;0&amp;#148; or &amp;#147;1&amp;#148; at fields &amp;#147;int&amp;#148; (intensified) and &amp;#147;inv&amp;#148; (inverse).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;If you want to color individual cells, then for each cell column, append a line to this inner table which also contains the column name at field &amp;#147;fname&amp;#148;. It is obvious that you can color an entire column by filling this inner table with a row for that column for each row in the list data table. But, it is also obvious that, this will be more time consuming &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Again key field coloring will override your settings. That&amp;#146;s why, we have another field in this inner table called &amp;#147;nokeycol&amp;#148;. For each field represented in the inner table, set this field to &amp;#145;X&amp;#146; to prevent overriding of key color settings.&lt;/P&gt;&lt;P&gt;In this procedure, again we must tell the control the name of the inner table containing color data. The field &amp;#147;CTAB_FNAME&amp;#148; of the layout structure is used for this purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding inner table that will contain cell color data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table holding list data &lt;/P&gt;&lt;P&gt;DATA BEGIN OF gt_list OCCURS 0 .&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SFLIGHT .&lt;/P&gt;&lt;P&gt;DATA rowcolor(4) TYPE c .&lt;/P&gt;&lt;P&gt;DATA cellcolors TYPE lvc_t_scol .&lt;/P&gt;&lt;P&gt;DATA END OF gt_list .&lt;/P&gt;&lt;P&gt;Code Part 15 &amp;#150; A sample code to make the cell at row 5 and column &amp;#145;SEATSOCC&amp;#146; colored&lt;/P&gt;&lt;P&gt;DATA ls_cellcolor TYPE lvc_s_scol .&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;READ TABLE gt_list INDEX 5 .&lt;/P&gt;&lt;P&gt;ls_cellcolor-fname = 'SEATSOCC' .&lt;/P&gt;&lt;P&gt;ls_cellcolor-color-col = '7' .&lt;/P&gt;&lt;P&gt;ls_cellcolor-color-int = '1' .&lt;/P&gt;&lt;P&gt;APPEND ls_cellcolor TO gt_list-cellcolors .&lt;/P&gt;&lt;P&gt;MODIFY gt_list INDEX 5 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep rockin&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Feb 2008 12:24:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-03T12:24:57Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314352#M793848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How many colors using ALV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send me about ALV colors details?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply me soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tx,&lt;/P&gt;&lt;P&gt;s.suresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2008 12:18:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314352#M793848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-03T12:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314353#M793849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Coloring an Entire Row&lt;/P&gt;&lt;P&gt;Coloring a row is a bit (really a bit) more complicated. To enable row coloring, 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. modify declaration of our list data table &amp;#147;gt_list&amp;#148;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table holding list data &lt;/P&gt;&lt;P&gt;DATA BEGIN OF gt_list OCCURS 0 .&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SFLIGHT .&lt;/P&gt;&lt;P&gt;DATA rowcolor(4) TYPE c .&lt;/P&gt;&lt;P&gt;DATA END OF gt_list .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you pass the name of the field containing color codes to the field &amp;#147;INFO_FNAME&amp;#148; of the layout structure.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;ps_layout-info_fname = &amp;lt;field_name_containing_color_codes&amp;gt;. &amp;#147;e.g. &amp;#145;ROWCOLOR&amp;#146;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coloring Individual Cells&lt;/P&gt;&lt;P&gt;-&amp;gt; The procedure is similar to coloring an entire row. However, since an individual cell can be addressed with two parameters we will need something more. What is meant by &amp;#147;more&amp;#148; is a table type structure to be included into the structure of the list data table. It seems strange, because including it will make our list data structure deep. But anyhow ALV Grid control handles this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structure that should be included must be of type &amp;#147;LVC_T_SCOL&amp;#148;. If you want to color the entire row, this inner table should contain only one row with field &amp;#147;fname&amp;#148; is set to space, some color value at field &amp;#147;col&amp;#148;, &amp;#147;0&amp;#148; or &amp;#147;1&amp;#148; at fields &amp;#147;int&amp;#148; (intensified) and &amp;#147;inv&amp;#148; (inverse).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;If you want to color individual cells, then for each cell column, append a line to this inner table which also contains the column name at field &amp;#147;fname&amp;#148;. It is obvious that you can color an entire column by filling this inner table with a row for that column for each row in the list data table. But, it is also obvious that, this will be more time consuming &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Again key field coloring will override your settings. That&amp;#146;s why, we have another field in this inner table called &amp;#147;nokeycol&amp;#148;. For each field represented in the inner table, set this field to &amp;#145;X&amp;#146; to prevent overriding of key color settings.&lt;/P&gt;&lt;P&gt;In this procedure, again we must tell the control the name of the inner table containing color data. The field &amp;#147;CTAB_FNAME&amp;#148; of the layout structure is used for this purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding inner table that will contain cell color data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table holding list data &lt;/P&gt;&lt;P&gt;DATA BEGIN OF gt_list OCCURS 0 .&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE SFLIGHT .&lt;/P&gt;&lt;P&gt;DATA rowcolor(4) TYPE c .&lt;/P&gt;&lt;P&gt;DATA cellcolors TYPE lvc_t_scol .&lt;/P&gt;&lt;P&gt;DATA END OF gt_list .&lt;/P&gt;&lt;P&gt;Code Part 15 &amp;#150; A sample code to make the cell at row 5 and column &amp;#145;SEATSOCC&amp;#146; colored&lt;/P&gt;&lt;P&gt;DATA ls_cellcolor TYPE lvc_s_scol .&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;READ TABLE gt_list INDEX 5 .&lt;/P&gt;&lt;P&gt;ls_cellcolor-fname = 'SEATSOCC' .&lt;/P&gt;&lt;P&gt;ls_cellcolor-color-col = '7' .&lt;/P&gt;&lt;P&gt;ls_cellcolor-color-int = '1' .&lt;/P&gt;&lt;P&gt;APPEND ls_cellcolor TO gt_list-cellcolors .&lt;/P&gt;&lt;P&gt;MODIFY gt_list INDEX 5 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep rockin&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2008 12:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314353#M793849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-03T12:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314354#M793850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to color a particular cell use slis_specialcol..&lt;/P&gt;&lt;P&gt;in your internal table add a field with type slis_specialcol..&lt;/P&gt;&lt;P&gt;enter field name and color number .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In General we have to give BLUE color for the primary key field and we have to give other color to other filelds.&lt;/P&gt;&lt;P&gt;If we mention KEY filed in FIELD CATALOG we get BLUE color for that filed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-tabname = 'IT_SALESORDER'. " &lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'VBELN'. " Field Name&lt;/P&gt;&lt;P&gt;wa_fieldcat-key = 'X'. " Blue Color&lt;/P&gt;&lt;P&gt;wa_fieldcat-hotspot = 'X'. " Hand Appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR OTHER COLOR FOR THE FILEDS WE HAVE TO USE &lt;/P&gt;&lt;P&gt;emphasize parameter.I have to mention the code below check it once..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-tabname = 'IT_SALESORDER'. " &lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname = 'MATNR. " Field Name&lt;/P&gt;&lt;P&gt;wa_fieldcat-hotspot = 'X'. " Hand Appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_fieldcat-emphasize = 'C310'. " Color&lt;/P&gt;&lt;P&gt;APPEND wa_fieldcat TO it_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these links will help you do so&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple ALV report&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/alvgrid.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/alvgrid.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox" target="test_blank"&gt;http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Please give me general info on ALV.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=58286" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=58286&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=76490" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=76490&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20591" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20591&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=66305" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=66305&lt;/A&gt; - this one discusses which way should you use - ABAP Objects calls or simple function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How do I program double click in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=11601" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=11601&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=23010" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=23010&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. How do I add subtotals (I have problem to add them)...&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=20386" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=20386&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=85191" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=85191&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88401" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88401&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=17335" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=17335&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. How to add list heading like top-of-page in ABAP lists?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=58775" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=58775&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=60550" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=60550&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=16629" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=16629&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. How to print page number / total number of pages X/XX in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=29597" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=29597&lt;/A&gt; (no direct solution)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=64320" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=64320&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=44477" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=44477&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. How can I set the cell color in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=52107" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=52107&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. How do I print a logo/graphics in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=81149" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=81149&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=35498" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=35498&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=5013" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=5013&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. How do I create and use input-enabled fields in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=84933" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=84933&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=69878" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=69878&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. How can I use ALV for reports that are going to be run in background?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=83243" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=83243&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=19224" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=19224&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11. How can I display an icon in ALV? (Common requirement is traffic light icon).&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=79424" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=79424&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=24512" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=24512&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12. How can I display a checkbox in ALV?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=88376" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=88376&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=40968" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=40968&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/forums/viewtopic.php?t=6919" target="test_blank"&gt;http://www.sapfans.com/forums/viewtopic.php?t=6919&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if helpful.&lt;/P&gt;&lt;P&gt;GAURAV J.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: GAURAV on Feb 3, 2008 1:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2008 12:25:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314354#M793850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-03T12:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314355#M793851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The below links will give you enough information for adding colors in ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz go thru these links for sample pgm&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/line-color-in-alv-example.htm" target="test_blank"&gt;http://www.sap-img.com/abap/line-color-in-alv-example.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is an example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Create an executable program and paste in the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use SE51 and create a screen '0100' for program ZR_COLORS. Place a custom container on it. Give the custom container the name of 'CUSTOM_GRID_CONTAINER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and activate all... and there you go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZR_Colors.

data: begin of i_vbak2 occurs 0.
include structure vbak.
data: end of i_vbak2.

data: begin of i_vbak occurs 0.
include structure vbak.
data: cellcolors type lvc_t_scol. " note that is an int table within
data: end of i_vbak. " an int table !!!

types: begin of r_vbak.
include structure vbak.
types: cellcolors type lvc_t_scol.
types: end of r_vbak.

data: i_vbak_out type table of r_vbak.

data: cellcolor type lvc_s_scol.
data: layout type LVC_S_LAYO.

data: grid1 type ref to cl_gui_alv_grid,
field_catalog type lvc_t_fcat,
grid1_container type ref to cl_gui_custom_container.
data: lt_fieldcat type LVC_T_FCAT.
data: wa_fieldcat type LVC_s_FCAT.


start-of-selection.
select * from vbak into table i_vbak2
where erdat &amp;gt; '20041201'
and erdat &amp;lt; '.

loop at i_vbak2.
move-corresponding i_vbak2 to i_vbak.
append i_vbak.
endloop.

layout-zebra = 'X'.
layout-cwidth_opt = 'X'.



Set first cell in Net value column. 
read table i_vbak index 2.
cellcolor-fname = 'NETWR'.
cellcolor-color-col = '3'.
cellcolor-color-int = '1'.
cellcolor-NOKEYCOL = 'X'.
append cellcolor to i_vbak-cellcolors.
modify i_vbak index 2.


Set 2nd cell in Net value column. 
read table i_vbak index 4.
cellcolor-fname = 'NETWR'.
cellcolor-color-col = '6'.
cellcolor-color-int = '1'.
cellcolor-NOKEYCOL = 'X'.
append cellcolor to i_vbak-cellcolors.
modify i_vbak index 4.


Identify the internal table name with the colors reference. 
layout-CTAB_FNAME = 'CELLCOLORS'.


Instantiate the grid container. 
create object grid1_container
exporting
container_name = 'CUSTOM_GRID_CONTAINER'.


Instantiate the grid itself within the container. 
create object grid1
exporting
i_parent = grid1_container
i_appl_events = 'X'.

i_vbak_out] = i_vbak[.

layout-frontend = 'E'.


Call method of grid1 class object to build/display the grid. 
call method grid1-&amp;gt;set_table_for_first_display
EXPORTING i_structure_name = 'VBAK'
is_layout = layout
changing
it_outtab = i_vbak_out.

it_fieldcatalog = lt_fieldcat. 

call screen '0100'.

&amp;amp;---------------------------------------------------------------------
*&amp;amp; Module STATUS_0100 OUTPUT
&amp;amp;---------------------------------------------------------------------

text 
----------------------------------------------------------------------
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'E100'.
SET TITLEBAR '100'.

ENDMODULE. " STATUS_0100 OUTPUT

&amp;amp;---------------------------------------------------------------------
*&amp;amp; Module USER_COMMAND_0100 INPUT
&amp;amp;---------------------------------------------------------------------

text 
----------------------------------------------------------------------
MODULE USER_COMMAND_0100 INPUT.
case sy-ucomm.
when 'EXIT' or 'BACK' or 'CANCEL'.
leave program.
endcase.

ENDMODULE. " USER_COMMAND_0100 INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 03:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3314355#M793851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T03:09:46Z</dc:date>
    </item>
  </channel>
</rss>

