<?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: Cell Color in ALV Grid Display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634989#M1282720</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;Do like below..to set color to particular cell:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-fieldname  =   p_fname   .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-col_pos    =   p_col_pos .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-coltext    =   p_col_text.&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-hotspot    =   p_hotspot .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-outputlen  =   p_outlen  .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-key           =  p_key     .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-convexit      =  p_convexit.&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-emphasize  =  p_emphasize. (  whr p_emphasize have value eg C510)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 May 2009 02:23:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-12T02:23:54Z</dc:date>
    <item>
      <title>Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634984#M1282715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts, &lt;/P&gt;&lt;P&gt;i have to display the output in alv format with few cells in color based on the condition.. and if user download this output in excel, the colors should be remain same.. (not in block color)..&lt;/P&gt;&lt;P&gt;please help me out... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;venkatreddy...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 13:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634984#M1282715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T13:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634985#M1282716</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;Try this for output with cell colors. But for downloading to excel, still something needs to be worked out.&lt;/P&gt;&lt;P&gt;Step 1:  Include a field called cellcolor in output table as below. Create a work area for the cellcolor.&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE mara.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;For cell coloring&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES : cellcolor TYPE lvc_t_scol,&lt;/P&gt;&lt;P&gt;        END OF ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : w_cellcolor TYPE lvc_s_scol, "For cell color&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: In layout, mention the field name for ctab_fname &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting layout&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  w_layout-ctab_fname = 'CELLCOLOR'."For cell coloring&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3: Mention the field name for coloring and then set the color, intensified and inverse options.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Colouring a cell&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear w_cellcolor.&lt;/P&gt;&lt;P&gt;  w_cellcolor-fname = 'ERSDA'.&lt;/P&gt;&lt;P&gt;  w_cellcolor-color-col = '5'.&lt;/P&gt;&lt;P&gt;  w_cellcolor-color-int = '1'.&lt;/P&gt;&lt;P&gt;  w_cellcolor-color-inv = '1'.&lt;/P&gt;&lt;P&gt;  APPEND w_cellcolor TO wa-cellcolor.&lt;/P&gt;&lt;P&gt;  MODIFY itab FROM wa INDEX 7 TRANSPORTING cellcolor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can set the col to different numbers(1 to 9) and then give intensified/ inverse values either 0 or 1 to know the variations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 4: Pass the required parameters for set_table_for_first_display as below.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displaying the output&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;      is_variant                    = w_variant&lt;/P&gt;&lt;P&gt;      i_save                        = 'A'&lt;/P&gt;&lt;P&gt;      is_layout                     = w_layout&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab                     = itab&lt;/P&gt;&lt;P&gt;      it_fieldcatalog               = i_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;  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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 13:36:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634985#M1282716</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2009-05-11T13:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634986#M1282717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have build a macro in excel which changes the cell color in excel with the same conditions as we use it in the ALV for cellcoloring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't found any sollution how you can keep the cellcolors in the export.&lt;/P&gt;&lt;P&gt;(but also curious if somebody has some smart sollution)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 13:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634986#M1282717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T13:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634987#M1282718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another work around that I do is exporting the output from ALV in to &lt;EM&gt;HTML Format&lt;/EM&gt; and then copy 'n paste the HTML table content from browser into spread sheet...which retains the cell colors as it is...little effort..but it works !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Trikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 23:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634987#M1282718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T23:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634988#M1282719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
...
PREFORM PREPARE_FIELDCAT .
...
FORM PREPARE_FIELDCAT .
...
 First field to appear in ALV list
X_FIELDCAT-COL_POS = 1.
* Name of the field in the internal table
  X_FIELDCAT-FIELDNAME = 'NACHN'.
* Name of the internal table
  X_FIELDCAT-TABNAME = 'it_data'.
* Heading for the column
  X_FIELDCAT-SELTEXT_M = 'Last Name'.
*&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
* It is going to be the key field.The color for this field is going to
* be different
  X_FIELDCAT-KEY = 'X'.
* The field will be colored differently(Cxyz)
  X_FIELDCAT-EMPHASIZE = 'C511'.
*&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
...
...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 23:26:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634988#M1282719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T23:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634989#M1282720</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;Do like below..to set color to particular cell:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-fieldname  =   p_fname   .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-col_pos    =   p_col_pos .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-coltext    =   p_col_text.&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-hotspot    =   p_hotspot .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-outputlen  =   p_outlen  .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-key           =  p_key     .&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-convexit      =  p_convexit.&lt;/P&gt;&lt;P&gt;  g_r_fieldcat-emphasize  =  p_emphasize. (  whr p_emphasize have value eg C510)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 02:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634989#M1282720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T02:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634990#M1282721</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;check following link...and in that my reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="7400054"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will helpful to u..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chintan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 03:14:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634990#M1282721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T03:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cell Color in ALV Grid Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634991#M1282722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/Snippets/Add" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/Snippets/Add&lt;/A&gt;&lt;EM&gt;color&lt;/EM&gt;to&lt;EM&gt;cell&lt;/EM&gt;in+ALV&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/Snippets/Coloring" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/Snippets/Coloring&lt;/A&gt;&lt;EM&gt;a&lt;/EM&gt;cell&lt;EM&gt;in&lt;/EM&gt;an&lt;EM&gt;ALV&lt;/EM&gt;conditionally&lt;/P&gt;&lt;P&gt;hey check this&lt;/P&gt;&lt;P&gt;you can find such things in wiki&lt;/P&gt;&lt;P&gt;before posting just check it&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;s.janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2009 03:18:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cell-color-in-alv-grid-display/m-p/5634991#M1282722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-12T03:18:31Z</dc:date>
    </item>
  </channel>
</rss>

