Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performance issue

Former Member
0 Likes
365

Dear all

I am using BAPI_BUS2172_GET_TREE fm for get phase, task for one project in Cproject.

When i am using this fm. it took time (4 to 5 seconds). After 5 seconds only i can able to get the result. But i am using the fm. with in loop.

LOOP at LT_DPR_PROJECT INTO WA_DPR_PROJECT.

lv_pro_GUID = WA_DPR_PROJECT-GUID.

call function 'BAPI_BUS2172_GET_TREE'

exporting

PROJECT_DEFINITION_GUID = lv_pro_GUID

TABLES

ET_TREE = lt_tree.

APPEND LINES OF lt_tree to lt_tree_f.

CLEAR : lt_tree,lv_pro_GUID.

ENDLOOP.

In my above internal table i have 100 projects are there, So i will take time. How can i avoid that.?

2 REPLIES 2
Read only

abdul_hakim
Active Contributor
0 Likes
329

Hi

Dont call FMs inside the loop unless otherwise required.Because it will cause performance problem.

Replace LOOP with READ TABLE.

Cheers,

Hakim

Read only

Former Member
0 Likes
329

Ask the BASIS guy about this he can surely help as I have faced same kind of issue but the problem was solved by the BASIS team.

They can Increase the run time of a object which is by default 5 second after which the system dumps.