cancel
Showing results for 
Search instead for 
Did you mean: 

Work item id of the given request number

Former Member
0 Kudos

Dear Experts,

Can anyone let me know from where we will get workitem id for a given request number.

The scenario is in SBWP tcode,for a workitem it will show workitem id .

PFB the snapshot

Thanks

KH

Accepted Solutions (0)

Answers (1)

Answers (1)

I042439
Employee
Employee
0 Kudos


Hi KH

You can use Function Module SAP_WAPI_WORKITEMS_TO_OBJECT to get the work items for a given object. Populate   OBJECT_POR with the Base object and the key and get the work items in   WORKLIST-WI_ID

Regards

Modak

Former Member
0 Kudos

Can you pls provide me the details what i need to pass according to my post?

Thanks

KH

I042439
Employee
Employee
0 Kudos

Hi KH

OBJECT_POR-INSTID = Pass request number (include liading zeros / spaces also...the full key)

OBJECT_POR-CATID = 'CL' if your base object is Class / 'BO' if base object is Business Object

OBJECT_POR-TYPEID = class name/ Business object name

SELECTION_STATUS_VARIANT = :

  • 0000 - if you want ALl Instances

    0001 - only active (running) instances

    0002 - if you want COMPLETED or CANCELLED Instances

Let other values be default for the FM SAP_WAPI_WORKITEMS_TO_OBJECT

The Workflist will be returned in table WORKLIST, workitem ID will be in column WI_ID

To get the OBJECT_POR-TYPEID:

check your workflow triggeing object in the header (Hat Icon) -> Version Independent Tab -> Start Events

To Get OBJECT_POR-CATID -> same as above, if it's BO, set to BO else CL

Regards,

Modak