<?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: variable of date calculation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410033#M10862</link>
    <description>&lt;P&gt;How are the variables defined in the program? PARAMETERS or SELECT-OPTIONS?&lt;/P&gt;&lt;P&gt;If it's PARAMETERS (i.e. two variables - from and to) then you can use in the variant dynamic variables "current date - 1" and "Last day of current month". &lt;/P&gt;&lt;P&gt;If it's SELECT-OPTIONS then your dynamic variable options are limited to just one. In this case either you could fill in values in the program, as shown by John (in this case you won't use variant to determine those values, so be careful when saving a variant for other values) or you'll have to create a custom variable. (option T in the variant). The latter has been discussed numerous times on SCN. Google -&amp;gt; TVARVC site:sap.com.&lt;/P&gt;&lt;P&gt;Kindly make sure to search and read documentation before posting in SCN.&lt;/P&gt;&lt;P&gt;P.S. "month" in SAP could also be fiscal, not calendar month. Make sure to clarify that.&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2017 20:24:55 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2017-05-02T20:24:55Z</dc:date>
    <item>
      <title>variable of date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410030#M10859</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am trying to create a new variant to select date range:&lt;/P&gt;&lt;P&gt;From: current date -1&lt;/P&gt;&lt;P&gt;To : End of month&lt;/P&gt;&lt;P&gt;I don't see variable in the list to meet above requirement.&lt;/P&gt;&lt;P&gt;Would you please advise, on how shall I create a new variable?&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Rtn&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 06:42:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410030#M10859</guid>
      <dc:creator>ratana_pouy</dc:creator>
      <dc:date>2017-04-28T06:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: variable of date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410031#M10860</link>
      <description>&lt;P&gt;Hi Ratana,&lt;/P&gt;&lt;P&gt;SAP variant do not support current your requirement. If you you are using the customize report, you can do sample code abap below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  zzzztest.
SELECT-OPTIONS: s_day  FOR sy-datum.



DATA : lv_lastday_month  TYPE sy-datum.



INITIALIZATION.

  CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'

    EXPORTING

      day_in            = sy-datum

    IMPORTING

      last_day_of_month = lv_lastday_month.

  s_day-sign = 'I'.

  s_day-option = 'EQ'.

  s_day-low = sy-datum - 1.

  s_day-high = lv_lastday_month. " last day of month

  APPEND s_day.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Apr 2017 10:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410031#M10860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-28T10:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: variable of date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410032#M10861</link>
      <description>&lt;P&gt;It should be "BT" instead of "EQ". "EQ" will give you exactly two days, not the period in between.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 20:18:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410032#M10861</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-05-02T20:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: variable of date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410033#M10862</link>
      <description>&lt;P&gt;How are the variables defined in the program? PARAMETERS or SELECT-OPTIONS?&lt;/P&gt;&lt;P&gt;If it's PARAMETERS (i.e. two variables - from and to) then you can use in the variant dynamic variables "current date - 1" and "Last day of current month". &lt;/P&gt;&lt;P&gt;If it's SELECT-OPTIONS then your dynamic variable options are limited to just one. In this case either you could fill in values in the program, as shown by John (in this case you won't use variant to determine those values, so be careful when saving a variant for other values) or you'll have to create a custom variable. (option T in the variant). The latter has been discussed numerous times on SCN. Google -&amp;gt; TVARVC site:sap.com.&lt;/P&gt;&lt;P&gt;Kindly make sure to search and read documentation before posting in SCN.&lt;/P&gt;&lt;P&gt;P.S. "month" in SAP could also be fiscal, not calendar month. Make sure to clarify that.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 20:24:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410033#M10862</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-05-02T20:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: variable of date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410034#M10863</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It's PARAMETERS: Two variables-From and To, how to use in the variant dynamic variable "Current date-1" and "Last day of current month"? I don't see in SAP.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Ratana&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 09:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410034#M10863</guid>
      <dc:creator>ratana_pouy</dc:creator>
      <dc:date>2017-05-03T09:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: variable of date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410035#M10864</link>
      <description>&lt;P&gt;Where exactly are you looking "in SAP"? It's in the variant, under selection variable -&amp;gt; dynamic date calculation, at least in ECC 6.0.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 19:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/variable-of-date-calculation/m-p/410035#M10864</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-05-03T19:48:49Z</dc:date>
    </item>
  </channel>
</rss>

