2006 Feb 06 5:07 PM
Hello All
I am using the CL_GUI_TIMER to auto-refresh a program every 60 seconds. This works perfect in SAP GUI but when I am trying to test the same in RF and it dumps with the following error:
The termination occurred in the ABAP program "CL_GUI_CONTROL================CP" in "SET_REGISTERED_EVENTS".
The following is the code that calls triggers the auto-refresh:
CREATE OBJECT gui_timer.
SET HANDLER event_handler->on_finished FOR gui_timer.
gui_timer->interval = timeout.
CALL METHOD gui_timer->run.
Is there a setting on SAP console which needs to be turned on for handling the events? Would be thankful for any help.
Thanks
Sunil Achyut
Hello All
I am using the CL_GUI_TIMER to auto-refresh a program every 60 seconds. This works perfect in SAP GUI but when I am trying to test the same in RF and it dumps with the following error:
The termination occurred in the ABAP program "CL_GUI_CONTROL================CP" in "SET_REGISTERED_EVENTS".
The following is the code that calls triggers the auto-refresh:
CREATE OBJECT gui_timer.
SET HANDLER event_handler->on_finished FOR gui_timer.
gui_timer->interval = timeout.
CALL METHOD gui_timer->run.
Is there a setting on SAP console which needs to be turned on for handling the events? Would be thankful for any help.
Thanks
Sunil Achyut
2006 Feb 06 5:15 PM
2006 Feb 06 5:15 PM
2006 Feb 06 5:18 PM
Here is a different method of autofreshing screens. This example shows how to do it with a list display.
Example program code.
REPORT ZRICH_0010
no standard page heading.
START-OF-SELECTION.
CALL FUNCTION 'Z_ENQUE_SLEEP'
STARTING NEW TASK 'WAIT'
PERFORMING WHEN_FINISHED ON END OF TASK.
Write:/ sy-datum, sy-uzeit.
END-OF-SELECTION.
AT USER-COMMAND.
SY-LSIND = SY-LSIND - 1.
CALL FUNCTION 'Z_ENQUE_SLEEP'
STARTING NEW TASK 'INFO'
PERFORMING WHEN_FINISHED ON END OF TASK.
Write:/ sy-datum, sy-uzeit.
***********************************************************************
* WHEN_FINISHED
***********************************************************************
FORM WHEN_FINISHED USING TASKNAME.
* Trigger an event to run the at user-command
RECEIVE RESULTS FROM FUNCTION 'Z_ENQUE_SLEEP'.
SET USER-COMMAND 'BUMM'.
ENDFORM.
Function Module Code
FUNCTION Z_ENQUE_SLEEP.
CALL FUNCTION 'ENQUE_SLEEP'
EXPORTING
SECONDS = 1.
ENDFUNCTION.
Regards,
Rich HEilman
2006 Feb 06 5:19 PM
Hello Rich
Thanks for the quick reply, is there any other way to refresh as time-out is causing a lot of problems for us. I was somewhat relieved when I saw your earlier post and included in my program only to realize it dumps :(.
Thanks
Sunil Achyut
2006 Feb 06 5:21 PM
Should appreciate your interest, patience, and knowledge in answering queries, as even before I posted reply I got the solution. I did look at that post, I was thinking this is was for lists and thus couldnt use in my screens and also was looking if there was an OO way of doing the same.
Thanks
Sunil Achyut
Message was edited by: Sunil K Achyut
2006 Feb 06 5:33 PM
Here is an example using a dynpro instead of a list display, you still need the function module.
Create screen 100, add a field of type TIMS and call it SY-UZEIT. Implement the code. You will see a dynpro with the time, and it will increment every second or so.
report zrich_0003 .
data: ok_code type sy-ucomm.
start-of-selection.
call function 'Z_ENQUE_SLEEP'
starting new task 'WAIT'
performing when_finished on end of task.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module status_0100 output.
set pf-status '0100'.
* SET TITLEBAR 'xxx'.
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module user_command_0100 input.
case ok_code.
when 'BACK'.
clear ok_code.
leave program.
when others.
clear ok_code.
endcase.
call function 'Z_ENQUE_SLEEP'
starting new task 'INFO'
performing when_finished on end of task.
endmodule.
*---------------------------------------------------------------------*
* FORM WHEN_FINISHED *
*---------------------------------------------------------------------*
form when_finished using taskname.
* Trigger an event to run the at user-command
receive results from function 'Z_ENQUE_SLEEP'.
set user-command 'BUMM'.
endform.
Please remember to award points for helpful answers and mark you post as solved when solved completely. Thanks.
Regards,
Rich Heilman
2006 Feb 06 5:35 PM
2006 Feb 06 6:03 PM
Rich
This solves the problem but, the reason I will not be able to use this is, it takes up 1 dialog process in the application server for the program and in my production environment this might not be a feasible solution. I know I have to make a choice, thanks for your help.
Thanks
Sunil Achyut
2006 Feb 06 6:06 PM
2006 Feb 06 6:41 PM
We are implementing WM extension set 2.0 which includes cross docking, yard management and TRM. The out-of-box was not flexible enough so we changed (would be good if I say we re-wrote) in the way things are done. The auto-refresh is for loading activity wherein the RF device shows the shipment the user is working on and once confirmed updates serial nos, pgi and also updates yard activities. Because of the timeout they have to log back into RF and there is a manual work that needs to be done by the office people because of timeout. I wanted to eliminate the manual work of the office people. I will show the possible options to them and let them make a decision.
Thanks
Sunil Achyut
2006 Feb 06 6:50 PM
2006 Feb 06 7:11 PM
Rich
The timeout is basically the amount of time they can be in the system without doing any activity. Lets say a loader is loading a shipment, since he is busy loading the materials in the trailer he wouldn't do anything on the RF device. Normally loading a shipment is relative to number of units but average time it takes is 30-60 minutes. The SAP policies in our company restrict the idle time to 30 minutes and thus the need for refreshing the screen so that the in-activity doesn't log them out. We pursued the basis option to change the time for RF users without any result.
We are using SAP console with Georgia Soft character based telnet I/O engine. The timeout on telnet session is 60 minutes. But since the SAP logs out after 30 minutes, is there a way we can keep the session active without any activity on the RF device.
Thanks
Sunil Achyut
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |