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 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.
 
__.____._
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
Kalyani Udare  

achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have a technical question? Need to find IT solutions? Ask your peers in the Toolbox for IT community.

_.____.__

0 comments:

Post a Comment

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