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

Spool

Former Member
0 Likes
1,401

Hello friends,

I am running my programs in back ground and it creats an outbound text file and i havent used any write statements in the program. Would it create a spool or anything to say that the progam has ran succesfully and would it display the output. IF not how can i do that.

Madhu.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,376

If there are no write statements and no SAPscript which you are outputting, then there will be no spool created. Suggestion is to put a write statement in your program, this will then create a spool.

WRITE:/ 'Program has completed successfully'.

Regards,

Rich Heilman

11 REPLIES 11
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,377

If there are no write statements and no SAPscript which you are outputting, then there will be no spool created. Suggestion is to put a write statement in your program, this will then create a spool.

WRITE:/ 'Program has completed successfully'.

Regards,

Rich Heilman

Read only

0 Likes
1,376

Thanks Rich.

If i have the write statement would it automitically create the spool as soon as the program runs or do i need to do something in the back ground Job setup.

Madhu.

Read only

0 Likes
1,376

Nothing more to do, simply have a WRITE statement and a spool will be created. When setting up the job, you could check the print specifications and make sure that the "Print Immeditatly" and "Delete after output" are set right. In this case, I believe that you want both checkboxes to be not-checked.

Regards,

RIch Heilman

Message was edited by:

Rich Heilman

Read only

0 Likes
1,376

Thanks.

One last question,

Do i need to check it somewhere after the job runs i mean in SP01 or somewhere?

Madhu.

Read only

0 Likes
1,376

Hello Rich , Naren.

Suppose i dont have write in my program as I said earlied and it runs in the background and have the printer setup to it. AS u said it would not create any spool. SO what will it print, The entire text file or nothing.

Madhu.

Read only

0 Likes
1,376

Any Suggestions.

Read only

0 Likes
1,376

You can check for the spool by going to SP01, or you can check it in SM37, give the job name and click spool.

If there is no WRITE statement or sapscript output, there will be no spool, it will not write the text file. In order for it to do so, you would have to LOOP at the internal table containing the data and WRITE it out.

Regards,

Rich Heilman

Read only

0 Likes
1,376

Thanks Rich, I got that.

But my question is would it print something if i set it up to the printer and do not have any write statement.

Thanks,

Madhu.

Read only

0 Likes
1,376

If you set up the print specifictions, these will be used if there is a spool, if there are no write statements, there is no spool and the print specs are ignored. Is it clear?

Regards,

RIch Heilman

Read only

Former Member
0 Likes
1,376

Hi,

As rich mentioned if you don't have write statements or sapscript output you will not get a spool..But If the background job is finished successfully..Means the program has ended successfully..

Otherwise simply use a write statement in your program..

Thanks,

Naren

Read only

Former Member
0 Likes
1,376

Hi,

Run the background job and select the job and select the spool button..

If there is no write statement..then you will get a message no spool or something similar..

It will not print anything..Unless if you have something on the spool..

If you write the entire text file in the output using write statement..Then it will have the file data in the spool.

Thanks,

Naren