02-06-2018 5:05 AM
Hi,
I have developed module pool screen with Tcode. I will enter the Tcode only once in a SAP screen and it should run automatically for every minute without user interaction in the foreground.
How to run the Tcode for every minute in foreground automatically ?
02-06-2018 6:17 AM
Perform some search on class CL_GUI_TIMER. (e.g. handling its finished event to trigger a function code with cl_gui_cfw=>set_new_ok_code)
02-06-2018 5:16 AM
Hi Shabbir Ahmed,
"I have developed module pool screen with Tcode
What is the screen contains, For complex operation, if it is module pool program, you can create BDC.
"it should run automatically for every minute without user interaction in the foreground
If there is no interaction required, then the program should run in the background only.
1. Create the job in SM37 transaction for the particular(Main) program which runs every one minute and schedule the job 'After Event' and creates the event in SM62 transaction and create some flag variable inside the program which should work based on event raised from the Front-end.
2. Create one more program, update the above flag variable and create one transaction(new) and trigger the above-created event using FM BP_EVENT_RAISE.
3. Execute the new transaction in front end and the job will start run in the backend
Regards
Rajkumar Narasimman
02-06-2018 5:59 AM
Hi Raj,
Thanks for reply.The foreground screen which has 'Total Attended' value which will change/increment for every minute.
This screen I want to show on foreground.
02-06-2018 7:01 AM
"if it is module pool program, you can create BDC."
Don't. BDC has been outdated for over 15 years.
02-06-2018 7:32 AM
02-06-2018 6:17 AM
Perform some search on class CL_GUI_TIMER. (e.g. handling its finished event to trigger a function code with cl_gui_cfw=>set_new_ok_code)
02-06-2018 6:53 AM
Shabbir,
But how do you intend to show your screen ? As a separate session ?
How about embedding this object in SAP Easy Access screen.
If they want that info,all they have to login to SAP and details will be available in SAP Easy Access Screen.
K.Kiran.
02-06-2018 7:08 AM
Technically it's easy to do with:
WHILE my_condition( ) = abap_true.
do_stuff( ). "Or: CALL TRANSACTION ZYX.
WAIT UP TO 60 SECONDS.
ENDWHILE.
But with Raymond's approach you have a bit more control.
02-06-2018 5:43 PM