cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Releasing Parked Document - Agent finding problem

Former Member
0 Kudos

Hello together,

i set up a workflow for releasing parked document within the standard customizing of SAP (OBWE) using the subworkflow WS20000045 (Amount Release with User Decision)

But the problem is: finding the right agent.

When i declare the role 139 as a general task, everybody gets the workflow in the inbox.

I want to assign a special person according to the reference in the parked document. (for example: reference is : 99999999 then agent is mr.smith//1111111 then agent is mr.schneider)

do u know a user exit or any other hint which can help me solve this problem.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martin,

I had a look at the workflow and believe your problem is related to the workflow step 34 Release parked document, which calls the task TS00008267 Generic decision task.

By default, the agent for this task is determined by using the responsibility role 139 you mentioned. This means that based on the parked document number and the release level, the correct agent is determined. These characteristics are defined in the role, the configuration of the responsibility role can be seen in transaction PFAC_DIS.

If you need to determine your agent by another criteria (e.g. reference number), you should modify the workflow step and include your own responsibility rule there. The responsibility rule to be created should include the reference number as a container element. The role can be created in transaction PFAC. Please let me know if you need any assistance with it.

When you have created the new role with the ref number as a container element, you can put it into your workflow (I recommend to copy the workflow to a new copy) and bind the invoice reference number to the role container element similarly to the standard invoice number binding.

Hope this helps,

-Mikko

Former Member
0 Kudos

Hi Mikko,

thank you for your very fast and very helpful answer.

All things you suggested works fine now.

But i have got one more problem:

In the new role definition: i only have defined that the actor is found via reference based on table VBKPF and field XBLNR. Now all parked documents are sent to all users mentioned in the list - no matter what reference are filled in.

I think this is my problem:

<i>"bind the invoice reference number to the role container element similarly to the standard invoice number binding."</i>

Should I copy the Object FIPP and change it to my requirements?

Thanks for your help.

Message was edited by: Martin Elfen

I think this is really my problem because the reference in the container doesnt get any input. it seems to stay empty. any idea?

Thanks.

Message was edited by: Martin Elfen

Former Member
0 Kudos

Hi Martin,

not sure I understood your problem correctly but here goes..

Just to make sure, you can think of the role as a plain function module. As the import params, you have the role container elements and the export param is the agent(s) determined. After giving the role some input values, the role routes to a responsibility (have you defined it to be a responsibility role?), which in turn can be assigned to a user ID so it returns the user ID:s.

You can simulate the role you have created in PFAC by clicking on the simulate button - it should then return the proper user based on the reference number. Have you verified you get the proper users thru this simulation?

Once you make this work all right, it is time to put the role to your workflow step. You can do this by putting in the role number to the workflow step, clicking on binding and assigning the invoice reference number from your workflow container to the role container element.

If I remember correctly, you can't get the reference number from the standard FIPP object. So you'd have to make a new copy of it and put in a new method or attribute which returns the reference number. Then put this value to the workflow container and it's ready to be binded to the role container.

Please let me know if this helps,

-Mikko

Former Member
0 Kudos

Hi Mikko,

so let me get through your list.

the role finding is working fine and simulation works also fine.

when i start the workflow as a test (SWUD) everything works fine, because i fill in the datas manually needed at the beginning.

but when the workflow is startet because a document is parked, then the conainer element Z_FIPP is not filled.

Z_FIPP is a copy of the object FIPP with a new attribute Reference (works fine).

So my problem is: how can the new Object Z_FIPP get the datas? FIPP is filled initial at the beginning of the workflow, but how can i give the datas also to my new containerelement Z_FIPP? Maybe the problem is also this is a subworkflow and i really dont know where to initialize the Z_FIPP Container at the beginnig?

Hope you understand a little bit and can help me thank you

Former Member
0 Kudos

Hi Martin,

could you elaborate on this a bit more..? Do you have the workflow with the approval task as a subworkflow and it is called from another workflow (and not triggered by an event)?

If this is the case, you should bind the parked document wf container element of the master workflow to the subworkflow wf container element (type Z_FIPP). You can do this in the master workflow by editing the subworkflow step and clicking on Binding. Note that you should set the Z_FIPP type element of the subwf cont element to an import type to make it visible.

As a general rule, if you have to make changes (new elements, binding changes etc.) to the standard templates or tasks provided by SAP, it is good to make your own copies. That way the standard templates remain and can be utilised in the future as well.

Hope this helps,

-Mikko

Former Member
0 Kudos

Hello,

W/o reading the whole story, but only the question i have this answer for you.

You want to have a role which finds the agents/users to approve a parked document for a value in the reference field. For this the easiest way is to build a custom table where you define the values and connect a user to it who has to approve, the table will look like this

mandt - mandt - system mandant

xbelnr - XBLNR1 - description

agent - SWP_AGENT - agent (like US123456)

then you have to build a function module which search the agents for the reference used

then you have to assign this function module to a new rule (with tx pfac). The container of the rule must have an element for the reference field

then copy the SAP standard template and change the rule139 in that step with you new rule and make sure in the binding the reference field is binded to the reference element in the rule container.

The reference field can be obtained as attributed of ZFIPP (zfipp is extended from FIPP and also delegated).

In case you have question for this brief and quick description then let me know

Former Member
0 Kudos

Hello Peter, hello Mikko

thanks for your suggestion, but the graphical way with roles is nearly the same as with a function module.

The problem i have got is to read the reference number / fill the container element Z_FIPP.

I cannot copy all the masterworkflows because then all customizing settings are useless.

I tested it in another way. At the beginning of the Subworkflow i insert a container operation Z_FIPP = FIPPID and this works. But FIPPID dont has the attribute reference...how can i attach this attribute after starting the workflow? is it not possible to do a containeropertation or get a userexit and the programm it in ABAP by myself???

Thanks a lot. (Workflow is a very interesting thing - but costs a lot of nervs

Former Member
0 Kudos

Hi Martin,

I believe you can just change the data type of the FIPPID container element to Z_FIPP since object Z_FIPP is a delegated subtype of FIPP. When the subwf is called, FIPPID container element will be filled all right and you have the new attribute available for binding. After this, the container element Z_FIPP can be deleted completely.

Please let me know how it works,

-Mikko

ps. I fully agree with you about workflow in general, I have a love-hate relationship with it myself

Former Member
0 Kudos

Hello,

I think this is the situation, you have your own template which starts on the event parked of business object FIPP. In the binding from the event to the workflow container you have to pass the the values for the object. Now you have access to the FIPP element in the workflow container which is populated and have all the attributes filled.

Former Member
0 Kudos

Hi again,

ok i changed now the object FIPP against my own created object ZFIPP (which is a subtyp of FIPP with the new attribute Reference) in the whole workflow.

Nearly everything works fine - but what a surprise the agent finding doesnt.

The agentfinding role for itself works perfect (simulation looks good and returns the results i want)

but within the datas changed from the workflow container to the agent role there comes up the error:

"the attribute REFERENCE is not supported by the object FIPP"

But FIPP is not used at all.

The data changing rule from the workflow container to the agent role finding is:

(Role:) Referencenumber (based on table: VBSEG - XBLNR) <= ReferenceID = &ZFIPP.Reference&

When checking this rule in the data changing no error is found. But when the workflow gets started the error above comes up.

Do I have to change something within the object ZFIPP? I dont find any more relations between ZFIPP and FIPP.

Thanks for your help in advance.

Former Member
0 Kudos

it looks you forgot to delegate your subobject to your object You can do this also via tx swo1, goto a menu above and choose delegate (it's somewhere there). There delegate your subobject to the object as system wide.

That must work...

Former Member
0 Kudos

Thanks for that missing piece in the whole puzzle. I never heard of that thing anytime before. My Workflow is working perfect now.

Thanks Mikko for your helpful advices and your patience.

Thank you Peter for the tips and the helpful feedbacks and alternatives.

Hope I can help you too sometime, if you are going to need help

Answers (0)