on 11-02-2004 4:23 PM
Hello,
we´ve developped an own SAP GUI transaction T (SAP GUI 6.20 is used).
The problem is: There arises an external event which we transfer to SAP server (i.e. SAP server is acting as RFC-server) and call a function module as user X. How can we fire an event to the (running) transaction T of user Y so that we can display that an event occurred (without interaction of the user Y)?
We found class CL_IMC_MODE but no sample code. Is this class able to solve our problem?
Thank you for any help,
Stefan
Hello Stefan,
if Cl_Imc_Mode is no help and if you the event should occur in near future Cl_Gui_Timer may help. But please note using this technique too extensive may prevent sharing work processes and cause frequent round trips ( == app. server load ).
This class seems to me very useful to write monitors. If your RFC-server temporarily stores its state within a db table, shared buffer or shared object ( release 640+ ) you may use this technique to poll the data.
Kind Regards
Klaus
program Test_Timer.
*********************
* local classes
*********************
class lcl_Receiver definition.
public section.
methods:
constructor,
handle_Timer_Event for event Finished of cl_Gui_Timer.
private section.
data:
f_Timer type ref to Cl_Gui_Timer,
f_Counter type i.
endclass.
class lcl_Receiver implementation.
*==================
method Constructor.
*==================
create object f_Timer.
set handler me->handle_Timer_Event for f_Timer.
f_Timer->Interval = 2.
f_Timer->Run( ).
endmethod.
*=========================
method handle_Timer_Event.
*=========================
data:
text_Info type c length 20 value 'INVOCATION:'.
text_Info+16(4) = Me->f_Counter.
add 1 to f_Counter.
message text_Info type 'S' display like 'I'.
if ( 10 gt f_Counter ).
f_Timer->run( ).
endif.
endmethod.
endclass.
*********************
* report eventing
*********************
start-of-selection.
perform sub_Main.
**********************
* forms
**********************
*============
form sub_Main.
*============
data:
cref_Handler type ref to lcl_Receiver.
create object cref_Handler.
write: 'Timer started'.
endform.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.