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

Reagrding Job Selection TCODE SM37.

Former Member
0 Likes
637

Hi All,

After running a Program in Background and whne we see the Job Overview In TCode 'SM37' (Job Selection), we get the log as per below table.

JobName ln Job CreatedBy Status

Z_LIST_DETAILS 1049JG800106 Finished

Z_LIST_DETAILS 1049JG800106 Finished

for one of my program when it is run in Background and after its completion I have to change the Status message of the JOB Indicator (typed in Bold Above) in my program from 'Finished' to 'Job Finished with Errors' in case any error occurs in the program. How can we do this ? How will I come to Know whether Job Has finised successfully or with errors and change the message accordingly.

Points will be rewarded..

Thanks

Jitendra

Hi All,

After running a Program in Background and whne we see the Job Overview In TCode 'SM37' (Job Selection), we get the log as per below table.

JobName ln Job CreatedBy Status

Z_LIST_DETAILS 1049JG800106 Finished

Z_LIST_DETAILS 1049JG800106 Finished

for one of my program when it is run in Background and after its completion I have to change the Status message of the JOB Indicator (typed in Bold Above) in my program from 'Finished' to 'Job Finished with Errors' in case any error occurs in the program. How can we do this ? How will I come to Know whether Job Has finised successfully or with errors and change the message accordingly.

Points will be rewarded..

Thanks

Jitendra

3 REPLIES 3
Read only

Former Member
0 Likes
568

I think being a standard transation one can not change the status of SM37. Whether job was finished successfully or with error can be checked by checking Job log.

anya

Read only

Former Member
0 Likes
568

hi...

if ur job is not successfull then the status will be INCOMPLETE only..

so u can see the logs there...

regds

jigar p

Read only

Former Member
0 Likes
568

Hi

To do this, you have to query the table TBTCO witht the Job Name and Job Count (job id). The Status field will give you the status of execution of the background job. Hnece in your program, you will have to write a select query on TBTCO passing job name and count and fetch status. Based on this change the message to the required message. You can probably make use of the wait statment before querying the table, so that processing of the background job is complete.

Regards,

Vijay