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

background job...

Former Member
0 Likes
501

Hi,

I have developed a report in which first part is report display and second is download to database. I want to put download to database in background. Is there any option by which first part i can put online and second part i.e. database download i can put in as background job...

Regards,

1 ACCEPTED SOLUTION
Read only

birendra_chatterjee
Active Participant
0 Likes
470

Hi Santosh,

Yes You can do so. In the list display, give a button for 'Update Database', when one clicks on this, save the entries to database by calling another program or the same program (if you use the same program you need to incorporate suitable condition checks) which will update the entries as a background job. You can do so by using functions 'JOB_OPEN', command SUBMIT PROGRAM and RETURN and function 'JOB_CLOSE'. You can search in SCN for sample code of submitting a program as a job.

Regards,

Birendra

Hi,

I have developed a report in which first part is report display and second is download to database. I want to put download to database in background. Is there any option by which first part i can put online and second part i.e. database download i can put in as background job...

Regards,

2 REPLIES 2
Read only

birendra_chatterjee
Active Participant
0 Likes
471

Hi Santosh,

Yes You can do so. In the list display, give a button for 'Update Database', when one clicks on this, save the entries to database by calling another program or the same program (if you use the same program you need to incorporate suitable condition checks) which will update the entries as a background job. You can do so by using functions 'JOB_OPEN', command SUBMIT PROGRAM and RETURN and function 'JOB_CLOSE'. You can search in SCN for sample code of submitting a program as a job.

Regards,

Birendra

Read only

Former Member
0 Likes
470

Hi,

You can display your report by usual procedure.

Once that is done then you can create the new job for uploading to the database using FM 'JOB_OPEN'.

Then you can call the custom Z-report to upload the data using Submit command.

SUBMIT z_report VIA JOB lw_name NUMBER lw_number AND RETURN.

where lw_name is the Job Name and lw_number is the jobcount.

Once it is done close the job using 'JOB_CLOSE' FM.

Regards,

Vaibhav