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: 

Spool get lost while job runs in background

0 Kudos

Hi

We wrote a custom program where in we use two custom bapi's which were copied from original bapi's. When we run this interface program in backgroud, we have lost the spool. But when we run the test with limited data in foreground, it works fine. What are the possible solutions to correct this issue. Is there anyway we can force this spool to stay even though any BAPI fails in the middle or fail to provide proper error?

Does this cause because of any memory leak? or insufficient memory? But there are no short dumps... in system.

If we direct to print the spool during background job execution, it comes back with spool object not found error.

Any help would be highly appreciated.

Thanks

Pandiri

4 REPLIES 4

Sm1tje
Active Contributor
0 Kudos

What exactly do you mean by: we have lost the spool? Did you check in SM37 (job overview), and the spool icon is missing, or are you looking at SP01 and you don't see any output / spool requests?

When running program in background, are you providing the correct print parameters?

When you run it in foreground, do you create a spool request during the report?

Is report aborting when running in backgroud, because than you won't get any output / spool request, just a message stating that program was aborted / failed somewhere along the line?

Need some additional info before we can make an educated guess....

0 Kudos

Program is complete, but the spool is lost. It may not happen all the time for all the files. For some files it runs okay and gives spool also, with some files it get's lost the spool. We are trying to create applicants in SAP from an interface using bapi's.

Thanks

Pandiri

Sm1tje
Active Contributor
0 Kudos

are you sure that you are actually creating a spool. For example, let's say the BAPI didn't create any applicants and therefore doesn't return any message in the return structure.

To make sure that if applicant is not created, a spool is created anyway (stating 'Applicant could not be created'), just add your own message. So check BAPI return structure. If empty, create own message and write it.

0 Kudos

Thanks Mike for the response. We have tried so many of these options, still no use. We finally started creating the error file as a file while it runs in background.. It creates error file right, but we have lost the spool for those files it failed to create the spool. It is sometimes successful creating the spools, not sure what's the catch point of failure on certain files... even though all of them are in same format.

Thanks