cancel
Showing results for 
Search instead for 
Did you mean: 

UI API: Press tab on field

Former Member
0 Kudos

Hi All,

How does one accomplish showing a window when the tab key is pressed? I don't know if there's some standard way of doing this? If you press the tab key on the customer field on an invoice the choose from list window is displayed and the selected value is posted to the customer acc no field, etc. Any idea?

Thanks!

Adele

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for the reply. I am new to VB too - actually a delphi programmer. Can you send me code how to catch tab key event? How does one get the same effect on the button as they have next to the fields that does a lookup?

Former Member
0 Kudos

1.) For example there is a EditText - Field where you want to catch the TAB-KEY. Catch the event "et_KEY_DOWN" in the Edittext. (How to catch events, just look into the Helpfile of UI-API)

2.) You should get a SAPbouiCOM.IItemEvent Object, one property of this event is 'CharPressed'. Check if 'CharPressed' is equal to '13' (Code for TAB)

3.) Perform a Click to the choose button e.g. oForm.Items("67").Click (67 = ItemIndex of choose Button in contract-form behind CardCode Field)

Former Member
0 Kudos

Thanks very much, just one correction (i think)... the tab key is 9 and not 13. Otherwise it works like a bomb!

Thanks a lot, Adele

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

i just did something like this. I catched the event of the TabKey inside a userdefined form, after this i raised a click to the choose button of eg. CardCode.

When the choose form is opened you can catch every event and content of the items in this form.