<?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: Why this simple SELECT is NOT working?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132743#M988262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - So, this is the case with all PARAMETERS, I mean, when we use them in SELECTs, Do we need to convert to RANGES?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 - or Is it specific some fileds, some data types? bcoz, in some of my or´ther prog., it was worked, like for BUKRS, doc type etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2008 22:23:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-25T22:23:58Z</dc:date>
    <item>
      <title>Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132741#M988260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I input the P_VKORG the following SELECT is working.&lt;/P&gt;&lt;P&gt;When I did not inut(leaving blank) the P_VKORG the same SELECT is NOT working??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u tell me, Why this simple SELECT is NOT working??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS:     p_vkorg TYPE mvke-vkorg.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_prodh FOR mvke-prodh,&lt;/P&gt;&lt;P&gt;                s_mvgr2 FOR mvke-mvgr2,&lt;/P&gt;&lt;P&gt;                s_matnr FOR mvke-matnr.&lt;/P&gt;&lt;P&gt;PARAMETERS:     p_werks TYPE mard-werks.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_lgort FOR mard-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT&lt;/P&gt;&lt;P&gt;         v&lt;SUB&gt;matnr v&lt;/SUB&gt;vkorg v&lt;SUB&gt;vtweg v&lt;/SUB&gt;vmsta&lt;/P&gt;&lt;P&gt;         d&lt;SUB&gt;labst d&lt;/SUB&gt;insme d~speme&lt;/P&gt;&lt;P&gt;            INTO CORRESPONDING FIELDS OF TABLE it_itab&lt;/P&gt;&lt;P&gt;               FROM mvke AS v&lt;/P&gt;&lt;P&gt;                  INNER JOIN mard AS d ON d&lt;SUB&gt;matnr = v&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;                     WHERE v~matnr IN s_matnr   AND&lt;/P&gt;&lt;P&gt;                            v~vkorg EQ p_vkorg  AND&lt;/P&gt;&lt;P&gt;                            v~vmsta = '33'      AND&lt;/P&gt;&lt;P&gt;                            v~vmstd GE sy-datum AND&lt;/P&gt;&lt;P&gt;                            v~prodh IN s_prodh  AND&lt;/P&gt;&lt;P&gt;                            v~mvgr2 IN s_mvgr2  AND&lt;/P&gt;&lt;P&gt;                            d~werks = p_werks   AND&lt;/P&gt;&lt;P&gt;                            d~lgort IN s_lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried also with,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT&lt;/P&gt;&lt;P&gt;         v&lt;SUB&gt;matnr v&lt;/SUB&gt;vkorg v&lt;SUB&gt;vtweg v&lt;/SUB&gt;vmsta&lt;/P&gt;&lt;P&gt;         d&lt;SUB&gt;labst d&lt;/SUB&gt;insme d~speme&lt;/P&gt;&lt;P&gt;            INTO CORRESPONDING FIELDS OF TABLE it_itab&lt;/P&gt;&lt;P&gt;               FROM mvke AS v&lt;/P&gt;&lt;P&gt;                  INNER JOIN mard AS d ON d&lt;SUB&gt;matnr = v&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;                     WHERE v~matnr IN s_matnr   AND&lt;/P&gt;&lt;P&gt;                            v~vkorg = p_vkorg  AND&lt;/P&gt;&lt;P&gt;                            v~vmsta = '33'      AND&lt;/P&gt;&lt;P&gt;                            v~vmstd GE sy-datum AND&lt;/P&gt;&lt;P&gt;                            v~prodh IN s_prodh  AND&lt;/P&gt;&lt;P&gt;                            v~mvgr2 IN s_mvgr2  AND&lt;/P&gt;&lt;P&gt;                            d~werks = p_werks   AND&lt;/P&gt;&lt;P&gt;                            d~lgort IN s_lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:15:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132741#M988260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132742#M988261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;COnvert p_vkorg to a range:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_vkorg for mvke-vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_vkorg is not initial.&lt;/P&gt;&lt;P&gt;r_vkorg-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_vkorg-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_vkorg-low = p_vkorg.&lt;/P&gt;&lt;P&gt;append r_vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN the select query enter :&lt;/P&gt;&lt;P&gt;v~vkorg IN r_vkorg ............&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;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132742#M988261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132743#M988262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - So, this is the case with all PARAMETERS, I mean, when we use them in SELECTs, Do we need to convert to RANGES?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 - or Is it specific some fileds, some data types? bcoz, in some of my or´ther prog., it was worked, like for BUKRS, doc type etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:23:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132743#M988262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132744#M988263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be there is not a record in the table MVKE with VKORG empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to use SELECT-OPTIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS: s_vkorg FOR MVKE-VKORG.

SELECT
v~matnr v~vkorg v~vtweg v~vmsta
d~labst d~insme d~speme
INTO CORRESPONDING FIELDS OF TABLE it_itab
FROM mvke AS v
INNER JOIN mard AS d ON d~matnr = v~matnr
WHERE v~matnr IN s_matnr AND
v~vkorg IN s_vkorg AND  "change here
v~vmsta = '33' AND
v~vmstd GE sy-datum AND
v~prodh IN s_prodh AND
v~mvgr2 IN s_mvgr2 AND
d~werks = p_werks AND
d~lgort IN s_lgort.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:24:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132744#M988263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132745#M988264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srinivas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your SELECT does not work because you left parameter P_VKORG blank. I suppose there are no records that meet your selection criteria ( MVKE-VKORG = blank).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you to change P_VKORG, from PARAMETER to SELECT OPTIONS, and use P_VKORG the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_prodh FOR mvke-prodh,&lt;/P&gt;&lt;P&gt;s_mvgr2 FOR mvke-mvgr2,&lt;/P&gt;&lt;P&gt;s_matnr FOR mvke-matnr,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;S_VKORG FOR mvke-vkorg.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_werks TYPE mard-werks.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_lgort FOR mard-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;v&lt;SUB&gt;matnr v&lt;/SUB&gt;vkorg v&lt;SUB&gt;vtweg v&lt;/SUB&gt;vmsta&lt;/P&gt;&lt;P&gt;d&lt;SUB&gt;labst d&lt;/SUB&gt;insme d~speme&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_itab&lt;/P&gt;&lt;P&gt;FROM mvke AS v&lt;/P&gt;&lt;P&gt;INNER JOIN mard AS d ON d&lt;SUB&gt;matnr = v&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;WHERE v~matnr IN s_matnr AND&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;v~vkorg IN s_vkorg AND&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;v~vmsta = '33' AND&lt;/P&gt;&lt;P&gt;v~vmstd GE sy-datum AND&lt;/P&gt;&lt;P&gt;v~prodh IN s_prodh AND&lt;/P&gt;&lt;P&gt;v~mvgr2 IN s_mvgr2 AND&lt;/P&gt;&lt;P&gt;d~werks = p_werks AND&lt;/P&gt;&lt;P&gt;d~lgort IN s_lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you do not need to worry if parameter is left blank or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafael Rojas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:27:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132745#M988264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132746#M988265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my impression is that, If we leave as blank any thing in the selection criteria of the selection screen, i thought that, SAP wuld treate as ALL VKORGs ( all Sales Orgs), bcoz I did not INPUT any thing, so, it is just wide open!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:35:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132746#M988265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132747#M988266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my impression is that, If we leave as blank any thing in the selection criteria of the selection screen, i thought that, SAP wuld treate as ALL VKORGs ( all Sales Orgs), bcoz I did not INPUT any thing, so, it is just wide open!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 22:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132747#M988266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T22:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why this simple SELECT is NOT working??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132748#M988267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your assumption is right only for select options not parameters , if parameter is left blank it consider it as a vlaue ' '.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 00:55:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/why-this-simple-select-is-not-working/m-p/4132748#M988267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T00:55:23Z</dc:date>
    </item>
  </channel>
</rss>

