Skip to Content
0
Aug 16, 2010 at 03:45 PM

JOB_OPEN - SUBMIT - JOB_CLOSE - User Name for the Job

6974 Views

Hi,

I have a code like that:

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.

* Call Update PO from Sales Order
  SUBMIT zpcc_mm_upo3
    WITH p_vbeln = puv_vbeln
    USER lc_uname
    VIA JOB lv_jobname NUMBER lv_jobcount
    AND RETURN.

  CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount             = lv_jobcount
      jobname              = lv_jobname
      strtimmed            = lc_true
    EXCEPTIONS
      cant_start_immediate = 1
      invalid_startdate    = 2
      jobname_missing      = 3
      job_close_failed     = 4
      job_nosteps          = 5
      job_notex            = 6
      lock_failed          = 7
      OTHERS               = 8.

In this code as you see I can run the SUBMIT program with a specified user. But the creator of the job always becomes SY-UNAME. So is there a way to specify the user name for a job creator? I don't want to use SY-UNAME.

Thanks,