<?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/1638190#M284420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at BCALV_TREE_ITEMLAYOUT. It is present in 4.7 I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also have a look at below code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0002 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use of colours in ALV grid (cell, line and column) *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;types : begin of ty_mara,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;matkl like mara-matkl,&lt;/P&gt;&lt;P&gt;counter(4) type n,&lt;/P&gt;&lt;P&gt;free_text(15) type c,&lt;/P&gt;&lt;P&gt;color_line(4) type c, " Line color&lt;/P&gt;&lt;P&gt;color_cell type lvc_t_scol, " Cell color&lt;/P&gt;&lt;P&gt;end of ty_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structures&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : wa_mara type ty_mara,&lt;/P&gt;&lt;P&gt;wa_fieldcat type lvc_s_fcat,&lt;/P&gt;&lt;P&gt;is_layout type lvc_s_layo,&lt;/P&gt;&lt;P&gt;wa_color type lvc_s_scol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : it_mara type standard table of ty_mara,&lt;/P&gt;&lt;P&gt;it_fieldcat type standard table of lvc_s_fcat,&lt;/P&gt;&lt;P&gt;it_color type table of lvc_s_scol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : okcode like sy-ucomm,&lt;/P&gt;&lt;P&gt;w_alv_grid type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;w_docking_container type ref to cl_gui_docking_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : p_column as checkbox,&lt;/P&gt;&lt;P&gt;p_line as checkbox,&lt;/P&gt;&lt;P&gt;p_cell as checkbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_data.&lt;/P&gt;&lt;P&gt;perform fill_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if w_docking_container is initial.&lt;/P&gt;&lt;P&gt;perform create_objects.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form create_objects&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form create_objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object w_docking_container&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;ratio = 60&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;cntl_error = 1&lt;/P&gt;&lt;P&gt;cntl_system_error = 2&lt;/P&gt;&lt;P&gt;create_error = 3&lt;/P&gt;&lt;P&gt;lifetime_error = 4&lt;/P&gt;&lt;P&gt;lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;others = 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object w_alv_grid&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_parent = w_docking_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field that identify color line in internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'COLOR_LINE' to is_layout-info_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field that identify cell color in inetrnal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'COLOR_CELL' to is_layout-ctab_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method w_alv_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;is_layout = is_layout&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;it_outtab = it_mara&lt;/P&gt;&lt;P&gt;it_fieldcatalog = it_fieldcat&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;too_many_lines = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form get_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara up to 5 rows.&lt;/P&gt;&lt;P&gt;clear : wa_mara-color_line, wa_mara-color_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding mara to wa_mara.&lt;/P&gt;&lt;P&gt;add 1 to wa_mara-counter.&lt;/P&gt;&lt;P&gt;move 'Blabla' to wa_mara-free_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_mara-counter = '0002'&lt;/P&gt;&lt;P&gt;and p_line = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Color line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'C410' to wa_mara-color_line.&lt;/P&gt;&lt;P&gt;elseif wa_mara-counter = '0004'&lt;/P&gt;&lt;P&gt;and p_cell = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Color cell&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'FREE_TEXT' to wa_color-fname.&lt;/P&gt;&lt;P&gt;move '6' to wa_color-color-col.&lt;/P&gt;&lt;P&gt;move '1' to wa_color-color-int.&lt;/P&gt;&lt;P&gt;move '1' to wa_color-color-inv.&lt;/P&gt;&lt;P&gt;append wa_color to it_color.&lt;/P&gt;&lt;P&gt;wa_mara-color_cell[] = it_color[].&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_mara to it_mara.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form fill_catalog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fill_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colour code : *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colour is a 4-char field where : *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 1st char = C (color property) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 2nd char = color code (from 0 to 7) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;0 = background color *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;1 = blue *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;2 = gray *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;3 = yellow *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;4 = blue/gray *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;5 = green *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;6 = red *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;7 = orange *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 3rd char = intensified (0=off, 1=on) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 4th char = inverse display (0=off, 1=on) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colour overwriting priority : *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;1. Line *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;2. Cell *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;3. Column *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;P&gt;data : w_position type i value '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'MATNR' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'MARA' to wa_fieldcat-ref_table.&lt;/P&gt;&lt;P&gt;move 'MATNR' to wa_fieldcat-ref_field.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to w_position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'MATKL' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'MARA' to wa_fieldcat-ref_table.&lt;/P&gt;&lt;P&gt;move 'MATKL' to wa_fieldcat-ref_field.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Color column&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if p_column = 'X'.&lt;/P&gt;&lt;P&gt;move 'C610' to wa_fieldcat-emphasize.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to w_position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'COUNTER' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'N' to wa_fieldcat-inttype.&lt;/P&gt;&lt;P&gt;move '4' to wa_fieldcat-intlen.&lt;/P&gt;&lt;P&gt;move 'Counter' to wa_fieldcat-coltext.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to w_position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'FREE_TEXT' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'C' to wa_fieldcat-inttype.&lt;/P&gt;&lt;P&gt;move '20' to wa_fieldcat-intlen.&lt;/P&gt;&lt;P&gt;move 'Text' to wa_fieldcat-coltext.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Oct 2006 13:04:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-19T13:04:50Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638185#M284415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How to coler a row in alv display.&lt;/P&gt;&lt;P&gt;I am using methods for display.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 12:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638185#M284415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T12:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638186#M284416</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;if you now the row number then use sy-tabix&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-tabix =4.&lt;/P&gt;&lt;P&gt; format color col_key intensified on.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt; format color col_key intensified off.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OFF&lt;/P&gt;&lt;P&gt;or COL_BACKGROUND&lt;/P&gt;&lt;P&gt;Background (GUI-specific) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 &lt;/P&gt;&lt;P&gt;or COL_HEADING &lt;/P&gt;&lt;P&gt;Headers (grayish blue) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 &lt;/P&gt;&lt;P&gt;or COL_NORMAL &lt;/P&gt;&lt;P&gt;List body (bright gray) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 &lt;/P&gt;&lt;P&gt;or COL_TOTAL &lt;/P&gt;&lt;P&gt;Totals (yellow) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4 &lt;/P&gt;&lt;P&gt;or COL_KEY &lt;/P&gt;&lt;P&gt;Key columns (bluish green) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5 &lt;/P&gt;&lt;P&gt;or COL_POSITIVE &lt;/P&gt;&lt;P&gt;Positive threshold value (green) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6 &lt;/P&gt;&lt;P&gt;or COL_NEGATIVE &lt;/P&gt;&lt;P&gt;Negative threshold value (red) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7 &lt;/P&gt;&lt;P&gt;or COL_GROUP &lt;/P&gt;&lt;P&gt;Control levels (violet) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 12:58:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638186#M284416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T12:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638187#M284417</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lokk here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_470/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_470/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 12:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638187#M284417</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-10-19T12:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638188#M284418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1)add a field to your output table&lt;/P&gt;&lt;P&gt;line_color(4) type c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Do programmatically what you need to do and specify the colour you want for each row.&lt;/P&gt;&lt;P&gt;e.g &lt;/P&gt;&lt;P&gt;if &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;itab-line_colour = 'C210'&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;how you get this is &lt;/P&gt;&lt;P&gt;Char 1 = C (This is a color property)&lt;/P&gt;&lt;P&gt;Char 2 = 3 (Color codes: 1 - 7)&lt;/P&gt;&lt;P&gt;Char 3 = Intensified on/off ( 1 or 0 )&lt;/P&gt;&lt;P&gt;Char 4 = Inverse display on/off ( 1 or 0 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 Define the layout with&lt;/P&gt;&lt;P&gt;ws_layout-info_fieldname = 'LINE_COLOR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this link it is very userful&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 13:00:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638188#M284418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T13:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638189#M284419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Method: 1&lt;/P&gt;&lt;P&gt;Assign a variable celltab TYPE lvc_t_styl, in the internal table which u dispaly the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the layout give, wa_layout-stylefname = 'CELLTAB'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the final table before showing the data do like the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lt_celltab TYPE lvc_t_styl,&lt;/P&gt;&lt;P&gt;ls_celltab TYPE lvc_s_styl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE i_final_data INTO wa_final_data INDEX 1.&lt;/P&gt;&lt;P&gt;ls_celltab-fieldname = 'LNG_TYPES'.&lt;/P&gt;&lt;P&gt;ls_celltab-style = '00000060'.&lt;/P&gt;&lt;P&gt;INSERT ls_celltab INTO TABLE lt_celltab.&lt;/P&gt;&lt;P&gt;CLEAR ls_celltab.&lt;/P&gt;&lt;P&gt;ls_celltab-fieldname = 'LNG_QUANTITY'.&lt;/P&gt;&lt;P&gt;ls_celltab-style = '00003060'.&lt;/P&gt;&lt;P&gt;INSERT ls_celltab INTO TABLE lt_celltab.&lt;/P&gt;&lt;P&gt;CLEAR ls_celltab.&lt;/P&gt;&lt;P&gt;ls_celltab-fieldname = 'NG_TYPES'.&lt;/P&gt;&lt;P&gt;ls_celltab-style = '00000666'.&lt;/P&gt;&lt;P&gt;INSERT ls_celltab INTO TABLE lt_celltab.&lt;/P&gt;&lt;P&gt;CLEAR ls_celltab.&lt;/P&gt;&lt;P&gt;ls_celltab-fieldname = 'NG_QUANTITY'.&lt;/P&gt;&lt;P&gt;ls_celltab-style = '00000066'.&lt;/P&gt;&lt;P&gt;INSERT ls_celltab INTO TABLE lt_celltab.&lt;/P&gt;&lt;P&gt;CLEAR ls_celltab.&lt;/P&gt;&lt;P&gt;wa_final_data-celltab[] = lt_celltab[].&lt;/P&gt;&lt;P&gt;MODIFY i_final_data FROM wa_final_data INDEX 1.&lt;/P&gt;&lt;P&gt;CLEAR: ls_celltab, lt_celltab, wa_final_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here ls_celltab-style = '00000066' or '00000060' gives the color for a particular cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the row which u want to make cell colored. For that row, append the field name and style into ls_celltab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_celltab-fieldname = 'LNG_TYPES'.&lt;/P&gt;&lt;P&gt;ls_celltab-style = '00003040'.&lt;/P&gt;&lt;P&gt;INSERT ls_celltab INTO TABLE lt_celltab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_final_data-celltab[] = lt_celltab[].&lt;/P&gt;&lt;P&gt;So that the particular cell will become colored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. declare one field say color in the output table of type SLIS_T_SPECIALCOL_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Also declare a table color like &lt;/P&gt;&lt;P&gt;DATA COLOR TYPE SLIS_T_SPECIALCOL_ALV WITH HEADER LINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. After you have filled the field catalog do like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_ALV_DATA.&lt;/P&gt;&lt;P&gt;IF SY-TABIX = 2.&lt;/P&gt;&lt;P&gt;COLOR-FIELDNAME = 'POSNR'.&lt;/P&gt;&lt;P&gt;COLOR-COLOR-COL = 6.&lt;/P&gt;&lt;P&gt;COLOR-COLOR-INT = 0.&lt;/P&gt;&lt;P&gt;APPEND COLOR.&lt;/P&gt;&lt;P&gt;IT_ALV_DATA-COLOR = COLOR[].&lt;/P&gt;&lt;P&gt;MODIFY IT_ALV_DATA.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 13:04:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638189#M284419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T13:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638190#M284420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at BCALV_TREE_ITEMLAYOUT. It is present in 4.7 I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also have a look at below code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zrich_0002 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use of colours in ALV grid (cell, line and column) *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tables : mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;types : begin of ty_mara,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;matkl like mara-matkl,&lt;/P&gt;&lt;P&gt;counter(4) type n,&lt;/P&gt;&lt;P&gt;free_text(15) type c,&lt;/P&gt;&lt;P&gt;color_line(4) type c, " Line color&lt;/P&gt;&lt;P&gt;color_cell type lvc_t_scol, " Cell color&lt;/P&gt;&lt;P&gt;end of ty_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structures&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : wa_mara type ty_mara,&lt;/P&gt;&lt;P&gt;wa_fieldcat type lvc_s_fcat,&lt;/P&gt;&lt;P&gt;is_layout type lvc_s_layo,&lt;/P&gt;&lt;P&gt;wa_color type lvc_s_scol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : it_mara type standard table of ty_mara,&lt;/P&gt;&lt;P&gt;it_fieldcat type standard table of lvc_s_fcat,&lt;/P&gt;&lt;P&gt;it_color type table of lvc_s_scol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data : okcode like sy-ucomm,&lt;/P&gt;&lt;P&gt;w_alv_grid type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;w_docking_container type ref to cl_gui_docking_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : p_column as checkbox,&lt;/P&gt;&lt;P&gt;p_line as checkbox,&lt;/P&gt;&lt;P&gt;p_cell as checkbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_data.&lt;/P&gt;&lt;P&gt;perform fill_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if w_docking_container is initial.&lt;/P&gt;&lt;P&gt;perform create_objects.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form create_objects&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form create_objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object w_docking_container&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;ratio = 60&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;cntl_error = 1&lt;/P&gt;&lt;P&gt;cntl_system_error = 2&lt;/P&gt;&lt;P&gt;create_error = 3&lt;/P&gt;&lt;P&gt;lifetime_error = 4&lt;/P&gt;&lt;P&gt;lifetime_dynpro_dynpro_link = 5&lt;/P&gt;&lt;P&gt;others = 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object w_alv_grid&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_parent = w_docking_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field that identify color line in internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'COLOR_LINE' to is_layout-info_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field that identify cell color in inetrnal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'COLOR_CELL' to is_layout-ctab_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method w_alv_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;is_layout = is_layout&lt;/P&gt;&lt;P&gt;changing&lt;/P&gt;&lt;P&gt;it_outtab = it_mara&lt;/P&gt;&lt;P&gt;it_fieldcatalog = it_fieldcat&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;too_many_lines = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form get_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mara up to 5 rows.&lt;/P&gt;&lt;P&gt;clear : wa_mara-color_line, wa_mara-color_cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding mara to wa_mara.&lt;/P&gt;&lt;P&gt;add 1 to wa_mara-counter.&lt;/P&gt;&lt;P&gt;move 'Blabla' to wa_mara-free_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_mara-counter = '0002'&lt;/P&gt;&lt;P&gt;and p_line = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Color line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'C410' to wa_mara-color_line.&lt;/P&gt;&lt;P&gt;elseif wa_mara-counter = '0004'&lt;/P&gt;&lt;P&gt;and p_cell = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Color cell&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;move 'FREE_TEXT' to wa_color-fname.&lt;/P&gt;&lt;P&gt;move '6' to wa_color-color-col.&lt;/P&gt;&lt;P&gt;move '1' to wa_color-color-int.&lt;/P&gt;&lt;P&gt;move '1' to wa_color-color-inv.&lt;/P&gt;&lt;P&gt;append wa_color to it_color.&lt;/P&gt;&lt;P&gt;wa_mara-color_cell[] = it_color[].&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_mara to it_mara.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form fill_catalog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fill_catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colour code : *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colour is a 4-char field where : *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 1st char = C (color property) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 2nd char = color code (from 0 to 7) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;0 = background color *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;1 = blue *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;2 = gray *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;3 = yellow *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;4 = blue/gray *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;5 = green *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;6 = red *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;7 = orange *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 3rd char = intensified (0=off, 1=on) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;- 4th char = inverse display (0=off, 1=on) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colour overwriting priority : *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;1. Line *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;2. Cell *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;3. Column *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;P&gt;data : w_position type i value '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'MATNR' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'MARA' to wa_fieldcat-ref_table.&lt;/P&gt;&lt;P&gt;move 'MATNR' to wa_fieldcat-ref_field.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to w_position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'MATKL' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'MARA' to wa_fieldcat-ref_table.&lt;/P&gt;&lt;P&gt;move 'MATKL' to wa_fieldcat-ref_field.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Color column&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if p_column = 'X'.&lt;/P&gt;&lt;P&gt;move 'C610' to wa_fieldcat-emphasize.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to w_position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'COUNTER' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'N' to wa_fieldcat-inttype.&lt;/P&gt;&lt;P&gt;move '4' to wa_fieldcat-intlen.&lt;/P&gt;&lt;P&gt;move 'Counter' to wa_fieldcat-coltext.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add 1 to w_position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_fieldcat.&lt;/P&gt;&lt;P&gt;move w_position to wa_fieldcat-col_pos.&lt;/P&gt;&lt;P&gt;move 'FREE_TEXT' to wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;move 'C' to wa_fieldcat-inttype.&lt;/P&gt;&lt;P&gt;move '20' to wa_fieldcat-intlen.&lt;/P&gt;&lt;P&gt;move 'Text' to wa_fieldcat-coltext.&lt;/P&gt;&lt;P&gt;append wa_fieldcat to it_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 13:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638190#M284420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T13:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638191#M284421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am trying to display the 12th row for a color.&lt;/P&gt;&lt;P&gt; But almost i am getting color from line 2 to line 13.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;READ TABLE GT_BPSTAB ASSIGNING &amp;lt;GT_BPSTAB&amp;gt; INDEX LV_COUNTER.&lt;/P&gt;&lt;P&gt;IF LV_COUNTER = 12.&lt;/P&gt;&lt;P&gt;*FORMAT COLOR COL_KEY INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;WA_BPSTAB-COLOR_LINE = 'C610'.&lt;/P&gt;&lt;P&gt;APPEND WA_BPSTAB TO GT_BPSTAB.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LS_LAYOUT-INFO_FNAME = 'COLOR_LINE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   append GT_FIELDCATALOG to LT_FIELDCATALOG.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       CALL METHOD GRID-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_STRUCTURE_NAME              = 'gt_STRUCT'&lt;/P&gt;&lt;P&gt;    I_SAVE                        = X_SAVE&lt;/P&gt;&lt;P&gt;    I_DEFAULT                     = LV_DEF&lt;/P&gt;&lt;P&gt;    IS_LAYOUT                     = LS_LAYOUT&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    IT_OUTTAB                     = GT_BPSTAB[]&lt;/P&gt;&lt;P&gt;    IT_FIELDCATALOG               = GT_FIELDCATALOG[]&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    INVALID_PARAMETER_COMBINATION = 1&lt;/P&gt;&lt;P&gt;    PROGRAM_ERROR                 = 2&lt;/P&gt;&lt;P&gt;    TOO_MANY_LINES                = 3&lt;/P&gt;&lt;P&gt;    OTHERS                        = 4&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2006 13:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1638191#M284421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-19T13:19:25Z</dc:date>
    </item>
  </channel>
</rss>

