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 identify end of background job?

Former Member
0 Kudos

HI All,

Can any body knows ,

IF I want to do further processing when the program in background executes?

How to identify the end of background processing?

Thanks and Regards,

Mrunal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello ,

Use FM SHOW_JOBSTATE. It takes in the Input as Job number and job name and returns the status of the job.

Regards

Saket Sharma

5 REPLIES 5

Former Member
0 Kudos

Hello ,

Use FM SHOW_JOBSTATE. It takes in the Input as Job number and job name and returns the status of the job.

Regards

Saket Sharma

Former Member
0 Kudos

Hi,

Call the FM .BP_JOB_STATUS_GET OR BAPI_XBP_JOB_STATUS_GET' by giving the job name and job count. u will get the status of the job whethre its complted or on progress or cancled.

Depends on that u can write ur code to move forward or u can write the code to WAIT there till the job complted.

Regs

Manas

Former Member
0 Kudos

Hi,

Below is the code for ur reference.

DO .

CALL FUNCTION 'BP_JOB_STATUS_GET'

EXPORTING

jobcount = jobcount

jobname = jobname

IMPORTING

status = staus

IF status EQ 'F'. "Finished

EXIT.

ENDIF.

ENDDO.

This code will wait till ur background job finished.

Regs

Manas.

Former Member
0 Kudos

select * from tbtco into table t_tbtco

where jobname EQ 'jobname' and

SDLDATE EQ sy-datum and

STATUS EQ 'F'

if sy-subrc EQ 0.

write:/ 'job completed'

endif.

reward if answered

Former Member
0 Kudos

Using tcode SM36, we can find whether the background job status. we have to give job name, user name etc., Please refer this tcode. If the job is cancelled the indication will be dispalyed as cancelled or else it will be displayed as completed.