cancel
Showing results for 
Search instead for 
Did you mean: 

WebDynpro application that can work with SAP workflow work items?

Former Member
0 Kudos

Hello Experts-

Can any of you point me in the direction of how I can work with Work Items (eg., those in business workplace, or created by Workflow, etc.) from an SAP system in my Web Dynpro application?

Is there some standard API (or BAPI function group) that is available with which I can build an application that can connect to the user's Inbox in an R/3 system and work with (approve/reject/process, etc.) items contained therein.

What is a good direction for me to be proceeding in? Are there any help documents or tutorials that talk about something like this?

Thank you,

- Vik.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi there - looks like the thread might be dead, but it might prove helpful to someone!

I had a play with the sap_wapi_decision_complete fm and the decision key is the numerical equivalent of the decision options the user gets in the workflow.

So if the responses are

"Yes"

"No"

"Maybe"

Decision Key is 0001 for "Yes", "0002" for "No" and "0003" for "Maybe".

Easy, no?

Former Member
0 Kudos

Hi Vik.

I build an application that works with workitems created by a workflow. I use the following BAPIs:

- SAP_WAPI_CREATE_WORKLIST: to get the user's INBOX.

- SAP_WAPI_RESERVE_WORKITEM: to set the workitem status READY.

- SAP_WAPI_DECISION_READ and SAP_WAPI_DECISION_COMPLETE to read and execute the user's decision.

In general the SAP_WAPI* functions let u interact with workitems created by workflow process.

Best Regards.

Gregory.

Former Member
0 Kudos

Hi Gregory,

Do you have any documentation on how to use these BAPI's.I am trying to do something very similar - Display work items , then the details and then execute based on the decision.I checked the SAP_WAPI_DECISION_READ BAPI , and am not sure how do I capture the approve or reject decision ...

Regards,

Muinul

Former Member
0 Kudos

Hi Ravi,

I want to try out the "Only webdynpro " way. The inbox can be got using the RFC you mentioned.

Can you let me know what are the RFC's to execute a work item ?

Thanks

Best Regards,

Muinul

Former Member
0 Kudos

<i>Can you let me know what are the RFC's to execute a work item ?</i>

There are a set of FMs, Use SAP_WAPI_RESERVE_WORKITEM to reserve the workitem and then use FM SAP_WAPI_DECISION_COMPLETE to execute the work item.

Regards,

Xiaoming Yang

nol_hendrikx
Active Contributor
0 Kudos

Hi Vik,

As Ravi mentioned, you can use the standard "Universal Worklist" to view the work items from the backend.

Regards,

Noel

Former Member
0 Kudos

Hi

You can search for function modules available in SAP related to workflows. We have used our own custom RFC's for achieving workflows in SAP specific to our requirement.

To start with go to SE37 transaction and just type "workitem" and press a F4. It should give you lot of function modules to deal with Workitems in a Inbox. You will have to select the functions as per your requirement.

In our scenario we configured the UWL of EP to display the workitems. On click of the workitem we would open up a WebDynpro Application with a Approve or Reject button.

I dont think you have a document that deals with Webdynpro directly interacting with SAP workflows.

Let me know if you require some more information.

regards

ravi

Former Member
0 Kudos

Hi

Check out this function module. Its there in 4.7 enterprise. The function module name is

"RH_INBOX_VIEW_CREATE"

Just pass your SAP User id as input and it returns you the contents of your inbox.

If you are not using UWL in EP, then you can create your own table in Webdynpro and display all the workitems from SAP inbox to your table.

regards

ravi

Former Member
0 Kudos

Hello Ravi,

Your scenario is exactly what we are currebtly trying to implement @ the moment. Will it be possible that you elaborate a little bit more particularly on how you achieve integration between UWL and WD application ? Your inputs will be greatly appreciated. Thank you very much.

from

Kwok Wei

Former Member
0 Kudos

Hi kwok

Can you tell me if you are using Enterprise Portal in your implementation or is it just WebDynpro.

If you are using Enterprise Portal then use Universal Worklist.

If you are using only WebDynpro without portal then i will suggest some RFC's that will give you the inbox details for a user.

When you click on the link then there is another RFC that will execute the workitem :).

But let me know your full requirement and i will be able to help you out.

regards

ravi

Former Member
0 Kudos

Iam looking for exactly the same.

Cud U guys plz point me int the rite direction ..

I am using WebDynpro to achieve this.

I have mapped my custom controller's context to BAPI(input & output).

Then in startview i mapped input field with BAPI'S input.

and binded Resultview's table to output of BAPI.

When i deploy n run , it actually shows (startview) a input box and a button. pressing button shud show me the result table.

How to achieve this?

what is the implementation code??

iam confused with WebDynpro's API.

tHANX

Former Member
0 Kudos

Hello Ravi,

Thank you very much for your reply. Below are some scenarios that I am considering

<u><b>Scenario 1: Using EP and UWL</b></u>

This approach is the prefered method. However, we do not have much clue on how to implement this. Hence if you can give me some clues/suggestions and the possible steps involved (whats to be involved in web dynpro and on the EP) that will be appreciated.

<u><b>Scenario 2: Using UWL and Web Dynpro</b></u>

This is the second preferred method which we will adopt if scenario does not turn out well. If you are able to let me know which RFCs are needed then that will be great as well.

<u><b>Brief project description</b></u>

Our team is currently in the midst of building a air ticket booking application and is trying to build one using Web Dynpro as the front end. Whenever someone creates a flight request, the request <b>must</b> be approved by the manager before the travel agaent can cut the ticket. If it is not approved, the agaent will not be able to see the request on their screen. This is where the UWL and Web Dynpro portion comes in.

from

Kowk Wei

nol_hendrikx
Active Contributor
0 Kudos

Hi Kowk Wei,

You will need to set up a system in the Universal Worklist Administration.

The transaction you need in the backend is SWFVISU. With this transaction you can define tasks (TS50000075 as an example) and connect it to a WebDynpro.

For WebDynpro you need the Application and Package. In this case (TS50000075):

Application: IsrFormApprove

Package: sap.com/pcui_gp~isr

There is also a specific UWL configuration guide:

http://help.sap.com/saphelp_nw04/helpdata/en/39/a1bb5c4c0d4ab4a417e87ef35f1efa/frameset.htm

Good luck with it

Noel

Former Member
0 Kudos

Hello Noel,

Thanks a lot !!! I will keep you guys updated. Ravi, if you have furter inputs, that will be greatly appreciated as well )

from

Kwok Wei

Former Member
0 Kudos

Somebody plz point me to something!!!

iam stuck displaying my BAPI using Webdynpro!!

Former Member
0 Kudos

Hi

Naresh ,what is the problem that you are facing with your BAPI. Can you elaborate on that. I will be able to help you out.

kwok, was the link given by noel helpful. I guess that should be a starting point for you. Its easy to do so. In case you are stuck let me know and i will help you out.

P.S : Sorry about the late response

regards

Ravi

Former Member
0 Kudos

Thanx Ravi,

I have a BAPI in my Backend R3 system

I need to display (say Z_BAPI1) in the portal.

Iam able to create everything but iam stuck @ coding.

Created custom controller and mapped the imput and output parameters to it.The application has a start view tied to input context of custom controller and a result view(type Table) and mapped it to output parameters.

Upon hitting button 'Go' on Start, it shud take me to result view with results in the table.

I have written the implementation code for start and result..but what shud i code in the start to get to the result ivew without using the navigation link(inbound n outbound plugs).

Do u have API and examples other than the basic SAP pdfs??

Thanq!!

Can explain more clearly, if u need.

Former Member
0 Kudos

Hey Ravi !!

The info provided by Noel is really useful. Infact I forwarded it to my EP colleague and he was thankful for that However, (me being the total web dynpro novice), the info provided did not really mentioned how this is achieved in web dynpro... either I must have mis-read some of the info or its not documented. Most of the artcles are related to setting up of EP and how to get UWL to work oth it... I will like to find out what it takes on Web Dynpro 's end to has it integrated as well. Any suggestions ?

from

Kwok Wei

Former Member
0 Kudos

Hi All!

I am trying to do something similar that has been described in this post.

Here is what we would like to do:

When I login to the SAP portal and access UWL, I expect to see my workitems (ie the same ones I would see in R/3 workflow inbox). However, when I launch a work item in the UWL, we will call a Web Dynpro application that calls a Function module in the backend that retrieves the notification data displaying it in the Web Dynpro app. The user then clicks approve/reject and a R/3 Function module is called to update the work item.

My question is: Do I need ITS for this? I believe not, but I am receiving mixed messages. Since you all are actually implemented it would great to hear from your experiences.

Thanks,

Younoos

Former Member
0 Kudos

Hi Experts,

Ravi, I think you can help me for the following issue. I got a similar issue.

EP 7.0 SP8. Web Dynpro, R/3 4.6C.

I am trying to pass application parameters to web dynpro application through UWL XML customization. Following is the XML coding.I am not getting the workitem id in the url where I am getting only the session id. when I try to pass to a URL application I am getting the workitem id in URL but not BOR details.Can you please correct me if iam wrong with the XML. I want to launch web dynpro application from UWL with application details along with Approve/Reject button.

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd' [

]>

<UWLConfiguration version="1.0">

<ItemTypes>

<ItemType name="uwl.task.webflow.TS90100219.SHD012" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="launchWebDynPro" executionMode="default">

<ItemTypeCriteria systemId="SHD012" externalType="TS90100219" connector="WebFlowConnector"/>

<CustomAttributes>

<CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="externalId" objectType="WebFlowContainer" cacheValidity="default">

<Attribute name="PathNumber" type="string" displayName="Path Number"/>

<Attribute name="ApproverLevel" type="string" displayName="Approver Level"/>

</CustomAttributeSource>

<CustomAttributeSource id="ABAP_BOR" objectIdHolder="externalObjectId" objectType="ZPMT_GRID" cacheValidity="default">

<Attribute name="DOCUMENTNUMBER" type="string" displayName="Doc number"/>

<Attribute name="USER" type="string" displayName="Owner"/>

<Attribute name="PRODUCTTYPE" type="string" displayName="Product type"/>

<Attribute name="SALESOFFICE" type="string" displayName="Sales office"/>

</CustomAttributeSource>

</CustomAttributes>

<Actions>

<Action name="launchWebDynPro" handler="SAPWebDynproLauncher" launchInNewWindow="yes" launchNewWindowFeatures="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">

<Properties>

<Property name="WebDynproApplication" value="TestApplication"/>

<Property name="WebDynproDeployableObject" value="sappi.com/zsd_pmt_testwf"/>

<Property name="itemid" value="${item.externalId}" />

<Property name="DynamicParameter4" value="${item.status}"/>

<Property name="System" value="SAP_LocalSystem"/>

</Properties>

<Descriptions default=""/>

</Action>

</Actions>

</ItemType>

</ItemTypes>

</UWLConfiguration>

Hope some one will help me.

Regards,

John.

Former Member
0 Kudos

Hi Ravi,

I have a requirement which is very similar to yours.I have configured the UWL and I am getting the work items in that. The idea is to launch a web dynpro applicaion which will help to make the decision. ie. to Approve and Reject.

The problem is I am not aware fo the correct FMs available in the R/3 which can resolve the issue.

I got to know one BAPI named "SAP_WAPI_DECISION_COMPLETE" but when I try to execute the FM it asks for the work item id which I pass along with the "Decesion Key" but after execution it gives an error message saying that the Work item 000000395178 is not a user decision.

Moreover I am not sure what to pass for the "Decesion Key".

As you have some experience on this I request you to throw some light and let me know which are the correct FMs which can be used for the Decision making in web dynpros.

Regards

DK