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

Time out problem in background

Former Member
0 Likes
2,338

Hi All,

I am facing a problem with a select query while running the report in background (found out while debugging) where as the same select query while running in fore ground works fine.It is getting timed out.If anyone has faced simillar problem can you please let me know the reason and the way to solve the problem without changing the code.

Thanks in advance.

Hi All,

I am facing a problem with a select query while running the report in background (found out while debugging) where as the same select query while running in fore ground works fine.It is getting timed out.If anyone has faced simillar problem can you please let me know the reason and the way to solve the problem without changing the code.

Thanks in advance.

11 REPLIES 11
Read only

sylvain_vels
Explorer
0 Likes
1,684

Hi,

I am surpised because normaly you don't have time out in background task.

Are you sure that you are in background? if yes, are you sure that the query is the same in foreground than in background?

Don't you reach the limit size of the memory?

what is the select?

Best regards Sylvain

Read only

0 Likes
1,684

Hi Vels,

Thanks for your reply. Yes like you am also surprised seeing this and the select queries are same.

The select query is as follows:

Select bukrs

werks

matnr

ziv_mm_datemon

ziv_mm_dateyear

ziv_mm_itotobs

ziv_mm_ototobs

from ziv_mm_obsdat1

into table tb zivmm_obsdat1

for all entries in tbl_mara

where bukrs in s_bukrs

and werks in s_werks

and matnr eq tbl_mara-matnr.

Thanks.

Read only

0 Likes
1,684

Hi,

Are you sure that you internal table tbl_mara is not empty... because with the for all entries the table must not be empty

if it's empty you will select all the data.

What is your dump?

Best regards

Read only

0 Likes
1,684

Hi,

Yes the internal table has records, actually the report was running for even 2 days and the stuck up point was this select query mentioned in the previous post.Ultimately the job has to be cancelled externaly.

Hope this information helps!

Thanks.

Read only

HermannGahm
Product and Topic Expert
Product and Topic Expert
0 Likes
1,684

Hi,

> Yes the internal table has records, actually the report was running for even 2 days and the stuck up point was this select query mentioned in the previous post.Ultimately the job has to be cancelled externaly.

but this is no timeout. If you canceled it manually there is no technical problem (besides the run time).

With stuck you mean that after 2 days it was (still / currently) executing this query, right?

In that case it looks like you have to do a performance analysis of the whole program execution. Check if you

can find anything that processes less data and runs faster. Take traces from this run.

Kind regards,

Hermann

Read only

0 Likes
1,684

Thanks All for your inputs !!

but my concern is if the same query is taking minutes to get executed in foreground why it is taking so much of time while executed in background.

Any suggestions on the same.

Thanks.

Read only

HermannGahm
Product and Topic Expert
Product and Topic Expert
0 Likes
1,684

Hi,

> but my concern is if the same query is taking minutes to get executed in foreground why it is taking so much of time while executed in background.

sorry, my crystal ball is out of order right now. I suggest that you take traces in the mean time.

Kind regards,

Hermann

Read only

0 Likes
1,684

You can try 3 ways:

1° When the job is running in background you can debbug it with the SM66 transaction. Go to the menu program--> debug.

Like that you will see step by step what is doing.

2° when you launch your programm in background you can avoid it to go to background... and like that you can debugg it...

3° When it takes a long time with your query, you can ask to the Database adminstrator to see what's happening on the base... and see the selec clause. (directly in the base: not by SAP view)

I hope it's helpful.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,684

Did you debug the background job and find the exact place where its hanging.

Are you sure its because of this query ?

Read only

0 Likes
1,684

perhaps you have reached the limit of the memory for the process...

Can you send us the dump in the ST22?

Thanks

Best regards

Read only

Former Member
0 Likes
1,684

Moderator message - Please see before posting - post locked Rob