Skip to Content
1

How to run the custom Tcode for every minute in foreground without user interaction SAP ABAP?

Feb 06 at 05:05 AM

80

avatar image

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 ?

10 |10000 characters needed characters left characters exceeded

Why do you need this?

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Raymond Giuseppi
Feb 06 at 06:17 AM
3

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)

Share
10 |10000 characters needed characters left characters exceeded
Rajkumar Narasimman Feb 06 at 05:16 AM
-2

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

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.

0

"if it is module pool program, you can create BDC."

Don't. BDC has been outdated for over 15 years.

1

And is UTTERLY unnecessary for a custom program.

1
Kiran K Feb 06 at 06:53 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Mike Pokraka Feb 06 at 07:08 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded