cancel
Showing results for 
Search instead for 
Did you mean: 

How can we set a particular date to schedule a report?

former_member629678
Discoverer
0 Kudos
169

The report is working but it needs to be scheduled to run once a month on the 19th. But to schedule the report with values that will dynamically change each month with the first date to be the 19th of the prior month and the second to the 18th of the current month. Please help me.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member629678
Discoverer
0 Kudos

Firstly, I am new to SAP, So I have a report ready to be scehduled, but I am unable to set the scheduled date to run once a month on the 19th ? Do I need replace the filters in the filter box with values that will dynamically change each month with the first date to be the 19th of the prior month and the second to the 18th of the current month.

0 Kudos

v_datenext = sy-datum + 1.

CALL FUNCTION 'JOB_OPEN'

EXPORTING

delanfrep = ' '

jobgroup = ' '

jobname = jobname

sdlstrtdt = v_datenext

sdlstrttm = sy-uzeit

IMPORTING

jobcount = jobcount.

SUBMIT z_prg_spinterf

WITH i_year EQ v_subyrnext

WITH i_month EQ app->g_str_header-f_month

WITH i_dc EQ 'B'

USER sy-uname

VIA JOB jobname

NUMBER jobcount

AND RETURN.

starttime-sdlstrttm = sy-uzeit + 60.

  • Close job

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = jobcount

jobname = jobname

  • prddays = 1

sdlstrtdt = v_datenext

sdlstrttm = starttime-sdlstrttm

strtimmed = starttimeimmediate

targetsystem = host.


Do not provide sdlstrtdt and sdlstrttm when calling JOB_OPEN, do not provide strtimmed when calling JOB_CLOSE, and see if this helps.

PS = Copied from answers.sap.com

former_member629678
Discoverer
0 Kudos

Shall I run these script in Query Script Viewer. I am very new to SAP BOE. More details on how to run the scheduled report will be very helpful.