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 not generated in batch job

Former Member
0 Likes
2,041

Hello All,

We have developed one custom program and that we have scheduled to run as batch job daily every 15 minutes.

This code contents BAPI - 'BAPI_INSPLOT_SETUSAGEDECISION' which copies UD values from one inspection lot to another inspection lot.

We have written code such that any exception / error during data selection or processing will be captured in one internal table and that table entries are displayed as output after execution of program. In case of job we get spool entry.

This programs runs properly and we get desired results, but some times suddenly this program (Job) stops creating spool though job shows status as "FINISHED".

In such case UD is not copied and also job log shows no error entry.

After some time during any later run of job spool again gets created automatically and UD happens properly.

One observation is when spool is not generated job finishes within few seconds as compared to duration in normal run.

Please reply if anyone has faced such spool issue earlier.

Also I have one doubt, whats happens incase BAPI returns abort message (Type = A), will program control go back to calling program or calling program will be terminated?

Help awaited.

Regards,

Hello All,

We have developed one custom program and that we have scheduled to run as batch job daily every 15 minutes.

This code contents BAPI - 'BAPI_INSPLOT_SETUSAGEDECISION' which copies UD values from one inspection lot to another inspection lot.

We have written code such that any exception / error during data selection or processing will be captured in one internal table and that table entries are displayed as output after execution of program. In case of job we get spool entry.

This programs runs properly and we get desired results, but some times suddenly this program (Job) stops creating spool though job shows status as "FINISHED".

In such case UD is not copied and also job log shows no error entry.

After some time during any later run of job spool again gets created automatically and UD happens properly.

One observation is when spool is not generated job finishes within few seconds as compared to duration in normal run.

Please reply if anyone has faced such spool issue earlier.

Also I have one doubt, whats happens incase BAPI returns abort message (Type = A), will program control go back to calling program or calling program will be terminated?

Help awaited.

Regards,

5 REPLIES 5
Read only

Former Member
0 Likes
1,185

Hello Experts,

Can anyone help me in isue mentioned above?

Its really urgent....

Read only

viral_bhuva
Explorer
0 Likes
1,185

Hi there,

The BAPI will always return to calling program.

We need to check the RETURN parameter(table) in the code to check whether the execution of BAPI is successful or not.

For BAPI - BAPI_INSPLOT_SETUSAGEDECISION... If usage decision is successfully made than system returns message number 050 (class 'QV'). This is captured in the RETURN table parameter.

Based on this you may process/not-process your data further.

Read only

Former Member
0 Likes
1,185

Thanks Viral,

But I am looking for issue where Job is showing as Finished but spool entry is missing.

Have you ever faced issue like this?

Regards,

Read only

0 Likes
1,185

Hello,

Can you please paste your code. It would be easy for all to understand the problem.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,185

There are some errors to perform for such a program, like executing a ROLLBACK after writing some lines to a spool and not before.

Could you paste significant part of the code, how RETURN table is managed, how COMMIT/ROLLBACK are triggered, etc.

Regards,

Raymond