FM to create background job

FM to create a background job: Imports:   Result: Source Code: FUNCTION ZTB_CREATE_JOB. *”———————————————————————- *”*”Local Interface: *”  IMPORTING *”     REFERENCE(I_JOBNAME) TYPE  STRING *”     REFERENCE(I_REPORT) TYPE  STRING *”     REFERENCE(I_VARIANT) TYPE  STRING OPTIONAL *”     REFERENCE(I_UNAME) TYPE  STRING OPTIONAL *”  EXPORTING *”     REFERENCE(E_RETURN) TYPE  BAPIRET2 *”———————————————————————- data: lv_jobname  like tbtcjob–jobname, lv_report   like sy–repid, lv_variant  like raldb–variant, lv_uname    like sy–uname, lv_jobcount like tbtcjob–jobcount, lv_released type c. lv_jobname = i_jobname. lv_report  = i_report. lv_variant = i_variant. lv_uname   = i_uname. if lv_uname is initial.    lv_uname = sy–uname. endif. * Step 1 call function ‘JOB_OPEN’   exporting     jobname         = lv_jobname   importing     jobcount        = lv_jobcount  exceptions    cant_create_job  = 1    invalid_job_data = 2    jobname_missing  = 3    others           = 4           . if sy–subrc <> 0.    e_return–type = ‘E’.    e_return–message = ‘Error!’.    exit. endif. * Step 2 call function ‘JOB_SUBMIT’… Continue reading FM to create background job