on 02-24-2009 2:10 PM
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
I think reading table SWW_WI2OBJ will be a good approach.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For you Scenario, Directly fetch from the Tables, You having the list of Object Keys, get the workitem id using the above mention tables. Use For All Entries to pick the all workitem ids at one time.
Regards,
Surjith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I don't know if SAP_WAPI_WORKITEMS_TO_OBJECT can really be faulted over this.
1000 iterations in 5 minutes = 0.3 seconds per object, or 10 objects every 3 seconds.
Unless there's a special WAPI for multiple objects, I think you will have to access the tables directly.
Looking inside that fm it seems it's tables SWWWIHEAD and SWIWOBJCT. You should debug a run of the fm to see exactly how it's done.
Note that table names may change from release to release.
regards
Rick Bakker
Hanabi Technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.