2008 Nov 12 7:50 AM
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
2008 Nov 12 7:53 AM
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
2008 Nov 12 7:53 AM
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
2008 Nov 12 8:14 AM
Hi Darren,
Thanks a lot. I was able to solve my problem with your help. Thanks!
Eo
2008 Nov 12 8:01 AM
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |