<?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: Select Statement Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918498#M1331056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;udate is ddmmyyyy and lvdate is yyyy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to compare this?/?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jul 2009 07:42:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-21T07:42:28Z</dc:date>
    <item>
      <title>Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918493#M1331051</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;i am using a select statement where i am writing,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objectclas from cdhdr where udate = sy-datum+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this particular statement i feel ll not work as udate is ddmmyyy where i am checking wth only year.&lt;/P&gt;&lt;P&gt;\&lt;/P&gt;&lt;P&gt;can anyone tell me how can i go further on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918493#M1331051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918494#M1331052</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;u can select all the objects whose year matches &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that you need to have a range of date type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;range-sign = 'EQ'.
range-option =  'I'.
concatenate '%' sy-datum+0(4) into string
range-low = string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objectclas from cdhdr into table itab where udate in range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sajid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:37:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918494#M1331052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918495#M1331053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Poonam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take one variable(lv_date) and assign the value  lv_date = sy-datum+0(4) to that variable before selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now call the select query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select objectclas from cdhdr where udate eq lv_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work for sure.&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;Sreeram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918495#M1331053</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2009-07-21T07:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918496#M1331054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but here udate and range is different right...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;udate is full date format where as sydatum+0(4) is just year im considering.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918496#M1331054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918497#M1331055</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 sy-datum ie yyyymmdd that system internaly use to get the data from tables if no alfa conversion routines are maintained in domain of any fiels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UDATE having domain as DATUM(yyyymmdd) .Soinsteed of usung sy-datum+0(4) use SY-datum in where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Deepanker Dwivedi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:41:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918497#M1331055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918498#M1331056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;udate is ddmmyyyy and lvdate is yyyy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to compare this?/?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:42:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918498#M1331056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918499#M1331057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but my requiremnt is just to compare with the current year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:43:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918499#M1331057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918500#M1331058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
data: date_from like sy-datum,  "start date 
         date_to     like sy-datum. "End date

move: '0101' to date_from+4(4),
          sy-datum(4) to date_from(4),
         '1231' to date_to+4(4),
          sy-datum(4) to date_to(4). 
* Now you got 2 dates, with the start and the end of the current year

*This select read all changes between the start and the end of the year.
Select objectclas from cdhdr into table itab where udate le date_to
                                                                          and udate ge date_from.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can avoid the use of 'DATE_TO' since you got SY-DATUM that is today and SAP register modify until today and not for tomorrow &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Simone Milesi on Jul 21, 2009 9:51 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:51:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918500#M1331058</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2009-07-21T07:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select Statement Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918501#M1331059</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;Why don't you try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;range-sign = 'CP'.  
range-option =  'I'.
concatenate '++++' sy-datum+0(4) into string    
range-low = string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Patterned string could be based on your requirements. Check out the help for the keyword CP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Wenonah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-query/m-p/5918501#M1331059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:55:41Z</dc:date>
    </item>
  </channel>
</rss>

