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

select-optins doubt

Former Member
0 Likes
1,010

Dear All,

can you please clarify this.

select-option : s_matnr for mara-matnr default '500' no-display.

data i_mara like mara occurs 0 with header line.

select * from mara into table i_mara where matnr in s_matnr.

now what data is being selected ??

1) Only matnr number 500 ?? or

2) material number 500 and more ??

Thank you.

Regards

madhu

Edited by: Alvaro Tejada Galindo on Apr 16, 2008 12:51 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
989

hi ,

ti will picks only one value 500 only...

regards,

venkat

9 REPLIES 9
Read only

Former Member
0 Likes
989

HI,

do this way ...


initializaion.
s_matnr-low = '500'.
s_matnr-option 'EQ'.
append s_manr.
clear s_matnr.

select-option : s_matnr for mara-matnr no-display.
data i_mara like mara occurs 0 with header line.

select * from mara into table i_mara where matnr in s_matnr.  

Read only

valter_oliveira
Active Contributor
0 Likes
989

Hello.

Only one row with material 500 is selected.

Hope this helped you.

Best regards.

Valter Oliveira.

Read only

Former Member
0 Likes
989

This particular SELECT-OPTIONS will not display if it is the only selection screen field. it will bypass it and use 500 and 500 only as your parameter in the select.

If there are more fields on the screen, it simply will not show up and the parameter is still set to 500.

Again, if this is the only field on the selection screen, it is a good chance this report is called from another program and the select-options field can be set from there.

Read only

former_member191735
Active Contributor
0 Likes
989

now what data is being selected ??

1) Only matnr number 500 ?? or

2) material number 500 and more ??

Well, it does select only the matnr 500 because, when you say default 500 - this is low value and nothing but paramter.

if you want to select greater than 500 - you need to change the selection option from EQ to GT.

Read only

Former Member
0 Likes
989

HI,

It will retrieve the records with 500 material number only.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
990

hi ,

ti will picks only one value 500 only...

regards,

venkat

Read only

0 Likes
989

Thank you all,

Thanks for sending replies and claring my doubt. I will allot points to all repliers.

I have one more doubt. if this statement selects only 500. then how it is different from

PARAMETERS : p_matnr like mara-matnr DEFAULT '500'.

SELECT * from mara into table i_mara where matnr = p_matnr.

is there any performance issues??

Which one should i prepfer ?

Thank you

madhu

Read only

0 Likes
989

If you are trying to get a single record from MARA, then it would be better to use the parameter instead as using a select-option here is a little ambiguous. On a technical level, there may not be much difference in performance, as the runtime may translate the select-option to an = expression when hitting the DB anyway. But I guess you could have some overhead from this translation, but not enough to notice I would think.

Regards,

Rich Heilman

Read only

0 Likes
989

Thank You Rich and others,

Closing thread and alloting points.

Regards

madhu