Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FIELD IN SELECT PARAMETERS

Former Member
0 Likes
589

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!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
566

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!

4 REPLIES 4
Read only

Former Member
0 Likes
567

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.

Read only

Former Member
0 Likes
566

yes, you didnt fill the field sign in your ranges table.

Read only

Former Member
0 Likes
566

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

Read only

Former Member
0 Likes
566

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.