cancel
Showing results for 
Search instead for 
Did you mean: 

FV60 Workflow Approval based on Cost Centre

former_member531036
Participant
0 Kudos
483

Hi Experts,

We have a need to trigger the workflow approval based on cost centre instead of company number. Is there a BAdI available that we can use? I've searched SDN with no luck.

Thanks!

Julie

View Entire Topic
Former Member
0 Kudos

Routing of workflow based on company code : This sounds like they already have some workflow and the Approvers get selected based on company code and this needs to change so that approvers get selected based on cost center ? Is it the requirement is ?

Also please let us know -:

1.) Currently any workflow is existing for FV60 if yes then is it standard our custom one ?

2.) The triggering logic of workflow. whether the workflow is configured or its get triggered by event ?

Cheers,

Prakash

former_member531036
Participant
0 Kudos

Hi Prakash,

I'll try to answer your questions as best I can (I am fairly new to workflows). Yes, your statement is accurate. We want to change how the approvers are determined to be based on cost centre instead of company code.

1. Workflow WS10000051 was copied to a custom workflow (I'm not sure what changes were made).

2. I believe it's configured.

Using SWIA, I found a log for this workflow. It looks like sub-workflow WS10000052 is getting triggered. Within WS10000052, I can see that rule 00000139 is used, which calls function module PRELIMINARY_POSTING_ACTOR1_DET. Within this function module CUSTOMER-FUNCTION '001' (EXIT_SAPLF040_001) is called with the actors table as a parameter. Could this function module be used to determine the approvers based on cost centre?

Thanks!

Julie

former_member185167
Active Contributor
0 Kudos

Hello,

I just had a look at that FM (PRELIMINARY_POSTING_ACTOR1_DET) and that does indeed seem to be the case - that you can select any agent you want there. In your system is that where it finds the approver based on company code?

regards

Rick Bakker

former_member531036
Participant
0 Kudos

Hi Rick,

I've looked at the log and I can see that it is calling sub-workflow WS10000052, however, when I look in the container in the log, I don't see the Agents table. Company code is one of the container fields that is getting passed to the sub-workflow.

Unfortunately, the gentleman that normally deals with workflows is out of the office for a few weeks, so I'm trying to fill in. I've debugged through the PRELIMINARY_POSTING_ACTOR1_DET FM and can see that after the call to EXIT_SAPLF040_001, if the ACTOR_TAB table is populated, then the FM is exited. Is there a way that I can tell by looking at the log for this particular WF, if the agent is determined within this function module?

Thanks!

Julie

former_member185167
Active Contributor
0 Kudos

Hi Julie,

"Is there a way that I can tell by looking at the log for this particular WF, if the agent is determined within this function module?"

Not by looking at the log but by looking at the workflow definition - step 3 of WS10000052 uses rule AC00000139 which calls FM PRELIMINARY_POSTING_ACTOR1_DET.

You could use tx PFAC_DIS to test rule AC00000139 using inputs found in the workflow log. Put a breakpoint in FM PRELIMINARY_POSTING_ACTOR1_DET and you'll see exactly what it does and what custom FM (if any) is called.

regards

Rick Bakker

former_member531036
Participant
0 Kudos

Hi Rick,

After doing a debug, it looks like this customer function should work for us. Thanks for your help!

Julie