cancel
Showing results for 
Search instead for 
Did you mean: 

FM: SAP_WAPI_WORKITEMS_TO_OBJECT to get WI ID for PO

former_member187651
Active Participant
0 Kudos

Hi Experts,

My requirement is to get the WI ID based on object, in my case PO in SRM. Depending on which I can apply my logic in code. I am using FM: SAP_WAPI_WORKITEMS_TO_OBJECT to get the WI ID.

I have tried to execute the FM with

OBJTYPE = 'BUS2201'

OBJKEY = GUID value of PO

OBJECT_POR = INSTID = ?  TYPEID = ? ca= ?

When I checked the table SWW_WI2OBJ and we have required parameter to be passed. Even it works when I executed the table with some known WI and then executed the FM with table parameters. but how can I get the OBJECT_POR = INSTID = ?  TYPEID = ? ca= ? from FM: BBP_PD_PO_GETDETAIL

I didn't find thses values under any return parameter. Just I am having doubt with input OBJECT_POR .

Thanks in advance

Chandan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

OBJECT_POR-TYPEID = Name of the object/class - see example from table SWW_WI2OBJ and hard-code it to the function call.

OBJECT_POR-CA = Either "CL" if it is a class or "BO" if it is a business object (see it again from the table SWW_WI2OBJ). Again hard code it once you know the correct entry.



OBJECT_POR-INSTID = This is the only real variable. This is the key of the object.

Please understand that the OBJECT_POR is exactly the same as the field CATID, INSTID and type ID values in table SWW_WI2OBJ. I don't think that you can find the work items by using OBJTYPE = 'BUS2201', if there is no entry in the table that has that value in the type ID field. This would mean that there are no work items that would have business object BUS2201 as an attachment. You might be looking something that does not exist.

(This was purely from WF point of view. Perhaps there is some special SRM functionality/function that you can use to find the work items.)

Kind regards,

Karri

former_member187651
Active Participant
0 Kudos

Thanks Karri. You reply helped me to resolve the issue.

Can you please give your inputs on link below:

Regards

Chandan

Answers (0)