<?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/4098250#M980016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add a column in your internal table, let's say field name is COLOR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your layout structure, put "COLOR" into INFO_FIELDNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each record, check the condition and change the color value accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;color must be "Cxy" with x = 1,2,3,4,5,6,7,8,9 (colors according to SAP like for WRITE statement) and y=0 or 1 (intensified)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will allow you to change (easily) color of complete row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the same can be done for individual cells, then put the field name into field coltab_fieldname of layout, and change the type of extra field in your internal table so that it is SLIS_T_SPECIALCOL_ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can look at documentation of function module REUSE_ALV_GRID_DISPLAY in order to get more information&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jul 2008 13:11:48 GMT</pubDate>
    <dc:creator>franois_henrotte</dc:creator>
    <dc:date>2008-07-10T13:11:48Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098247#M980013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      I was displaying a report in ALV..It is showing all the employees of the company..&lt;/P&gt;&lt;P&gt;Niow they are asking that more than 2 yrs experience want to be displayed in different color,3+yrs different colors and so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was into 4.6c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body help me in this issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 12:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098247#M980013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T12:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098248#M980014</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;when ur looping the internal table check for the select condition as experince and then use the row col, u can use the row col by declaring one more field in ur internal table of length 4 type c and then give an attribute to each row before appending to ur main internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : theres a sample demo report in r/3 which u can check also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sumanjeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:07:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098248#M980014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T13:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098249#M980015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi calculate from date of joining to system date( years of experience).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check exp. within the loop. pass diff color based on condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: venkat reddy on Jul 10, 2008 3:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:10:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098249#M980015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T13:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098250#M980016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add a column in your internal table, let's say field name is COLOR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your layout structure, put "COLOR" into INFO_FIELDNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each record, check the condition and change the color value accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;color must be "Cxy" with x = 1,2,3,4,5,6,7,8,9 (colors according to SAP like for WRITE statement) and y=0 or 1 (intensified)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will allow you to change (easily) color of complete row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the same can be done for individual cells, then put the field name into field coltab_fieldname of layout, and change the type of extra field in your internal table so that it is SLIS_T_SPECIALCOL_ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can look at documentation of function module REUSE_ALV_GRID_DISPLAY in order to get more information&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098250#M980016</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2008-07-10T13:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098251#M980017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  ZTEST                                 . 

TYPE-POOLS: SLIS. 

DATA: BEGIN OF ITAB OCCURS 0, 
       TEXT1(10), 
       TEXT2(10), 
       TEXT3(10), 
       COLORS TYPE LVC_T_SCOL, 
     END OF ITAB, 
     LIN LIKE LINE OF ITAB, 
     MCOL  TYPE LVC_S_SCOL, 
     REP LIKE SY-REPID, 
     LS_LAYOUT TYPE SLIS_LAYOUT_ALV, 
     LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE, 
     LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV. 

START-OF-SELECTION. 
  ITAB-TEXT1 = 'Red'. 
  ITAB-TEXT2 = 'Green'. 
  ITAB-TEXT3 = 'Yellow'. 
  DO 5 TIMES. 
     APPEND ITAB. 
  ENDDO. 

  LS_FIELDCAT-TABNAME = 'ITAB'. 
  LS_FIELDCAT-FIELDNAME = 'TEXT1'. 
  LS_FIELDCAT-OUTPUTLEN = 10. 
  LS_FIELDCAT-SELTEXT_L = 'Field1'. 
  APPEND LS_FIELDCAT TO LT_FIELDCAT. 

  LS_FIELDCAT-TABNAME = 'ITAB'. 
  LS_FIELDCAT-FIELDNAME = 'TEXT2'. 
  LS_FIELDCAT-OUTPUTLEN = 10. 
  LS_FIELDCAT-SELTEXT_L = 'Field2'. 
  APPEND LS_FIELDCAT TO LT_FIELDCAT. 

  LS_FIELDCAT-TABNAME = 'ITAB'. 
  LS_FIELDCAT-FIELDNAME = 'TEXT3'. 
  LS_FIELDCAT-OUTPUTLEN = 10. 
  LS_FIELDCAT-SELTEXT_L = 'Field3'. 
  APPEND LS_FIELDCAT TO LT_FIELDCAT. 



  LOOP AT ITAB INTO LIN. 
    MCOL-FNAME = 'TEXT1'. 
    MCOL-COLOR-COL = 6. 
    APPEND MCOL TO LIN-COLORS. 
    MCOL-FNAME = 'TEXT2'. 
    MCOL-COLOR-COL = 3. 
    APPEND MCOL TO LIN-COLORS. 
    MCOL-FNAME = 'TEXT3'. 
    MCOL-COLOR-COL = 5. 
    APPEND MCOL TO LIN-COLORS. 
    MODIFY ITAB FROM LIN. 
  ENDLOOP. 

  REP = SY-REPID. 
  LS_LAYOUT-COLTAB_FIELDNAME = 'COLORS'. 


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
    EXPORTING 
      I_CALLBACK_PROGRAM       = REP 
      IS_LAYOUT                = LS_LAYOUT 
      IT_FIELDCAT              = LT_FIELDCAT[] 
    TABLES 
      T_OUTTAB                 = ITAB.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:15:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098251#M980017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T13:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098252#M980018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use one more field called ROWCOLOR of len char4,&lt;/P&gt;&lt;P&gt;and set its like c200 c400 according to experience and set layout structure field info_fname to 'ROWCOLOR'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098252#M980018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T13:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098253#M980019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;take itab n wa..&lt;/P&gt;&lt;P&gt;run loop like this...&lt;/P&gt;&lt;P&gt;LOOP AT lt_emp INTO lwa_emp.&lt;/P&gt;&lt;P&gt;    CLEAR lwa_grid_emp.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING lwa_emp TO lwa_grid_emp.&lt;/P&gt;&lt;P&gt;    IF lwa_emp-ename = 'RAJU' OR lwa_emp-ename = 'VINAY'.&lt;/P&gt;&lt;P&gt;    lwa_grid_emp-rowcolor = 'C600'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ls_style-fieldname = 'ESAL'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ls_style-style = cl_gui_alv_grid=&amp;gt;mc_style4_link.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     APPEND ls_style TO lwa_grid_emp-styles.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ls_style-fieldname = 'EMPNO'.&lt;/P&gt;&lt;P&gt;    ls_style-style = cl_gui_alv_grid=&amp;gt;mc_style4_link.&lt;/P&gt;&lt;P&gt;    ls_style-style = cl_gui_alv_grid=&amp;gt;mc_style_button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND ls_style TO lwa_grid_emp-styles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ls_style-fieldname = 'ENAME'.&lt;/P&gt;&lt;P&gt;    ls_style-style = cl_gui_alv_grid=&amp;gt;mc_style_disabled.&lt;/P&gt;&lt;P&gt;    APPEND ls_style TO lwa_grid_emp-styles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND lwa_grid_emp TO gt_emp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098253#M980019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T13:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098254#M980020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are passing an final iternal table ( say itab )&lt;/P&gt;&lt;P&gt;to alv function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think your internal table may contain a field called experiance&lt;/P&gt;&lt;P&gt;based on which you need to give color coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now add another field  color(3) type c  to your itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now before passing your internal table to the reuse_alv_grid_display &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;if itab-experiance gt 2  and lt 3 (put condition as per your requirement)&lt;/P&gt;&lt;P&gt;itab-color = 'C51'.&lt;/P&gt;&lt;P&gt;elseif itab-experiance = 3&lt;/P&gt;&lt;P&gt;itab-color = 'C61'.&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;.........&lt;/P&gt;&lt;P&gt;........&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; MODIFY ITAB index sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*in  layout declerations give&lt;/P&gt;&lt;P&gt;  wa_layout-info_fieldname = 'COLOR'(017).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and pass wa_layout also to alv function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get colors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tummala swapna on Jul 10, 2008 6:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:19:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/4098254#M980020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T13:19:54Z</dc:date>
    </item>
  </channel>
</rss>

