Application Development and Automation 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: 
Read only

Job is creating with multiple users

Former Member
0 Likes
1,318

Hi All,

we have a strange issue with background jobs in existed logic. We are updating the batch with first GR date and below is the program flow. The job is event triggered job.

MIGO -> Method POST_DOCUMENT

Call FM JOB_OPEN

Submit the program (In which we are calling the BAPI to update first GR)

event_id = 'Event name'

CALL FM = 'JOB_CLOSE'.

CALL FM 'ZFM' in Update task(start delay) (In which the logic is written to raise the event with BP_EVENT_RAISE)

When I debugged, it is executing only once but the job is creating with multiple users at the same time.But the userid is not hardcoded anywhere and the userids are not related to MM users

Anyone faced similar issue ? Any thoughts please share.

Hi All,

we have a strange issue with background jobs in existed logic. We are updating the batch with first GR date and below is the program flow. The job is event triggered job.

MIGO -> Method POST_DOCUMENT

Call FM JOB_OPEN

Submit the program (In which we are calling the BAPI to update first GR)

event_id = 'Event name'

CALL FM = 'JOB_CLOSE'.

CALL FM 'ZFM' in Update task(start delay) (In which the logic is written to raise the event with BP_EVENT_RAISE)

When I debugged, it is executing only once but the job is creating with multiple users at the same time.But the userid is not hardcoded anywhere and the userids are not related to MM users

Anyone faced similar issue ? Any thoughts please share.

6 REPLIES 6
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,282

If some jobs are scheduled with same event, wont the first event raised release every job?

Read only

0 Likes
1,282

Hi Raymond,

The same job is triggering multiple times with different users

Read only

0 Likes
1,282

JOB_CLOSE creates exactly one job (at most) and a job is executed only once (don't forget the full id of the job is jobname + jobcount.

  • Transaction SM37: look at 'Job details', look for 'Schedule job' and 'Last change' time/date/by fields.
  • Transaction: SM63, look at event history, the number of jobs triggered will be displayed


Regards,

Raymond

Read only

0 Likes
1,282

Hi Raymond,

Somehow by testing I came to know that how many times the batch is processed through MIGO by any of the user those many times the job is creating with their names along with current user's job in current MIGO process. Couldn't get the technical root cause of this.

Read only

0 Likes
1,282

Look at your BAdI implementation, are the data stored in some shared area (E.g. export to database) not locked and not immediately refreshed, or some wrong LOOP in the code. Also does your implementation read data not provided by the interface to schedule job?

Could you explain the

We are updating the batch with first GR date 

Regards,

Raymond

Read only

0 Likes
1,282

HI Raymond,

We checked all these checks but everything is fine.

we are updating the batch date with first GR date using BAPI_BATCH_CHANGE which is written inside the program(which is calling through submit)