What RFC calls are required to process the “Absence Approval” example workflow?
How to approve/reject a FORMABSENC absence notification (task TS30000016 in workflow WS30000015) by RFC call: 1. Call SAP_WAPI_SET_WORKITEM_STATUS • Set WORKITEM_ID to the workitem ID • Set STATUS to STARTED • Set USER to the user ID of the approver 2. Call SWK_DEMO_FORMABS_PROC_WRITE • Set IM_FORMNUMBER to the form number • Set IM_PROCSTATE to R or A (for Rejected or Approved) • Set IM_APPROVBY to the user ID of the approver • Set IM_APPROVDATE to today’s date (e.g. “24.05.2007” in SE37, or 20070524 from PHP) 3. Call SAP_WAPI_WORKITEM_COMPLETE • Set WORKITEM_ID to the workitem ID • Set ACTUAL_AGENT to the user ID of the approver • Set 2 entries in the SIMPLE_CONTAINER table: Element: _WI_RESULT, Value: R or A (for Rejected or Approved) Element: _RESULT, Value: R or A (for Rejected or Approved) This will leave the workitem in status “Committed” 4.