<?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: Any Function Module to find Difference between two Monyr's in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600971#M867309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;I am not sure of any FM available for this requirement. But u can write a simple code and use FM &lt;STRONG&gt;HR_99S_INTERVAL_BETWEEN_DATES&lt;/STRONG&gt; for getting difference in months. Check below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: p1(7) TYPE c VALUE '01.2008',&lt;/P&gt;&lt;P&gt;      p2(7) TYPE c VALUE '11.2007',&lt;/P&gt;&lt;P&gt;      w_date1 TYPE d,&lt;/P&gt;&lt;P&gt;      w_date2 TYPE d,&lt;/P&gt;&lt;P&gt;      w_result TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE:p1&lt;EM&gt;3(4) p1&lt;/EM&gt;0(2) '01' INTO w_date1,&lt;/P&gt;&lt;P&gt;            p2&lt;EM&gt;3(4) p2&lt;/EM&gt;0(2) '01' INTO w_date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;   BEGDA           =  w_date2&lt;/P&gt;&lt;P&gt;    endda           = w_date1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TAB_MODE        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DAYS            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  C_WEEKS         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   C_MONTHS        = w_result&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  C_YEARS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WEEKS           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MONTHS          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  YEARS           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  D_MONTHS        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MONTH_TAB       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WRITE w_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u will get difference in months in the importing parameter c_months/d_months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Mar 2008 06:30:07 GMT</pubDate>
    <dc:creator>vinod_vemuru2</dc:creator>
    <dc:date>2008-03-23T06:30:07Z</dc:date>
    <item>
      <title>Any Function Module to find Difference between two Monyr's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600969#M867307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any Function Module to find the difference between&lt;/P&gt;&lt;P&gt;two Monyr Variables&lt;/P&gt;&lt;P&gt;For.Eg  Difference&lt;/P&gt;&lt;P&gt;between 01.2008 &amp;amp; 11.2007  =  2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2008 04:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600969#M867307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-23T04:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Any Function Module to find Difference between two Monyr's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600970#M867308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this related thread ... hope it helps ..&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="4898253"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2008 04:39:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600970#M867308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-23T04:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Any Function Module to find Difference between two Monyr's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600971#M867309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;I am not sure of any FM available for this requirement. But u can write a simple code and use FM &lt;STRONG&gt;HR_99S_INTERVAL_BETWEEN_DATES&lt;/STRONG&gt; for getting difference in months. Check below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: p1(7) TYPE c VALUE '01.2008',&lt;/P&gt;&lt;P&gt;      p2(7) TYPE c VALUE '11.2007',&lt;/P&gt;&lt;P&gt;      w_date1 TYPE d,&lt;/P&gt;&lt;P&gt;      w_date2 TYPE d,&lt;/P&gt;&lt;P&gt;      w_result TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE:p1&lt;EM&gt;3(4) p1&lt;/EM&gt;0(2) '01' INTO w_date1,&lt;/P&gt;&lt;P&gt;            p2&lt;EM&gt;3(4) p2&lt;/EM&gt;0(2) '01' INTO w_date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;   BEGDA           =  w_date2&lt;/P&gt;&lt;P&gt;    endda           = w_date1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TAB_MODE        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DAYS            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  C_WEEKS         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   C_MONTHS        = w_result&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  C_YEARS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WEEKS           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MONTHS          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  YEARS           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  D_MONTHS        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MONTH_TAB       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          WRITE w_result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u will get difference in months in the importing parameter c_months/d_months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2008 06:30:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600971#M867309</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-03-23T06:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Any Function Module to find Difference between two Monyr's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600972#M867310</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; Without the day we cant calculate the difference. So make the day as 01 in both the inputs and use the function module as RTP_US_API_DATES_TO_AGE. Hope your expected output will be produced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2008 07:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600972#M867310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-23T07:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Any Function Module to find Difference between two Monyr's</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600973#M867311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below Function Modules are helpfull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CMO_DATETIME_DIFFERENCE   Calculates difference between two dates/timestamps.&lt;/P&gt;&lt;P&gt;CMO_TIME_DIFF_GET         Calculate the time difference in seconds&lt;/P&gt;&lt;P&gt;HR_HK_DIFF_BT_2_DATES          HR-HK: Calculate the days, months and years between 2 dates.&lt;/P&gt;&lt;P&gt;HR99L00_GET_RETRO_MONTH_DIFF   Get retroactive result differences by month&lt;/P&gt;&lt;P&gt;HR_PDC_CALCULATE_TIME_DIFF&lt;/P&gt;&lt;P&gt;SCSM_TIME_DIFF_GET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2008 08:30:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/any-function-module-to-find-difference-between-two-monyr-s/m-p/3600973#M867311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-23T08:30:02Z</dc:date>
    </item>
  </channel>
</rss>

