cancel
Showing results for 
Search instead for 
Did you mean: 

TCode SM37

margaretquintal
Explorer
0 Kudos

Good morning

Can someone help me with this.

I have setup to jobs SM37 eg:

Job A Process data

Job B Update data

I wish for Job A to run only once Job B is completed

then I wish Job B to run only once Job A is completed.

Hence

SM37

1.

Job Name is Job A

Job Start : After Job B

2. Job Name is Job B

Job Start: After Job A

This should run contineously:

Alternatively Which would be better

I can setup Job A

with Step 1 Program a

Step 2 Program b

and Job A should run everytime Step 2 is finished. -= contineously

Regards

Margaret

Edited by: margaret quintal on Apr 9, 2009 12:30 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

SumiKarmakar
Participant
0 Kudos

Hi Margaret,

The programs that are currently being run are standard program or custom programs?

If they are custom programs than you can have event triggers to trigger Job B to trigger Job A and then Job A to trigger Job B.

For example,

Set up your job in SM36/SM37 to be triggered by an event and,

optionally, an event parameter. Then in your ABAP, call the Function

Module 'RSSM_EVENT_RAISE' to start the job.

e.g.

tables: btcuev.

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.

parameter : p_evntid like TBTCSTRT-EVENTID

matchcode object zbw_eventid obligatory.

CALL FUNCTION 'RSSM_EVENT_RAISE'

EXPORTING

I_EVENTID = p_evntid

I_EVENTPARM = ''.

Thanks

margaretquintal
Explorer
0 Kudos

Good morning Kamas

Thanks greatly for your comments

I will look into this solution and get back to you.

I will leave this question open until I try this solution.

Thanks again

Margaret

Former Member
0 Kudos

Hi Margaret,

You can include both the programs in a single job setup a periodic time between the 2 programs such that both of them run consecutively one after another.

In this way, there is no need for a second job.

Cheers,

Hari Kishan.

JPReyes
Active Contributor
0 Kudos

include both the programs in a single job setup a periodic time between the 2 programs such that both of them run consecutively one after another

periodicity can only be setup for the job itself not for the individual steps...

Regards

Juan

former_member603052
Contributor
0 Kudos

Hi Margaret

> I can setup Job A

> with Step 1 Program a

> Step 2 Program b

>

> and Job A should run everytime Step 2 is finished. -= contineously

As per me, this is better choice ....adding 2 steps in the same Job and the set as periodic for every 10 min or so(as per your requirement)

Regards,

Kalyan

JPReyes
Active Contributor
0 Kudos

Moved to NW Admin forum,

Why don't you just create 1 job with 2 steps and set the periodicity so it runs continuously?..

Regards

Juan

margaretquintal
Explorer
0 Kudos

Good morning

Thanks for your comments, however this does not work for us.

Sounds easy, but this is exactly how we run the job at the moment and it takes up system resource as it can run upto 4 or so jobs at any one time.

The runtime of the steps is variable depending on the workload. (Delivery based)

Currently we run:

Job A (step 1 and step 2) to run every 10mins.

Would like to :

Run job A with step 1 and 2 but only to start the same job A again once step 2 is completed ( Obvioulsy the above kicks in if it takes longer than 10mins.)

The job running is more relevant to step 2 completing the trigging job A to run again.

The important part is that we only want the job A triggers again once step 2 is completed.

I did try to create a job which was dependant on the same job finishing but to no avail.

I also ran the steps as two separate jobs and made one reliant on the other, however

to activate the job it requires a run time so you find yourself with the same problem above

- a) I couldn't activate the job without putting in a runtimefor at least one job.

Job 1

(Currently running every 10mins)

step 1 completed (say in 4 mins)

step 2 start ........... starts and completed (say it took 15mins)

Then

Job 1 to start again after step 2 is completed. (which is irrelevant in running every 10 mins)

Do you have any further suggestions.

Kind Regards

Margaret