Dear Experts ,
I am facing the below perfomance problem by using SAP WAPI Function modules in my requirement .
Requirement :---I am working on DMS Workflows .The BO is DRAW .
I need to find the WORKFLOW Workitem Id respective to the Document . I am using the WAPI - SAP_WAPI_WORKITEMS_TO_OBJECT for this .
In the import parameter of this BAPI i am passing the DMS document no , version, document type and document part which are the key fields for the business object DRAW . I am geeting the respective workflow workitem ID for that perticular document through this bapi .
My problem is :---
When i want to get the workflow workitem id of more than 1000 documents at a time through programme , i am calling this WAPI - SAP_WAPI_WORKITEMS_TO_OBJECT inside Loop of an internal table like below ,
The ITAB intranal table contains the document nos appx 1000 .
LoOp at ITAB .
CALL FUCNTION SAP_WAPI_WORKITEMS_TO_OBJECT
IMPORT
EXPORT
TABLES
END LOOP .
This takes nearly 5 minutes to get executed . In real when i will execute the programme there may be more than 5000 documents to be executed so the programme may take more than 10minutes .
I am quite surprised that the standard WAPI are taking so much of time .
Am i missing any thing so that the WAPI is taking so much of time. Or if any body is having any suggestion related to are most welcome .
Is it possible to get the data directly from Tables instead of using WAPIs .
Regards
Prabhudutta