<?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: Issue with Select options in select statement - ABAP Question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-select-options-in-select-statement-abap-question/m-p/8302746#M1635791</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;The problem here with where condition select option lifnr = s_lifnr.&lt;/P&gt;&lt;P&gt;Use below select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM bsak INTO TABLE lt_bsak
WHERE bukrs IN s_bukrs 
    AND lifnr     IN s_lifnr 
    AND gjahr   IN s_gjahr 
    AND budat  IN s_budat 
    AND saknr  IN s_saknr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.&lt;/P&gt;&lt;P&gt;if you want to pass this s_lifnr as single vale then pass in below mentioned way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lifnr = s_lifnr-low&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Dec 2011 07:53:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-12-03T07:53:16Z</dc:date>
    <item>
      <title>Issue with Select options in select statement - ABAP Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-select-options-in-select-statement-abap-question/m-p/8302745#M1635790</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 facing an issue with select options. Select statement is returning sy-subrc as 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote the program as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;s_kunnr FOR bsad-kunnr,&lt;/P&gt;&lt;P&gt;s_lifnr FOR bsak-lifnr,&lt;/P&gt;&lt;P&gt;s_gjahr FOR bsad-gjahr,&lt;/P&gt;&lt;P&gt;s_bukrs FOR bsad-bukrs,&lt;/P&gt;&lt;P&gt;s_saknr FOR bsad-saknr,&lt;/P&gt;&lt;P&gt;s_budat FOR bsak-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In start of selection I have written the select statement as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM bsak INTO TABLE lt_bsak&lt;/P&gt;&lt;P&gt;WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If am removing the "lifnr = s_lifnr " condition in select then select is returning values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting where I made the mistake. Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Hanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Dec 2011 07:18:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-select-options-in-select-statement-abap-question/m-p/8302745#M1635790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-03T07:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Select options in select statement - ABAP Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-select-options-in-select-statement-abap-question/m-p/8302746#M1635791</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;The problem here with where condition select option lifnr = s_lifnr.&lt;/P&gt;&lt;P&gt;Use below select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM bsak INTO TABLE lt_bsak
WHERE bukrs IN s_bukrs 
    AND lifnr     IN s_lifnr 
    AND gjahr   IN s_gjahr 
    AND budat  IN s_budat 
    AND saknr  IN s_saknr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.&lt;/P&gt;&lt;P&gt;if you want to pass this s_lifnr as single vale then pass in below mentioned way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lifnr = s_lifnr-low&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Dec 2011 07:53:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-select-options-in-select-statement-abap-question/m-p/8302746#M1635791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-03T07:53:16Z</dc:date>
    </item>
  </channel>
</rss>

