‎2007 May 02 3:48 PM
I want to schedule report ex : ABC by function module not by directly excuting the report.
Is there any function module which can schedule the Report by passing
1) Report Name
2) Variant Name
‎2007 May 02 3:50 PM
Hi
There is no FM for scheduling
U can do it using sm37 after create the job with variant of report in sm36.
Regards,
Sreeram
‎2007 May 02 3:51 PM
http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d4d543b11d1898e0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d8e543b11d1898e0000e8322d00/frameset.htm
Also check this sample program provided by <b>Rich</b>
report zrich_0004 .
data: sdate type sy-datum,
stime type sy-uzeit,
l_valid,
ls_params like pri_params,
l_jobcount like tbtcjob-jobcount,
l_jobname like tbtcjob-jobname.
start-of-selection.
Get Print Parameters
call function 'GET_PRINT_PARAMETERS'
exporting
no_dialog = 'X'
importing
valid = l_valid
out_parameters = ls_params.
Open Job
l_jobname = 'ZRICH_0005'.
call function 'JOB_OPEN'
exporting
jobname = l_jobname
importing
jobcount = l_jobcount.
Submit report to job
submit zrich_0005
via job l_jobname
number l_jobcount
to sap-spool without spool dynpro
spool parameters ls_params
and return.
Kick job off 30 seconds from now.
sdate = sy-datum.
stime = sy-uzeit + 30.
Schedule and close job.
call function 'JOB_CLOSE'
exporting
jobcount = l_jobcount
jobname = l_jobname
sdlstrtdt = sdate
sdlstrttm = stime
strtimmed = 'X'
Message was edited by:
Rajesh
‎2007 May 02 3:52 PM
Hi tejaswi,
1. We have to use the following 3 FMs.
JOB_OPEN - for getting the job number
JOB_SUBMIT - <b>for giving the REPORT Name + VARIANT</b>
JOB_CLOSE - for releasing the job
2. Just see the documentation on these FMs.
regards,
amit m.
‎2007 May 02 3:52 PM
‎2007 May 02 3:53 PM