<?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: Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679898#M299701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in your coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; LOOP AT GT_BPSTAB INTO WA_BPSTAB.&lt;/P&gt;&lt;P&gt;&amp;gt; clear LV_COUNTER.&lt;/P&gt;&lt;P&gt;&amp;gt; CASE LV_COUNTER.&lt;/P&gt;&lt;P&gt;&amp;gt; WHEN '12 '.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you do a clear on lv_counter and then you do a case on this lv_counter. But lv_counter is initial after a clear!?&lt;/P&gt;&lt;P&gt;So the case-structure will not work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Oct 2006 12:40:25 GMT</pubDate>
    <dc:creator>MichaelTe</dc:creator>
    <dc:date>2006-10-23T12:40:25Z</dc:date>
    <item>
      <title>Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679896#M299699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to code for this requirement.&lt;/P&gt;&lt;P&gt; In OO ALV, My final internal table has color_line field.&lt;/P&gt;&lt;P&gt; I need to color a two particuler row in the output.&lt;/P&gt;&lt;P&gt; I am using this logic, but it doesnt work.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;LOOP AT GT_BPSTAB INTO WA_BPSTAB.&lt;/P&gt;&lt;P&gt;clear LV_COUNTER.&lt;/P&gt;&lt;P&gt;CASE LV_COUNTER.&lt;/P&gt;&lt;P&gt;WHEN '12 '.&lt;/P&gt;&lt;P&gt;*IF LV_COUNTER = 12.&lt;/P&gt;&lt;P&gt;*FORMAT COLOR COL_KEY INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;WA_BPSTAB-COLOR_LINE  = 'C610'.&lt;/P&gt;&lt;P&gt;MODIFY GT_BPSTAB FROM WA_BPSTAB.&lt;/P&gt;&lt;P&gt;**MOVE WA_BPSTAB TO GT_BPSTAB.&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;WHEN '13'.&lt;/P&gt;&lt;P&gt;*IF LV_COUNTER = 13.&lt;/P&gt;&lt;P&gt;*FORMAT COLOR COL_KEY INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;WA_BPSTAB-COLOR_LINE  = 'C910'.&lt;/P&gt;&lt;P&gt;MODIFY GT_BPSTAB FROM WA_BPSTAB  .&lt;/P&gt;&lt;P&gt;*ENDIF.&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;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'COLOR_LINE' TO LS_LAYOUT-INFO_FNAME.&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;    I_STRUCTURE_NAME              = 'gt_STRUCT'&lt;/P&gt;&lt;P&gt;    I_SAVE                        = X_SAVE&lt;/P&gt;&lt;P&gt;    I_DEFAULT                     = LV_DEF&lt;/P&gt;&lt;P&gt;    IS_LAYOUT                     = LS_LAYOUT&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    IT_OUTTAB                     = GT_BPSTAB[]&lt;/P&gt;&lt;P&gt;    IT_FIELDCATALOG               = GT_FIELDCATALOG[]&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;        .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 11:56:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679896#M299699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-23T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679897#M299700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to colorize ALV, do as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include a field of type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SLIS_T_SPECIALCOL_ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uin your display table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set the name of this field to parameter LAYOUT-coltab_fieldname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this form to colorize fields. If Field name is left space, the whole row will be colored:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;pre&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form alv_color&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      set field color - last wins&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form alv_color using    pv_fieldname      type fieldname&lt;/P&gt;&lt;P&gt;                        pv_color          type c&lt;/P&gt;&lt;P&gt;                        pv_intensify      type i&lt;/P&gt;&lt;P&gt;                        pv_inverse        type i&lt;/P&gt;&lt;P&gt;               changing pt_colors         type slis_t_specialcol_alv."#EC CALLED&lt;/P&gt;&lt;P&gt;  field-symbols:&lt;/P&gt;&lt;P&gt;    &amp;lt;color&amp;gt;                               type line of slis_t_specialcol_alv.&lt;/P&gt;&lt;P&gt;  data:&lt;/P&gt;&lt;P&gt;    ls_colors                             type line of slis_t_specialcol_alv.&lt;/P&gt;&lt;P&gt;  read table pt_colors assigning &amp;lt;color&amp;gt; with key&lt;/P&gt;&lt;P&gt;    fieldname                             = pv_fieldname&lt;/P&gt;&lt;P&gt;    binary search.&lt;/P&gt;&lt;P&gt;  if sy-subrc                             = 0.&lt;/P&gt;&lt;P&gt;    &amp;lt;color&amp;gt;-color-col                     = pv_color.&lt;/P&gt;&lt;P&gt;    &amp;lt;color&amp;gt;-color-int                     = pv_intensify.&lt;/P&gt;&lt;P&gt;    &amp;lt;color&amp;gt;-color-inv                     = pv_inverse.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    ls_colors-fieldname                   = pv_fieldname.&lt;/P&gt;&lt;P&gt;    ls_colors-color-col                   = pv_color.&lt;/P&gt;&lt;P&gt;    ls_colors-color-int                   = pv_intensify.&lt;/P&gt;&lt;P&gt;    ls_colors-color-inv                   = pv_inverse.&lt;/P&gt;&lt;P&gt;    insert ls_colors into pt_colors index sy-tabix.&lt;/P&gt;&lt;P&gt;  endif." sy-subrc                        = 0.&lt;/P&gt;&lt;P&gt;endform.                    "alv_color&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/pre&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps - let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 12:33:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679897#M299700</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-10-23T12:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679898#M299701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in your coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; LOOP AT GT_BPSTAB INTO WA_BPSTAB.&lt;/P&gt;&lt;P&gt;&amp;gt; clear LV_COUNTER.&lt;/P&gt;&lt;P&gt;&amp;gt; CASE LV_COUNTER.&lt;/P&gt;&lt;P&gt;&amp;gt; WHEN '12 '.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you do a clear on lv_counter and then you do a case on this lv_counter. But lv_counter is initial after a clear!?&lt;/P&gt;&lt;P&gt;So the case-structure will not work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2006 12:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code/m-p/1679898#M299701</guid>
      <dc:creator>MichaelTe</dc:creator>
      <dc:date>2006-10-23T12:40:25Z</dc:date>
    </item>
  </channel>
</rss>

