Skip to Content
0
Feb 08, 2012 at 03:05 PM

Problem Submit Via Job in BADI

162 Views

Hello All

I am using SUBMIT VIA JOB in BADI "work order update" and but no job is created....also sy-subrc is 0.

Here is the code

call function 'JOB_OPEN'

exporting

jobname = name

importing

jobcount = number

exceptions

cant_create_job = 1

invalid_job_data = 2

jobname_missing = 3

others = 4.

if sy-subrc = 0.

submit z_idoc_create_process_order and return

via job name number number

with p_aufnr = it_header1-aufnr

with p_werks = it_header1-werks

with p_autyp = c_autyp

with p_auart = it_header1-auart

with p_dispo = it_header1-dispo

with p_opt = c_opt

with p_mestyp = c_mestyp.

if sy-subrc = 0.

call function 'JOB_CLOSE'

exporting

jobcount = number

jobname = name

strtimmed = 'X'

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.

if sy-subrc <> 0.

endif.

Any reason why job is not created?

Thanks in advance.

regads

VInit