Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PAI is not triggered after I choose value in F4

Hello experts,

I fight with the following problem:

On my screen I use input field (ucf_s_coi_afd03_ct-xrproc_param) and I coded the F4 help for it manually

PROCESS ON VALUE-REQUEST.
  FIELD ucf_s_coi_afd03_ct-xrproc_param
      MODULE req_xrproc_param_2006.

After I press f4 on this field, the values are correctly listed but after I choose one value (double click), I would expect that the PAI is triggered but it is not. I have to press ENTER, only then.

Is there a way how to trigger the PAI after the value is chosen?

I found one way, but I don't want to use it:

If I change the input field into "List box" or "List box with key", then I can assign function code to it and if I do that, then it works - PAI is triggered after value is chosen. However, I don't want to use list box, I need standard input field.

Any ideas?

Regards,

Tomas

replied

There is a function module which seems to be exactly what you are searching for, the name

is SAPGUI_SET_FUNCTIONCODE.

A quote from the documentation of this function module: "This module simulates user input

in the command field. This enables you to run screen sequences without user input."

If you place this function module call after your call of the search help, you can trigger PAI.

Regards,

Karsten

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question