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

SUBMIT and Spool

Former Member
0 Likes
669

Hi Group,

I have copied one standard program and customised it and used in another program using Submit and Return command.

Problem:

Those Custom and Standard Programs have wrtting some List on the screen after execution,when I executed my main program in foreground its wroking fine,when I executed in batch I am not getting this List in the Spool(or Job log),Can any body suggest me how to capture this in Spool or Job log when execution mode is batch.

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
625

Did you use the SUBMIT statement with the TO SAP-SPOOL option?

~Suresh

Read only

0 Likes
625

Its not working with that

Read only

Former Member
0 Likes
625

Hi

Try out with the below kind of code.

where log is the int tab containing the data

export t_log[] to memory id c_midlog.

if sy-subrc = 0.

submit ysd_psspoollog

to sap-spool

spool parameters w_prntparam

without spool dynpro

and return.

also try & write directly to the spool in the report so that u get the output in spool.

Read only

Clemenss
Active Contributor
0 Likes
625

Hi,

compare code and spool handling in foreground and background for original and copy. Is the copy acting differently compared to original?

No: do your enhancements as already proposed in detail.

YES: There must be a significant difference.

Regards,

Clemens

Read only

Former Member
0 Likes
625

Hi,

Try

1. 'Submit xxx Exporting List To memory And Return'.

2. Then get back the list using the Function Module 'List_From_Memory' into an internal table.

3. Write this internal Table.

This output will be seen in the spool.

regards,

biju

Note: Please reward helpful answers