Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module for scheduling the report

Former Member
0 Likes
794

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

5 REPLIES 5
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
759

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

Read only

Former Member
0 Likes
759

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

Read only

Former Member
0 Likes
759

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.

Read only

Former Member
0 Likes
759

chk this FM /OSP/REPORT_SCHEDULE , but this an RFC RM

Read only

Former Member
0 Likes
759

YOu have to use JOB_OPEN

JOB_SUBMIT.

and

JOB_CLOSE