We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-newbies-l] Performance Issue With Select Single * Inside Loop

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

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.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
horacio zapettini  

13 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language