‎2009 Nov 17 6:04 AM
Hello,
I am getting Time Out Error in the following select query while executing the Transaction LT22 using one varient.
SELECT (LTAP_FIELDS-FIELDS) FROM LTAP
INTO CORRESPONDING FIELDS OF TABLE ILTAP PACKAGE SIZE MAX_LTAP
WHERE LGNUM = T3_LGNUM
AND ( VLTYP IN IVLTYP AND VLPLA IN IVLPLA AND
NLTYP IN INLTYP AND NLPLA IN INLPLA AND
RLTYP IN IRLTYP AND RLPLA IN IRLPLA )
AND PQUIT IN PQUIT
AND (LTAP_SEL-WHERE_TAB).
Can you suggest what should do?
‎2009 Nov 17 7:05 AM
Hi,
You should only use the variant ... INTO CORRESPONDING FIELDS ... with large volumes of data because otherwise the time required to compare the field names in the name table is too high
better to use into table ranther than into corresponding fields.
SELECT FIELDS FROM LTAP
INTO TABLE ILTAP
WHERE LGNUM = T3_LGNUM
AND VLTYP IN IVLTYP
AND VLPLA IN IVLPLA
AND NLTYP IN INLTYP
AND NLPLA IN INLPLA
AND RLTYP IN IRLTYP
AND RLPLA IN IRLPLA
AND PQUIT IN PQUIT
AND LTAP_SEL-WHERE_TAB.
Works like ... INTO wa, except that the selected data is not assigned to the internal table itab line by line, but in packets of n lines. The old contents of itab are overwritten.
n <= 0 causes a runtime error.
Internally, n is placed in a type I field. Here, the usual conversion rules apply .
After leaving the processing loop, the contents of the internal table itab are undefined.
Regards,
Nelson
‎2009 Nov 17 9:02 AM
nobody can really help you because the given information is useless:
your WHERE-condition is completely dynamic:
+ the in-clause are dynamic you must specifiy their content,
+ and the last condition is a dynamic condition.
Thread should be locked, and you should start with SQL_Trace (see top thread) and come back with details.
Siegfried
‎2009 Nov 17 2:24 PM
Moderator message - Please see before posting - post locked
Rob