Skip to Content
author's profile photo Former Member
Former Member

Second user's background program in a queue


If a user executes one zprogram in background and in the same time if another user executes this zprogram in the background then how can we maintain programatically the second user's program in a queue and make it execute after completion of the first one rather than executing simultaneously.

Thanks in Advance.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 30, 2007 at 07:20 AM


    You can use the below function module:

                                                            open backgroundjob


                                                            ********Declare parameters of function module accordingly

                                                            CALL FUNCTION 'JOB_OPEN'


                                                            JOBNAME = JOBNAME


                                                            JOBCOUNT = JOBNUMBER


                                                            CANT_CREATE_JOB = 01

                                                            INVALID_JOB_DATA = 02

                                                            JOBNAME_MISSING = 03

                                                            OTHERS = 99.


                                                            submit ranges table to program


                                                            SUBMIT REPORTNAME AND RETURN

                                                            with <select-options field of Z_REQUEST_BUSINESS_PARTNER_R3 program> in r_range

                                                            USER SY-UNAME " User for runtime authorizations

                                                            VIA JOB JOBNAME " Job name from job_open function module

                                                            NUMBER JOBNUMBER "job number from job_open


                                                            close the job so that it gets released


                                                            CALL FUNCTION 'JOB_CLOSE'


                                                            JOBCOUNT = JOBNUMBER

                                                            JOBNAME = JOBNAME

                                                            strtimmed = 'X' " check this field

                                                            Hope this will help you.

                                                            Please reward if helpful.

                                                            Thank you.

                                                            Add a comment
                                                            10|10000 characters needed characters exceeded

                                                          Before answering

                                                          You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
                                                          You must be Logged in to submit an answer.

                                                          Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.