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

Need help with select options

kamesh_g
Contributor
0 Likes
1,097

Hi All

My requirement is particular . And i have searched in forums I did not proper answer .So I am posting my thread.

I have one select option on selection screen and I ma using DYNPRO_VALUE_READ fm to read selection screen value but Limitation with this FM is reading only one value of select option .

I would like to read all records of select options using FM DYNPRO_VALUE_READ or if other fm is there please let me know .

Thanks

Kamesh...

Hi All

My requirement is particular . And i have searched in forums I did not proper answer .So I am posting my thread.

I have one select option on selection screen and I ma using DYNPRO_VALUE_READ fm to read selection screen value but Limitation with this FM is reading only one value of select option .

I would like to read all records of select options using FM DYNPRO_VALUE_READ or if other fm is there please let me know .

Thanks

Kamesh...

9 REPLIES 9
Read only

Former Member
0 Likes
1,020

Hi,

You can read the values of the select-option by looping the select option variable.

For Eg:

selection-screen : Begin of block b1.

select-option : s_matnr for mara-matnr.

selection-screen : End of block b1.

In this you can read the values from the select-option s_matnr by

Loop at s_matnr.

EndLoop.

The values of the select-option will be available in s_manr-low and s_matnr-high fields.

Read only

0 Likes
1,020

HI

I dont want to read based on select options .

And more over I dont need any select query .

I need to read the select option values dynamically .

Thanks for ur reply.

Read only

0 Likes
1,020

Hi,

Check this

[]

Read only

Former Member
0 Likes
1,020

You can read the values of the select-option

Loop at s_optionr.

EndLoop.

or if wnat for select quesy select * from dbtablw where field1 IN S_option..

or suppose want to read for low then s_option-low and if high then s_option-high.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,020

Hello Kamesh,

I think this is because the FM: DYNP_VALUES_READ reads the data from the screen-fields only.

Anyways when i am trying to use DYNP_VALUES_READ on select-option, i am getting an exception (Did you use NO-INTERVAL addition with SELECT-OPTIONS)

Can you please share your code ?

BR,

Suhas

Read only

0 Likes
1,020

CLEAR lt_dynpfields.

REFRESH lt_dynpfields.

lt_dynpfields-fieldname = 'S_RES-LOW'.

APPEND lt_dynpfields.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-cprog

dynumb = sy-dynnr

TABLES

dynpfields = lt_dynpfields

EXCEPTIONS

OTHERS = 0. "EC

CLEAR fc_fvalue.

READ TABLE lt_dynpfields INDEX 1.

CHECK sy-subrc = 0.

fc_fvalue = lt_dynpfields-fieldvalue.

Edited by: KAMESH G on Feb 16, 2010 12:46 PM

Read only

Former Member
0 Likes
1,020

Hi,

You can loop at select option and can access its field value just like an internal table.

May I know why are you using FM for this?

Read only

0 Likes
1,020

Hi

I am using this FM to capture the value what ever I have on selection scree.

And one more thing I have to use this Fm as per requirement .

So please give idea how can i read select option values at a time .

because depending on that I need to F4 help of other field on sel.screen.

And if you can look at this FM you will get idea of this FM.

Thanks for reply.

Read only

Former Member
0 Likes
1,020

use FM rs_refresh_ from _selectoptions

Edited by: poornima pendyala on Apr 4, 2010 7:20 PM