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

How to solve a TIME_OUT error in the program?

Former Member
0 Likes
2,198

Hi Experts,

I am try to fix a Time limit exceeded error in the custom program, after review this program, I found there is a subroutine will be performed many times. And there are 3 standard FM  COM_PCAT_CTY_GETITEMLIST_O, COM_PCAT_ITM_GETDETAIL_O and  COM_PRSHTEXT_READ_SINGLE in this subroutine. A lot of SAP SQL & DB open/fetch in these 3 FM, so it will cost a lot of running time. The logic is ok, the requirement need to perform many times subroutine. Currently this program always dump when screen select a big Catalog Name.(Dialog mode & job mode) I think maybe use Parallel Processing call FM staring new task to solve this question,  but basis told me that the parameter of Max. Requests in Queue can't be changed(default is 5) I am afraid it's not enough for my requirement. Is there another way to solve this problem? I hope someone can give me a hint. Thanks!

Regards.

Hi Experts,

I am try to fix a Time limit exceeded error in the custom program, after review this program, I found there is a subroutine will be performed many times. And there are 3 standard FM  COM_PCAT_CTY_GETITEMLIST_O, COM_PCAT_ITM_GETDETAIL_O and  COM_PRSHTEXT_READ_SINGLE in this subroutine. A lot of SAP SQL & DB open/fetch in these 3 FM, so it will cost a lot of running time. The logic is ok, the requirement need to perform many times subroutine. Currently this program always dump when screen select a big Catalog Name.(Dialog mode & job mode) I think maybe use Parallel Processing call FM staring new task to solve this question,  but basis told me that the parameter of Max. Requests in Queue can't be changed(default is 5) I am afraid it's not enough for my requirement. Is there another way to solve this problem? I hope someone can give me a hint. Thanks!

Regards.

8 REPLIES 8
Read only

Former Member
0 Likes
1,826

Hi Kelvin,

If you think logic is ok, then why you want to change the program...

Run it in background.

or Schedule Job if you need to execute it with specific time period.

Read only

0 Likes
1,826

Because run it in background or Schedule Job also dump by Time limit exceeded error.

Read only

former_member210008
Active Participant
0 Likes
1,826

Is it possible to replace FMs with custom code that will not use select single?

Also you can try to split select screen parameters and run program several times (i.e. split date range 20160101-20160131 to 31 run with single date 20160101, 20160102, etc).

Read only

Chintu6august
Contributor
0 Likes
1,826

Hi,

look at the performance standard and logic using tcodes like  ST05, SLIN, SE30 etc

else run the report in background!!

thanks!!

Read only

Former Member
0 Likes
1,826

Hi,

If you call FM "SAPGUI_PROGRESS_INDICATOR" if your system is older then SAP BASIS 7.0.

Please check this. I am not sure about this way.

Regards,

Naveen Kumar.

Read only

Former Member
0 Likes
1,826

Do a trace - find out where time is being spent. Then get back to the forum.

The logic may be OK, but the implementation may have issues.

Rob

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,826

How would you get a time out in a background job? Are you sure it's not some other short dump?

These FMs are not released, so why are you using them? It looks like they only do some "reading" here, so why not replace them with custom SELECTs that you can tailor to your requirements?

As others noted, there are many tools available in SAP (e.g. this one) to analyze and resolve performance issues. I feel using parallel processing here would be nothing but a band-aid on an ugly sore.

Read only

ArcherZhang
Product and Topic Expert
Product and Topic Expert
0 Likes
1,826

Hi Kelvin,

Time out or over the memory during the background job process?

Regards,
Archer