Application Development 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: 

re : submit report

Former Member
0 Kudos
148

Hello Friends

I am calling another report in my program , I am passing the parameter to that program within my same program, but i don't want to get the output screen of the submitted report and it should process without displaying output screen

Hope you will understand my requirement.

Thanks in Advance

Nagaraj S

1 ACCEPTED SOLUTION

Former Member
0 Kudos
115

u can run it in the background

*Submit report as job(i.e. in background)

data: jobname like tbtcjob-jobname value

' TRANSFER TRANSLATION'.

data: jobcount like tbtcjob-jobcount,

host like msxxlist-host.

data: begin of starttime.

include structure tbtcstrt.

data: end of starttime.

data: starttimeimmediate like btch0000-char1.

  • Job open

call function 'JOB_OPEN'

exporting

delanfrep = ' '

jobgroup = ' '

jobname = jobname

sdlstrtdt = sy-datum

sdlstrttm = sy-uzeit

importing

jobcount = jobcount

exceptions

cant_create_job = 01

invalid_job_data = 02

jobname_missing = 03.

if sy-subrc ne 0.

"error processing

endif.

  • Insert process into job

SUBMIT zreport and return

with p_param1 = 'value'

with p_param2 = 'value'

user sy-uname

via job jobname

number jobcount.

if sy-subrc > 0.

"error processing

endif.

  • Close job

starttime-sdlstrtdt = sy-datum + 1.

starttime-sdlstrttm = '220000'.

call function 'JOB_CLOSE'

exporting

event_id = starttime-eventid

event_param = starttime-eventparm

event_periodic = starttime-periodic

jobcount = jobcount

jobname = jobname

laststrtdt = starttime-laststrtdt

laststrttm = starttime-laststrttm

prddays = 1

prdhours = 0

prdmins = 0

prdmonths = 0

prdweeks = 0

sdlstrtdt = starttime-sdlstrtdt

sdlstrttm = starttime-sdlstrttm

strtimmed = starttimeimmediate

targetsystem = host

exceptions

cant_start_immediate = 01

invalid_startdate = 02

jobname_missing = 03

job_close_failed = 04

job_nosteps = 05

job_notex = 06

lock_failed = 07

others = 99.

if sy-subrc eq 0.

"error processing

endif.

8 REPLIES 8

Former Member
0 Kudos
115

have you tried

SUBMIT zreport AND RETURN

Former Member
0 Kudos
115

hi,

if the called program has some output then it will definitely be shown

submit report 'zprog' with (selection-screen values ) and return.

it can skip the selection screen but not the output

if nothing is displayed then the output will also be skipped..

if

submit report 'zprog' via selection-screen and return. is used

you can give the selection screen values online

but if it is having output definitely you will be getting it

thanks & regards,

Venkatesh

0 Kudos
115

I do not want that output screen to be displayed

Former Member
0 Kudos
115

Hi!

If there is only 1 WRITE or SKIP statement in the submitted, it will show its output.

I usually make a plus parameter on the selection screen of the submitted one (P_SILENT).

If this is set, this skips all write stements. Of course, you have to modify the source of the submitted one, and write if p_silence = 'X' conditions to all write statements.

Use submit like this:

SUBMIT zmyreport WITH ... AND RETURN.

Regards

Tamá

Former Member
0 Kudos
116

u can run it in the background

*Submit report as job(i.e. in background)

data: jobname like tbtcjob-jobname value

' TRANSFER TRANSLATION'.

data: jobcount like tbtcjob-jobcount,

host like msxxlist-host.

data: begin of starttime.

include structure tbtcstrt.

data: end of starttime.

data: starttimeimmediate like btch0000-char1.

  • Job open

call function 'JOB_OPEN'

exporting

delanfrep = ' '

jobgroup = ' '

jobname = jobname

sdlstrtdt = sy-datum

sdlstrttm = sy-uzeit

importing

jobcount = jobcount

exceptions

cant_create_job = 01

invalid_job_data = 02

jobname_missing = 03.

if sy-subrc ne 0.

"error processing

endif.

  • Insert process into job

SUBMIT zreport and return

with p_param1 = 'value'

with p_param2 = 'value'

user sy-uname

via job jobname

number jobcount.

if sy-subrc > 0.

"error processing

endif.

  • Close job

starttime-sdlstrtdt = sy-datum + 1.

starttime-sdlstrttm = '220000'.

call function 'JOB_CLOSE'

exporting

event_id = starttime-eventid

event_param = starttime-eventparm

event_periodic = starttime-periodic

jobcount = jobcount

jobname = jobname

laststrtdt = starttime-laststrtdt

laststrttm = starttime-laststrttm

prddays = 1

prdhours = 0

prdmins = 0

prdmonths = 0

prdweeks = 0

sdlstrtdt = starttime-sdlstrtdt

sdlstrttm = starttime-sdlstrttm

strtimmed = starttimeimmediate

targetsystem = host

exceptions

cant_start_immediate = 01

invalid_startdate = 02

jobname_missing = 03

job_close_failed = 04

job_nosteps = 05

job_notex = 06

lock_failed = 07

others = 99.

if sy-subrc eq 0.

"error processing

endif.

0 Kudos
115

but this will get scheduled in background and not processing immediately . I am calling RSBDCSUB . then in order to capture the errors I am calling again RSBDCLOG . but session is created but not executed

0 Kudos
115

I want to skip the output screen and the submitted report should process immediately.

0 Kudos
115

You can send report to memory and you can retrieve from there. See if the below code is useful.

Submit <b>Program</b>

exporting list to memory

and return

with Field1 EQ 'Value1'

with Field2 EQ 'Value2'.

  • get list from memory

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = abaplist.

-Kriss