<?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 ALV variant dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758170#M1950894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried modifying the fieldcatolog at runtime and setting the column you wish to hide as technical?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jun 2016 19:51:31 GMT</pubDate>
    <dc:creator>Patrick_vN</dc:creator>
    <dc:date>2016-06-29T19:51:31Z</dc:date>
    <item>
      <title>Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758163#M1950887</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;I have an alv grid (class) showing some data + day01...day31 columns. I use the field catalog to turn off invalid dates, like day31 column for June.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if I use default variant or any variant for the ALV, its settings I do in the build_field_catalog, is overwritten. Thus I cannot hide 31June (which is an invalid date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions how to modify fields in the variant's fieldcatalog and at what point?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Charlie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2016 12:55:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758163#M1950887</guid>
      <dc:creator>kroly_horvth</dc:creator>
      <dc:date>2016-06-28T12:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758164#M1950888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to find an event like after_refresh then handle it to adapt field catalog, use methods like get_frontend_catalog and then set_frontend_catalog and trigger another refresh of the display if and only if you actually changed the catalog (no infinite loop).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2016 13:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758164#M1950888</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2016-06-28T13:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758165#M1950889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;use FM : 'NUMBER_OF_DAYS_PER_MONTH_GET' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass month and year in it.. you will get the number of days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then check if month have 31 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if days &amp;gt; 30.&lt;/P&gt;&lt;P&gt;add new field to the fieldcatalog internal table.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as you have modified the Fieldcatalog internal table at run time call the following methods&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt; GET_FRONTEND_FIELDCATALOG, SET_FRONTEND_FIELDCATALOG methods and REFRESH_TABLE_DISPLAY.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2016 14:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758165#M1950889</guid>
      <dc:creator>Chintu6august</dc:creator>
      <dc:date>2016-06-28T14:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758166#M1950890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you "&lt;SPAN style="color: #333333; font-size: 12px;"&gt;turn off invalid dates" exactly? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 18:59:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758166#M1950890</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2016-06-29T18:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758167#M1950891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In such situations, I disable the option to save variants, so that users don't mess up the display and then start complaining saying, the display isn't working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 19:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758167#M1950891</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2016-06-29T19:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758168#M1950892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FUNCTION '/DSD/PR_LAST_DAY_OF_MONTHS'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Then in the field catalog I have DAY01...DAY31 fields and:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_fcat-no_out = 'X'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the day is larger than the last day of the month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 19:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758168#M1950892</guid>
      <dc:creator>kroly_horvth</dc:creator>
      <dc:date>2016-06-29T19:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758169#M1950893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked, THANKS, I set up a g_first_run flag to prevent infinite loop, which is fine with me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 19:47:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758169#M1950893</guid>
      <dc:creator>kroly_horvth</dc:creator>
      <dc:date>2016-06-29T19:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758170#M1950894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried modifying the fieldcatolog at runtime and setting the column you wish to hide as technical?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 19:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758170#M1950894</guid>
      <dc:creator>Patrick_vN</dc:creator>
      <dc:date>2016-06-29T19:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change ALV variant dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758171#M1950895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Columns not to display can be marked tech = abap_true in field catalog. ALV layout variant can not override this.&lt;/P&gt;&lt;P&gt;Clemens &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 22:41:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/change-alv-variant-dynamically/m-p/11758171#M1950895</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2016-06-29T22:41:00Z</dc:date>
    </item>
  </channel>
</rss>

