Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from Kalyani Udare on Dec 6 at 12:44 PM Hi Abaper, Try not to use select query inside the loop. You are already reading gt_tcurf table using read statement and again after that statement you have written select query on TCURF table. There is absolutely no need of this select statement unless and until your internal table doesn't contain required fields. These fields however can be included in your internal table itself. Regards, Kalyani
| | | ---------------Original Message--------------- From: abaper Sent: Friday, December 06, 2013 4:06 AM Subject: Performance Issue With Select Single * Inside Loop Hi All, How to improve the performance of the below code. loop at gt_fplt into gs_fplt. GS_OUTTAB-WAERK = GS_FPLT-WAERS. READ TABLE GT_SETLEAF INTO GS_SETLEAF WITH KEY SETCLASS = '0000' SETNAME = 'ZSD_OTHER_CURR' VALFROM = GS_OUTTAB-WAERK. IF SY-SUBRC = 0. READ TABLE GT_TCURF INTO GS_TCURF WITH KEY KURST = 'M' FCURR = GS_OUTTAB-WAERK TCURR = GV_WAERS. SELECT SINGLE * FROM TCURF WHERE KURST = 'M' AND FCURR = GS_OUTTAB-WAERK AND TCURR = GV_WAERS. IF SY-SUBRC = 0. GS_OUTTAB-LNETWR = GS_OUTTAB-LNETWR * ( TCURF-TFACT / TCURF-FFACT ). ENDIF. ENDIF. Please advice. Thanks, abaper | | Reply to this email to post your response. __.____._ | _.____.__ |