<?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 ALV grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096880#M436675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ALV grid output how do we change the colour of a particular row?(or how do we provide different colour to different rows).is there any provision for that?Need some info on that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2007 08:21:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-16T08:21:12Z</dc:date>
    <item>
      <title>ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096880#M436675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ALV grid output how do we change the colour of a particular row?(or how do we provide different colour to different rows).is there any provision for that?Need some info on that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:21:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096880#M436675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096881#M436676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this link -&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;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:22:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096881#M436676</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-04-16T08:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096882#M436677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk this program to color a row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Z_ALV_LINE_COLOR.html" target="test_blank"&gt;http://www.geocities.com/mpioud/Z_ALV_LINE_COLOR.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:23:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096882#M436677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096883#M436678</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;Here is some colors and fonting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZR_EXCEL_WITH_COLORS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Export to Excel data defs - below&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE OLE2INCL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;handles for OLE objects&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: hExcel TYPE OLE2_OBJECT, " Excel object&lt;/P&gt;&lt;P&gt;hWorkBooks TYPE OLE2_OBJECT, " list of workbooks&lt;/P&gt;&lt;P&gt;hWorkbook TYPE OLE2_OBJECT, " workbook&lt;/P&gt;&lt;P&gt;hSheet TYPE OLE2_OBJECT, " worksheet object&lt;/P&gt;&lt;P&gt;hRange TYPE OLE2_OBJECT, " range object&lt;/P&gt;&lt;P&gt;hRange2 TYPE OLE2_OBJECT, " range object&lt;/P&gt;&lt;P&gt;hBorders TYPE OLE2_OBJECT, " Border object&lt;/P&gt;&lt;P&gt;hInterior TYPE OLE2_OBJECT, " interior object - for coloring&lt;/P&gt;&lt;P&gt;hColumn TYPE OLE2_OBJECT, "column&lt;/P&gt;&lt;P&gt;hCell TYPE OLE2_OBJECT, " cell&lt;/P&gt;&lt;P&gt;hFont TYPE OLE2_OBJECT, " font&lt;/P&gt;&lt;P&gt;hSelected TYPE OLE2_OBJECT, " range object&lt;/P&gt;&lt;P&gt;hPicture TYPE OLE2_OBJECT, "picture object&lt;/P&gt;&lt;P&gt;hLogo TYPE OLE2_OBJECT. "Logo object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA H TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants: xlCenter type i value '-4108',&lt;/P&gt;&lt;P&gt;xlBottom type i value '-4107',&lt;/P&gt;&lt;P&gt;xlLeft type i value '-4131',&lt;/P&gt;&lt;P&gt;xlRight type i value '-4152'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants: xlMinimized type i value '-4140'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants: xlContinuous type i value '1',&lt;/P&gt;&lt;P&gt;xlInsideVertical type i value '11',&lt;/P&gt;&lt;P&gt;xlThin type i value '2',&lt;/P&gt;&lt;P&gt;xlLandscape type i value '2',&lt;/P&gt;&lt;P&gt;xlPortrait type i value '1',&lt;/P&gt;&lt;P&gt;xlLetter type i value '1',&lt;/P&gt;&lt;P&gt;xlLegal type i value '5',&lt;/P&gt;&lt;P&gt;xlThick type i value '4',&lt;/P&gt;&lt;P&gt;xlNone type i value '-4142',&lt;/P&gt;&lt;P&gt;xlAutomatic type i value '-4105'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform Start_Excel using 'c:\my_file.xls'.&lt;/P&gt;&lt;P&gt;Perform Build_Chain_Line.&lt;/P&gt;&lt;P&gt;Perform Release_Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM Start_Excel using p_CliFile.&lt;/P&gt;&lt;P&gt;CREATE OBJECT hExcel 'EXCEL.APPLICATION'.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get list of workbooks, initially empty&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF hExcel 'Workbooks' = hWorkbooks.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add a new workbook&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF hWorkbooks 'Add' = hWorkbook.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Worksheet object.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;get property of hWorkbook 'ActiveSheet' = hSheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Start_Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM Build_Chain_Line.&lt;/P&gt;&lt;P&gt;data: Chain_Name(40).&lt;/P&gt;&lt;P&gt;data: Year_Line(30).&lt;/P&gt;&lt;P&gt;data: p_row_cnt type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_row_cnt = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chain_Name = 'My Chain Here'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select range object onto cell A1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF hExcel 'RANGE' = hRange EXPORTING #1 = 'A1:A1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Add the chain name to A2.&lt;/P&gt;&lt;P&gt;PERFORM Fill_The_Cell USING p_row_cnt 1 1 Chain_Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set background color to tan.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method of hRange 'Interior' = hInterior.&lt;/P&gt;&lt;P&gt;set property of hInterior 'ColorIndex' = 40. "tan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Add the year to A3.&lt;/P&gt;&lt;P&gt;Year_Line = '2007'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_row_cnt = p_row_cnt + 1.&lt;/P&gt;&lt;P&gt;PERFORM Fill_The_Cell USING p_row_cnt 1 1 Year_Line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select range object onto cell A2.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD OF hExcel 'RANGE' = hRange EXPORTING #1 = 'A2:A2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set background color to blue.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method of hRange 'Interior' = hInterior.&lt;/P&gt;&lt;P&gt;set property of hInterior 'ColorIndex' = 20. "blue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Center the chain name.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;set property of hRange 'HorizontalAlignment' = xlCenter.&lt;/P&gt;&lt;P&gt;set property of hRange 'VerticalAlignment' = xlCenter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Change font to 14 point.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call method of hRange 'Font' = hFont.&lt;/P&gt;&lt;P&gt;set property of hFont 'Size' = 14.&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;&lt;/P&gt;&lt;P&gt;FORM Release_Excel .&lt;/P&gt;&lt;P&gt;CALL METHOD OF hExcel 'RANGE' = hRange EXPORTING #1 = 'A6'.&lt;/P&gt;&lt;P&gt;call method of hRange 'Select'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set Excel VISIBLE property to TRUE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set property of hExcel 'WindowState' = xlMinimized.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PROPERTY OF hExcel 'Visible' = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FREE OBJECT hExcel.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Release_Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORM Fill_The_Cell *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sets cell at coordinates i,j to value val boldtype bold *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BOLD --&amp;gt; 1 = true, set bold ON 0 = false, set bold OFF&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM Fill_The_Cell USING I J BOLD TheValue.&lt;/P&gt;&lt;P&gt;CALL METHOD OF hExcel 'Cells' = hCell EXPORTING #1 = I #2 = J.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PROPERTY OF hCell 'Value' = TheValue.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET PROPERTY OF hCell 'Font' = hFont.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PROPERTY OF hFont 'Bold' = BOLD.&lt;/P&gt;&lt;P&gt;PERFORM ERR_HDL.&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;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form ERR_HDL&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;outputs OLE error if any&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;FORM ERR_HDL.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message i000(zz) with 'OLE Automation error: ' SY-SUBRC.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " ERR_HDL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this one is already posted in Forum..I am copying and pasting here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sangeetha.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096883#M436678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096884#M436679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Savitha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just go through this&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/7f/e477e2fba211d2b48f006094192fe3/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/7f/e477e2fba211d2b48f006094192fe3/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the sample program&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;If it helps reward with points&lt;/P&gt;&lt;P&gt;Regards Rk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rk Pasupuleti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096884#M436679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096885#M436680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call the type pools slis&lt;/P&gt;&lt;P&gt;in that u've got a stucture of type alv_grid_layout_spec&lt;/P&gt;&lt;P&gt;in that there is a field name called zebra.. something like that&lt;/P&gt;&lt;P&gt;if u invoke it u'll be getting the rows in alternate colours&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096885#M436680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096886#M436681</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 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. So, let&amp;#146;s 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;you should fill the color code to this field. Its format will be the same as explained before at section C.6.3. But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing 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;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;You can color an entire row as described in the next section. However, this method is less time consuming.&lt;/P&gt;&lt;P&gt;Coloring Individual Cells&lt;/P&gt;&lt;P&gt;This is the last point about coloring procedures for the ALV Grid. 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;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;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: SLIS, ICON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF IMARA OCCURS 0,&lt;/P&gt;&lt;P&gt;LIGHT(4) TYPE C,&lt;/P&gt;&lt;P&gt;MATNR TYPE MARA-MATNR,&lt;/P&gt;&lt;P&gt;MTART TYPE MARA-MTART,&lt;/P&gt;&lt;P&gt;MAKTX TYPE MAKT-MAKTX,&lt;/P&gt;&lt;P&gt;COLOR_LINE(4) TYPE C,&lt;/P&gt;&lt;P&gt;TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell&lt;/P&gt;&lt;P&gt;END OF IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM GET_DATA.&lt;/P&gt;&lt;P&gt;PERFORM WRITE_REPORT.&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;Get_Data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.&lt;/P&gt;&lt;P&gt;IMARA-MATNR = 'ABC'.&lt;/P&gt;&lt;P&gt;IMARA-MTART = 'ZCFG'.&lt;/P&gt;&lt;P&gt;IMARA-MAKTX = 'This is description for ABC'.&lt;/P&gt;&lt;P&gt;APPEND IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.&lt;/P&gt;&lt;P&gt;IMARA-MATNR = 'DEF'.&lt;/P&gt;&lt;P&gt;IMARA-MTART = 'ZCFG'.&lt;/P&gt;&lt;P&gt;IMARA-MAKTX = 'This is description for DEF'.&lt;/P&gt;&lt;P&gt;APPEND IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.&lt;/P&gt;&lt;P&gt;IMARA-MATNR = 'GHI'.&lt;/P&gt;&lt;P&gt;IMARA-MTART = 'ZCFG'.&lt;/P&gt;&lt;P&gt;IMARA-MAKTX = 'This is description for GHI'.&lt;/P&gt;&lt;P&gt;APPEND IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-TABIX = 1.&lt;/P&gt;&lt;P&gt;IMARA-COLOR_LINE = 'C410'. " color line&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-TABIX = 2. " color CELL&lt;/P&gt;&lt;P&gt;CLEAR XCOLOR.&lt;/P&gt;&lt;P&gt;XCOLOR-FIELDNAME = 'MTART'.&lt;/P&gt;&lt;P&gt;XCOLOR-COLOR-COL = '3'.&lt;/P&gt;&lt;P&gt;XCOLOR-COLOR-INT = '1'. " Intensified on/off&lt;/P&gt;&lt;P&gt;XCOLOR-COLOR-INV = '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND XCOLOR TO IMARA-TCOLOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "get_data&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;WRITE_REPORT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;FORM WRITE_REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.&lt;/P&gt;&lt;P&gt;LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM BUILD_FIELD_CATALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL ABAP LIST VIEWER (ALV)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;IS_LAYOUT = LAYOUT&lt;/P&gt;&lt;P&gt;IT_FIELDCAT = FIELDCAT&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;T_OUTTAB = IMARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "write_report&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;BUILD_FIELD_CATALOG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;FORM BUILD_FIELD_CATALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;CLEAR: FIELDCAT. REFRESH: FIELDCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: FC_TMP.&lt;/P&gt;&lt;P&gt;FC_TMP-REPTEXT_DDIC = 'Status'.&lt;/P&gt;&lt;P&gt;FC_TMP-FIELDNAME = 'LIGHT'.&lt;/P&gt;&lt;P&gt;FC_TMP-TABNAME = 'IMARA'.&lt;/P&gt;&lt;P&gt;FC_TMP-OUTPUTLEN = '4'.&lt;/P&gt;&lt;P&gt;FC_TMP-ICON = 'X'.&lt;/P&gt;&lt;P&gt;APPEND FC_TMP TO FIELDCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: FC_TMP.&lt;/P&gt;&lt;P&gt;FC_TMP-REPTEXT_DDIC = 'Material Number'.&lt;/P&gt;&lt;P&gt;FC_TMP-FIELDNAME = 'MATNR'.&lt;/P&gt;&lt;P&gt;FC_TMP-TABNAME = 'IMARA'.&lt;/P&gt;&lt;P&gt;FC_TMP-OUTPUTLEN = '18'.&lt;/P&gt;&lt;P&gt;APPEND FC_TMP TO FIELDCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: FC_TMP.&lt;/P&gt;&lt;P&gt;FC_TMP-REPTEXT_DDIC = 'Material Type'.&lt;/P&gt;&lt;P&gt;FC_TMP-FIELDNAME = 'MTART'.&lt;/P&gt;&lt;P&gt;FC_TMP-TABNAME = 'IMARA'.&lt;/P&gt;&lt;P&gt;FC_TMP-OUTPUTLEN = '10'.&lt;/P&gt;&lt;P&gt;APPEND FC_TMP TO FIELDCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: FC_TMP.&lt;/P&gt;&lt;P&gt;FC_TMP-REPTEXT_DDIC = 'Material'.&lt;/P&gt;&lt;P&gt;FC_TMP-FIELDNAME = 'MAKTX'.&lt;/P&gt;&lt;P&gt;FC_TMP-TABNAME = 'IMARA'.&lt;/P&gt;&lt;P&gt;FC_TMP-OUTPUTLEN = '40'.&lt;/P&gt;&lt;P&gt;FC_TMP-EMPHASIZE = 'C610'. " color column&lt;/P&gt;&lt;P&gt;APPEND FC_TMP TO FIELDCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "build_field_catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kiran kumar k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        kiran kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096886#M436681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096887#M436682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi savitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to analyze this code and execute in your program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants :&lt;/P&gt;&lt;P&gt;       gray type i value 1,&lt;/P&gt;&lt;P&gt;       yellow type i value 3,&lt;/P&gt;&lt;P&gt;       blue   type i value 4,&lt;/P&gt;&lt;P&gt;       green  type i value 5,&lt;/P&gt;&lt;P&gt;       red    type i value 6,&lt;/P&gt;&lt;P&gt;       orange type i value 7,&lt;/P&gt;&lt;P&gt;       lblue  type i value 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form set_color.&lt;/P&gt;&lt;P&gt;  loop at tab.&lt;/P&gt;&lt;P&gt;    if not tab-objnr is initial.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KOKRS' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KWAER' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'WERKS' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'VBELN' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'POSNR' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'AUFNR' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'OBJNR' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'MATNR' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'MEINS' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'MAKTX' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'WEMNG' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'AMEIN' green.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KALAB' green.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KAINS' green.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KASPE' green.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'WKGBTR' gray.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_ACT' gray.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_PACK' gray.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_OHIS' gray.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_OHNS' gray.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'TWAER' orange.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'IDNRK' orange.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'I_MBGBTR' orange.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'I_MEINB' orange.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'I_WKGBTR' orange.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_MATNR' red.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_MBGXXX' red.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_MEINB' red.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_VALUE' red.&lt;/P&gt;&lt;P&gt;      perform field_color_set2 using 'ZFG_VALUE' lblue.&lt;/P&gt;&lt;P&gt;      perform field_color_set2 using 'ZFG_QTY' lblue.&lt;/P&gt;&lt;P&gt;      perform field_color_set2 using 'ZWP_VALUE' lblue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWP_QTY' lblue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZICON_AL1' lblue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KOKRS' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KWAER' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'WERKS' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'VBELN' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'POSNR' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'AUFNR' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'OBJNR' blue.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'MATNR' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'MEINS' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'MAKTX' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'WEMNG' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'AMEIN' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KALAB' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KAINS' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'KASPE' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'WKGBTR' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_ACT' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_PACK' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_OHIS' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWKGXXX_OHNS' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'TWAER' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'IDNRK' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'I_MBGBTR' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'I_MEINB' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'I_WKGBTR' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_MATNR' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_MBGXXX' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_MEINB' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZS_VALUE' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZFG_VALUE' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZFG_QTY' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWP_VALUE' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZWP_QTY' yellow.&lt;/P&gt;&lt;P&gt;      perform field_color_set using 'ZICON_AL1' yellow.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    modify tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " set_color&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  field_color_set&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_1003   text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_COULEUR_COURANTE  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form field_color_set using nom couleur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data : lp_color type kkblo_specialcol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear : lp_color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lp_color-fieldname = nom.&lt;/P&gt;&lt;P&gt;  lp_color-color-int = 0.&lt;/P&gt;&lt;P&gt;  lp_color-color-inv = 0.&lt;/P&gt;&lt;P&gt;  lp_color-nokeycol  = 'X'.&lt;/P&gt;&lt;P&gt;  lp_color-color-col = couleur.&lt;/P&gt;&lt;P&gt;  append lp_color to tab-color.&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  field_color_set&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_1003   text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_COULEUR_COURANTE  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form field_color_set2 using nom couleur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data : lp_color type kkblo_specialcol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear : lp_color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lp_color-fieldname = nom.&lt;/P&gt;&lt;P&gt;  lp_color-color-int = 0.&lt;/P&gt;&lt;P&gt;  lp_color-color-inv = 1.&lt;/P&gt;&lt;P&gt;  lp_color-nokeycol  = 'X'.&lt;/P&gt;&lt;P&gt;  lp_color-color-col = couleur.&lt;/P&gt;&lt;P&gt;  append lp_color to tab-color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:33:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/2096887#M436682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:33:13Z</dc:date>
    </item>
  </channel>
</rss>

