cancel
Showing results for 
Search instead for 
Did you mean: 

SAP notes analysis

Former Member
0 Kudos

Hi All have the SAP Notes for executing a equerry in background.

I am not able to analyses the Note. Can any one please help me on this. It is really urgent.

Following is the Note details.

*Note 537735* - SAP Query: save to file in the background

Note Language: English Version: 3 Validity: Valid from 06.07.2005

Summary

Symptom

You want to schedule an SAP Query for background processing and you want to

write the list to a file. You cannot use the save to file provided on the

query selection screen because this type of storage requires a connection

to a front end. However, this type of connection does not always exist

during background processing.

More Terms

Query, download, save, store, save to file, file, job, background job,

schedule, COD, MOD

Cause and Prerequisites

.

Solution

Use the SUE enhancement described in the online documentation: You can

create an ABA program in this enhancement, which is then used for writing

the output to a file on the application server using the ABAP commands

'OPEN DATASET ', 'TRANSFER' and 'CLOSE DATASET '.

Header Data

Release Status: Released for Customer

Released on: 13.07.2005 12:53:43

Priority: Recommendations/additional info

Category: Consulting

Main Component BC-RV-QU SAP Query

The note is not release-dependent.

Related Notes

Thanks and Regards,

Nimisha Deshpande.

Accepted Solutions (1)

Accepted Solutions (1)

valter_oliveira
Active Contributor
0 Kudos

Hi there.

That note is a workaround for one problem: save a query output into a file, when you are runing it in background (so, you don't have a save button to click).

The note points you to an exit, where you should have available an internal table with the output of the query. In that exit, you can save the output into a file using statements: 'OPEN DATASET ', 'TRANSFER' and 'CLOSE DATASET '.

This way you can write it into a directory like usr/sap/SYD/ ...

Regards.

Valter Oliveira.

Former Member
0 Kudos

Hi Valter,

Thanks for the reply. But I am not getting the exit which the note is pointing to. Can you tell me the exit and where to find it.

Thanks and Regards,

Nimisha Deshpande.

valter_oliveira
Active Contributor
0 Kudos

HI again.

Go to transaction SMOD and see ampliation SQUE0001.

Reward if usefull.

Regards.

Valter Oliveira.

Former Member
0 Kudos

Hi valter,

This is really helpful. I have some more doubts..I went to SMOD and exit SQUE0001.. did some coding and put a break point over there just to see if things are working good. but when I execute the querry in foreground it is not stopping at the break point. Can you please guide me on this.

Thanks and Regards,

Nimisha Deshpande.

valter_oliveira
Active Contributor
0 Kudos

Hi again.

Remember 2 things:

1 - first, you have to go to tcode CMOD, create project Zproject and include there the ampliation. After that you have to activate the project.

2 - second, I think that exit will only be called in background, so I don't think it will stop in a break point.

To test it quickly, create a simple one line file in OS, with OPEN/CLOSE dataset, and then check the target directory.

Regards.

Valter Oliveira.

Former Member
0 Kudos

As per the above mail , I created a Zproject, added my enhancement to the same and activated it. After that I did a simple coding of open/close data set . But when I checked on the OS there was no file created.

Thanks

Nimisha Deshpande.

Answers (0)