<?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: Date format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265682#M491607</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;Look at the function module &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATE_CHECK_PLAUSIBILITY&amp;lt;/b&amp;gt;, Check to see if a date is in a valid format for SAP or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2007 05:17:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-18T05:17:56Z</dc:date>
    <item>
      <title>Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265680#M491605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai, &lt;/P&gt;&lt;P&gt;Is there any function module which checks the datatype sy-datum.&lt;/P&gt;&lt;P&gt;I have the value 20070418 in a variable . I want to check it is of the datatype&lt;/P&gt;&lt;P&gt;sy-datum.&lt;/P&gt;&lt;P&gt;urgent.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rakesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 05:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265680#M491605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T05:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265681#M491606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please explain in more detail about your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want to check if the variable has the same date as today then you can use &lt;/P&gt;&lt;P&gt;if variable_name = sy-datum.&lt;/P&gt;&lt;P&gt;***do something.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 05:17:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265681#M491606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T05:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265682#M491607</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;Look at the function module &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATE_CHECK_PLAUSIBILITY&amp;lt;/b&amp;gt;, Check to see if a date is in a valid format for SAP or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 05:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265682#M491607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T05:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265683#M491608</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;Adding to sudheer, try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: v_date TYPE sydatum.
 
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = v_date
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
IF sy-subrc &amp;lt;&amp;gt; 0.
WRITE: / 'INvalid date'.
ELSE.
WRITE: / 'Correct date'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 05:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265683#M491608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T05:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265684#M491609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try with this   function module   .   just  give  your   field dataelement as  input   in  ROLL_NAME ,  so that you will  gives   all data  like   Domain  , lenth  , all texts ,etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;DD_DTEL_GET&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 05:37:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265684#M491609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T05:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265685#M491610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_CHECK_PLAUSIBILITY	- Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETER P_DATE TYPE SYDATUM.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = P_DATE
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
OTHERS = 2.
 
v_subrc = sy-subrc.
 
if v_subrc = '1'.
 
write : 'PLAUSIBILITY_CHECK_FAILED'.
elseif  v_subrc = '2'.
write : 'OTHERS'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 05:44:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265685#M491610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T05:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265686#M491611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use SAP's standard function  module in SE37 transaction '&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;DD_DTEL_GET'&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;Just pass the name of dataelement of the variable you are using in your program.The function module, will give you the details about its type as SY-DATUM in your case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: LS_DD04L_WA_A TYPE DD04L,
      LS_DD04L_WA_N TYPE DD04L, 
      LS_DD01L_WA TYPE DD01L.

CALL FUNCTION 'DD_DTEL_GET'
 EXPORTING
   GET_STATE           = 'MXX'
   LANGU               = '*'
   PRID                = 0
   WITHTEXT            = 'X'
   ROLL_NAME           = 'Z_DATA_ELEMENT'
 IMPORTING
   DD04L_WA_A          = LS_DD04L_WA_A
   DD04L_WA_N          = LS_DD04L_WA_N
   DD01L_WA            = LS_DD01L_WA
 EXCEPTIONS
   ILLEGAL_VALUE       = 1
   OTHERS              = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the export parameter DD04L_WA_A-DATATYPE you will get the name of datatype. Also in the same struture you can get the name of domain/dataelements etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sort out your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS If the answer solves your query, plz close the thread by rewarding each reply.&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;Sapna Modi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 06:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265686#M491611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T06:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265687#M491612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just declare it as type DATUM.&lt;/P&gt;&lt;P&gt;parameter : p_date type DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no need to do anything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 06:32:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265687#M491612</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-05-18T06:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265688#M491613</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;Use the following FM:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATE_CHECK_PLAUSIBILITY&amp;lt;/b&amp;gt; Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sipra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 07:49:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format/m-p/2265688#M491613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T07:49:15Z</dc:date>
    </item>
  </channel>
</rss>

