Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from horacio zapettini on Dec 6 at 6:27 AM Hi abaper, good morning that loop seems to be fine. I'd check a couple of points (would you mind if I ask you to revert back with these answers TODAY...? I'm on vacations since tomorrow and I'llbe offline until the end of the year...) 1. can gt_setleaf and gt_tcurf be hashed tables? If so, why don't you try that way? 2. how many rows does gt_setleaf hold? - how many rows does gt_tcurf hold? and how many rows does gt_fplt hold? 3. how long does it take to process each row in gt_fplt? 4. how long does it take to perform a read in gt_setleaf? 5. how long does it take to perform a read in gs_tcurf 6. how long does it take that select single? (this should be irrelevant...) 7. what is the piece of code you haven't copied that exists between the last endif and the endloop.... (there seems to be something missing ) Regards! Horacio
| | | ---------------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. __.____._ | _.____.__ |