<?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: How to validate when date format is diff Internally and externally in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051468#M1174204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dont think its necessary to pass the time zone..nyways here is d syntax example for the same...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: time_stamp TYPE timestamp, &lt;/P&gt;&lt;P&gt;      dat        TYPE d, &lt;/P&gt;&lt;P&gt;      dat        TYPE d, &lt;/P&gt;&lt;P&gt;      tz         TYPE ttzz-tzone, &lt;/P&gt;&lt;P&gt;      dst        TYPE c LENGTH 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tz = 'BRAZIL'. &lt;/P&gt;&lt;P&gt;time_stamp = 20030309033000. &lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP time_stamp TIME ZONE tz &lt;/P&gt;&lt;P&gt;        INTO DATE dat .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jan 2009 10:56:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-12T10:56:47Z</dc:date>
    <item>
      <title>How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051448#M1174184</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;How can I validate the Date format if Internal format and external format is different. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Ex : 

 *  SELECT SINGLE CRTSP
**                FROM /SAPSLL/PR
**                INTO L_CRTSP
**                WHERE CRTSP IN S_CRTSP .
*

CRTSP (YYYY/DD/MM HHMMSEC) Internal Format 

S_CRTSP (YYYY/DD/MM) External format - selection option

I had done following to convert the internal format to external format. 

DATA : LV_DT TYPE STRING.

DATA :  L_CRTSP TYPE /SAPSLL/CRTSP.

SELECT SINGLE CRTSP
                FROM /SAPSLL/PR
                INTO L_CRTSP.

MOVE : L_CRTSP TO LV_DT. "(YYYY/DD/MM HHMMSEC)

 L_LEN = STRLEN( LV_DT ).
 L_DATE = LV_DT+0(8).

I have the date format that i need in L_DATE."  (YYYY/DD/MM)

Now how should I validate? 


*  SELECT SINGLE CRTSP
**                FROM /SAPSLL/PR
**                INTO L_CRTSP
**                WHERE CRTSP IN S_CRTSP .

Please let me know how can I validate or how can I write the select query to validate this field. 

There should be some way using Wildcard or some function module...which I am not sure...

Any suggestions will be appreciated!&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kittu on Jan 6, 2009 12:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 11:57:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051448#M1174184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T11:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051449#M1174185</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 function module FORMAT_DATE_4_OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : DATE TYPE CHAR10.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    DATIN         = '20081013'&lt;/P&gt;&lt;P&gt;    FORMAT        = 'DD.MM.YYYY'&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   DATEX         = DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF DATE IS  INITIAL.&lt;/P&gt;&lt;P&gt;give error message&lt;/P&gt;&lt;P&gt;ELSE:&lt;/P&gt;&lt;P&gt;WRITE : / DATE.&lt;/P&gt;&lt;P&gt;ENDIF.          .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it solves your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051449#M1174185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051450#M1174186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kittu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take date in string ..split at '/' adn comare the range like&lt;/P&gt;&lt;P&gt; yyyy shd be betwwen 1900-2008 &lt;/P&gt;&lt;P&gt;dd btw 1-31 and&lt;/P&gt;&lt;P&gt; mm btw 1-12.&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;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:05:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051450#M1174186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051451#M1174187</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 this FM to convert internal format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT_DATE_TO_INTERNAL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:06:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051451#M1174187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051452#M1174188</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 conversion exit for date in your required format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanket sethi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:07:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051452#M1174188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051453#M1174189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;     do like dis...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: time_stamp TYPE timestamp, &lt;/P&gt;&lt;P&gt;               dat        TYPE d, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT SINGLE CRTSP&lt;/P&gt;&lt;P&gt;                FROM /SAPSLL/PR&lt;/P&gt;&lt;P&gt;                INTO time_stamp .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONVERT TIME STAMP time_stamp INTO DATE dat .&lt;/P&gt;&lt;P&gt;      IF dat IN s_CRTSP.         "filter&lt;/P&gt;&lt;P&gt;        " do the append or watever...&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051453#M1174189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051454#M1174190</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;Thank you for your quick response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had already converted into desired format...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My issue is how can I write screen validation? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the desired fromat date in L_DATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I had converted (YYYY/DD/MM HHMMSEC) Internal Format to  &lt;/P&gt;&lt;P&gt; external format  (YYYY/DD/MM). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I write validation for it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TT, you got it right...i need to validate this field just like any other screen validation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what do you suggest if the condition satisfies? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be appreciated and can you please eloborate your sugesstions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kittu on Jan 6, 2009 1:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051454#M1174190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051455#M1174191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kittu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as i said in my previous post ....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Take date in string ..split at '/' and compare the range like
yyyy shd be betwwen 1900-2008
dd btw 1-31 and
mm btw 1-12.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051455#M1174191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051456#M1174192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi...can u tell me wat ur requirement is???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u want the value of crstp field in ur program.&lt;/P&gt;&lt;P&gt;den &lt;/P&gt;&lt;P&gt;if dat IN s_crstp.&lt;/P&gt;&lt;P&gt; use value of field &amp;lt;timestamp &amp;gt;  whereever u want&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051456#M1174192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051457#M1174193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Would you want to try something like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE s_crtsp-low '%' INTO wa_crtsp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE CRTSP&lt;/P&gt;&lt;P&gt;                FROM /SAPSLL/PR&lt;/P&gt;&lt;P&gt;                INTO L_CRTSP&lt;/P&gt;&lt;P&gt;                WHERE CRTSP LIKE wa_crtsp .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this would give you data for only a single date.&lt;/P&gt;&lt;P&gt;You could very well keep looping through for all dates from s_crtsp-low to s_crtsp-high.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051457#M1174193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051458#M1174194</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;&lt;/P&gt;&lt;P&gt;Convert screen input is same as internal format and then validate with internal field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:49:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051458#M1174194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051459#M1174195</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;Convert screen input is same as internal format (Using FM wat I mentioned above) and then validate with internal field in AT SELECTION SCREEN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051459#M1174195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051460#M1174196</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;Convert screen input is same as internal format (Using FM wat I mentioned above) and then validate with internal field in AT SELECTION SCREEN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 12:52:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051460#M1174196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T12:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051461#M1174197</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;This is actual select query for data selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT GUID_PR   "Primary Key as GUID in "RAW" Format
         CRTSP     "PRODUCT CREATED ON
         CHTSP     "PRODUCT CHANGED ON
         FROM /SAPSLL/PR
         INTO TABLE T_PR
          FOR ALL ENTRIES IN T_PRGEN    
         WHERE GUID_PR EQ T_PRGEN-GUID_PR 
                AND CRTSP IN *S_CRTSP*     
              AND CHTSP IN S_CHTSP.


Now I had changed the date format and it is in v_dat variable. 

How should i select the data based on this criteria. 

I mean should I write this select query like this : 

SELECT GUID_PR   "Primary Key as GUID in "RAW" Format
         CRTSP     "PRODUCT CREATED ON
         CHTSP     "PRODUCT CHANGED ON
         FROM /SAPSLL/PR
         INTO TABLE T_PR
          FOR ALL ENTRIES IN T_PRGEN    
         WHERE GUID_PR EQ T_PRGEN-GUID_PR 
                AND CRTSP IN *v_dat*     
              AND CHTSP IN S_CHTSP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I am doing so then it is throwing an error message.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2009 15:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051461#M1174197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-06T15:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051462#M1174198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,here comes d solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_CHTSP and S_CRTSP is of type D(date).&lt;/P&gt;&lt;P&gt;But in table /SAPSLL/PR ,crtsp and chtsp is of format timestamp.&lt;/P&gt;&lt;P&gt;so u have to convert the timestamp to date format and den validate it in a loop....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: d1 type d,&lt;/P&gt;&lt;P&gt;        d2 type d,&lt;/P&gt;&lt;P&gt;        v_fg type c.&lt;/P&gt;&lt;P&gt;SELECT GUID_PR   "Primary Key as GUID in "RAW" Format&lt;/P&gt;&lt;P&gt;         CRTSP     "PRODUCT CREATED ON&lt;/P&gt;&lt;P&gt;         CHTSP     "PRODUCT CHANGED ON&lt;/P&gt;&lt;P&gt;         FROM /SAPSLL/PR&lt;/P&gt;&lt;P&gt;         INTO TABLE T_PR&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN T_PRGEN    &lt;/P&gt;&lt;P&gt;         WHERE GUID_PR EQ T_PRGEN-GUID_PR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_pr.&lt;/P&gt;&lt;P&gt; CONVERT TIME STAMP t_pr-crtsp INTO DATE d1 .&lt;/P&gt;&lt;P&gt; IF d1 NOT IN s_crtsp.&lt;/P&gt;&lt;P&gt;   v_fg = 'X'.&lt;/P&gt;&lt;P&gt;  delete t_pr index sy-tabix.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt; IF chtsp NOT IN d2 and v_fg &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt; delete t_pr index sy-tabix.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt; clear:v_fg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u get the records in t_pr with both filteration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 04:09:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051462#M1174198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T04:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051463#M1174199</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;Thank you for youe response and I apprecaite the help so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This logic work if it is Parameter...When I have select option it is not working as it is not taking the range values...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT GUID_PR "Primary Key as GUID in "RAW" Format
CRTSP "PRODUCT CREATED ON
CHTSP "PRODUCT CHANGED ON
FROM /SAPSLL/PR
INTO TABLE T_PR.


DATA : T_PR1 TYPE TY_PR OCCURS 0 WITH HEADER LINE.


DATA:  W_TEST    TYPE STRING,
       W_LV_LEN  TYPE I,
       W_LV_LEN1 TYPE I,
       W_LV_DATE(20)  TYPE C,
       W_LV_DATE1(20) TYPE C.

DATA : W_V(8) TYPE C,
       S_CT(11) TYPE C.

SORT T_PR BY CRTSP CHTSP.


LOOP AT T_PR INTO WA_PR.

  W_TEST = WA_PR-CRTSP.

  W_LV_LEN = STRLEN( W_TEST ).
  W_LV_DATE = W_TEST+0(8).

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;** IF WE SELECT ONLY ONE DATE IN SELECT OPTION&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;s_crtsp VALUE IS - IEQ20040101..bY REMOVING FIRST THRID DIGITS &lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;WE ARE GETTING THE S_CRTSP VALUE IS 20040101 AND THIS LOGIC IS WORKING FINE..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
   MOVE S_CRTSP TO S_CT. 

  W_LV_LEN1 = STRLEN( S_CT ).
  W_LV_DATE1 = S_CT+3(8).

*  IF W_LV_DATE NE S_CRTSP

 IF W_LV_DATE NE W_LV_DATE1.

  W_FLG = 'X'.
    DELETE T_PR INDEX SY-TABIX.
  ENDIF.
  CLEAR W_FLG.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we do anything for this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANy suggestions would be apprecaited!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 09:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051463#M1174199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T09:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051464#M1174200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kittu,&lt;/P&gt;&lt;P&gt;    PLEASE come out from the way u have coded..the code i gave u before in d post is considering s_crtsp and s_chtsp as select-options only.... nyways m pasting the code again...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please read the code below with patience ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_CHTSP and S_CRTSP is of type D(date).&lt;/P&gt;&lt;P&gt;But in table /SAPSLL/PR ,crtsp and chtsp is of format timestamp.&lt;/P&gt;&lt;P&gt;so u have to convert the timestamp to date format and den validate it in a loop....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: d1 type d,&lt;/P&gt;&lt;P&gt;d2 type d,&lt;/P&gt;&lt;P&gt;v_fg type c.&lt;/P&gt;&lt;P&gt;SELECT GUID_PR "Primary Key as GUID in "RAW" Format&lt;/P&gt;&lt;P&gt;CRTSP "PRODUCT CREATED ON&lt;/P&gt;&lt;P&gt;CHTSP "PRODUCT CHANGED ON&lt;/P&gt;&lt;P&gt;FROM /SAPSLL/PR&lt;/P&gt;&lt;P&gt;INTO TABLE T_PR&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_PRGEN &lt;/P&gt;&lt;P&gt;WHERE GUID_PR EQ T_PRGEN-GUID_PR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_pr.&lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP t_pr-crtsp INTO DATE d1 .&lt;/P&gt;&lt;P&gt;IF d1 NOT IN s_crtsp.&lt;/P&gt;&lt;P&gt;v_fg = 'X'.&lt;/P&gt;&lt;P&gt;delete t_pr index sy-tabix.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF chtsp NOT IN d2 and v_fg 'X'.&lt;/P&gt;&lt;P&gt;delete t_pr index sy-tabix.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;clear:v_fg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u get the records in t_pr with both filteration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 09:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051464#M1174200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T09:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051465#M1174201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now m putting the full code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: d1 type d,&lt;/P&gt;&lt;P&gt;d2 type d,&lt;/P&gt;&lt;P&gt;v_fg type c.&lt;/P&gt;&lt;P&gt;SELECT GUID_PR "Primary Key as GUID in "RAW" Format&lt;/P&gt;&lt;P&gt;CRTSP "PRODUCT CREATED ON&lt;/P&gt;&lt;P&gt;CHTSP "PRODUCT CHANGED ON&lt;/P&gt;&lt;P&gt;FROM /SAPSLL/PR&lt;/P&gt;&lt;P&gt;INTO TABLE T_PR&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN T_PRGEN &lt;/P&gt;&lt;P&gt;WHERE GUID_PR EQ T_PRGEN-GUID_PR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_pr.&lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP t_pr-crtsp INTO DATE d1 .&lt;/P&gt;&lt;P&gt;IF d1 NOT IN s_crtsp.&lt;/P&gt;&lt;P&gt;v_fg = 'X'.&lt;/P&gt;&lt;P&gt;delete t_pr index sy-tabix.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF v_fg &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP t_pr-chtsp INTO DATE d2 .&lt;/P&gt;&lt;P&gt;IF d2 NOT IN s_chtsp.&lt;/P&gt;&lt;P&gt;delete t_pr index sy-tabix.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;clear:v_fg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051465#M1174201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T10:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051466#M1174202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kittu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*  MOVE S_CRTSP TO S_CT. 
 
* W_LV_LEN1 = STRLEN( S_CT ).
*  W_LV_DATE1 = S_CT+3(8).
 
*  IF W_LV_DATE NE S_CRTSP
 
*  IF W_LV_DATE NE W_LV_DATE1.

IF W_LV_DATE NOT IN S_CRTSP 
  W_FLG = 'X'.
    DELETE T_PR INDEX SY-TABIX.
  ENDIF.
  CLEAR W_FLG.
 
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use &lt;STRONG&gt;NOT IN S_CRTSP&lt;/STRONG&gt; with the select-option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 12, 2009 11:02 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051466#M1174202</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-12T10:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate when date format is diff Internally and externally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051467#M1174203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi TT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for being patient with me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I take time to understand things....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP t_pr-crtsp INTO DATE d1 .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Here i have issue with the syntax.....&lt;/P&gt;&lt;P&gt;I tried with this by using the help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CONVERT TIME STAMP t_pr-crtsp TIME ZONE INTO DATE d1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I also need to add anything here like Time ZONE tz ...etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Becayse it says INTO expected afetr INTO..it behaves as this syntax is incomplete.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Kittu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kittu on Jan 12, 2009 11:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 10:21:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-when-date-format-is-diff-internally-and-externally/m-p/5051467#M1174203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-12T10:21:20Z</dc:date>
    </item>
  </channel>
</rss>

