cancel
Showing results for 
Search instead for 
Did you mean: 

passing parameters to method

manubhutani
Active Contributor
0 Kudos

Hi

I have developed a business object in which there is a method with 2 importing parameters.

In my WF, there's user decision with accept and reject . No other workitem has been defined.

In user decision, there is a standard task, do i need to define binding for this standard task and workflow container.

I have used 'swe_event_create'm, but not able to understand how to pass the importing parameters of the method

from this FM.

Please help

Regards

Manu

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos
I have developed a business object in which there is a method with 2 importing parameters

What exactly the method does and as you told that you are using standard decision task , in that case how you will be able to use the method that you are saying.

If it is some thing like after taking the decision you want to pass whether the workitem is rejected or Approved then you have to create one more step in the workflow after teh decision step and in that step you have to do binding from

WF ---> TAsk -


> Method.

Because the decision task will be already using a standard BOR DECISION and method PROCESS of it, so you cannot use this method

Answers (1)

Answers (1)

manubhutani
Active Contributor
0 Kudos

THanks for the reply.

I am have another activity in approved section of the user decision, and i have done the binding in this 'approved activity'.

do i need to do the binding of the user decision work item also, as data will come from this 'user decision' to the 'approved' activity.

Regards

Manu

bpawanchand
Active Contributor
0 Kudos

in the BOR method you can make use the below line

swc_get_element container  '_Workitem'  lobject.
swc_get_property lv_object 'WorkitemId' lwiid.

to get the workitem ID, afetr this by using the FM SAP_WAPI_GET_WORKITEM_DETAIL for parent workitem.

SAP_WAPI_GET_DEPENDET_WIS to get the dependent workitems and after this delete all teh workitem which are not of type W and then fianlly you will get the decision workitem ID and

SAP_WAPI_READ_CONATINER you can read the what ever the values that re stored in the Decision step workitem ID.

as data will come from this 'user decision' to the 'approved' activity

what ever the data comes from the Decision step bind it to the workflow conatiner. Once the data is in the workflow conatainer then you can use in any of the steps , i mean you can either export or import

manubhutani
Active Contributor
0 Kudos

Can't i just use 'swe_event_create' FM to develop a simple scenario.

EVENT

USER DECISION

TASK do nothing

(method)

update DB table

this is my scenario.

and if possible, then how to pass importing parameters of this method from FM 'swe_event_create'

Regards

Manu

bpawanchand
Active Contributor
0 Kudos
Can't i just use 'swe_event_create' FM to develop a simple scenario

.

This FM is used to trigger the WORKFLOW as when ever you pass the name of t he BOR, And key along with with.

Secondly, yes you can go with the execution that you want

EVENT    " To Trigger the Workflow


USER DECISION " A Step in the Workflow template
  

TASK do nothing  " A task will have a method and task number will be included ina  Activity step  now  bind from WF  ---> to
                             " Activity step and from task ---> method
(method)
update DB table

It is possible to export the values from Workflow to Method. As you asked that how to pass values from workflow tomethod then obvisouly you hvae to include one more step after decision step and do binding.

You can export values to method only through binding.

manubhutani
Active Contributor
0 Kudos

Thnanks for the reply !!

i would be thankful to you if you can some good workflow docs..

one last ques, how to bind task container with the method.

Regards

Manu

bpawanchand
Active Contributor
0 Kudos

[Check this wiki|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/bindingDefinitionin+Workflow]