<?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 changing colour based on value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397065#M1995250</link>
    <description>&lt;P&gt;I have an OO ALV, in that the quantity and netprice field is editable and there is some color based on some conditions. &lt;/P&gt;
  &lt;P&gt;Now, I have requirement to change the color of the cells after editing the value , based on conditions.&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 06:51:47 GMT</pubDate>
    <dc:creator>former_member768291</dc:creator>
    <dc:date>2021-09-01T06:51:47Z</dc:date>
    <item>
      <title>changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397065#M1995250</link>
      <description>&lt;P&gt;I have an OO ALV, in that the quantity and netprice field is editable and there is some color based on some conditions. &lt;/P&gt;
  &lt;P&gt;Now, I have requirement to change the color of the cells after editing the value , based on conditions.&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 06:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397065#M1995250</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2021-09-01T06:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397066#M1995251</link>
      <description>&lt;P&gt;Welcome to the SAP
Community! We wanted to give you the opportunity to take the tutorial
to get &lt;A href="https://developers.sap.com/tutorials/community-qa.html"&gt;started in SAP &lt;/A&gt;&lt;A href="https://developers.sap.com/tutorials/community-qa.html"&gt;Community&lt;/A&gt;, as it provides tips for preparing
questions that draw responses from our members.&lt;/P&gt;&lt;P&gt;Additionally,
by adding a picture to your profile you
encourage readers to respond to your question. Learn more about your profile using &lt;A href="https://developers.sap.com/tutorials/community-profile.html"&gt;Profile
Tutorial &lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 06:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397066#M1995251</guid>
      <dc:creator>former_member751591</dc:creator>
      <dc:date>2021-09-01T06:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397067#M1995252</link>
      <description>&lt;P&gt;This is your requierment, not a technical question. So what is your question ?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 07:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397067#M1995252</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-09-01T07:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397068#M1995253</link>
      <description>&lt;P&gt;Did you even tried to search for help before posting this question? I have a fish memory for some things, like the one you are asking for, and I'm able to fast find the way to do it without having to post the question again and again.&lt;/P&gt;&lt;P&gt;As you can edit, I assume you are using the "deprecated" CL_GUI_ALV_something... check for program samples, or just search this place for&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CL_GUI_ALV_something cell color&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Sep 2021 08:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397068#M1995253</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-09-01T08:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397069#M1995254</link>
      <description>&lt;P&gt;The term "OO ALV" is confusing, are you talking about CL_GUI_ALV_GRID or about "OM ALV" (Object Model ALV A.K.A. CL_SALV_* classes)?&lt;/P&gt;&lt;P&gt;The question has been asked so many times how to set a color in a cell. If you tried one of the many solutions, could you precise what your issue is?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 09:26:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397069#M1995254</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-09-01T09:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397070#M1995255</link>
      <description>&lt;P&gt;Yea, I am using CL_GUI_ALV_GRID&lt;/P&gt;&lt;P&gt;I have a requirement like i have to change the color of a cell after edit based on some condition &lt;/P&gt;&lt;P&gt;for example suppose if the after edit the Net price is more than 1000 so the colour of the cell will be red.&lt;/P&gt;&lt;P&gt;I want to know how to add colours to the cells after editing the value .&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 09:05:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397070#M1995255</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2021-09-02T09:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397071#M1995256</link>
      <description>&lt;P&gt;So you know how to set the color of a given cell, but you want to know how to change it after you press a button in the toolbar, right?&lt;/P&gt;&lt;P&gt;So, during the processing of the function code, based on condition, you change the color  in the field catalog, you transfer it to the frontend (SET_FRONTEND_FIELDCATALOG) and you refresh the ALV (REFRESH).&lt;/P&gt;&lt;P&gt;EDIT after &lt;SPAN class="mention-scrubbed"&gt;raymond.giuseppi&lt;/SPAN&gt; comment: sorry, I am full wrong here. You just need to update the color in the ALV internal table and call REFRESH_TABLE_DISPLAY.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 11:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397071#M1995256</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-09-02T11:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397072#M1995257</link>
      <description>&lt;P&gt;Perform some &lt;A href="https://launchpad.support.sap.com/#/solutions/scnwiki/?q=Color%252520individual%252520cells%252520of%252520an%252520ALV%252520GRID"&gt;search&lt;/A&gt;, you could add a column in your table, type lvc_t_scol, so for each record you can add in this itab a record per column with a color attribute&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In first display of the table, pass the color column name to the IS_LAYOUT-CTAB_NAME field&lt;/LI&gt;&lt;LI&gt;As  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; wrote, once you update the displayed internal table, refresh the display with the CL_GUI_ALV_GRID-&amp;gt;REFRESH_TABLE_DISPLAY method.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 03 Sep 2021 10:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397072#M1995257</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2021-09-03T10:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397073#M1995258</link>
      <description>&lt;P&gt;METHOD HANDLE_DATA_CHANGED.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    loop at er_data_changed-&amp;gt;mt_MOD_cells into is_cells.
      check is_cells-fieldname eq 'NETPR'.
CALL METHOD rg1-&amp;gt;get_frontend_layout
  IMPORTING
    es_layout = IS_LAYO1.
      CASE IS_CELLS-FIELDNAME.
        WHEN 'NETPR'.
      REPLACE ALL OCCURRENCES OF ',' IN IS_CELLS-VALUE WITH '.'.
          MESSAGE IS_CELLS-VALUE TYPE 'I'.
         IF IS_CELLS-VALUE &amp;gt;= 100000 AND IS_CELLS-VALUE &amp;lt;= 200000.
           MESSAGE 'HIGH' TYPE 'I'.
        ls_color-fname     = 'NETPR'.
        ls_color-color-col = 3.
        ls_color-color-int = 0.
        ls_color-color-inv = 0.
        APPEND ls_color TO &amp;lt;fs&amp;gt;-color.
      ELSE .
        MESSAGE 'LOW' TYPE 'I'.
        ls_color-fname     = 'NETPR'.
        ls_color-color-col = 4.
        ls_color-color-int = 0.
        ls_color-color-inv = 0.
        APPEND ls_color TO &amp;lt;fs&amp;gt;-color.
      ENDIF.
      ENDCASE.
ENDLOOP.
    is_layo1-ctab_fname = 'COLOR1'.

    CALL METHOD rg1-&amp;gt;set_frontend_layout
  EXPORTING
    is_layout = is_layo1.

    CALL METHOD rg1-&amp;gt;refresh_table_display
     EXPORTING
*       is_stable      =
       i_soft_refresh = 'X'
*     EXCEPTIONS
*       finished       = 1
*       others         = 2
           .
   IF sy-subrc &amp;lt;&amp;gt; 0.
*    Implement suitable error handling here
   ENDIF.
      ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Sep 2021 17:22:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397073#M1995258</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2021-09-03T17:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397074#M1995259</link>
      <description>&lt;P&gt;Can anyone tell me what I am doing wrong ?&lt;/P&gt;&lt;P&gt;when I am pressing enter after editing the value no colors are coming even the old colors are also vanished.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 17:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397074#M1995259</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2021-09-03T17:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: changing colour based on value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397075#M1995260</link>
      <description>&lt;P&gt;I am concerned about &amp;lt;FS&amp;gt;. Is it the line of the ALV internal table, of which you want to update the color in one of the cells? If yes, then its color column seems to be named &lt;STRONG&gt;COLOR&lt;/STRONG&gt;, but you indicate the name &lt;STRONG&gt;COLOR1 &lt;/STRONG&gt;in the layout.&lt;/P&gt;&lt;P&gt;Moreover, you need to call SET_FRONTEND_LAYOUT once for all, before SET_TABLE_FOR_FIRST_DISPLAY, you don't need to call it while you handle user events.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 19:12:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-colour-based-on-value/m-p/12397075#M1995260</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-09-03T19:12:14Z</dc:date>
    </item>
  </channel>
</rss>

