2007 Jun 14 11:01 AM
I have:
select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR
from BSEG
into corresponding fields of itab
where HKONT in ZCOUNT
and BELNR EQ '0003000020'
or BELNR EQ '0003000025'.
append itab.
endselect.
where ZCOUNT is an select parameter:
5200000000 a 5299999999
5700000000 a 5799999999
1700000000 a 1709999999
But he select doesn't work. It selects all the HKONT!!!
any idea? thanks a lot!
2007 Jun 14 11:03 AM
HI,
for parameters u have to use EQ
for select-options u have to use IN.
if parameters is empty it will get all the values.
select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR
from BSEG
into corresponding fields of itab
where HKONT EQ ZCOUNT
and BELNR EQ '0003000020'
or BELNR EQ '0003000025'.
append itab.
endselect.
rgds,
bharat.
I have:
select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR
from BSEG
into corresponding fields of itab
where HKONT in ZCOUNT
and BELNR EQ '0003000020'
or BELNR EQ '0003000025'.
append itab.
endselect.
where ZCOUNT is an select parameter:
5200000000 a 5299999999
5700000000 a 5799999999
1700000000 a 1709999999
But he select doesn't work. It selects all the HKONT!!!
any idea? thanks a lot!
2007 Jun 14 11:03 AM
HI,
for parameters u have to use EQ
for select-options u have to use IN.
if parameters is empty it will get all the values.
select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR
from BSEG
into corresponding fields of itab
where HKONT EQ ZCOUNT
and BELNR EQ '0003000020'
or BELNR EQ '0003000025'.
append itab.
endselect.
rgds,
bharat.
2007 Jun 14 11:04 AM
2007 Jun 14 11:05 AM
Hi
define the int tables fields in the order of BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR sequence then write
select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR from BSEG
into table itab
where HKONT in ZCOUNT
and ( BELNR EQ '0003000020'
or BELNR EQ '0003000025' ).
( Zcount = Select-options)
se now.
Reward points for useful Answers
Regards
Anji
2007 Jun 14 11:12 AM
Hi,
I think that if you make ZCOUNT as a range table using RANGES keyword then it might work.
Hope it is useful.
Thanks,
Sandeep.