‎2006 Sep 12 6:34 PM
hi to all,
help me in this issue,
how to write exclusion range for kunnr in selection statement.
that customers should not appear in output
thanks in advance
kiran kumar
‎2006 Sep 12 6:38 PM
Question is not clear. Where the customer should not appear.
Regards,
Prakash.
‎2006 Sep 12 6:40 PM
Hi Kiran,
Try with this code at AT SELECTION-SCREEN.
DATA S_KUNNR TYPE KNA1-KUNNR.
AT SELECTION-SCREEN.
S_KUNNR-OPTION = 'E'.
MODIFY S_KUNRR.
If you want to exclusion of this customer in SELECT statement then use this code.
SELECT KUNNR
FROM KNA1
INTO IT_KNA1
WHERE KUNNR NOT IN S_KUNNR.
Thanks,
Vinay
‎2006 Sep 12 6:43 PM
Prepare a range table for the customers that should be in the exclusion.
RANGES : r_kunnr FOR kna1-kunnr.
r_kunnr-option = 'E'.
r_kunnr-sign = 'EQ'.
r_kunnr-low = customer number.
append r_kunnr.
select * from kna1 where kunnr in r_kunnr.
This will list all the customers except the one in the range table.
‎2006 Sep 12 6:47 PM
hi this is select statement
SELECT * FROM BSID
INTO CORRESPONDING FIELDS OF TABLE L_BSID
WHERE BUKRS IN S_BUKRS AND
BUDAT LE S_BUDAT AND
KUNNR ne E_KUNNR.(when i pass the customer no in selection screen that customer should not appear in out put of report.)
thanks in advance
kiran kumar
‎2006 Sep 12 6:49 PM
Hi Kiran,
Use NOT clause in SELECT statement to your requirement. NOT will not consider the customers specified in SELECT-OPTION. It will take INVERSE of the list.
Change the code like this.
SELECT * FROM BSID
INTO CORRESPONDING FIELDS OF TABLE L_BSID
WHERE BUKRS IN S_BUKRS AND
BUDAT LE S_BUDAT AND
<b>KUNNR NOT IN E_KUNNR.</b>
<b>Note: Plz reward all helpful answers.</b>
Thanks,
Vinay