cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI BAPI_CATTIMESHEETMGR_DELETE not completing the workitem

Former Member
0 Kudos

Hi,

For timesheet approval, we have used task TS310000007 for approval/rejection. Now when employee deletes the time record (using CAT2 tcode OR from portal ESS) which is pending for approval, the corresponding UWL item in manager inbox also gets removed and work item/work flow gets completed, record is also record from CATSDB table. But on deleting/following same steps using BAPI BAPI_CATTIMESHEETMGR_DELETE, only record is being removed from CATSDB table and work item is not getting completed/removed from manager's inbox. This is redundant work item and does not have any record for approval.

Seems this BAPI only deletes record from CATSDB but doesnt completes work item.

Did any one of you had a requirement to use this BAPI and what was done to set work item to complete ?

Regards,

Ibrahim

Accepted Solutions (1)

Accepted Solutions (1)

anjan_paul
Active Contributor
0 Kudos


Hi,

   check and share SWEL screenshot, after callin BAPI_CATTIMESHEETMGR_DELETE, is any event triggered or not

Answers (4)

Answers (4)

Former Member
0 Kudos

Issue was with COMMIT WORK. Executing this FM from SE37 doesnt complete the work item. calling from program with comit work works !

Regards,

Ibrahim Ansari

I042439
Employee
Employee
0 Kudos

Hi Ibrahim

The FM BAPI_CATTIMESHEETMGR_DELETE is probably not calling the terminating event of the task TS31000007.

You will have to call it explicitly after calling BAPI_CATTIMESHEETMGR_DELETE.

Call FM  SAP_WAPI_CREATE_EVENT to trigger event COMPLETED of BO CATS for the same time record (The Key should be same for the Event to have an effect on the running instance).


Regards,

Modak

Former Member
0 Kudos

TS31000007 only have Completed as Terminating Event and CATS has Created, Rejected and Completed Event. If this a one time clean up, you could use SWWL tcode to clean the workitems. Otherwise, use the one of the user exits to trigger "COMPLETED" in CATS. Also we could create a custom event by creating a subtype for CATS.

CATS0001  CATS: Set up worklist

CATS0002  CATS: Supplement recorded data

CATS0003  CATS: Validate recorded data

CATS0004  CATS: Deactivate functions in the user interface

CATS0005  CATS: Customer field enhancements

CATS0006  CATS: Validate entire time sheet

CATS0007  CATS: Subscreen on initial screen

CATS0008  CATS: Determine workflow recipients for approval

CATS0009  CATS: Customer-Specific Text Fields in Data Entry Secti

CATS0010  CATS: Customer-Specific Text Fields in Worklist

CATS0011  CATS: Customer functions

former_member186746
Active Contributor
0 Kudos

Hi,

Check if the corresponding task of the workitem has any terminating events. If this is the case then this BAPI isnt triggering the events. Search for a different bapi who also triggers events, or simulate your own, with FM SAP_WAPI_EVENT_CREATE.

Kind regards, Rob Dielemans

former_member185167
Active Contributor
0 Kudos

*SAP_WAPI_CREATE_EVENT