cancel
Showing results for 
Search instead for 
Did you mean: 

Examples of using SAP_WAPI

0 Kudos

Hello.

Our webdynpro application has to use UWL and SAP workflow.

We can’t find more examples how to work with SAP_WAPI, and any documentation for workflow API in the net.

Actually we have to use workflow only for transfer data from one task to another. All user interface will be in webdynpro without SAPGUI.

We can’t answer to some questions because of we never used to work with sapworkflows:

- What BOR object to use for creating our type object.

- What methods, events, attributes to build?

- What is better to use for starting workflow: sap_wapi_create_event or sap_wapi_start_workflow.

- And examples how to manage sap workflow via RFC-calls

Appreciate for your help.

Sergey,

a member of HR project team

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sergey

Binding from workflow to task and back should enable you to transfer data from one step to another of a single workflow, sub-workflows, etc. You don't need the SAP_WAPIs for this...

Good Luck

Ravi

martin_nooteboom
Active Contributor
0 Kudos

Hi Sergey,

First of all, I don't have experience with this, but I have experience with workflow ;-).

To start the workflow use SAP_WAPI_CREATE_EVENT, it is easier to maintain when a new workflow is created for the process.

What BOR you need to use depends a bit on the process and data you need in the workflow. If you need to create something new you could also use a class. Jocelyn Dart wrote some excellent blogs about this.

Depending on the process maybe it is an option to use a guided procedure in stead of a workflow. It mostly depends on the fact if you need data from the back-end I think.

Regards,

Martin

darren_hague
Contributor
0 Kudos

Hi Sergey,

My experience is of using Web Dynpro to work with work items from an already-started workflow, and I have used the following SAP_WAPI calls:

SAP_WAPI_GET_HEADER - to get high level information about a work item

SAP_WAPI_GET_WORKITEM_DETAIL - to get information about a work item

SAP_WAPI_READ_CONTAINER - to get information from a work item's container

SAP_WAPI_DECISION_READ - to get the available decision options for a decision-type work item

SAP_WAPI_CREATE_EVENT - to create a work item event with attached container values

SAP_WAPI_GET_OBJECTS - to get information about the BOR objects associated with a work item

SAP_WAPI_WORKITEM_COMPLETE - to complete a work item and update container values at the same time

SAP_WAPI_SUBSTITUTES_GET - get a list of the specified user's substitutes

SAP_WAPI_WRITE_CONTAINER, SAP_WAPI_SET_WORKITEM_COMPLETD and SAP_WAPI_WORKITEM_CONFIRM are called by the UWL Updating Container action handler.

In general if you browse function group SWRC you can see all the SAP_WAPI function modules and see what they do.

Best regards,

Darren