Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to schedule the jobs in Background which triggers other jobs?

Former Member
0 Kudos

Hi,

Currently we are implementing SAP-HR.We get data in Flat files in text format from Legacy system on the Application server.Flat files are stored in differernt folders according to differrent Infotypes(Infotype 0002, Infotype 0009 etc.).Now i want to shedule all my programs and BDC Sessions in background .My program should sense the presence of Flat file on application server and accordingly shedule the required jobs.For each session run i want to produce a separate file having all the error records in separate folder.The each Session after processed should Trigger my program which separates errors.

Can anyone help me in this regard.

Ravindra

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Ravindra,

You can schedule your program to sense the presence of files then you can read those files, do conversion and schedule session jobs in the background.

Later on coming to seperation of error records from each session job, I am not able to see any solution which automates this process. This is a labor work which you have to do on your own.

Regards,

5 REPLIES 5

Former Member
0 Kudos

i think there is one option 'After Job' in SM36

this might be helpful to you

regards

if you are creating your jobs via SM36, you should be able to to create the second job using

'After Job' option with the 'Start Status Dependent' checkbox switched on. This way the

second job will not start unless the first job finishes successfully.

Message was edited by: Surpreet Singh Bal

Former Member
0 Kudos

Hi,

In the first program you can use FM 'BP_EVENT_RAISE'. Define a second job, that will be started after the raised event. In such a way you can have conditional jobs.

Svetlin

Former Member
0 Kudos

Ravindra,

You can schedule your program to sense the presence of files then you can read those files, do conversion and schedule session jobs in the background.

Later on coming to seperation of error records from each session job, I am not able to see any solution which automates this process. This is a labor work which you have to do on your own.

Regards,

Former Member
0 Kudos

Dear Ravindra,

I quite agree that we have to retrieve the error records manually, but i think there is a way to automate it.

To auto mate the process we have to take a look at the Following Built in tables of SAP:-

1) APQD

2) T100.

I think if u can pass hte queue ID into the Table APQD u can get the Transaction counter and the other attributes. After that u can map it with the messages in the table T100. Then u can get the data into the internal table and process it.

Former Member
0 Kudos

Hi Ravindra,

you might also want to check out the new Job Scheduling capabilities of SAP NetWeaver. You can find more information about this on SAP Service Marketplace under quick-link job-scheduling (http://service.sap.com/job-scheduling).

Kind regards,

Edwin Esser