<?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: Convert text to date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672813#M617229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C14W_CHAR_NUMBER_CONVERSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*&lt;STRONG&gt;reward for useful answers&lt;/STRONG&gt;*&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2007 10:19:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-28T10:19:02Z</dc:date>
    <item>
      <title>Convert text to date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672809#M617225</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;  I face some problems... &lt;/P&gt;&lt;P&gt;I want to work with  FUNCTION 'SM02_ADD_MESSAGE'....so I need to give it an expiration date... I declared it : &lt;/P&gt;&lt;P&gt;parameters p_expd    TYPE temsg-emtext. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  This because I want to assign it dynamicaly , like  : &lt;/P&gt;&lt;P&gt;REPLACE '$TUE' IN p_expd WITH next_tuesday.&lt;/P&gt;&lt;P&gt;Where next_tuesday is calculated in the report .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; As far I could see , the parameter I must declar as a text, but when I call the function , it must be the type temsg-timdel, which is in fact a date .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;So I need to convert the text to date , before I call the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 10:09:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672809#M617225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text to date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672810#M617226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your text contains the date in proper format you can use FM CONVERT_DATE_TO_INTERNAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not, you have to build it from your data to ensure the date has format YYYYMMDD (this is easy with a concatenate statement)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 10:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672810#M617226</guid>
      <dc:creator>franois_henrotte</dc:creator>
      <dc:date>2007-08-28T10:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text to date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672811#M617227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;here is the example program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data:  emtext like TEMSG-EMTEXT.
data:  exp_time like TEMSG-TIMDEL.

* Messages have the same format as the dialog transaction --
* a maximum of 3 lines each with a maximum of 60 characters.  Only the first line 
* must contain a message.   
emtext = "Bitte abmelden. Backup in 2 minutes.
      
* Enter the expiration time as shown. Use either 12 or 24

* Hour format, as in user master record, under which the program

* is running.
* If only time is specified, today&amp;#146;s date is assumed.

The print program can  . 
* Always specify a time.                                  
exp_time = '230000'.                        



CALL FUNCTION 'SM02_ADD_MESSAGE'

     EXPORTING                                       

         MESSAGE              = emtext     " 1. message line

         MESSAGE2             =            " 3. line

         MESSAGE3             =            " 3. line

         SERVERNAME           =               " Server

         EXPIRATION_DATE      = SY-DATUM      " expiration date with

         EXPIRATION_TIME      = '230000'      " time

         DELETE_DATE          = ' '           " deletion date with

         DELETE_TIME          = '230000'      " time

         CLIENT               = ' '           " client

      IMPORTING

         MESSAGE_ID           =

    EXCEPTIONS

         EMPTY_MESSAGE        = 1                   

         SERVER_NOT_AVAILABLE = 2                   

         CLIENT_NOT_AVAILABLE = 3                   

         NOT_AUTHORIZED       = 4                   

         OTHERS               = 5     &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&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; Sudheer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 10:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672811#M617227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T10:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text to date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672812#M617228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;declare a variable of type date and move the date from text field to this variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move p_expd to zdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward points if it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 10:16:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672812#M617228</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2007-08-28T10:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text to date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672813#M617229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C14W_CHAR_NUMBER_CONVERSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*&lt;STRONG&gt;reward for useful answers&lt;/STRONG&gt;*&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 10:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-text-to-date/m-p/2672813#M617229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T10:19:02Z</dc:date>
    </item>
  </channel>
</rss>

