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: F4 help

Former Member
0 Likes
495

Hi,

I created a program with 10 selection screen parameter. Out of which 5 fields are mandatory. For one of the mandatory field F4 help need to be attached. F4 should be based on the company code user enters on the selection screen. If user enter 1000 as company code. when user press F4, the payment method related to company code 1000 need to be listed as help.

I completed the coding by using the company code and fetched the payment data from T042E table and called FM F4IF_INT_TABLE_VALUE_REQUEST in AT SELECTION-SCREEN ON VALUE REQUEST FOR

But the F4 help is not available if the user doesnot enter all other mandatory fields and a enter. Which means if user tries to press F4 after entering company code. all the payment method are available for selection.

Please help me

Thanks

Suresh Kumar

3 REPLIES 3
Read only

Former Member
0 Likes
463

yes it can be fetch for the screen data unless any user interaction.

whenever you are entering the value in any screen field in PAI of that screen only you can get the screen field value . and PAI is only trigger after user interaction so here in your case when user give the values and press enter then only it will trigger the pai and you can get the screen field value. So enter or any user interaction is must to trigger pai and get the value.

regards

shiba dutta

Read only

Former Member
0 Likes
463

Hell,

in your form "value request for...." you can get the required field values of the other fields with the function module DYNP_VALUES_READ BEFORE the user press ENTER.

Rgds,

JP

Read only

Former Member
0 Likes
463

Hi Suresh,

The FM DYNP_VALUES_READ might help.

See this example

*give program name and screen number

l_program_name = sy-repid.

l_dynpro_number = sy-dynnr.

*give field name, whose value you want to read into the field 'fieldname' of the

*internal table l_dynp_value_tab

l_dynp_value_tab-fieldname = l_field_name.

append l_dynp_value_tab.

call function 'DYNP_VALUES_READ'

exporting

dyname = l_program_name

dynumb = l_dynpro_number

tables

dynpfields = l_dynp_value_tab

exceptions

invalid_abapworkarea = 04

invalid_dynprofield = 08

invalid_dynproname = 12

invalid_dynpronummer = 16

invalid_request = 20

no_fielddescription = 24

undefind_error = 28.

read table l_dynp_value_tab index 1.

l_functd1_value = l_dynp_value_tab-fieldvalue.

*now you have the field value in the variable l_functd1_value.

Thanks

Pranati.

Please reward points if helpful !