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 Problem

Former Member
0 Kudos

Hi,

I have written a code as above but it is giving timeout error, what I can do to resolve this problem.

SELECT bukrs belnr gjahr j_1ibuzei witht wt_withcd

FROM with_item INTO corresponding fields of TABLE

data_tab FOR ALL ENTRIES IN

bkpftab WHERE bukrs = bkpftab-bukrs AND

belnr = bkpftab-belnr AND

gjahr = bkpftab-gjahr AND

wt_qbshh NE 0 AND

koart = 'K' AND

wt_acco IN zvendor AND

qsrec IN zrec AND

wt_stat = ' ' AND

j_1ibuzei <> '000'.

Thanks.

4 REPLIES 4

former_member667836
Active Participant
0 Kudos

Before giving query using select all entries check whether the internal table is initial or not.otherwise it will fetch all the values in the table.that may lead to time out error.

former_member404244
Active Contributor
0 Kudos

Hi,

Write like this

If not bkpftab[] is not initial.

SELECT bukrs belnr gjahr j_1ibuzei witht wt_withcd

FROM with_item INTO corresponding fields of TABLE

data_tab FOR ALL ENTRIES IN

bkpftab WHERE bukrs = bkpftab-bukrs AND

belnr = bkpftab-belnr AND

gjahr = bkpftab-gjahr AND

wt_qbshh NE 0 AND

koart = 'K' AND

wt_acco IN zvendor AND

qsrec IN zrec AND

wt_stat = ' ' AND

j_1ibuzei <> '000'.

endif.

regards,

Nagaraj

Former Member
0 Kudos

Hi

Instead of corresponding fields better use INTO TABLE

by writing the fileds in internal table in the correct sequence

and also in where condition follow the sequence of fields similar to the table field sequence.

If not bkpftab[] is not initial.

SELECT bukrs belnr gjahr j_1ibuzei witht wt_withcd

FROM with_item INTO TABLE

data_tab FOR ALL ENTRIES IN

bkpftab WHERE bukrs = bkpftab-bukrs AND

belnr = bkpftab-belnr AND

gjahr = bkpftab-gjahr AND

wt_qbshh NE 0 AND

koart = 'K' AND

wt_acco IN zvendor AND

qsrec IN zrec AND

wt_stat = ' ' AND

j_1ibuzei <> '000'.

endif.

<b>

Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

SELECT bukrs belnr gjahr j_1ibuzei witht wt_withcd

FROM with_item

APPENDING corresponding fields of TABLE data_tab

PACKAGE SIZE 1000

FOR ALL ENTRIES IN

bkpftab WHERE bukrs = bkpftab-bukrs AND

belnr = bkpftab-belnr AND

gjahr = bkpftab-gjahr AND

wt_qbshh NE 0 AND

koart = 'K' AND

wt_acco IN zvendor AND

qsrec IN zrec AND

wt_stat = ' ' AND

j_1ibuzei <> '000'.

ENDSELECT.

Use Package size and Appending into table

This helps you.

Regards,

Pavan P.