Wednesday, May 15, 2013
Lets assume that we want to check all the pending leave work items.
Steps
  • Get all pending work items from table SWWWIHEAD(Header Table for All Work Item Types).
  •  "Get all pending work items
      SELECT WI_ID WI_TYPE WI_STAT TOP_WI_ID
        FROM SWWWIHEAD
        INTO TABLE IT_PLVE_WITEMS
       WHERE WI_TYPE     = 'W'
         AND WI_STAT     = 'READY'
         AND WI_RH_TASK  = C_WORFLOW_TASK.
  • Get the work items assigned to user using table SWWUSERWI.
  • IF IT_PLVE_WITEMS IS NOT INITIAL.
        "Current Work Items Assigned to a User
        SELECT USER_ID WI_ID TASK_OBJ
          FROM  SWWUSERWI
          INTO TABLE IT_WI_AGENT
          FOR ALL ENTRIES IN IT_PLVE_WITEMS
         WHERE WI_ID     = IT_PLVE_WITEMS-WI_ID
           AND TASK_OBJ  = C_WORFLOW_TASK
           AND NO_SEL    = SPACE.
      ENDIF.
  • Based on two tables, we can filter work item for user.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.