<?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 write Select statement for this codition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965368#M68428</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;Just try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;concatenate '&lt;STRONG&gt;' belnr '&lt;/STRONG&gt;' into temp.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;from BSAD&lt;/P&gt;&lt;P&gt;where SGTXT like temp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Oct 2005 12:50:26 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2005-10-03T12:50:26Z</dc:date>
    <item>
      <title>How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965355#M68415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to check whether SGTXT contains BELNR value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SGTXT is a text field and It should be matched with BELNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to write select statement for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;from BSAD&lt;/P&gt;&lt;P&gt;where SGTXT should have the given BELNR Value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz note : Here I cannot give as SGTXT = BELNR as coz BELNR have only 10 digits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965355#M68415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965356#M68416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to use CS (Contains operator). If you know that BELNR is going to be the starting or ending of the field SGTXT, then you can use a wild card like %BELNR, BELNR%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please reward points if you think this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965356#M68416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965357#M68417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sumi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can pass the value of Belnr to a variable of same length of SGTXT using &amp;lt;b&amp;gt;MOVE&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: W_BELNR like BSAD-SGTXT.&lt;/P&gt;&lt;P&gt;      MOVE BELNR to W_BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;from BSAD&lt;/P&gt;&lt;P&gt;where SGTXT = W_BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Baburaj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Give the Reward points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:43:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965357#M68417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965358#M68418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA WA_SGTXT LIKE BSAD-SGTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE BELNR  TO WA_SGTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;from BSAD&lt;/P&gt;&lt;P&gt;where SGTXT eq WA_SGTXT&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965358#M68418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965359#M68419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data t_bsad type bsad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select AUGBL AUGDT into (t_BSAD-AUGBL, t_BSAD-AUGDT)&lt;/P&gt;&lt;P&gt;from BSAD where SGTXT = BSAD~BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Svetlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:49:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965359#M68419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965360#M68420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data w_belnr like bsad-sgtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate 'belnr' '%'  into w_belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from bsad where sgtxt like w_belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: This SQL will be expensive &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965360#M68420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965361#M68421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can't do a comparison in a select statement where both the fields on the left as well as on the right are from the database table. U probably have to go for one of these options...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) compare with sgtxt that is previously determined in the program...this could be like retrieving in a separate internal table and then using 'FOR ALL ENTRIES' on it...like ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select augbl augdt from bsad into table t_bsad &lt;/P&gt;&lt;P&gt;for all entries in t_bsad1&lt;/P&gt;&lt;P&gt;where belnr eq t_bsad1-sgtxt+0(10)...(followed by other conditions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) not recommended but u can try and go for a nested select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;PJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 10:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965361#M68421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T10:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965362#M68422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;  try with this code,i am not sure about this but i think it could be helpful to you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: duplicate_BELNR like BSAD-SGTXT.&lt;/P&gt;&lt;P&gt;WRITE BELNR to duplicate_BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;                   from BSAD&lt;/P&gt;&lt;P&gt;                   where SGTXT = duplicate_BELNR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 11:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965362#M68422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965363#M68423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sumi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can also create the another data type with type 'C' and length 50. Move belnr value into that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in select use that field in where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 11:58:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965363#M68423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T11:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965364#M68424</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;data temp(12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate '%' belnr '%' into temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;from BSAD&lt;/P&gt;&lt;P&gt;where SGTXT like temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If belnr is having multiple values,just create a internal table as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty,&lt;/P&gt;&lt;P&gt;        belnr....&lt;/P&gt;&lt;P&gt;        temp(12),&lt;/P&gt;&lt;P&gt;        end of ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data itab_ type standard table of ty.&lt;/P&gt;&lt;P&gt;data wa type ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;concatenate '%' wa-belnr '%' into wa-temp.&lt;/P&gt;&lt;P&gt;modify itab from wa index sy-tabix transporting temp.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your select statement accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward poits if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 12:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965364#M68424</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-10-03T12:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965365#M68425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Like is not working&lt;/P&gt;&lt;P&gt;2. I cannot use EQ. Coz SGTXT will have chars other than BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BELNR =  123&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SGTXT can be like this &lt;/P&gt;&lt;P&gt;TEST123TEST.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 12:33:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965365#M68425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T12:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965366#M68426</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;retieve all the records into interal table like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT  SGTXT into table t_xxxxx&lt;/P&gt;&lt;P&gt;from BSAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_xxxx&lt;/P&gt;&lt;P&gt;  if t_xxx sgtxt ca belnr&lt;/P&gt;&lt;P&gt;  else&lt;/P&gt;&lt;P&gt;    delete t_xxxx&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 12:43:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965366#M68426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T12:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965367#M68427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then use&lt;/P&gt;&lt;P&gt;CS (Contains String)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'ABCDE' CS 'CD' is true; SY-FDPOS = 2. &lt;/P&gt;&lt;P&gt;'ABCDE' CS 'XY' is false; SY-FDPOS = 5. &lt;/P&gt;&lt;P&gt;'ABC DEF' CS ' ' is true; but: SY-FDPOS = 0, &lt;/P&gt;&lt;P&gt;since ' ' is interpreted as a trailing blank and is thus &lt;/P&gt;&lt;P&gt;ignored.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 12:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965367#M68427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T12:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965368#M68428</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;Just try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;concatenate '&lt;STRONG&gt;' belnr '&lt;/STRONG&gt;' into temp.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Select AUGBL AUGDT into t_BSAD&lt;/P&gt;&lt;P&gt;from BSAD&lt;/P&gt;&lt;P&gt;where SGTXT like temp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 12:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965368#M68428</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-10-03T12:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Select statement for this codition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965369#M68429</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;You should create a string with tha value you want to check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA SGTXT TYPE BSAD-SGTXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: '%'   TO SGTXT(1),&lt;/P&gt;&lt;P&gt;       BELNR TO SGTXT+1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEN = STRLEN( SGTXT ).&lt;/P&gt;&lt;P&gt;WRITE: '%'   TO SGTXT+LEN(1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM BSAD WHERE SGTXT LIKE SGTXT&lt;/P&gt;&lt;P&gt; .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I hope this isn't only condition you'd check, because it can take many time, it should be better you use the compnay code and vendor code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2005 14:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-write-select-statement-for-this-codition/m-p/965369#M68429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-03T14:04:06Z</dc:date>
    </item>
  </channel>
</rss>

