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

SAP Query and POP Up

Former Member
0 Likes
697

I have written a quesry which lists all billings that have been cancelled on a particular day.

What I need to do is to then download this information to a file in txt format.

When I run this online I get a pop up where I can change the file name and format etc..

All I do is just press enter and it creates the file for me in txt format.

Works just the way I want.

The only problem is that I want to run this in the background and send the file created via email.

SAP does not allow the file to be saved in txt format but just sends it to the spooler.

Is there any way that I can do this is a query so the file is created

Thanks

I have written a quesry which lists all billings that have been cancelled on a particular day.

What I need to do is to then download this information to a file in txt format.

When I run this online I get a pop up where I can change the file name and format etc..

All I do is just press enter and it creates the file for me in txt format.

Works just the way I want.

The only problem is that I want to run this in the background and send the file created via email.

SAP does not allow the file to be saved in txt format but just sends it to the spooler.

Is there any way that I can do this is a query so the file is created

Thanks

3 REPLIES 3
Read only

Former Member
0 Likes
603

Can you download spool content and achieve what you want? If not, convert to an executable ABAP program, and add routines convert to a tab-delimited file and use BCS to forward to recipients.

Read only

brad_bohn
Active Contributor
0 Likes
603

You can drop background files from queries using the 'Private File' option and enhancement SQUE0001. You could also subsequently trigger an email with the data attached or just drop the file and embed a link to the file in the email.

Read only

Former Member
0 Likes
603

The best way out from what you have specified is use a ALV list display for your report. Ouput the report to a List by using the WRITE:/ of ABAP and when you do this you get a SPOOL generated when run in background job later you know the ways how to download the spool and send this into a mail thru SAP itself.

Hope this help you.