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

Background Processing

Former Member
0 Likes
2,310

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,978

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

Read only

0 Likes
1,978

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

Read only

0 Likes
1,978

Post your code, please.

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

Regards,

RIch Heilman

Read only

0 Likes
1,978

Hi Rich,

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

Regards,

Nagesh

Read only

0 Likes
1,978

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

Regards,

Rich Heilman

Read only

0 Likes
1,978

Hi Rich,

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

Regards,

Nagesh.

Read only

0 Likes
1,978

Please post the code of the program which is failing.

Regards,

Rich Heilman

Read only

0 Likes
1,978

Hi,

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

Svetlin

Read only

0 Likes
1,978

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

Read only

0 Likes
1,978

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

Read only

0 Likes
1,978

Hi rich,

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

Regards,

Nagesh

Read only

0 Likes
1,978

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.

Read only

0 Likes
1,978

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

Read only

0 Likes
1,978

Hi,

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

Svetlin

Read only

0 Likes
1,978

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

Read only

Former Member
0 Likes
1,978

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.

Read only

0 Likes
1,978

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

Read only

0 Likes
1,978

Are you going to post the code?

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,978

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.