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 issue

Former Member
0 Likes
326

Hi ,

i am getting timeout error after one hour after executing my z report and i checked in st22 and it is telling that timeout happened at statement case cobrb-konty in below code.

please tell me what may be problem and how to improve performance.

**************************************

FORM GET_SETTLEMENT_INFO.

clear : cobrb.

*concatenate 'OR' ekkn-aufnr into tobjnr.

select single kostl anln1 anln2 konty aufnr ps_psp_pnr

into (cobrb-kostl, cobrb-anln1, cobrb-anln2, cobrb-konty,

cobrb-aufnr, cobrb-ps_psp_pnr )

from cobrb

where objnr = tobjnr

and perbz = 'PER'.

if sy-subrc <> 0.

select single kostl anln1 anln2 konty aufnr ps_psp_pnr

into (cobrb-kostl, cobrb-anln1, cobrb-anln2, cobrb-konty,

cobrb-aufnr, cobrb-ps_psp_pnr )

from cobrb

where objnr = tobjnr.

endif.

case cobrb-konty.

when 'AN'.

concatenate cobrb-anln1 '-' cobrb-anln2 into tdata-ACCESSKEY.

when 'KS'.

tdata-ACCESSKEY = cobrb-kostl.

when 'OR'.

tdata-ACCESSKEY = cobrb-aufnr.

when 'PR'.

WRITE: cobrb-ps_psp_pnr TO tdata-ACCESSKEY.

when others.

clear tdata-ACCESSKEY.

endcase.

ENDFORM. " GET_SETTLEMENT_INFO

********************************************

Moderator message: what you can do now has been discussed many times, so

Edited by: Thomas Zloch on Dec 5, 2011 5:04 PM

1 REPLY 1
Read only

Former Member
0 Likes
281

do not use non key elements in the where clause