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: 

How to get report output on screen as well as in spool?. Spool to be mailed

Former Member
0 Kudos

Hi All,

Can any guide the approach for:

Foreground run:

-


Get report output on screen as well as generate a spool. The content of spool needs to be mailed.

Background run:

-


we need to generate the spool and mail the spool contents.

Am aware of usage of FMs

1. GET_JOB_RUNTIME_INFO

2. RSTS_GET_ATTRIBUTES

3. CONVERT_OTFSPOOLJOB_2_PDF

4. SO_DOCUMENT_SEND_API1

Regards

Raj

4 REPLIES 4

Former Member
0 Kudos

How about using the command 'new-page print on.' and then use write statement to write the data to spool. Then you can list the output using ALV.

Former Member
0 Kudos

hi rajasekhar,

all you need for background job is...

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

regards

vivek

former_member223537
Active Contributor
0 Kudos

Hi Rajasekhar,

Please refer this program:

/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job

Best regards,

Prashant

Former Member
0 Kudos

Hi All,

I had solved the issue by having two separate blocks for processing based on mode of execution.

Background:

1. Initiate spool

2. Write the summary

3. Close spool, build PDF and mail the same.

Foreground:

1. Initiate spool

2. Write the summary

3. Close spool, build PDF and mail the same.

Write summary again (for display on screen).

Regards

Raj