cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative to SAP_WAPI_WORKITEMS_TO_OBJECT

Clucking
Participant
0 Kudos

Hi,

I'm using FM SAP_WAPI_WORKITEMS_TO_OBJECT in a check function module in order to find eventually other workflows for an object. But deeply in this function module a commit work is executed and this in not allowed in the check function module - thus I get a dump.

Can anyone come up with another way of finding running workflows for an object?

Thanks,

Claus.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You could read the data directly from table SWW_WI2OBJ.

Also, take a look to transaction SWI6. Perhaps you can get an idea.

Actually I am little bit surprised about your problem. I think it is quite normal approach to use that function in check function module (without problems). Refer to this post:

Regards,

Karri

Clucking
Participant
0 Kudos

Thanks,

Yes, I am surprised too. Because I have used this approach several times. And actually the issue is not persistant - sometimes a dump - sometimes not...

As you can see below, reading from my check FM and up the issue occours in the top of the list in FM SWD_CHECK_ACTIVE_VERSION where there is a call to FM DB_COMMIT.

Best regards,

Claus.

21 FUNCTION     SAPLSYDB                            LSYDBU27                                7

   DB_COMMIT

20 FUNCTION     SAPLSWDO_RUNTIME                    LSWDO_RUNTIMEU01                      251

   SWD_CHECK_ACTIVE_VERSION

19 FUNCTION     SAPLRHWA                            LRHWAU02                              109

   RH_GET_WFD_ID

18 FUNCTION     SAPLRHWF_RUNTIME                    LRHWF_RUNTIMEU01                      480

   RH_TASK_ATTRIBUTES_RUNTIME

17 METHOD       CL_SWF_RUN_P_HEAD=============CP    CL_SWF_RUN_P_HEAD=============CM00C    13

   CL_SWF_RUN_P_HEAD=>GET_TASK_TEXT

16 METHOD       CL_SWF_RUN_P_HEAD=============CP    CL_SWF_RUN_P_HEAD=============CM003   130

   CL_SWF_RUN_P_HEAD=>IF_SWF_REP_HEADER_SELECTION~READ

15 METHOD       CL_SWF_REP_MANAGER============CP    CL_SWF_REP_MANAGER============CM003    47

   CL_SWF_REP_MANAGER=>IF_SWF_REP_WORKITEM_SELECTION~READ

14 METHOD       CL_SWF_REP_ITEM2OBJECT========CP    CL_SWF_REP_ITEM2OBJECT========CM00M     4

   CL_SWF_REP_ITEM2OBJECT=>CONVERT_TO_WI2HDR

13 METHOD       CL_SWF_REP_ITEM2OBJECT========CP    CL_SWF_REP_ITEM2OBJECT========CM00N     5

   CL_SWF_REP_ITEM2OBJECT=>GET_WI2OBJ_WIHDR

12 METHOD       CL_SWF_REP_ITEM2OBJECT========CP    CL_SWF_REP_ITEM2OBJECT========CM00D    30

   CL_SWF_REP_ITEM2OBJECT=>READ

11 FUNCTION     SAPLSWRI                            LSWRIU01                              149

   SAP_WAPI_WORKITEMS_TO_OBJECT

10 FUNCTION     SAPLZSDWF01                         LZSDWF01U06                           157

   Z_SD_WF_CHECK_FM_CREDIT

former_member186746
Active Contributor
0 Kudos

Hi,

I just had a quick glance at the code. It seems that the commit comes up if any of the other function modules comes up with message of message type E or A.

Maybe something is not correct in your system or maybe this only happens in development.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Perhaps you have something "wrong" in the development (in your workflow template perhaps)? I assume this happens only in development? Isn't SWD_CHECK_ACTIVE_VERSION for checking the active workflow template version? What if you generated a new version for your template?

Debugging could tell you a lot, but I guess it is difficult if the problem doesn't appear always.

Regards,

Karri

Answers (2)

Answers (2)

Clucking
Participant
0 Kudos

Not sure what is going on - but yes, it is in development.

I will continue using the same FM at see if it gives any issues in the qa system

anjan_paul
Active Contributor
0 Kudos

hi,

  you can find entries in SWW_WI2OBJ table