<?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 required to convert the date coming from external system in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827246#M43264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I need a Function Module that would convert the incoming date from external sytem in format YYYYMMDD to the SAP system in DDMMYYYY. The External system data type for the date is Numberic. Please suggest any FM if you know.I found out many in SAP but didn't find for this requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Sep 2004 11:03:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-09-01T11:03:37Z</dc:date>
    <item>
      <title>Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827246#M43264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I need a Function Module that would convert the incoming date from external sytem in format YYYYMMDD to the SAP system in DDMMYYYY. The External system data type for the date is Numberic. Please suggest any FM if you know.I found out many in SAP but didn't find for this requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 11:03:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827246#M43264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-01T11:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827247#M43265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If my external data format is fixed, I usually just program this myself like the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: date1(8) type n.  "Format YYYYMMDD
data: date2(8) type n.  "Format DDMMYYYY

move date1+0(4) to date2+4(4).
move date1+4(2) to date2+2(2).
move date1+6(2) to date2+0(2).

call function 'DATE_CHECK_PLAUSIBILITY'
  exporting
     DATE = date2
  exceptions
     plausibility_check_failed = 1.
if sy-subrc ne 0.
  "Do Something.
endif.
   
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 13:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827247#M43265</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-09-01T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827248#M43266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the user default settings are DD.MM.YYYY, you can use the WRITE statement, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_date1    TYPE dats,&lt;/P&gt;&lt;P&gt;      v_date2(8) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date1 = sy-datum.       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE v_date1 TO v_date2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date1 will be in format YYYYMMDD&lt;/P&gt;&lt;P&gt;v_date2 will be in format DDMMYYYY (according to user settings)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 13:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827248#M43266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-01T13:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827249#M43267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    I tried this patch of code in the LSMW, but it gave me a dump CALL_FUNCTION_CONFLICT_TYPE on the Function Module DATE_CHECK_PLAUSIBILITY. Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 14:29:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827249#M43267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-01T14:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827250#M43268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry about that DATE_CHECK_PLAUSIBILITY is expecting its date input parameter to be like sy-datum.  Just change the defintion of date2 to the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  date: date2 type sydatum.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 14:33:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827250#M43268</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-09-01T14:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827251#M43269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I am still getting some issue with the output for date. here's my code&lt;/P&gt;&lt;P&gt;data: date1(8) type c value '20051225'.  "Format YYYYMMDD&lt;/P&gt;&lt;P&gt;data: date2 type sy-datum.  "Format DDMMYYYY&lt;/P&gt;&lt;P&gt;data: f_date type datum.&lt;/P&gt;&lt;P&gt;data: l_year(4),&lt;/P&gt;&lt;P&gt;      l_month(2),&lt;/P&gt;&lt;P&gt;      l_day(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move date1&lt;EM&gt;0(4) to date2&lt;/EM&gt;4(4).&lt;/P&gt;&lt;P&gt;move date1&lt;EM&gt;4(2) to date2&lt;/EM&gt;2(2).&lt;/P&gt;&lt;P&gt;move date1&lt;EM&gt;6(2) to date2&lt;/EM&gt;0(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_year = date2+4(4).&lt;/P&gt;&lt;P&gt;l_month = date2+2(2).&lt;/P&gt;&lt;P&gt;l_day = date2+0(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate l_day l_month l_year into f_date.&lt;/P&gt;&lt;P&gt;condense f_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; write: f_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expected should be 25122005 but I am getting the date output as 05.20.2512. I checked the UserProfile Own data of the system,it is set fine to DDMMYYYY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 14:58:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827251#M43269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-01T14:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827252#M43270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Thomas ..I got the solution.The FM is CONVERSION_EXIT_PDATE_OUTPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 15:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827252#M43270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-09-01T15:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827253#M43271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mira,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAP, date is always stored in format YYYYMMDD. Depending on your format, it will be displayed on the screen or printer based on that format when you use WRITE statement to screen or text. You can't have a field in date format stored as DDMMYYYY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 15:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827253#M43271</guid>
      <dc:creator>nablan_umar</dc:creator>
      <dc:date>2004-09-01T15:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module required to convert the date coming from external system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827254#M43272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wait a minute.  I am definetely missing something here.  You want to convert from an external format YYYYMMDD to SAP's internal format?  SAP's internal format is YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All you should have to do is move you external date directly to your internal date.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: date1(8) type c value '20051225'. "Format YYYYMMDD
data: date2 type sy-datum. "Format (YYYYMMDD)

write: / date2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you write out date2 it will be in whatever format your user profile has.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to force the date format independent of your user profile settings during the write statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
write: / date2 DDMMYY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Thomas Jung&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2004 15:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-required-to-convert-the-date-coming-from-external-system/m-p/827254#M43272</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2004-09-01T15:14:18Z</dc:date>
    </item>
  </channel>
</rss>

