2008 Jan 03 12:01 PM
Hi All,
I have created a batch input session and scheduled in background with the help of the standard program RSBDCSUB.
Please find the below code.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'zxy'
user = sy-uname
keep = 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
SUBMIT rsbdcsub WITH mappe = 'zxy'
WITH von = sy-datum
WITH bis = sy-datum
WITH z_verarb = 'X'
WITH logall = 'X'
EXPORTING LIST TO MEMORY
AND RETURN.
My problem is the above code is working fine. The background job is craeted but created in schedule status but my background job should be in release state...
can you please guide me how to get the job in relaese state with the help of the standard program RSBDCSUB.
Healthy points will be rewarded..
awaiting for your reply.
Thank you.
Regards,
Ravi Ganji
2008 Jan 04 6:29 AM
Hi Ravi,
Try this:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount_test
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE x000(yp) WITH 'JOB-START ' jobname ' failed !!!'.
ELSE.
*--Step insert
SUBMIT rsbdcsub
USER sy-uname VIA JOB jobname NUMBER jobcount_test
WITH mappe = map
WITH von = pdatum
WITH z_verarb = 'X'
AND RETURN .
*
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount_test
jobname = jobname
strtimmed = strtimmed
targetsystem = sy-host
IMPORTING
job_was_released = job_released
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 > 1.
MESSAGE x000(yp) WITH 'JOB-CLOSE ' jobname ' failed!!!'.
ENDIF.
ENDIF.
Regards,
David D
2008 Jan 04 9:23 AM
Hi,
u need to assign date and time in submit to current execution date and time of program being executed:-
NUMB LIKE RSJOBINFO-JOBNUMB, "jobnummer
NAME LIKE APQI-GROUPID, "jobname
QID LIKE APQI-QID , "jobqid
DATE LIKE SY-DATUM, "creationdate mappe
TIME LIKE SY-UZEIT, "creationtime mappe
SDATE LIKE SY-DATUM, "jobdatum submit
STIME LIKE SY-UZEIT, "jobzeit submit
USER LIKE SY-UNAME, "jobuser
BUSER LIKE SY-UNAME, "Batchberechtigter
GROUP LIKE APQI-GROUPID, "jobgruppe
i think:-
SUBMIT rsbdcsub WITH mappe = 'zxy'
USER sy-uname VIA JOB jobname NUMBER jobcount_test
WITH mappe = map
with DATE = sy-datum "creationdate mappe
with TIME = sy-UZEIT, "creationtime mappe
with SDATE = SY-DATUM, "jobdatum submit
with STIME = SY-UZEIT, "jobzeit submit
WITH z_verarb = 'X'
AND RETURN .