Issue triggering a workflow using a BAPI.
Harshita Nersu
harshita.nersu at ie.ibm.com
Thu Jul 10 12:30:44 EDT 2008
Hi All,
Please help me fill the missing bits, where i am going wrong to achieve a
certain use case.
The requirement is for a custom portlet..
Usecase: Employee submits a Absense or Attendance Record>Goes for approval
to the manager>Manager is able to approve/reject.
The below are the BAPIs that i am to work with.I have put together a
process flow how it must be working But have issues triggering a workflow.
I HAVE to make use of that workflow task only and that Bapi to create
records.
Step 1: Create Absence/attendance using BAPI_PTMGRATTABS_MNGCREATION.( i am
succesfully able to create a Absence Record aswell as Attendance record)
Step2: Some how by doing the above the workflow TS30000016 is getting
triggered. (i dont see it getting executed..coz i dont see anything in SBWP
of manager)
Step3: Assuming The workflow indeed gets triggered, then it goes and
creates a task for manager to approve or reject in SAP inbox.(which i dont
see)
Step4:Read Inbox using SAP_WAPI_CREATE_WORKLIST
Step5:Get Details of a work item using SAP_WAPI_GET_WORKITEM_DETAIL
Step6:Execute SAP_WAPI_GET_OBJECTS to get an object ID
Step7: Call SWX_FORMABS_READ passing this object ID
Step8:Approve / Reject using SWX_FORMABS_UPDATE_DB (this again i have doubt
if SWX_FORMABS_APPROVE is being used somewhere)
Step9: call SAP_WAPI_WORKITEM_COMPLETE
Step10: Call SAP_WAPI_WRITE_CONTAINER
Step 11:Call SAP_WAPI_WORKITEM_CONFIRM
I have concerns with first 2 steps and the relation between them. i dont
see how TS30000016 is getting triggered when BAPI_PTMGRATTABS_MNGCREATION
is executed.
I want to know what is the triggering evets for TS30000016. I tried by
adding Business objects Absence and also Attendance with Event Create.
It did not trigger any workflow nor did any workitem reach the managers
Inbox.
also tried buss obj:PTManagerAttAbsence/BUS7007 it doesnt allow me to add
it to my task.
is there anything i need to do on SAP side that would establish
relationship between BAPI_PTMGRATTABS_MNGCREATION and the workflow task
30000016. Or if i am missing any step.
what else shld i check for to get my use case working. Pls advice.
Also if any BAPI is missed in the above list that may need.
Thanks & Regards
Harshita
Harshita Nersu | SAP Certified HCM Consultant | Lotus Workforce Management
| IBM SWG | Dublin Software Lab | harshita.nersu at ie.ibm.com | Ph+353 1 815
5721
IBM Ireland Product Distribution Limited registered in Ireland with number
92815. Registered office: Oldbrook House, 24-32 Pembroke Road,
Ballsbridge, Dublin 4
P Please consider the environment before printing this e-mail
More information about the SAP-WUG
mailing list