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: 

Background Processing

Former Member
0 Kudos

Hi All,

Pl. Let me Know how to run an ABAP report in <b>background</b>. For this i have a seletion screen. When i press F8 and execute the program in background ( Thru the option ).

And when i go to SM37 and chek it i am getting the status as "cancel".

So pl. let me know how to go about it.

Regards,

Nagesh

19 REPLIES 19

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Something has happened during your program execution that has caused it to dump. Check ST22 for the dump, and correct the program code.

If you need help with your dump, please post the code and the ABAP runtime error that you are getting.

Regards,

RIch Heilman

0 Kudos

Hi Rich,

Thanks for the suggestion but

when i go to SM36 and see own Jobs i can the status of the program as can my job canceled . In the job log i got this message.

Job started

Step 001 started (program ZHRPYEXPENSE, variant &0000000000000, user ID NR-ABAP)

could not ascertain code page

Job cancelled after system exception ERROR_MESSAGE

0 Kudos

Post your code, please.

ERROR_MESSAGE is the error that you are getting via ST22 also?

Regards,

RIch Heilman

0 Kudos

Hi Rich,

I could not get the message in the ST22 it was only showing the Short Dump messages.

Regards,

Nagesh

0 Kudos

Ok, what are the short dump messages? Also , can you please post the code of the report program.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

There are no short dump messages for the background program. Only i can see that job log.

Regards,

Nagesh.

0 Kudos

Please post the code of the program which is failing.

Regards,

Rich Heilman

0 Kudos

Hi,

Why don't you start your program in foreground, just to check the error occuring. Then try to use ST22

Svetlin

0 Kudos

Hi Rich,

Actually its a 1550 ln of code when i run that its taking more time and it was giving time lapsed error so only went to run the program in background.

Regards,

Nagesh

0 Kudos

So how long does it run before it cancels? Does it use custom tables or custom function modules? If not, send me the code via email. You can use the email address on my business card.

Regards,

Rich Heilman

0 Kudos

Hi rich,

When i go to SM37 and see it was only for 10 sec.

Regards,

Nagesh

0 Kudos

Hi Svetlin,

I exactly don't no for a report if we execute in background, will there be a session created by that ?

Regards,

Nagesh.

0 Kudos

Then I think that there is something in the beginning of the program which is causing it to cancel. Please post some code.

And yes, you can definitly run report programs in the background.

Regards,

Rich Heilman

0 Kudos

Hi,

I offered you a test run in foreground, in order to investigate the exact line at which the error occurs(ST22).

Svetlin

0 Kudos

Hi Nagesh,

Can you briefly explain what this program is doing? Check transaction SM21 for the error and let us know what you see.

Put a break point in your program at the first executable statement in your start-of-selection and execute your program online. See if that helps.

If nothing helps, then issue some messages in your program at several places. These messages will go into your job log and that way you will know exactly where the problem occured.

Also, please remember to reward people who are trying to help you.

Regards,

Srinivas

Former Member
0 Kudos

Hi,

To run a job in background, do F8 and then enter the selection screen values and then instead of pressing F8 do <b>F9</b>. then uncheck the print option.

Then press ok.

Tehn press immediate, then save.

Now it will show a message saying that job scheduled in background.

Now goto<b> SM37</b> press F8, now u can see the jobname and the status if it is finished it will create an spool. Then click the jobname and the spool in the toolbar u can see the list created. then click and see teh output list generated.

If it is canceled then some error has occured, so u can chose the job and put <b>shdb</b> in the command prompt and start debugging and check where it fails.

Hope this helps.

0 Kudos

pl. can u tell this in detail because when i go to SM37 and execute it i can see my job but when i go to SHDB i am not able to see my job over there.

"If it is canceled then some error has occured, so u can chose the job and put shdb in the command prompt and start debugging and check where it fails."

Thanks

Nagesh

0 Kudos

Are you going to post the code?

Regards,

Rich Heilman

Former Member
0 Kudos

firstly, post the code of your program as said by Rich,

secondly, have you done coding for running program in background

i.e.

if sy-batch = 'X'.

RUN ALV CLASSIC

enif.

third, do you have authorization to run program in background.

regards.