<?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 function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715212#M629648</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need a standard function module that takes a date and time as input, I then add say hours/minutes/days/weeks/months/years to that function module, it then converts it to the corresponding date and time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2007 07:01:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-10T07:01:46Z</dc:date>
    <item>
      <title>function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715212#M629648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need a standard function module that takes a date and time as input, I then add say hours/minutes/days/weeks/months/years to that function module, it then converts it to the corresponding date and time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715212#M629648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715213#M629649</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;check the FM "RP_CALC_DATE_IN_INTERVAL"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715213#M629649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715214#M629650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also check SD_DATETIME_DIFFERENCE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:05:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715214#M629650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715215#M629651</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;try this fm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RP_CALC_DATE_IN_INTERVAL&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&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;Preeti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward for useful reply&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:05:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715215#M629651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715216#M629652</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;&lt;/P&gt;&lt;P&gt;Date, Month and Popup Related Function Modules &lt;/P&gt;&lt;P&gt;Date/Month Related Function Modules: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_COMPUTE_DAY &amp;#150; Finds day of the month &lt;/P&gt;&lt;P&gt;DATE_CONV_EXT_TO_INT  - user formatted date is converted to system date &lt;/P&gt;&lt;P&gt;DATE_GET_WEEK  - convert date into year + week format &lt;/P&gt;&lt;P&gt;DATE_TO_DAY &amp;#150; gives weekday from date &lt;/P&gt;&lt;P&gt;DATE_IN_FUTURE &amp;#150; takes number of days and date  - gives future date in user format and system format &lt;/P&gt;&lt;P&gt;MONTH_PLUS_DETERMINE &amp;#150; add or subtract month from a date &lt;/P&gt;&lt;P&gt;RP_CALC_DATE_IN_INTERNAL &amp;#150; add/subtract year/month/days from a date &lt;/P&gt;&lt;P&gt;WEEK_GET_FIRST_DAY &amp;#150; take input as YYYYWW and it gives first day of the week. &lt;/P&gt;&lt;P&gt;MONTH_NAMES_GET &amp;#150; language is only parameter. Returns internal table with months. &lt;/P&gt;&lt;P&gt;MONTH_PLUS_DETERMINE &amp;#150; subtract months from date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.To get a date from a given date +/- period. Input : Date &amp;amp; Period (No. of Days) Output : Calculated Date &lt;/P&gt;&lt;P&gt;Please go through the Function Module "RELATIVE_DATE_CALCULATE". Remember to enter the date in 'yyyymmdd' format in the start date field. &lt;/P&gt;&lt;P&gt;2.if the days variable is integer and other 2 like sy-datum, the math below yields the number of days to yo.. &lt;/P&gt;&lt;P&gt;start date = '23.07.2003'&lt;/P&gt;&lt;P&gt;End date = '23.09.2003'&lt;/P&gt;&lt;P&gt;Days = enddate - Start date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Please go through the Functions Module , it gives date as well as time difference, though U may have to enter time as well. &lt;/P&gt;&lt;P&gt;SD_DATETIME_DIFFERENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. with this FM you can get dates between two dates : Function Module &lt;/P&gt;&lt;P&gt;RP_CALC_DATE_IN_INTERVAL&lt;/P&gt;&lt;P&gt;5. go into SE37 and search on 'difference between dates', one of these 3 keywords or a combination between the 3 will give you a function module. &lt;/P&gt;&lt;P&gt;6. Date Upper &amp;amp; Lower limit: the lower is obviously the 1st of the month. To get the upper use function module END_OF_MONTH_DETERMINE. &lt;/P&gt;&lt;P&gt;7. to get the logon user setting date dynamically : Using offsets move it into a date field,obviously in the format yyyymmdd. then move it into a char(10) field. U get the data in char(10) using the current user's setting. &lt;/P&gt;&lt;P&gt;ex:: w_date type d value '20030822', &lt;/P&gt;&lt;P&gt;w_char(10). &lt;/P&gt;&lt;P&gt;say logon user setting is mm/dd/yyyy. &lt;/P&gt;&lt;P&gt;write w_date to w_char. w_char will have the value 08/22/2003. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the result of the move stmt in bdc table. &lt;/P&gt;&lt;P&gt;8. Check this FM &lt;/P&gt;&lt;P&gt;"/SAPDMC/LSM_DATE_CONVERT "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9.statements: &lt;/P&gt;&lt;P&gt;1. CONVERT DATE f1 INTO INVERTED-DATE f2. &lt;/P&gt;&lt;P&gt;2. CONVERT INVERTED-DATE f1 INTO DATE f2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculates the nine's complement of the internal date format (YYYYMMDD - for more information about internal display, meaning and initial values of types and places it in the field f2. &lt;/P&gt;&lt;P&gt;For example, 19950511 ==&amp;gt; 80049488 or 80049488 ==&amp;gt; 19950511. &lt;/P&gt;&lt;P&gt;In the inverse date format, the most recent date has the numerically smallest value. You can make use of this effect when sorting dates. &lt;/P&gt;&lt;P&gt;10. GET TIME STAMP : returns the timestamp in short or long form. The short form contains the current date and time : &lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;s_tst TYPE timestamp, &lt;/P&gt;&lt;P&gt;l_tst TYPE timstampl, &lt;/P&gt;&lt;P&gt;tzone TYPE timezone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET TIME STAMP FIELD s_tst. "Short form &lt;/P&gt;&lt;P&gt;GET TIME STAMP FIELD l_tst. "Long form &lt;/P&gt;&lt;P&gt;tzone = 'UTC '. "Time zone &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / s_tst TIME ZONE tzone, &lt;/P&gt;&lt;P&gt;/ l_tst TIME ZONE tzone. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, The short form might then contain the value 19980204163520, while the long form has the value 19980204163520,1234560. &lt;/P&gt;&lt;P&gt;The time stamp can be converted by using CONVERT TIME STAMP and CONVERT DATE &lt;/P&gt;&lt;P&gt;11.Some system fields: DATLO Local date for user DATUT Global date related to UTC (GMT) TSTLO Timestamp (date and time) for user TSTUT Timestamp (date and time) related to UTC (GMT) &lt;/P&gt;&lt;P&gt;12. Check the site &lt;A href="http://funciones.sapabap.cc" target="test_blank"&gt;http://funciones.sapabap.cc&lt;/A&gt; for functions like DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. &lt;/P&gt;&lt;P&gt;Works well when validating dates being passed in from other systems. &lt;/P&gt;&lt;P&gt;DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc. &lt;/P&gt;&lt;P&gt;DATE_GET_WEEK will return the week that a date is in. &lt;/P&gt;&lt;P&gt;DATE_IN_FUTURE Calculate a date N days in the future. &lt;/P&gt;&lt;P&gt;DAY_ATTRIBUTES_GET Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuesday), whether the day is a holiday, and more. &lt;/P&gt;&lt;P&gt;F4_DATE for popping up calendar for date help on value request &lt;/P&gt;&lt;P&gt;RH_GET_DATE_DAYNAME return the day based on the date provided &lt;/P&gt;&lt;P&gt;RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date &lt;/P&gt;&lt;P&gt;RP_LAST_DAY_OF_MONTHS Determine last day of month &lt;/P&gt;&lt;P&gt;WEEK_GET_FIRST_DAY For a given week (YYYYMM format), this function returns the date of the Monday of that week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/functions.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/functions.htm&lt;/A&gt;&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="3880075"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:07:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/2715216#M629652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:07:27Z</dc:date>
    </item>
  </channel>
</rss>

