<?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: problem with coloring alv rows in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401879#M1046292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Aug 2008 01:58:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-22T01:58:03Z</dc:date>
    <item>
      <title>problem with coloring alv rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401878#M1046291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Who can help with this report.I want to color the rows.I just can not make it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZCOLORTEST.&lt;/P&gt;&lt;P&gt;data: grid type ref to cl_gui_alv_grid,&lt;/P&gt;&lt;P&gt;      container type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      gs_layout type lvc_s_layo,&lt;/P&gt;&lt;P&gt;      gt_fcat type lvc_t_fcat,&lt;/P&gt;&lt;P&gt;      ok_code type sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of tab_sflight occurs 0.&lt;/P&gt;&lt;P&gt;include structure sflight.&lt;/P&gt;&lt;P&gt;data:linecolor(4) type c.&lt;/P&gt;&lt;P&gt;data:end of tab_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; module status_0100 output.&lt;/P&gt;&lt;P&gt;  select * from sflight into corresponding fields of table tab_sflight.&lt;/P&gt;&lt;P&gt; perform fillcolor.&lt;/P&gt;&lt;P&gt; set pf-status 'STATUS1'.&lt;/P&gt;&lt;P&gt; if container is initial.&lt;/P&gt;&lt;P&gt; create object container&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;     container_name = 'CONTAINER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; create object grid&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;     i_parent = container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform prepare_field_catalog changing gt_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gs_layout-info_fname = 'linecolor'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    is_layout = gs_layout&lt;/P&gt;&lt;P&gt;  changing&lt;/P&gt;&lt;P&gt;     it_outtab = tab_sflight[]&lt;/P&gt;&lt;P&gt;     it_fieldcatalog = gt_fcat.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; module user_command_0100 input.&lt;/P&gt;&lt;P&gt; case sy-ucomm.&lt;/P&gt;&lt;P&gt; when 'EXIT'.&lt;/P&gt;&lt;P&gt; leave program.&lt;/P&gt;&lt;P&gt; endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; form fillcolor.&lt;/P&gt;&lt;P&gt;  loop at tab_sflight.&lt;/P&gt;&lt;P&gt; tab_sflight-linecolor = 'C300'.&lt;/P&gt;&lt;P&gt; modify tab_sflight.&lt;/P&gt;&lt;P&gt; endloop.&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; form prepare_field_catalog changing pt_fieldcat type lvc_t_fcat.&lt;/P&gt;&lt;P&gt; data ls_fcat type lvc_s_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'LVC_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;P&gt;     i_structure_name = 'SFLIGHT'&lt;/P&gt;&lt;P&gt;   changing&lt;/P&gt;&lt;P&gt;     ct_fieldcat = pt_fieldcat[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_fcat-fieldname = 'linecolor'.&lt;/P&gt;&lt;P&gt; append ls_fcat to pt_fieldcat.&lt;/P&gt;&lt;P&gt; endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alex Zhang on Aug 22, 2008 3:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 01:32:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401878#M1046291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T01:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: problem with coloring alv rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401879#M1046292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 01:58:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401879#M1046292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T01:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: problem with coloring alv rows</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401880#M1046293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
"Make this line change , it shoulbe in caps.
gs_layout-info_fname = 'LINECOLOR'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form prepare_field_catalog changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.

call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat[].
"this is not required you can delete this code
*ls_fcat-fieldname = 'linecolor'.
*append ls_fcat to pt_fieldcat.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 03:31:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-coloring-alv-rows/m-p/4401880#M1046293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T03:31:59Z</dc:date>
    </item>
  </channel>
</rss>

