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

Help on AT SELECTION-SCREEN ON VALUE-REQUEST FOR..

Former Member
0 Likes
1,710

Hi all,

I have two parameters on my SELECTION-SCREEN and i have to use ON VALUE-REQUEST on p_field2. The return_tab must contain values based from the input value of p_field1 so I used

"WHERE field1 = p_field1" in my SELECT statement. I input a value in p_field1, but when I press F4 on p_field2 it says 'No values found'.

Here's the code:

PARAMETERS: p_field1 LIKE tab-field1,

p_field2 LIKE tab-field2.

DATA: BEGIN OF i_field2 OCCURS 0,

field2 LIKE tab-field2,

END OF i_field2.

DATA: ret_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field2.

SELECT field2 FROM tab

INTO TABLE i_field2

WHERE field1 = p_field1.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FIELD2'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'p_field2'

value_org = 'S'

TABLES

value_tab = i_field2

return_tab = ret_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

Thanks

Eo

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,395

Hi,

The field transport has not occurred yet, if you pressed enter before F4 on the second field it would probably work. To get around it without having to press enter use the function module DYNP_VALUES_READ to read the value of the first parameter within the value request for the second parameter.

Darren

Hi,

The field transport has not occurred yet, if you pressed enter before F4 on the second field it would probably work. To get around it without having to press enter use the function module DYNP_VALUES_READ to read the value of the first parameter within the value request for the second parameter.

Darren

3 REPLIES 3
Read only

Former Member
0 Likes
1,396

Hi,

The field transport has not occurred yet, if you pressed enter before F4 on the second field it would probably work. To get around it without having to press enter use the function module DYNP_VALUES_READ to read the value of the first parameter within the value request for the second parameter.

Darren

Read only

0 Likes
1,395

Hi Darren,

Thanks a lot. I was able to solve my problem with your help. Thanks!

Eo

Read only

Former Member
0 Likes
1,395

Hi ,

first of all check in debugging whether its actually passing the value in the Select query from P_field1.

if not

then use FM "DYNP_VALUES_READ" to read the value entered on screen for P_field1.

if yes

then check for any conversion exit existing for that field .may be conversion is required.