<?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 query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812616#M348259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first take the first 6 character of your date field suppose &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : spmon(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spmon = sy-datum(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of  i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and mjahr = i_vbfa_so-erdat(4).&lt;/P&gt;&lt;P&gt;if i_mkpf-bldat cs spmon.&lt;/P&gt;&lt;P&gt;   append i_mkpf.&lt;/P&gt;&lt;P&gt;  clear i_mkpf.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you may try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and mjahr = i_vbfa_so-erdat(4)and&lt;/P&gt;&lt;P&gt;bldat like spmon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am not sure whether it will work or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Dec 2006 08:35:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-01T08:35:34Z</dc:date>
    <item>
      <title>select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812612#M348255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;We are having requirment in which i've to take partial field data from a field in database table  and use it in where clause with select option.&lt;/P&gt;&lt;P&gt;i am writting the select query :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and   mjahr = i_vbfa_so-erdat(4)&lt;/P&gt;&lt;P&gt;and   bldat+4(2) in so_month&lt;/P&gt;&lt;P&gt;and   bldat in so_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error is coming  : field bldat+4(2) unknown.&lt;/P&gt;&lt;P&gt;I know this won't work but is there a way to do it in some other way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 07:46:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812612#M348255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T07:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812613#M348256</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;It's not possible in select.&lt;/P&gt;&lt;P&gt;Alternative way is&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and mjahr = i_vbfa_so-erdat(4)&lt;/P&gt;&lt;P&gt;and bldat in so_month&lt;/P&gt;&lt;P&gt;and bldat in so_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then delete the unwanted entries from the internal table by comparing bldat+4(2) and so_month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Jayanthi Jayaraman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 07:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812613#M348256</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-12-01T07:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812614#M348257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;since ur prime req is selecting based on month so ...why dont u ...&lt;/P&gt;&lt;P&gt;1. Calculate the start date and end date from the month's parameter selection screen.......create a range and append it ther in low and high.&lt;/P&gt;&lt;P&gt;2.  use this range and replace the code as&lt;/P&gt;&lt;P&gt;and bldat in r_range....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gunjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 07:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812614#M348257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T07:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812615#M348258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;select bldat budat mblnr mjahr
from mkpf
into corresponding fields of table i_mkpf
for all entries in i_vbfa_so
where mblnr = i_vbfa_so-vbelv
and mjahr = i_vbfa_so-erdat(4)
and bldat in so_year.

loop at i_mkpf.
 
   if not i_mkpf+4(2) in so_month.
        delete table i_mkpf index sy-tabix.
   endif.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 07:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812615#M348258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T07:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812616#M348259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first take the first 6 character of your date field suppose &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : spmon(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spmon = sy-datum(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of  i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and mjahr = i_vbfa_so-erdat(4).&lt;/P&gt;&lt;P&gt;if i_mkpf-bldat cs spmon.&lt;/P&gt;&lt;P&gt;   append i_mkpf.&lt;/P&gt;&lt;P&gt;  clear i_mkpf.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you may try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and mjahr = i_vbfa_so-erdat(4)and&lt;/P&gt;&lt;P&gt;bldat like spmon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am not sure whether it will work or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 08:35:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812616#M348259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T08:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812617#M348260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small modification in Chandra's logic. Hope Chandra wouldnt mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select bldat budat mblnr mjahr
from mkpf
into corresponding fields of table i_mkpf
for all entries in i_vbfa_so
where mblnr = i_vbfa_so-vbelv
and mjahr = i_vbfa_so-erdat(4)
and bldat in so_year.
 
*loop at i_mkpf.
 
*   if not i_mkpf+4(2) in so_month.
*        delete table i_mkpf index sy-tabix.
*   endif.
 
*endloop.

delete i_mkpf where not bldat+4(2) in so_month.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 08:41:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812617#M348260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T08:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812618#M348261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and bldat+4(2) instead of writing like this write in the below way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-bldat+4(2), here you have to mention the appropriate internal able name .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 09:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812618#M348261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T09:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812619#M348262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good question.&lt;/P&gt;&lt;P&gt;A select option behaves as an internal table without a headerline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried some coding to meet your requirement.&lt;/P&gt;&lt;P&gt;It's worked fine. U can use s_month in ur select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check it as a test program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_dats type dats,&lt;/P&gt;&lt;P&gt;      month(2) type N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block blk1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options s_date   for l_dats.&lt;/P&gt;&lt;P&gt;select-options s_date1  for l_dats no-extension no-display.   "for internal use&lt;/P&gt;&lt;P&gt;select-options s_month  for month no-display.                     "for internal use&lt;/P&gt;&lt;P&gt;select-options s_month1 for month no-extension no-display. "for internal use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of block blk1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_date into s_date1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_month1-low    = s_date1-low+4(2).&lt;/P&gt;&lt;P&gt;s_month1-high   = s_date1-high+4(2).&lt;/P&gt;&lt;P&gt;s_month1-sign   = s_date1-sign.&lt;/P&gt;&lt;P&gt;s_month1-option = s_date1-option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append s_month1 to s_month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: / s_date1.&lt;/P&gt;&lt;P&gt;write: / s_month1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        JITHENDRA CHADICHAL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 09:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812619#M348262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T09:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812620#M348263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My friend.. what u are trying is very much possible and is easy also ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically if we are searching then we can search by specifying '*' this query works in a similar manner.&lt;/P&gt;&lt;P&gt;For eg search BUKRS with 10* it will list all the company code starting with 10.&lt;/P&gt;&lt;P&gt;A similar query can be written in ABAP also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this query .. .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab    type standard table of bkpf initial size  0,&lt;/P&gt;&lt;P&gt;       date(8) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '%' '03' '%' into date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bkpf into table itab where bukrs = '4000' and BLDAT like date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps... Plz reward points if it does.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 09:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812620#M348263</guid>
      <dc:creator>former_member69765</dc:creator>
      <dc:date>2006-12-01T09:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812621#M348264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the best solution is to combine your selection for so_year and so_month into a range r_date. Use the particular range in your select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can build your range in the below fashion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lmth = so_month-high + 1.&lt;/P&gt;&lt;P&gt;concatenate so_year-high lmth 01 into lastdate.&lt;/P&gt;&lt;P&gt;lastdate = lastdate - 1.&lt;/P&gt;&lt;P&gt;concatenate so_year-low so_month-low 01 into r_date-low.&lt;/P&gt;&lt;P&gt;concatenate so_year-high so_month-high lastdate+6(2) into r_date-high.&lt;/P&gt;&lt;P&gt;r_date-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_date-option = 'BT'.&lt;/P&gt;&lt;P&gt;append r_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bldat budat mblnr mjahr&lt;/P&gt;&lt;P&gt;from mkpf&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_mkpf&lt;/P&gt;&lt;P&gt;for all entries in i_vbfa_so&lt;/P&gt;&lt;P&gt;where mblnr = i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;and mjahr = i_vbfa_so-erdat(4)&lt;/P&gt;&lt;P&gt;and bldat in r_date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2006 10:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812621#M348264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-01T10:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812622#M348265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case select option is mandatory field.&lt;/P&gt;&lt;P&gt;so after using select query. We compared that internal table value with select option using check statement.&lt;/P&gt;&lt;P&gt;this is the code :&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;fkdat a&lt;/SUB&gt;erdat a&lt;SUB&gt;bukrs a&lt;/SUB&gt;waerk a~vbtyp&lt;/P&gt;&lt;P&gt;      b&lt;SUB&gt;vbeln b&lt;/SUB&gt;posnr b&lt;SUB&gt;fklmg b&lt;/SUB&gt;vrkme b&lt;SUB&gt;netwr b&lt;/SUB&gt;matnr b&lt;SUB&gt;bwtar b&lt;/SUB&gt;werks&lt;/P&gt;&lt;P&gt;      INTO TABLE i_vbrk&lt;/P&gt;&lt;P&gt;     FROM vbrk AS a JOIN vbrp AS b&lt;/P&gt;&lt;P&gt;           ON a&lt;SUB&gt;vbeln =  b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN  i_vbfa_so&lt;/P&gt;&lt;P&gt;    WHERE    b~vbeln =  i_vbfa_so-vbelv&lt;/P&gt;&lt;P&gt;    AND       b~posnr =  i_vbfa_so-posnv&lt;/P&gt;&lt;P&gt;    AND       b~werks IN so_plt&lt;/P&gt;&lt;P&gt;    AND      b~matnr IN so_matnr&lt;/P&gt;&lt;P&gt;    AND       b~bwtar  IN so_vltyp&lt;/P&gt;&lt;P&gt;    AND       a~bukrs  IN so_cocod .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_vbrk  INTO wa_vbrk .&lt;/P&gt;&lt;P&gt;      CHECK wa_vbrk-erdat+4(2) IN so_month .&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;        CHECK wa_vbrk-erdat+0(4) IN so_year .&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;          CHECK wa_vbrk-fkdat+4(2) IN so_mon1 .&lt;/P&gt;&lt;P&gt;          IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;            CHECK wa_vbrk-fkdat+0(4) IN so_year1 .&lt;/P&gt;&lt;P&gt;            IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;              APPEND wa_vbrk TO i_vbrk_so.&lt;/P&gt;&lt;P&gt;              CLEAR wa_vbrk.&lt;/P&gt;&lt;P&gt;            ENDIF .&lt;/P&gt;&lt;P&gt;          ENDIF .&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2006 04:54:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query/m-p/1812622#M348265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-13T04:54:09Z</dc:date>
    </item>
  </channel>
</rss>

