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

selection screen parameter update

Former Member
0 Likes
1,570

Hello;

Is there a way to update parameters on selection screen depending on values of other parameters without pressing Enter, ie at focus change.

For example: I have three parameters on the selection screen:

1. plant(werks) 2. material(matnr) 3.batch(charg)

I enter values for plant and material and without pressing enter move the cursor to batch field. Here when i press F4 for search help i want the search help to take the values of plant and material automatically. I tried to do it using parameter ids but they wait a button click.

How can I achieve this?

Thx in advance,

Ali.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,146

Try this

PARAMETERS: werks

matnr

charg

AT SELECTION-SCREEN ON VALUE-REQUEST FOR CHARG.

SELECT <field name> FROM <table name> INTO TABLE <internal table>

WHERE werks = werks

and matnr = matnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'charg'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'charg'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = <internal table>

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

If usefull reward points is helpfull......

4 REPLIES 4
Read only

Former Member
0 Likes
1,147

Try this

PARAMETERS: werks

matnr

charg

AT SELECTION-SCREEN ON VALUE-REQUEST FOR CHARG.

SELECT <field name> FROM <table name> INTO TABLE <internal table>

WHERE werks = werks

and matnr = matnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'charg'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'charg'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = <internal table>

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

If usefull reward points is helpfull......

Read only

0 Likes
1,146

Dear Rajneesh;

Thx for the answer. But still the user needs to press 'Enter' in order to transfer values of matnr and werks; when I check during debug these values are empty. What I need is transfer of values at cursor focus change.

Read only

Former Member
0 Likes
1,146

solved using search view

Read only

dmitry_sharshatkin
Product and Topic Expert
Product and Topic Expert
0 Likes
1,146

Hello,

You could use functions DYNP_VALUES_READ to get the parameter w/o pressing <Enter>.

Then use F4IF_INT_TABLE_VALUE_REQUEST to provide your own F4 value help data.

BR, Dima