cancel
Showing results for 
Search instead for 
Did you mean: 

Work flow ID for a SRM SC

Former Member
0 Kudos

Hi Experts,


Could you please let me know how Workitem-ID can be fectehd for a Shopping cart.

I tried using BBP_PD_SC_GETDETAIL and SAP_WAPI_WORKITEMS_TO_OBJECT but they were not useful.

Can you please help out.

best regards,

Raghavendra.

Accepted Solutions (1)

Accepted Solutions (1)

robin_janke
Contributor
0 Kudos

Hi,

the link between workitem and object is in table SWI2OBJ. Just do a select on this one probably with the SC guid.

Regards,

Robin

robin_janke
Contributor
0 Kudos

SWW_WI2OBJ is the correct table btw. But FM as mentioned by others should work

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

SAP_WAPI_WORKITEMS_TO_OBJECT will give you workitem details for particular SC.

pass below import paramters.

OBJTYPE                         BUS2121

OBJKEY                                                       " Pass 10 char shopping cart number

TOP_LEVEL_ITEMS

SELECTION_STATUS_VARIANT        0000

TIME                                  00.00.000000.00.0000

TEXT                            X

OUTPUT_ONLY_TOP_LEVEL

LANGUAGE                        EN

DETERMINE_TASK_FILTER

REMOVED_OBJECTS

Regards,

Ibrahim

Former Member
0 Kudos

Hi Ibrahim,

I have executed the FM as you suggetsed but it is returing a message "0 entries were selected" in the structure MESSAGE_LINES.

Does this happen when FM is executed in a standalone manner through SE37.

Best regards,

Raghavendra.

Former Member
0 Kudos

hi,

It should return you work item details on executing from SE37 also. hope you are passing 10 char. long SC number appended with zero at start.

Let me know what you are passing in each import paramter of this FM.

you should pass TOP_LEVEL_ITEMS as blank and SELECTION_STATUS_VARIANT as '0000'.

Regards,
ibrahim

Former Member
0 Kudos

Hi again,

I have tried in the following manner to execute FM:

#1

--------------------------------------------------------------------

OBJECT_POR

OBJTYPE                         BUS2121

OBJKEY                          0010087735

TOP_LEVEL_ITEMS

SELECTION_STATUS_VARIANT        0000

TIME                                  00.00.000000.00.0000

TEXT                            X

OUTPUT_ONLY_TOP_LEVEL

LANGUAGE                        EN

DETERMINE_TASK_FILTER           X

REMOVED_OBJECTS

--------------------------------------------------------------------

#2

--------------------------------------------------------------------

OBJTYPE                         BUS2121

OBJKEY                          010087735

TOP_LEVEL_ITEMS

SELECTION_STATUS_VARIANT        0000

TIME                                  00.00.000000.00.0000

TEXT                            X

OUTPUT_ONLY_TOP_LEVEL

LANGUAGE                        EN

DETERMINE_TASK_FILTER

REMOVED_OBJECTS

--------------------------------------------------------------------

Can you please correct if I was wrong.

best regards,

Raghu.

Former Member
0 Kudos

You are doing absolutely correct, it should return something to you if there is already triggered workflow for SC 010087735. Are you executing it in correct test client ?

Former Member
0 Kudos

Yeah, I am executing it in the right client.

So my question is does this FM work in standalone scenario (in SE37) as I noticed that some FM's only return values during runtime that is when they are executed in a program.

best regards,

Raghu.

Former Member
0 Kudos

Strange!!

Yesterday a colleague of mine had come to me with totally similar requirement like yours and it did work !

it should work fro mSE37 also.

Try to pass SC details in OBJECT_POR paramter . Also try to debug how it is returning via SWI6 because SWI6 also uses SAP_WAPI_WORKITEMS_TO_OBJECT.

Former Member
0 Kudos

Hi,

It was helpful.

As I debugged SWI6 and found the following info in the case where work item ID was coming:

-----------------------------------------------------

   call function 'SAP_WAPI_WORKITEMS_TO_OBJECT'
       exporting
            object_por               = ls_sibflporb * Shopping Cart Number
            top_level_items          = space
            selection_status_variant = swi2seldat-selvariant *0001 is being passed
            time                     = ls_time
            output_only_top_level    = 'X'
       tables
            task_filter              = lt_task_filter
            worklist                 = p_lt_worklist[].

-----------------------------------------------------

I used the same data in SE37 but it returned nothing.

Can you please try this.

Best regards,

Raghavendra.

Former Member
0 Kudos

Hi rapghu

plz try SWI6 tcode and provide shopping cart details

You will find the workitem in it

Hope it helps

Regards

Bash

Former Member
0 Kudos

Hi Basheer,

I have used SWI6 but I need some table/FM which would return the workitem ID so that I could use in a BADI.

Hope you understand.

Thanks ans regards,

Raghavendra.

former_member185167
Active Contributor
0 Kudos

Hello,

I'm surprised SAP_WAPI_WORKITEMS_TO_OBJECT did not work, though I haven't tried it myself.

Which object did you use, BUS2121?

regards

Rick Bakker

Former Member
0 Kudos

Hi RIck,

Yes I did use BUS2121 and passed both teh object number and the SC GUID but both did not work.


Best regards,

Raghu.