Application Development 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: 

Time out Error

Former Member
0 Kudos

Dear All,

I use the parallel way to get data from two large table. the SQL is below:

CALL FUNCTION 'ZIMMA011'

STARTING NEW TASK l_taskname

DESTINATION IN GROUP l_srv_grp

PERFORMING return_back_this_task

ON END OF TASK

TABLES

it_in = lt_component

it_plant = gs_werks

it_storl = gs_lgort

it_bwart1 = s_bwart1

it_bwart2 = s_bwart2

it_date = lt_date.

In function ZIMMA011 the code is :

SELECT msegmblnr msegzeile mkpfbudat mkpfcpudt mkpfcputm msegmatnr

msegmenge msegmeins mseg~shkzg

msegwerks mseglgort

mseg~bwart

FROM mkpf JOIN mseg

ON mkpfmblnr = msegmblnr

INTO CORRESPONDING FIELDS OF TABLE it_out

FOR ALL ENTRIES IN it_in

WHERE matnr = it_in-matnr

AND werks IN it_plant

AND lgort IN it_lgort

AND ( bwart IN it_bwart1 OR bwart IN it_bwart2 )

AND cpudt IN it_date.

the inner table has 2000 records, when I run foreground it is OK, but short dump with CALL_FUNCTION_REMOTE_ERROR result from Time limit exceeded.

The error point:

1449 *&RECEIVE RESULTS FROM aRFC calls

1450 REFRESH lt_mseg.

===== RECEIVE RESULTS FROM FUNCTION 'ZIMMA011'

1452 TABLES

1453 it_out = lt_mseg.

1454

1455 IF l_taskname <> 'TASK'.

1456 g_running = g_running - 1.

1457 ENDIF.

Edited by: zheng michael on Apr 8, 2010 2:30 AM

Edited by: Rob Burbank on Apr 8, 2010 9:08 AM

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try to avoid using

CORRESPONDING FIELDS OF . - alternative - > declare the internal table with the fields in the same order as that of the fields being selected in the select query.

Are you checking out whether the availability of the data in the internal table "it_in"?

if 'NO", then do not proceed for the select query.

Regards,

Venkatesh

Former Member
0 Kudos

Hi,

1) Before the select statement, add the condition

if it_in[] is not initial.

2) In select statement, i think you should add one more condition while joining MKPF and MSEG.

mkpf~mblnr = mseg~mblnr
and mkpf~mjahr = mseg~mjahr

which ensure the use of primary key during table join.

3) Check whether index exists for the where condition field sequence

Regards

Vinod

Former Member
0 Kudos

Hi

Pls add MJAHR in Join condition.

This select can not use useful index.

Pls try add to foliowing index.

MANDT

CPUDT

MBLNR

MJAHR

Regards,

Gaito