09-15-2016 4:47 PM
Hi,
i want the condition like this If S_CUST is initial and S_VEND is intial...i want satisfy both in single if condition.i mean what is exact statement
for example if i am giving value in selection scree for Customer it should go to my ELSE select statement for vendor also same.
09-15-2016 5:01 PM
Hi.
I suppose your S_CUST and S_VEND are select-options.
In that case
IF S_CUST[] IS INITIAL AND S_VEND[] IS INITIAL.
"Do code with empty input for Customer AND for Vendor
ELSE.
" If you're giving value in selection screen for Customer OR for Vendor
ENDIF.
Hope to help
Bye
09-15-2016 5:14 PM
HI Roberto,
Thank for Your Reply,can i write like this in my select statement where condition
select * from ztable into it
wher bukrs = ist_bseg-bukrs
and kunnr IN (s_cust , s_vend).
Regards,
Ramu
09-15-2016 5:27 PM
No of course
You should merge them in a big range
DATA: R_KUNNR TYPE RANGE OF KNA1-KUNNR.
LOOP AT S_KUNNR
APPEND S_KUNNR TO R_KUNNR.
ENDLOOP.
LOOP AT S_LIFNR
APPEND S_LIFNR TO R_KUNNR.
ENDLOOP.
SELECT * FROM ZTABLE WHERE KUNNR IN R_KUNNR
............................................
but you have to check those two select-options are not in conflict
Max
09-15-2016 8:09 PM
09-15-2016 10:22 PM
Ramu,
You can use them directly in your select statement! However, you need to write like this:
select * from ztable into it
where bukrs = ist_bseg-bukrs
and (kunnr IN s_cust
or kunnr IN s_vend).
Also make sure that your ranges are not empty, otherwise all the data from you ztable will be retrieved.