‎2009 Nov 20 10:17 AM
Hi all,
I Have a program that should not wait for PAI, but should go automatically and process PAI.
How do I reach this end?
Thanks in advance,
HProkoph
‎2009 Nov 20 10:45 AM
Hi,
You can achieve this by using FM SAPGUI_SET_FUNCTIONCODE or by using SET USER-COMMAND statement.
Code anyone of the above in PBO and check.
Regards
Karthik D
‎2009 Nov 20 10:28 AM
‎2009 Nov 20 10:54 AM
I try:
&----
*& Module ENTER_PAI OUTPUT
&----
text
----
MODULE ENTER_PAI OUTPUT.
sy-ucomm = 'ENTER'.
ENDMODULE. " ENTER_PAI OUTPUT
but it doesnt go to the PAI.
Only if I click on the Button.
Any Ideas?
Regards HProkoph
‎2009 Nov 20 11:06 AM
Hi,
Once again, I dont understand your requirement.
You want to code with Enter key as the event?
Or are you trying to debug some code and try to find out how the PAI is triggered?
You can have a function code (sy-ucomm) associated with your ENTER Key.
Go to the GUI Status, and in the Function Keys, You will buttons on the Standard Toolbar. The first button (tick mark in Green background is the button for Enter). So you can assign a function code saying 'ENTER' and activate the PF-STATUS.
Now you can start coding like
if sy-ucomm = 'ENTER'.
---
endif.
‎2009 Nov 20 11:18 AM
If you want some operation to be performed as soon as the you get the screen, then write the code in the PBO itself.
The name suggest PAI- Process After Input. so, if you give some input, then the control will take to the PAI event.
If you want to press the "ENTER" key, for the same, then you have to use,
Case Sy-ucomm.
when 'back'
your Code if any **
others.
-
______-----
____
here comes your automatic PAI code.
-
______-----
-
_____---
endcase.
‎2009 Nov 20 10:39 AM
Hi,
You PAI (PROCESS AFTER INPUT) is triggered only after some event or input.
Try pressing Enter if there is no explicit mouse click event.
‎2009 Nov 20 10:45 AM
Hi,
You can achieve this by using FM SAPGUI_SET_FUNCTIONCODE or by using SET USER-COMMAND statement.
Code anyone of the above in PBO and check.
Regards
Karthik D