<?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: remove days from date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217164#M1983304</link>
    <description>&lt;P&gt;Hi Raymond&lt;/P&gt;&lt;P&gt;i don't want the day to appear at all in my result only Month + Year&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2020 06:48:37 GMT</pubDate>
    <dc:creator>Yasin</dc:creator>
    <dc:date>2020-10-27T06:48:37Z</dc:date>
    <item>
      <title>remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217160#M1983300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I want to remove days from date so i can collect my internal table base on month (period)&lt;/P&gt;
  &lt;P&gt;so i want to convert all date from DD.MM.YYY ==&amp;gt; MM.YYYY&lt;/P&gt;
  &lt;P&gt;what is the best way to achieve this &lt;/P&gt;
  &lt;P&gt;i have uses as work around the bellow code:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;wa_i_final1_mg-fkdat = wa_i_final1_mg-fkdat+2(06).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;but am getting extra dot on final result like .MM.YYYY and an not sure if it is correct way.&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 14:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217160#M1983300</guid>
      <dc:creator>Yasin</dc:creator>
      <dc:date>2020-10-26T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217161#M1983301</link>
      <description>&lt;P&gt;Why wont you replace day with '01'&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;a_i_final1_mg-fkdat+6(2) = '01'.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Oct 2020 14:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217161#M1983301</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-10-26T14:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217162#M1983302</link>
      <description>&lt;P&gt;Seeing that you're using wa_i_final1_mg-fkdat+2(06) i take it that the value in wa_i_final1_mg-fkdat isalready in the DD.MM.YYYY format. If that is the case that it doesn't surprise me that you get the extra dot, it does surprise that your result is .MM.YYYY instead of .MM.YYY though.&lt;/P&gt;&lt;P&gt;In other words I think wa_i_final1_mg-fkdat+2(06) should be wa_i_final1_mg-fkdat+3(06).&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 14:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217162#M1983302</guid>
      <dc:creator>ArthurParisius</dc:creator>
      <dc:date>2020-10-26T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217163#M1983303</link>
      <description>&lt;P&gt;Hi Arthur &lt;/P&gt;&lt;P&gt;using 3(06) will through an error message:&lt;/P&gt;&lt;P&gt;The sum of offset (3) and length (06) exceeds the field length (8).&lt;/P&gt;&lt;P&gt;Regarsd&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 06:46:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217163#M1983303</guid>
      <dc:creator>Yasin</dc:creator>
      <dc:date>2020-10-27T06:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217164#M1983304</link>
      <description>&lt;P&gt;Hi Raymond&lt;/P&gt;&lt;P&gt;i don't want the day to appear at all in my result only Month + Year&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 06:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217164#M1983304</guid>
      <dc:creator>Yasin</dc:creator>
      <dc:date>2020-10-27T06:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217165#M1983305</link>
      <description>&lt;P&gt;I don't understand your issu&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;my_month_year = |{ bla-fkdat+4(2) }.{ bla-fkdat+0(4) }|. &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2020 08:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217165#M1983305</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-10-27T08:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217166#M1983306</link>
      <description>&lt;P&gt;That makes NO SENSE.&lt;/P&gt;&lt;P&gt;Your input string according to you is of the format DD.MM.YYY Your first issue here is that year only has three characters. But even then, that's a string that is 9 characters long. If you are getting the error message that the field length is 8, then I can only assume you are not giving us full information.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;string+offset(len)&lt;/STRONG&gt; is the syntax. &lt;STRONG&gt;Offset &lt;/STRONG&gt;starts at zero. &lt;STRONG&gt;Offset &lt;/STRONG&gt;plus &lt;STRONG&gt;len &lt;/STRONG&gt;must not be greater than the length of &lt;STRONG&gt;string&lt;/STRONG&gt;. This is basic. Which part are you having trouble with?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 08:56:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217166#M1983306</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-10-27T08:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217167#M1983307</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt;  You see, I don't use Hungarian notation !!!  Each time I wrote code here, I thing about your aversion about that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 08:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217167#M1983307</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-10-27T08:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217168#M1983308</link>
      <description>&lt;P&gt;Or one of these (since the OP clearly doesn't understand the +offset(length) syntax).:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;my_month_year = |{ substring( val = bla-fkdat off = 4 len = 2 ) }.{ substring( val = bla-fkdat len = 4 ) }|. 
my_month_year = substring( val = bla-fkdat off = 4 len = 2 ) &amp;amp;&amp;amp; '.' &amp;amp;&amp;amp; substring( val = bla-fkdat len = 4 ). &lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Oct 2020 08:58:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217168#M1983308</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-10-27T08:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217169#M1983309</link>
      <description>&lt;P&gt;My trick will allow you to collect data as required.&lt;/P&gt;&lt;P&gt;Now if you don't want to display the day, either create another field of type year.period (e.g. data element such as BUPER or JAHRPER) or use a DATS specific domain with a conversion exit that hide the day and reduce the output length.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 09:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217169#M1983309</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-10-27T09:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217170#M1983310</link>
      <description>&lt;P&gt;I am not sure about your problem, but you can try creating a new field and copying the month to that. &lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:34:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217170#M1983310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-10-27T10:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217171#M1983311</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; Maybe it's old style, and that I'm old school, but I prefer Frederic code, from far ! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(sometimes, just learn people something "new" and they will be happy to use it)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 13:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217171#M1983311</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-10-27T13:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217172#M1983312</link>
      <description>&lt;P&gt;I wonder if the good answer was not to find a correct Data element, like there is in FI module. &lt;/P&gt;&lt;P&gt;Because what we propose is just the output of the value, it could not be really used. &lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 13:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217172#M1983312</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-10-27T13:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: remove days from date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217173#M1983313</link>
      <description>&lt;P&gt;But you must admit that substring is readily more comprehensible to anyone new to ABAP. If the OP had gone for that in the first place, then maybe s/he wouldn't have got confused.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 14:57:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/remove-days-from-date/m-p/12217173#M1983313</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-10-27T14:57:51Z</dc:date>
    </item>
  </channel>
</rss>

