Application Development 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 selection screen values for a select-option field..........

Former Member
0 Kudos

Guys,

I have 2 fields in my selection screen........one is a Select-option with no intervals and with multiple selection allowed and the other a Parameter..... On pressing F4 on the parameter i need to read values entered in the Select-option........

Iam not able to get the values for the Select-Option field with "DYNP_VALUES_READ" FM ( Here it doesnot have a High field, Only Low with Multiple Selection).....

I could get the values with FM "RS_REFRESH_FROM_SELECTOPTIONS", but this work only when i press the Multiple selection option while entering values for Select-Option and not working when i directly enter a value for it (say when iam entering 1 vaue for it).....

Could anyone help me out and wil be rewarded......

1 ACCEPTED SOLUTION

Former Member
0 Kudos

karthik,

F4IF_INT_TABLE_VALUE_REQUEST is used for displaying F4 help for a parameter

SELECT-OPTIONS : s_variable for mara-matnr NO INTERVELS.

PARAMETERS : p_regtyp TYPE char1.

*

--


Selection Screen Help--

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_regtyp.

PERFORM f1000_show_f4help_regtyp .

--


Form--

FORM f1000_show_f4help_regtyp .

DATA : Begin of Itab occurs 0,

matnr like mara-matnr,

end of itab.

Here

LOOP at s_variable.

move : s_variable-low to itab-matnr.

APPEND ITAB.

CLEAR ITAB.

ENDLOOP.

  • Function Module to Call F4 Help

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = lc_reg_type

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = lc_pregtyp

value_org = 'S'

TABLES

value_tab = itab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFORM. " f1000_show_f4help_regtyp

Don't forget to reward if useful

10 REPLIES 10

Former Member
0 Kudos

Hi Karthik,

can u paste ur code so that i can check where it went wrong.

Regards,

Ravi G

Former Member
0 Kudos

karthik,

F4IF_INT_TABLE_VALUE_REQUEST is used for displaying F4 help for a parameter

SELECT-OPTIONS : s_variable for mara-matnr NO INTERVELS.

PARAMETERS : p_regtyp TYPE char1.

*

--


Selection Screen Help--

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_regtyp.

PERFORM f1000_show_f4help_regtyp .

--


Form--

FORM f1000_show_f4help_regtyp .

DATA : Begin of Itab occurs 0,

matnr like mara-matnr,

end of itab.

Here

LOOP at s_variable.

move : s_variable-low to itab-matnr.

APPEND ITAB.

CLEAR ITAB.

ENDLOOP.

  • Function Module to Call F4 Help

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = lc_reg_type

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = lc_pregtyp

value_org = 'S'

TABLES

value_tab = itab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFORM. " f1000_show_f4help_regtyp

Don't forget to reward if useful

0 Kudos

Thanks guys for all your post....... Still not solved.....

For Manish -> the FM is similar to "DYNP_VALUES_READ". It doesnt work for multiple selections....

For Muralikrishna and Shiva -> The logic only works when the user selects the multiple selection pushbutton and enters values....It doesnt work when directly the value say 'GMIP' is entered for the Select-Option-LOW.......

(This is my logic because only when the user selects a radiobutton, he has the multiple selection option, else he has only a single value field..... Also i have restricted the user to enter only for 'EQ' values in Select Options......)

Could you all reply pls.......

0 Kudos

I have got an idea -

Select-options let's say S_KUNNR is actually a table which contains values as

{LOW, HIGH, SIGN, OPTION}

1. {LOW1, HIGH1, SIGN1, OPTION1}

2. {LOW2, HIGH2, SIGN2, OPTION2}

3. {LOW3, HIGH3, SIGN3, OPTION3}

At any time user may edit only first entry.

Now use RS_SELECTIONSCREEN_READ to get the entry which user has entered directly.

Modify first line of S_KUNNR with values read. And you have the all multiple values in S_KUNNR.

I hope it gives you good understanding of the logic.

Regards,

Manish Joshi

0 Kudos

Thnx Manish and Narendran for your answers to solve my problem.......

Former Member
0 Kudos

I THINK YOU CAN DO LIKE THIS..

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PAR.

LOOP AT S_OP.

<CHECK S_OP-LOW>.

ENDLOOP.

REGARDS

SHIBA DUTTA

former_member194623
Participant
0 Kudos

Hi Karthik,

Instead of using DYNP_VALUES_READ use <b>RS_SELECTIONSCREEN_READ</b>, which is basically for using in context of selection screens.

For more information and possible input values consult documentation of <b>RS_SELECTIONSCREEN_READ</b>.

Regards,

Manish Joshi

Former Member
0 Kudos

Hi,

Probably you can both the FMs..

RS_REFRESH_FROM_SELECTOPTIONS -> Check if there is any value for the select-options..If not call the FM DYNP_VALUES_READ

Thanks,

Naren

Former Member
0 Kudos

solved.......thnx guys....

0 Kudos

hi

can u please tell me how did u solve it.i have similar requirement..

I dun want to call another report using submit commnad.

here is my code

DATA : ITAB1 LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.

SELECT-OPTIONS S1 FOR SPFLI-CITYFROM.

CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

EXPORTING

CURR_REPORT = SY-repid

  • IMPORTING

  • SP =

TABLES

SELECTION_TABLE = ITAB1

.

now on the selection screen when i enter 'Franfurt '' in the select option S1 ..then after the execuion of this F.M. i can see 'S1' in the table ITAB1 .but i should get value 'Frankfurt' in ITAB1-LOW' field ,, m i ryte ? or do i need to use some other FM ?

so my qn is how to get the value entered in the select option S1 ?so that i can use it to restrict the values in other input fields on the screen ..

plz help !!!

Nilesh