Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2008 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2008 at 08: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.