Skip to Content
author's profile photo Former Member
Former Member

Performance Issue using SAP WAPI

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 .






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 .



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 04:49 AM

    I think reading table SWW_WI2OBJ will be a good approach.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 24, 2009 at 05:12 PM


    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.


    Rick Bakker

    Hanabi Technology

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 25, 2009 at 02:43 AM


    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.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.