<?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: Regarding select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401661#M1240940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to change all parameters to select-options. Only then the select will work. IN case of Parameters, the select will fail if it doesnt find any matching records. SO even if you give date range, the select will find for other parameters and on the whole the select itself will fail. If you make the other parameters as select options, even if no value is found, select will just bypass those conditions and will fetch values corresponding to date range only. Change the parameters to select options, this is the only way to fetch values for date range or ponum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2009 12:36:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-07T12:36:32Z</dc:date>
    <item>
      <title>Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401647#M1240926</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 hav written select as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~ebeln      "PO Number&lt;/P&gt;&lt;P&gt;         a~bsart      "Document type&lt;/P&gt;&lt;P&gt;         a~bsakz      "Control indicator for PO/STO&lt;/P&gt;&lt;P&gt;         a~aedat      "Date Created on&lt;/P&gt;&lt;P&gt;         a~ekorg      "Purchase Organisation&lt;/P&gt;&lt;P&gt;         a~lifnr      "Supplier&lt;/P&gt;&lt;P&gt;         a~reswk      "Supplying site&lt;/P&gt;&lt;P&gt;         b~ebelp     "PO item Number&lt;/P&gt;&lt;P&gt;         b~matnr     "Article Number&lt;/P&gt;&lt;P&gt;         b~werks     "Receiving site&lt;/P&gt;&lt;P&gt;         b~menge     "PO Quantity&lt;/P&gt;&lt;P&gt;         c~mtart      "Article Type&lt;/P&gt;&lt;P&gt;         c~matkl      "Merchandise Category&lt;/P&gt;&lt;P&gt;         c~zeiar      "Department&lt;/P&gt;&lt;P&gt;         c~zeifo      "Sub Brand&lt;/P&gt;&lt;P&gt;         c~labor      "Gender&lt;/P&gt;&lt;P&gt;         c~saiso      "Season Category&lt;/P&gt;&lt;P&gt;    FROM ( ( ekko AS a INNER JOIN ekpo AS b ON a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln )&lt;/P&gt;&lt;P&gt;           INNER JOIN mara AS c ON b&lt;SUB&gt;matnr = c&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;    INTO TABLE it_ekko&lt;/P&gt;&lt;P&gt;    WHERE a~aedat IN s_date&lt;/P&gt;&lt;P&gt;       AND a~ebeln = p_ponum&lt;/P&gt;&lt;P&gt;      AND ( a&lt;SUB&gt;bsart EQ 'NB' OR a&lt;/SUB&gt;bsart EQ 'UDS')&lt;/P&gt;&lt;P&gt;     AND ( a&lt;SUB&gt;bsakz EQ ' ' OR a&lt;/SUB&gt;bsakz EQ 'T' )&lt;/P&gt;&lt;P&gt;      OR a~ekorg EQ p_purorg&lt;/P&gt;&lt;P&gt;      OR a~reswk EQ p_spsite&lt;/P&gt;&lt;P&gt;     AND a~lifnr EQ p_vendor&lt;/P&gt;&lt;P&gt;     AND b~werks EQ p_resite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the issue is if i give date it should bring all the purchase orders in that date range....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i give both po and date it should give that particular record............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if i give onli date it is giving no records..........thogh there are records........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401647#M1240926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401648#M1240927</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;Please change the following in where condition of SQL statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a~ebeln = p_ponum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ranges: ra_ponum for p_ponum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ra_ponum-low = p_ponum.&lt;/P&gt;&lt;P&gt;ra_ponum-sign = 'I'.&lt;/P&gt;&lt;P&gt;ra_ponum-option = 'EQ'.&lt;/P&gt;&lt;P&gt;append ra_ponum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change this to a~ebeln in ra_ponum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401648#M1240927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401649#M1240928</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;in this case, u should write three selects or make date &amp;amp; PO are mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if NOT &lt;STRONG&gt;ekko-ebeln&lt;/STRONG&gt; is initial AND not &lt;STRONG&gt;ekko-date&lt;/STRONG&gt; is initial.&lt;/P&gt;&lt;P&gt;  select as u wrote.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif &lt;STRONG&gt;ekko-ebeln&lt;/STRONG&gt; is not initial.&lt;/P&gt;&lt;P&gt;   select......................&lt;/P&gt;&lt;P&gt;   ..............................&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;remove date = ekko-date condition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;elseif &lt;STRONG&gt;ekko-date&lt;/STRONG&gt; is not initial.&lt;/P&gt;&lt;P&gt;   select......................&lt;/P&gt;&lt;P&gt;   ..............................&lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;remove ebeln = ekko-ebeln condition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401649#M1240928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401650#M1240929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use select-options instead of parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lalit Mohan Gupta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:13:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401650#M1240929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401651#M1240930</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;First be shure that the criteria you specify in your select statement should give a result. So you need to read sy-subrc (= return value after abap statements). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc = 0 records are found, &lt;/P&gt;&lt;P&gt;sy-subrc = 4 no records are found &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When it's 0 there are records found and somehow not displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When 4, you need to adjust the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guido Koopmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401651#M1240930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401652#M1240931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;date is mandatory and po is not mandatory.........but if i give date or date range it should give the pos in between that range&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401652#M1240931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401653#M1240932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; date is mandatory and po is not mandatory.........but if i give date or date range it should give the pos in between that range&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No it wont. Because when you DONOT input any &lt;STRONG&gt;p_ponum&lt;/STRONG&gt; the compiler tries to search the Database for PO's where &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;a~ebeln = p_ponum "which is blank&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not find any entry &amp;amp; returns you no value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401653#M1240932</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-04-07T12:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401654#M1240933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then what might be my select statement???????????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:22:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401654#M1240933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401655#M1240934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then what might be my select statement............if date range is given all pos in that range should be displayed where as if they give date and po no then that po details onli shuld be displayed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:25:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401655#M1240934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401656#M1240935</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;Try code written below for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: R_EBELN TYPE EKKO-EBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF S_EBELN IS INITIAL.&lt;/P&gt;&lt;P&gt;      SELECT EBELN &lt;/P&gt;&lt;P&gt;      FROM EKKO&lt;/P&gt;&lt;P&gt;      INTO TABLE I_EBELN&lt;/P&gt;&lt;P&gt;      WHERE  AEDAT IN S_AEDAT   &lt;/P&gt;&lt;P&gt;     IF SY-SUBRC EQ 0. &lt;/P&gt;&lt;P&gt;        SORT I_EBELN BY EBELN.                                       &lt;/P&gt;&lt;P&gt;          DELETE ADJACENT DUPLICATES FROM I_EBELN COMPARING EBELN.     &lt;/P&gt;&lt;P&gt;          LOOP AT I_EBELN. INTO.        &lt;/P&gt;&lt;P&gt;             R_EBELN-SIGN    = 'I'.                                  &lt;/P&gt;&lt;P&gt;             R_EBELN-OPTION  = 'EQ'.                                   &lt;/P&gt;&lt;P&gt;             R_EBELN-LOW     = I_EBELN-EBELN.                         &lt;/P&gt;&lt;P&gt;             APPEND R_EBELN&lt;/P&gt;&lt;P&gt;          ENDLOOP.                                                    &lt;/P&gt;&lt;P&gt;    ENDIF.                                                        &lt;/P&gt;&lt;P&gt;ELSE.                                                           &lt;/P&gt;&lt;P&gt;    R_EBELN[] = S_EBELN[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;AND WHILE SELECTING THE DATA FROM TABLE USE R_EBELN INSTEAD OF S_EBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS WILL SOLVE YOUR PROBLEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Deepa Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:26:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401656#M1240935</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401657#M1240936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ebeln is not selet-option it is parameter where as date is select option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: NEED  HELP on Apr 7, 2009 5:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401657#M1240936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401658#M1240937</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;SELECT a~ebeln "PO Number&lt;/P&gt;&lt;P&gt;a~bsart "Document type&lt;/P&gt;&lt;P&gt;a~bsakz "Control indicator for PO/STO&lt;/P&gt;&lt;P&gt;a~aedat "Date Created on&lt;/P&gt;&lt;P&gt;a~ekorg "Purchase Organisation&lt;/P&gt;&lt;P&gt;a~lifnr "Supplier&lt;/P&gt;&lt;P&gt;a~reswk "Supplying site&lt;/P&gt;&lt;P&gt;b~ebelp "PO item Number&lt;/P&gt;&lt;P&gt;b~matnr "Article Number&lt;/P&gt;&lt;P&gt;b~werks "Receiving site&lt;/P&gt;&lt;P&gt;b~menge "PO Quantity&lt;/P&gt;&lt;P&gt;c~mtart "Article Type&lt;/P&gt;&lt;P&gt;c~matkl "Merchandise Category&lt;/P&gt;&lt;P&gt;c~zeiar "Department&lt;/P&gt;&lt;P&gt;c~zeifo "Sub Brand&lt;/P&gt;&lt;P&gt;c~labor "Gender&lt;/P&gt;&lt;P&gt;c~saiso "Season Category&lt;/P&gt;&lt;P&gt;FROM ( ( ekko AS a INNER JOIN ekpo AS b ON a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln )&lt;/P&gt;&lt;P&gt;INNER JOIN mara AS c ON b&lt;SUB&gt;matnr = c&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;INTO TABLE it_ekko&lt;/P&gt;&lt;P&gt;WHERE a~aedat IN s_date&lt;/P&gt;&lt;P&gt;AND a~ebeln = p_ponum&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;bsart EQ 'NB' OR a&lt;/SUB&gt;bsart EQ 'UDS')&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;bsakz EQ ' ' OR a&lt;/SUB&gt;bsakz EQ 'T' )&lt;/P&gt;&lt;P&gt;OR a~ekorg EQ p_purorg&lt;/P&gt;&lt;P&gt;OR a~reswk EQ p_spsite&lt;/P&gt;&lt;P&gt;AND a~lifnr EQ p_vendor&lt;/P&gt;&lt;P&gt;AND b~werks EQ p_resite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will suggest avoid too many tables in inner join. you can use inner join with in header and item table . and then select from mara by using for all entries.&lt;/P&gt;&lt;P&gt;In select query if you use parameter with blank values, it won't gives any output. Either you can use select option with no interval for multiple value and with both no interval and no extension for single value.&lt;/P&gt;&lt;P&gt;Also you can use ranges instead of giving values directly to the select queries. &lt;/P&gt;&lt;P&gt;Let's try with this method. Hope you will solve your problem.&lt;/P&gt;&lt;P&gt;Feel free to ask if you have any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401658#M1240937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401659#M1240938</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;But for the given date range, there might be multiple orders.&lt;/P&gt;&lt;P&gt;how will you take that as parameters. &lt;/P&gt;&lt;P&gt;better make it select-options only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepa Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:30:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401659#M1240938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401660#M1240939</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 can use the solution which i have suggested. It will surely work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still if it doesn't work, then, there are someother things in where condition which you have declared as EQ. Change all the parameters to select options and declare as IN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, use ranges for the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401660#M1240939</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401661#M1240940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to change all parameters to select-options. Only then the select will work. IN case of Parameters, the select will fail if it doesnt find any matching records. SO even if you give date range, the select will find for other parameters and on the whole the select itself will fail. If you make the other parameters as select options, even if no value is found, select will just bypass those conditions and will fetch values corresponding to date range only. Change the parameters to select options, this is the only way to fetch values for date range or ponum.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 12:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401661#M1240940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T12:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401662#M1240941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to code it like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &lt;STRONG&gt;NOT p_ponum&lt;/STRONG&gt; is initial .&lt;/P&gt;&lt;P&gt;SELECT a~ebeln "PO Number&lt;/P&gt;&lt;P&gt;a~bsart "Document type&lt;/P&gt;&lt;P&gt;a~bsakz "Control indicator for PO/STO&lt;/P&gt;&lt;P&gt;a~aedat "Date Created on&lt;/P&gt;&lt;P&gt;a~ekorg "Purchase Organisation&lt;/P&gt;&lt;P&gt;a~lifnr "Supplier&lt;/P&gt;&lt;P&gt;a~reswk "Supplying site&lt;/P&gt;&lt;P&gt;b~ebelp "PO item Number&lt;/P&gt;&lt;P&gt;b~matnr "Article Number&lt;/P&gt;&lt;P&gt;b~werks "Receiving site&lt;/P&gt;&lt;P&gt;b~menge "PO Quantity&lt;/P&gt;&lt;P&gt;c~mtart "Article Type&lt;/P&gt;&lt;P&gt;c~matkl "Merchandise Category&lt;/P&gt;&lt;P&gt;c~zeiar "Department&lt;/P&gt;&lt;P&gt;c~zeifo "Sub Brand&lt;/P&gt;&lt;P&gt;c~labor "Gender&lt;/P&gt;&lt;P&gt;c~saiso "Season Category&lt;/P&gt;&lt;P&gt;FROM ( ( ekko AS a INNER JOIN ekpo AS b ON a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln )&lt;/P&gt;&lt;P&gt;INNER JOIN mara AS c ON b&lt;SUB&gt;matnr = c&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;INTO TABLE it_ekko&lt;/P&gt;&lt;P&gt;WHERE a~aedat IN s_date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND a~ebeln = p_ponum&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;bsart EQ 'NB' OR a&lt;/SUB&gt;bsart EQ 'UDS')&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;bsakz EQ ' ' OR a&lt;/SUB&gt;bsakz EQ 'T' )&lt;/P&gt;&lt;P&gt;OR a~ekorg EQ p_purorg&lt;/P&gt;&lt;P&gt;OR a~reswk EQ p_spsite&lt;/P&gt;&lt;P&gt;AND a~lifnr EQ p_vendor&lt;/P&gt;&lt;P&gt;AND b~werks EQ p_resite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;elseif p_ponum IS INITIAL&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;SELECT a~ebeln "PO Number&lt;/P&gt;&lt;P&gt;a~bsart "Document type&lt;/P&gt;&lt;P&gt;a~bsakz "Control indicator for PO/STO&lt;/P&gt;&lt;P&gt;a~aedat "Date Created on&lt;/P&gt;&lt;P&gt;a~ekorg "Purchase Organisation&lt;/P&gt;&lt;P&gt;a~lifnr "Supplier&lt;/P&gt;&lt;P&gt;a~reswk "Supplying site&lt;/P&gt;&lt;P&gt;b~ebelp "PO item Number&lt;/P&gt;&lt;P&gt;b~matnr "Article Number&lt;/P&gt;&lt;P&gt;b~werks "Receiving site&lt;/P&gt;&lt;P&gt;b~menge "PO Quantity&lt;/P&gt;&lt;P&gt;c~mtart "Article Type&lt;/P&gt;&lt;P&gt;c~matkl "Merchandise Category&lt;/P&gt;&lt;P&gt;c~zeiar "Department&lt;/P&gt;&lt;P&gt;c~zeifo "Sub Brand&lt;/P&gt;&lt;P&gt;c~labor "Gender&lt;/P&gt;&lt;P&gt;c~saiso "Season Category&lt;/P&gt;&lt;P&gt;FROM ( ( ekko AS a INNER JOIN ekpo AS b ON a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln )&lt;/P&gt;&lt;P&gt;INNER JOIN mara AS c ON b&lt;SUB&gt;matnr = c&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;INTO TABLE it_ekko&lt;/P&gt;&lt;P&gt;WHERE a~aedat IN s_date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND a~ebeln = p_ponum&lt;/STRONG&gt;                               &lt;STRONG&gt;(Remove this in where condition)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;bsart EQ 'NB' OR a&lt;/SUB&gt;bsart EQ 'UDS')&lt;/P&gt;&lt;P&gt;AND ( a&lt;SUB&gt;bsakz EQ ' ' OR a&lt;/SUB&gt;bsakz EQ 'T' )&lt;/P&gt;&lt;P&gt;OR a~ekorg EQ p_purorg&lt;/P&gt;&lt;P&gt;OR a~reswk EQ p_spsite&lt;/P&gt;&lt;P&gt;AND a~lifnr EQ p_vendor&lt;/P&gt;&lt;P&gt;AND b~werks EQ p_resite.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, if PO is not initial it will select only that particular PO in the given date range.&lt;/P&gt;&lt;P&gt;        if PO is initial it will select all the PO's in the given date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 13:16:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/5401662#M1240941</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T13:16:46Z</dc:date>
    </item>
  </channel>
</rss>

