<?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: Using offset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746434#M323819</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;a sugestion is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u will get the start and end date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:f_date type sy-datum,
l_date type sydatum.


CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = f_date
EV_MONTH_END_DATE = l_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u want to go with offset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_DATE_IN = '2006.12.11'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_DATE_IN+0(4) "&amp;lt;--for Year&lt;/P&gt;&lt;P&gt;V_DATE_IN+5(2) "&amp;lt;--for month&lt;/P&gt;&lt;P&gt;V_DATE_IN+8(2) "&amp;lt;--for Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2006 12:26:42 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2006-12-12T12:26:42Z</dc:date>
    <item>
      <title>Using offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746433#M323818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help me ,how to use OFFSET  in my code ?&lt;/P&gt;&lt;P&gt;REASON : I want to change the current date to the first date of the current month.&lt;/P&gt;&lt;P&gt;example: 2006.12.11(yyyy.mm.dd) to 2006.12.01(yyyy.mm.dd)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 12:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746433#M323818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T12:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746434#M323819</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;a sugestion is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u will get the start and end date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:f_date type sy-datum,
l_date type sydatum.


CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = f_date
EV_MONTH_END_DATE = l_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u want to go with offset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_DATE_IN = '2006.12.11'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_DATE_IN+0(4) "&amp;lt;--for Year&lt;/P&gt;&lt;P&gt;V_DATE_IN+5(2) "&amp;lt;--for month&lt;/P&gt;&lt;P&gt;V_DATE_IN+8(2) "&amp;lt;--for Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 12:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746434#M323819</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-12-12T12:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746435#M323820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try it as below :&lt;/P&gt;&lt;P&gt;string str.&lt;/P&gt;&lt;P&gt;date1 = 2006.12.11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str = date1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str+8(2) = '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can use some stanrdard functions for this change.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 12:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746435#M323820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T12:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746436#M323821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt; You can use the sub-string operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data v_date type sy-datum value sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  here v_date = 20061212&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_date+6(2) = '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  here v_date = 20061201&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The above code will change 2 characters from the seventh characters onwards. In this case day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 12:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746436#M323821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T12:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746437#M323822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;try this


REPORT YCHATEST LINE-SIZE 350.

DATA : V_DATE LIKE SY-DATUM,
       V_START_DATE(10).

V_DATE = SY-DATUM.

CONCATENATE V_DATE+0(4) V_DATE+4(2) '01' INTO V_START_DATE SEPARATED BY '.'.

WRITE : V_START_DATE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 12:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746437#M323822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T12:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using offset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746438#M323823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shashank  , &lt;/P&gt;&lt;P&gt;  Since the variable containing date will be of type DATUM and the internal rep of it is YYYYMMDD , so date like 22.12.2006 will be rep as 20061222.&lt;/P&gt;&lt;P&gt;Now if you want to convert it to 01.12.2006 all you have to do it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date+6(2) = '01'. where v_date is the variable storing the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 12:56:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-offset/m-p/1746438#M323823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T12:56:56Z</dc:date>
    </item>
  </channel>
</rss>

