Backgrond job in sap abap programming Langague
Some time requirements to post a job in the background this purpose we have to post the query
number TYPE btcjobcnt,
name TYPE btcjob.
CONCATENATE 'ZMMGATEENTRY' sy-datum sy-uzeit
INTO name SEPARATED BY '_'.
rsparams-selname = 'S_TRNO'.
rsparams-kind = 'S'.
rsparams-sign = 'I'.
rsparams-option = 'EQ'.
rsparams-low = zp2pdetrno.
APPEND rsparams.
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 zp2pr022_autosto WITH SELECTION-TABLE rsparams
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
MESSAGE 'Rohini kumar background jobs sucessfully' TYPE 'S'.
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.
ENDIF.
ENDIF.
********************************ROHINI KUMAR*********************************
Please support my work : sap.rohini988@gmail.com LinkedIn Link : https://www.linkedin.com/in/rohini-kumar-14647a13a/
********************************************************************************
SAP ABAP Training Course in Gurgaon
ReplyDelete