‎2006 Jul 19 6:45 AM
Guys,
with the following select statement data is not coming correctly.pleae help on this.
select werks lifnr from t001w into table int_t001w where
werks in s_werks and
werks in s_werks1.
regards,
vijay
‎2006 Jul 19 6:46 AM
select werks lifnr from t001w into table int_t001w where
werks in s_werks <b>or</b>
werks in s_werks1.
‎2006 Jul 19 6:46 AM
select werks lifnr from t001w into table int_t001w where
werks in s_werks <b>or</b>
werks in s_werks1.
‎2006 Jul 19 6:48 AM
hi
we use IN in the where clause when we deal with select options in reporting.
otherwise, to correct ur statement use '=' operator in where clause.
Reward points if helpful.
Naveen
‎2006 Jul 19 6:48 AM
Or you can simply do away with one select-options
append lines of s_werks1 to s_werks.
select werks lifnr from t001w into table int_t001w where
werks in s_werks.
Regards,
Ravi
Note : Please mark all the helpful answers
‎2006 Jul 19 6:49 AM
Hi vijay,
Explain your requirement then we can come out with exact select statement.
Azaz Ali.
‎2006 Jul 19 6:49 AM
Hi Vijay
select werks lifnr from t001w into table int_t001w where
werks in s_werks and
werks in s_werks1.
collect int_t001w.
You have to use collect statement.
Regards
Abhishek
‎2006 Jul 19 6:49 AM
‎2006 Jul 19 6:49 AM
Hi Vijay,
your Problum is :
select werks lifnr from t001w into table int_t001w where
werks in s_werks and
werks in s_werks1.
append lines of s_werks1 to s_werks.
you can use collect statement through it you can add all the int. values.
Regards.
Ankur garg.
Message was edited by: Ankur Garg
‎2006 Jul 19 6:50 AM
Hi Vijay,
I have made a slight change to your select statement.
Please find it below.
select werks lifnr from t001w
into table int_t001w
where werks in s_werks
<b> or </b> werks in s_werks1.
Hope it solves your problem.
Regards,
Anirban.
‎2006 Jul 19 6:53 AM
Hi,
Combine both the select options and pass that only in where clause.
append lines of s_werks1 to s_werks.
select werks
lifnr
from t001w
into table int_t001w
where werks in s_werks.Regards
vijay
‎2006 Jul 19 6:56 AM
Hi
use the below code..
APPEND LINES OF s_werks1 TO s_werks.
select werks lifnr from t001w into table int_t001w where
werks in s_werks.
Cheers,
Abdul Hakim
‎2006 Jul 19 7:00 AM
Hi Vijay,
I assume that your using <b>s_werks</b> and <b>s_werks1</b> to input multiple values and ranges for werks.
This can be done using a single <b>select-option</b>.
Consider this code.
REPORT zztest.
TABLES : t001w.
DATA : int_t001w TYPE STANDARD TABLE OF t001w WITH HEADER LINE.
SELECT-OPTIONS : s_werks FOR t001w-werks.
INITIALIZATION.
<b>*Values in Ranges</b>
s_werks-sign = 'I'.
s_werks-option = 'BT'.
s_werks-low = '1000'.
s_werks-high = '2000'.
APPEND s_werks.
CLEAR s_werks.
<b>*Values in Ranges</b>
s_werks-sign = 'I'.
s_werks-option = 'BT'.
s_werks-low = '4000'.
s_werks-high = '5000'.
APPEND s_werks.
CLEAR s_werks.
<b>*Single Value</b>
s_werks-sign = 'I'.
s_werks-option = 'EQ'.
s_werks-low = '2200'.
APPEND s_werks.
CLEAR s_werks.
START-OF-SELECTION.
SELECT werks lifnr FROM t001w INTO TABLE int_t001w WHERE
<b>werks IN s_werks</b>.
Regarding you code,
Instead of <b>AND</b> put a <b>OR</b> condition
SELECT werks lifnr FROM t001w INTO TABLE int_t001w WHERE
werks IN s_werks <b>OR</b>
werks IN s_werks1.
Regards,
Arun Sambargi.
‎2006 Jul 19 7:46 AM