‎2009 Jan 09 4:52 AM
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.?
‎2009 Jan 09 4:55 AM
Hi
Dont call FMs inside the loop unless otherwise required.Because it will cause performance problem.
Replace LOOP with READ TABLE.
Cheers,
Hakim
‎2009 Jan 09 5:01 AM
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.