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

Debugging mode

Former Member
0 Likes
2,598

Hi frends we are facing an TIME_OUT runtime error.In the SOURCE CODE EXTRACT , we gt the code bcz of which it is happening.It is a select statement .:

IF NOT WF_BSEG[] IS INITIAL.
      SELECT DOCNR BUZEI BELNR MSL RACCT BUDAT
        FROM FAGLFLEXA 
        INTO CORRESPONDING FIELDS OF TABLE T_FAGLFLEXA2
                              FOR ALL ENTRIES IN WF_BSEG
                                       WHERE RBUKRS = '9009'
                                       AND RYEAR = E_FYEAR
*                                       AND RBUSA = P_WERKS
                                       AND RACCT IN P_KSTAR
                                       AND DOCNR = WF_BSEG-BELNR
                                       AND BUZEI = WF_BSEG-BUZEI.
    ENDIF.

is there any way to know that what condition in the where clause it is nt able to satisfy?

Edited by: Rob Burbank on Jan 17, 2010 8:06 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,494

Hi Achal ,

Try to trace your code using first by ST05 and then by SE30 .

This is the best method and recommended by SAP Experts for performance tuning of your code.

Please let me know if you need more help in this.

Regards,

Nikhil

28 REPLIES 28
Read only

Former Member
0 Likes
2,494

Hi Achal ,

With TIME OUT error it means that , number of records fetched from this database table are many and hence the query execution takes more time.

You should try to optimize this query. Check that all the parameters used in where clause are having correct data type and try to increase the parameters in where clause.

Also, you can reduce number of records fetched from tables by making selection screen fields Mandatory.

Proceed with runtime analysis and use trace to check the index used.

Hope this helps you.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,494

Try to pass the key fields available or

You can use OPEN CURSOR addition with the select statement.

Please search in SCN or Google for more details.

Read only

0 Likes
2,494

>

> You can use OPEN CURSOR addition with the select statement.

@Keshav.T - how does OPEN CURSOR help here?

Rob

Read only

0 Likes
2,494

hi fiends....this TIME_OUT is nt bcz of any performance issue.actuallly it is only a report in which we are obtaining data from different standard tables then store it into a z table,internal table and then just display it.actually i have checked a z table used in this report from which we display the data, it does nt contain the entry which is entered by user in selection.

actually it is a performance report of equipments like their fuel cnsmptn,ideal hours,working hours etc for PM module in which user has to enter only month and the plant name for which he wants to see the report. the problem is only for few plants and that too for particular months.I think there is some functional problem bcz for one of our plants it is working perfectly fine.

I want to trace that entry which causes the error and in debugging mode this was the select statement at which it keeps on processing

Edited by: achalmehra on Jan 18, 2010 5:31 AM

Read only

0 Likes
2,494

Hi Rob,

Not as much as you know

Doesnt open cursor with hold avoids the time out error.

Read only

0 Likes
2,494

>

> Doesnt open cursor with hold avoids the time out error.

So are you suggesting OP to use Native SQL instead?

Cheers

Read only

0 Likes
2,494

Hi amit,

No not native sql.

I have seen so many discussions in forum related to this,

to use cursor with hold concept, so that there won't be time out error while fetching data from DB.

May be im wrong

Read only

0 Likes
2,494

hi friends i have tried to run it in the background.The duration for it has reached 2200 seconds and the count is still on.I mean stilll the job is in active state nd not finished

Edited by: achalmehra on Jan 18, 2010 11:33 AM

Read only

0 Likes
2,494

the report is running well for some plants.only it is not working for newly created plants and for period (mm/yy) 10/2009 to 03/2010.could there be some problem related to the configuration of these plants.?

Read only

0 Likes
2,494

>

> Doesnt open cursor with hold avoids the time out error.

It allows you to have multiple cursors open on a table at one time. No performance improvements in this case.

@achalmehra - don't you think it's better to clear up misleading statements? That should help answer your question. But I don't really know what your question is. please see: [How To Ask Questions The Smart Way|http://catb.org/~esr/faqs/smart-questions.html]

Rob

Read only

0 Likes
2,494

Thanks Rob.

Read only

0 Likes
2,494

There is a great deal of information on this forum; unfortunately, there is also a great deal of misinformation. The trick is to figure out the difference. One trick I use is to test before posting. It takes longer, but is less error prone.

Rob

Read only

0 Likes
2,494
ROB:
@achalmehra - don't you think it's better to clear up misleading statements?

thnx rob for your suggestions but most of the time what happen is that people start dissussing the other topics in so detail that they forget the main one, sometimes in order to show they have more experience.and like all other questions user will stop responding to the threads with more than 2-3 pages.

and I am sorry if i was not able to explain my problem in a good way.Is there anything you want to now then i can tell.

Read only

0 Likes
2,494

Hi friends , I have done some more testing and made some changes in the code.All what i have concluded the problem is related to some entry in the functinal mdule that is somehow related to the Plants and the log book entry most probably.

I think I sholud close the thread in ABAP.?

Read only

0 Likes
2,494

>

> all other questions user will stop responding to the threads with more than 2-3 pages.

You are mistaken. Often people (At least I) thinks that there must be informative discussion happening if thread looks of 2-3 pages, and most of the guys (Again, At least I and I'm sure there are many more) starts to read thread entirely to involve themselves in high-quality informative discussions.

As 2 other folks have already informed you that your provided information is inadequate.

Another thing which you should ask yourself i.e. what is significant relation between your question and subject line? What does "Debugging mode" do in this case? The proper subject line should be "Timeout Error in select statement" but again if you have had to search in [Google |http://www.google.com/search?hl=en&q=timeouterror%2BABAPselect+&aq=f&oq=&aqi=]with good text, trust me you were more likely to acquire answers yourself rather than waiting for days or two.

Also, just stress your head for a while and think If I would get same error in future then for sure I will search with the text "Timeout Error" and unfortunately your thread is less likely to fetched with search results and I will miss healthy information(If happend).

p.s. There is a possibility that my reaction is poor so feel free to hit abuse button if you think so.

Cheers

Read only

0 Likes
2,494

no no Amit...no hard feelings for you or anybody.I know people here are for help and sharing information.But the problem is that I have tried so many times and concluded after long disscussion people stop responding.There may be few like you.

the 2nd point you mentioned is about my question's subject line. that is so because when i posted the question my intension was only to find a way in the debugging mode that could tell me which condtion specifically in the select statement is not able to be satisfied.

is there any way to know that what condition in the where clause it is nt able to satisfy?

and the disscussion now we are having, is the result of other user responses i received after posting question.

Still i will try to make sure that the informatiin provided by me is complete. anything else Sir ?

Read only

Former Member
0 Likes
2,495

Hi Achal ,

Try to trace your code using first by ST05 and then by SE30 .

This is the best method and recommended by SAP Experts for performance tuning of your code.

Please let me know if you need more help in this.

Regards,

Nikhil

Read only

0 Likes
2,494

Hi nikhil

in ST05 it is shwing table RFBLG and in se30 it is showing the select statement given by me before.

Read only

0 Likes
2,494

Hi Achal ,

RFBLG is a Cluster for accounting document . Its clear that this is refered somewhere in your code or in one of the select query in standard tables. It will be of great help if you could share the trace file so that I can recommend you something that will help you in incresing the Performance.

Regards,

Nikhil

Read only

0 Likes
2,494

how to share.is there nay option to attach a file here..bcz the report has exceeded limit of max charators allowed here

Read only

0 Likes
2,494

one more thing nikhil i wanna tell u.the report is working fine for the plants created earlier for all months.only for some of our plants, it is not working for the month after sept.,2009. I mean we are facing TIME_OUT for these.

like if for a new plant i use the month and year(mm/yy) : 10/09 then we face error

and if i use 10/10(mm/yy) : then we dont face error.

Read only

0 Likes
2,494

One more thing achal i wanna ask you Can we have any updates on long discussion thread, Please?

Read only

0 Likes
2,494

This message was moderated.

Read only

0 Likes
2,494

Hi,

There is only two approach for the solution.

- Try to improve performance of select statement (You can check if it is possible to create an index, it will improve the performance)

- If not possible you can run the program in background. When program is running in background there will not be any time restriction.

Read only

0 Likes
2,494

>

> hey amit....srry friend as i was nt receiving any further comments and solutions for that thread so i just closed it.I am still lukng for a solution of that problem. but let us nt disscuss that problem in this thread....so plz...i am srry.yeah if i will have the solution for that problem i will intimate u.gve me ur id if u come to know anythng abt that plz tell mee..thnxxxxxxxxxxxxx

Looks like vowels are not functioning on your keyboard? Is it?

Cheers

Read only

Former Member
0 Likes
2,494

> No not native sql.

> I have seen so many discussions in forum related to this,

> to use cursor with hold concept, so that there won't be time out error while fetching data from DB.

??? open cursor is no Native SQL, but can see no advantage here. The OPEN CURSOR WITH HOLD is interesting if changes

to the db follow.

The problem is not really explained, how long does the actual SELECT need? I see no data?

How many records are in the driver table of the FAE, how many in the database table, what are the indices?

I am not familiar with that table but is does not make sense, to look up the settings in an other system.

Siegfried

Read only

0 Likes
2,494

Sorry Siegfried Boes and Amit,

I was confused.

Read only

0 Likes
2,494

hey friends pllease try to solve the actual problem istead of starting some other discussion in between.

thnx