<?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: Change cell color dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838137#M664650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes... I've added in the following module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE display_in_grid_9000 OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM (p_table) INTO TABLE &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  s_layo-edit = 'X'.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  s_layo-ctab_fname = 'T_CELLCOLORS'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_save                        = 'A'&lt;/P&gt;&lt;P&gt;        i_default                     = 'X'&lt;/P&gt;&lt;P&gt;        is_layout                     = s_layo&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        it_outtab                     = &amp;lt;fs_table&amp;gt;&lt;/P&gt;&lt;P&gt;        it_fieldcatalog               = i_fcat&lt;/P&gt;&lt;P&gt;        it_sort                       = i_sort&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;refresh_table_display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_ready_for_input = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " display_in_grid_9000  OUTPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2007 01:48:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-02T01:48:48Z</dc:date>
    <item>
      <title>Change cell color dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838135#M664648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following segment of my code has no syntax error. Trying to change the color dynamically of a cell. &lt;/P&gt;&lt;P&gt;But the grid table has no change in the color of the targeted cell. Is there&lt;/P&gt;&lt;P&gt;something i miss out? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE build_struct_9000 OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CREATE DATA o_table TYPE TABLE OF (p_table) .&lt;/P&gt;&lt;P&gt;  ASSIGN o_table-&amp;gt;* TO &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create dynamic work area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CREATE DATA o_line LIKE LINE OF &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;  ASSIGN o_line-&amp;gt;* TO &amp;lt;fs_warea&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE DATA o_color TYPE lvc_t_scol.&lt;/P&gt;&lt;P&gt;  ASSIGN o_color-&amp;gt;* TO &amp;lt;t_cellcolors&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field Catalogue&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'NAMETAB_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      langu   = sy-langu&lt;/P&gt;&lt;P&gt;      tabname = p_table&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      nametab = i_nametab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;fs_table&amp;gt; INTO &amp;lt;fs_warea&amp;gt;.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT 'T_CELLCOLORS'&lt;/P&gt;&lt;P&gt;    OF STRUCTURE &amp;lt;fs_warea&amp;gt; TO &amp;lt;t_cellcolors&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT i_nametab INTO w_nametab .&lt;/P&gt;&lt;P&gt;      CLEAR wa_cellcolors.&lt;/P&gt;&lt;P&gt;      wa_cellcolors-fname = w_nametab-fieldname.&lt;/P&gt;&lt;P&gt;      wa_cellcolors-color-col = '3'.&lt;/P&gt;&lt;P&gt;      wa_cellcolors-color-int = '1'.&lt;/P&gt;&lt;P&gt;      wa_cellcolors-color-inv = '1'.&lt;/P&gt;&lt;P&gt;      APPEND wa_cellcolors TO &amp;lt;t_cellcolors&amp;gt;.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODIFY &amp;lt;fs_table&amp;gt; FROM &amp;lt;t_cellcolors&amp;gt;.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT 'T_CELLCOLORS'&lt;/P&gt;&lt;P&gt;  OF STRUCTURE &amp;lt;fs_warea&amp;gt; TO &amp;lt;t_cellcolors&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_ED INTO wa_ED.&lt;/P&gt;&lt;P&gt;    READ TABLE &amp;lt;fs_table&amp;gt; INTO &amp;lt;fs_warea&amp;gt; INDEX wa_ED-RECORDNO.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      READ TABLE &amp;lt;t_cellcolors&amp;gt; INTO wa_cellcolors&lt;/P&gt;&lt;P&gt;      WITH KEY fname = wa_ED-ERRORFIELD.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        wa_cellcolors-fname = wa_ED-ERRORFIELD.&lt;/P&gt;&lt;P&gt;        wa_cellcolors-color-col = '6'.&lt;/P&gt;&lt;P&gt;        wa_cellcolors-color-int = '0'.&lt;/P&gt;&lt;P&gt;        wa_cellcolors-color-inv = '0'.&lt;/P&gt;&lt;P&gt;        MODIFY &amp;lt;t_cellcolors&amp;gt; FROM wa_cellcolors.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MODIFY &amp;lt;fs_table&amp;gt; FROM &amp;lt;t_cellcolors&amp;gt; INDEX wa_ED-RECORDNO.&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;  LOOP AT i_nametab INTO w_nametab .&lt;/P&gt;&lt;P&gt;    w_fcat-col_pos = w_nametab-position.&lt;/P&gt;&lt;P&gt;    w_fcat-fieldname = w_nametab-fieldname .&lt;/P&gt;&lt;P&gt;    w_fcat-coltext = w_nametab-fieldname .&lt;/P&gt;&lt;P&gt;    w_fcat-datatype = w_nametab-datatype.&lt;/P&gt;&lt;P&gt;    w_fcat-inttype = w_nametab-inttype.&lt;/P&gt;&lt;P&gt;    w_fcat-intlen = w_nametab-intlen.&lt;/P&gt;&lt;P&gt;    w_fcat-decimals = w_nametab-decimals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF w_nametab-keyflag NE 'X'.&lt;/P&gt;&lt;P&gt;      w_fcat-edit = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND w_fcat TO i_fcat.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " build_struct_9000  OUTPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 10:00:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838135#M664648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T10:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Change cell color dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838136#M664649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have u added in the layout field &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assume ur layous is ls_layout &lt;/P&gt;&lt;P&gt;then ls_layout-coltab_fieldname = 'T_CELLCOLORS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2007 10:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838136#M664649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-01T10:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change cell color dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838137#M664650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes... I've added in the following module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE display_in_grid_9000 OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM (p_table) INTO TABLE &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  s_layo-edit = 'X'.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  s_layo-ctab_fname = 'T_CELLCOLORS'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    CALL METHOD o_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_save                        = 'A'&lt;/P&gt;&lt;P&gt;        i_default                     = 'X'&lt;/P&gt;&lt;P&gt;        is_layout                     = s_layo&lt;/P&gt;&lt;P&gt;      CHANGING&lt;/P&gt;&lt;P&gt;        it_outtab                     = &amp;lt;fs_table&amp;gt;&lt;/P&gt;&lt;P&gt;        it_fieldcatalog               = i_fcat&lt;/P&gt;&lt;P&gt;        it_sort                       = i_sort&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;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;refresh_table_display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;set_ready_for_input&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_ready_for_input = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " display_in_grid_9000  OUTPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 01:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-cell-color-dynamically/m-p/2838137#M664650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T01:48:48Z</dc:date>
    </item>
  </channel>
</rss>

