Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to create a bg job with time zone issues

I am facing an issue while creating a bg job , the system time is ahead of user time (timezone) and with that it gives an error in SM21 logs saying start date for the job provided is in the past (the reason is system time is 2 hours ahead of user with which it is creating bg job )

and also in our existing code   CALL FUNCTION 'BP_JOB_CREATE' is used , but in sdn discusions I see JOB_OPEN, then JOB_SUBMIT and JOB_CLOSE to be used /suggested and also the code snippet existing is

SELECT SINGLE tzonesys FROM ttzcu INTO lv_tzonesys.


  CONVERT TIME STAMP lv_tstmp TIME ZONE lv_tzonesys

               INTO TIME lv_cur_time.

  ADD 10 TO lv_cur_time.

* Create Job header.

  ls_job_head-jobname   = 'XXXXXXX'. // I changed the jobname here

  ls_job_head-sdlstrtdt = sy-datum.

  ls_job_head-sdlstrttm = lv_cur_time.

  ls_job_head-sdluname  = /xxx/cl_sr_tml_services=>mv_bguserid.

  ls_job_head-periodic  = space.

  ls_job_head-authcknam = /XXXX/cl_sr_tml_services=>mv_bguserid.

  ls_job_head-reluname  = /XXXX/cl_sr_tml_services=>mv_bguserid.

it is a mainteneace project should I just change   ls_job_head-sdlstrttm  = sy-uzeit  and continue with existing code or change it completely by removing BP_JOB_CREATE to JOB_OPEN and JOB_SUBMIT and  JOB_CLOSE , please suggest as i am new to ABAP .



Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question