Application Development 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: 

SAP GUI - read input field A for value help of field B

Former Member
0 Kudos

Hello,

i created a own small SAP GUI dynpro.

One input field is the number of an CRM account. (A)

The second input field is the number of contact person belonging to this account. (B)

In the valuehelp of field (B) i want to have the value from field (A) defaulted.

I realised this with:

get PARAMETER ID 'BPA' field i_wa_interface-value.

This works, but only if the user hits enter after field (A) was filled.

How can i avoid that the user has to click "enter"?

Thank you

Regards

Manfred

1 ACCEPTED SOLUTION

brad_bohn
Active Contributor
0 Kudos

If I understand correctly, you don't need to trigger 'Enter' though. Can't you use the standard screen-scraper function DYNP_VALUES_READ to get the value of (A) and use that in your F4 process for (B)? Take a look at program RUTSHEXP and the examples in there for dynamic help processes.

4 REPLIES 4

MarcinPciak
Active Contributor
0 Kudos

You can only avoid this be means of listbox. You set first field as listbox with assigned user command. When you pick one entry the PAI will trigger, here you set the second box with appropriate data from first one.

Regards

Marcin

0 Kudos

Hi,

a listbox will not work for this field because there are thousands of possible entries.

What i´m looking for is a possiblity to do the "Enter" in field A via coding at the moment the F4-Help of field B is used.

Any idea?

Thank you

Kind regards

Manfred

0 Kudos

This was discussed many times and I believe no one has found the solution for it yet. Simply the "Enter" key can't be programically simulated.

Anyhow you can do other thing still leaning to listbox. Create a separate input field atop of listbox. Whenever user provides first letters for the input field you do a query on the table to restrcit the entries shown in the listbox (when the input field is initial make sure the listbox stays initial too, otherwise you will have to populate it with all these thousands items). Then you select the one from listbox which you are interested in and fill the second input field appropriately. This way may seems awkward though working one. We have already live application working this way and no user is complaining so far

Regards

Marcin

brad_bohn
Active Contributor
0 Kudos

If I understand correctly, you don't need to trigger 'Enter' though. Can't you use the standard screen-scraper function DYNP_VALUES_READ to get the value of (A) and use that in your F4 process for (B)? Take a look at program RUTSHEXP and the examples in there for dynamic help processes.