cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Workflow template when running tcode TRIP

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes
3,487

Hi,

I know that this probably is a dummy question, but which workflow template is executed when I create a travel request using transaction TRIP?

I went to tcode SWDD, but there are so many templates that was difficult to know for sure.

Thanks and regards,

Roberto Falk

Accepted Solutions (1)

Accepted Solutions (1)

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi All,

I'll put here the current status, since I've replied several different answers here.

Currently I have the following org. structure:

The workflow WS20000050 is active, and I've assigned task TS20000118 as general task:

PS: The agent assignement is now empty, but I've also tried to assign a specific role (manager) in my system (as you can see in other answer above), but this makes no difference in the result that I'm getting so far.

When creating the trip, the log shows the following errors:

one important part is that, I'm not sure how the system gets the rule that must be executed (AC00000168), cause the task rules alv is empty:

Here is the strange part: rule AC00000168 is calling function module SWX_GET_MANAGER. Debugging just the function module SWX_GET_MANAGER execution, during the trip creation, the approver is not returned, but if I debug just the function module itself, using transaction se37, using the same parameters as during the standard execution, the function correctly returns the approver .

Any ideas what might be wrong / different between the executions?

Thanks all help,

Roberto Falk


ronen_weisz
Active Contributor
0 Likes

Try:

  • Checking the binding to the rule
  • Check if restart after error works (transaction swi2_diag) if so this could indicate missing authorizations.
  • Test the rule in transaction pfac and see if you get the approver there.
roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ronen,

Sorry, i'm not familiar with the rule biding part, can you give me more info about this? Is there anu defr value for task TS20000118?

thanks,

Roberto Falk

ronen_weisz
Active Contributor
0 Likes

check node 372 in the workflow template, it receives the workflow initiator to the rule container, test the same data in PFAC (pay attention to the leading US) and see if you get a result.

I might have missed this in your data, but is infotype 0105 subtype 0001 maintained in persons master record (PA30)?

I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

@Roberto

sorry, I did not see this post before my earlier reply...what Ronen has mentioned is the right option now.

regards,

Modak

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ronen / Modak,

I've tested the rule on transaction PFAC. This rule asks for 3 parameters, Extended object ID, OrgManagement object and Object type. As far as I could identify, just the OrgManagement object is informed. So, I informed USF_EMPLOYEE (user is F_EMPLOYEE), and the test runs fine. See below:

Also, if I re-execute the workflow using transaction swi2_diag, the workflow runs fine and the approver is correctly determined. You said that this might indicate missing authorizations, how can I check that?

Infotype 0105 is mantained for both user (F_EMPLOYEE and F_MANAGER). F_EMPLOYEE is connected to Manuel Santos - Fiori Employee and F_MANAGER is connected to Maria Silva - Fiori Approver.

I saw that when creating the trip, the user that executes the reports in background is WF-BATCH, maybe is something related to this user...

Thanks all your help,

Roberto Falk

ronen_weisz
Active Contributor
0 Likes

Authorization object PLOG - with AC (workflow rule) in the object type, 1001,1000 in the infotype and DISP in actions fields (* in the rest). this is needed since the next approver is calculated with the current ones auth's so without this the workflow rules will return wrong results. this authorization should be given to all users.

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ronen,

thank you very much, after adding the Auth object PLOG, I was able to create it. See below:

One minor question, do you know why the system is showing this message: "PersNr. is locked. Please unlock."? I'm 100% sure that I was not locking this user in the moment that I was approving the trip.

Thanks again,

Roberto Falk

ronen_weisz
Active Contributor
0 Likes

Nice to hear its working now. make sure your not locking the person and retry.

Answers (2)

Answers (2)

I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Roberto

The workflow will "trigger" if you have activated the event linkage in your system. If not, no workflow will trigger. To find what all standard workflows are there, follow this process: (those may or may not be actively likked to the triggering event)

1) The Business object for TRIP is BUS2089

2) If you go to SWO1,enter this BO , click on where used list, select "Used in" as 'Tasks'-> you will get a lengthy list.

From the list, keep only the ones with 'OTYPE' (visible as just 'OT') = 'WS' - those are workflow templates: (custom workflow templates begin with 9xxxxxxx series):

WS  1000087

WS  1000087

WS  1000087

WS  1000087

WS 20000040

WS 20000040

WS 20000040

WS 20000040

WS 20000050

WS 20000050

WS 20000050

go to PFTC/SWDD and check these out, which one suits your need - activate them via SWETYPV/SWE2.

Regards,

Modak

also check out the help link:

http://help.sap.com/saphelp_erp60_sp/helpdata/en/04/928b3f46f311d189470000e829fbbd/content.htm?frame...

So we have the following standard workflows:

Workflow Template WS20000050 (Approve Travel Request)

Workflow Template WS 01000087 (Approve Travel Plan)

Workflow Template WS20000040 (Approve Trip)

Message was edited by: Modak Gupta

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

I've done the steps you described, and now the log shows that the workflow was started/considered:

Obejct TypeEvent  Curr DateTime Name of...Handler/Action
Trace ON 21.03.201414:34:03F_EMPLOYEE
BUS2089 CHANGED  21.03.201414:34:09No receiver entered
BUS2089 REQUESTCREATED21.03.201414:34:09  WS20000050SWW_WI_CREATE_VIA_EVENT_IBF
Trace OFF 21.03.201414:34:14F_EMPLOYEE

Before executing, I tried to set the approver by entering in the SWDD - workflow WS20000050, basic data, agent assigment for task, then I've added the posistion 'Manager', that has a user associated.

How can I see if the user received the trip to be approved?

Thanks and regards,

Roberto Falk

0 Likes

If you go into the trip and hit the Generic Object Services button

then

Choose the workflow with the log button

In the log, click on the following button and it will show you the agents of the work item:

Former Member
0 Likes

You can find workitesm using SWI1, or SWI2_FREQ, or SWI6 (provide business object and key and it will return all started workflows).

Then in the log locate the step and click on possible agents.

I assume this is all new to you so just take your time to get familiar with these transactions and with the workflow log (also technical view is interesting).

Kind regards, Rob Dielemans

Haha, just do what tommy said just moments before my post

Message was edited by: Rob Dielemans

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Tommy,

when I clicked on Workflow Overview, I received the following message:

There are no workflows that have already worked with this object

I believe I'm missing something...

Thanks and regards,

Roberto Falk

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

I've tested the workflow using tcode SWUS, and there I could see this page, but the approver was not found...

How can I set this?

Thanks and regards,

Roberto Falk

Former Member
0 Likes

Hi,

Just execute the procedure mentioned in the message.

Also make sure that there are values used for the agent assignment in the workflow.

Regards, Rob.

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Rob,

sorry, not sure how to do it. See below the org. structure:

I'm currently creating the trip with user Manuel, so, in the workflow WS 20000050, under basic data, agent assignement for task, I've included the manger user Maria, see below:

But is not working, when I test the workflow using tcode SWUS, the log says that "No agent found for this task", as you can see in my last post.

Any ideas where I'm missing the step to set the approval?

Thanks and regartds,

Roberto Falk

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Rob,

here is something interesting, in the technical log, an error message is showed:

"Result of agent resolution does not agree with agent of task", see below:

Maybe this helps...

Thanks again all,

Best regarsd,

Roberto Falk

Former Member
0 Likes

Hello,

That usually means the Decision Task hasn't been set to General Task.

regards

Rick Bakker

I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Roberto

in the task - do not fix to manager.....that is just the "Possible Agent"

go to PFTC, there maintain Agent Assignment -> make the task attribute general.

Now see if the "Rule" is attached to the workflow 'step' to send the decision (in SWDD) or is it attached to the task (in PFTC -> Default Rule).

Pick that up and open in PFAC and see what it is doing to get the agents....make the config.

Did you go through the links I gave, it will have process to setup rules to get the agents.

Regards,

Modak

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Modak,

My task is set the general. Do you want me to exclude the agent assignement? Currently I've assigned to the manager...

Another thing, the "Rule", inside my task, is empty, check below:

I'll recheck the links you sent. I've checked last week but haven't found this "Rule" part. I'll check again.

Thanks and regards,

Roberto Falk

I042439
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Roberto

No, please do not exclude any agent. setting Task Is general is fine.

Default rule being empty is fine.

where and how are we setting the manager as teh agent?

regards,

Modak

0 Likes

Look in tcode SWETYPV for BUS2089.

BTW these are the ones I am aware of:

WS20000040 Approve trip

WS20000050 Approve travel request

WS01000087 Approve travel plan

WS12500014 Mail: Trip has been settled

WS12500016 Mail: Trip was Transferred to FI

WS12500017 Mail: Trip on hold

WS12500021 Automatically approve travel request

WS12500022 Approve Travel Expenses Automatically

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Probably is not a good thing, but my alv doesn't show any record with the key BUS2089 (see attached).

Any idea?

Best regards,

Roberto Falk

ronen_weisz
Active Contributor
0 Likes

do you see active trip workflows in transaction SWI2_FREQ? do you see events starting workflows in transaction SWEL (event trace -activation via SWELS)?

anjan_paul
Active Contributor
0 Likes

Hi,

  Just check in SWDD the upper mentioned workflow is present in system or not. If present , goto Basic Data -> Start Event, Add BUS2089 BO to the workflow. Then you can see the entries in   SWETYPV

roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Anjan,

Ok, now I can see the entries.

I've also set the approver by entering in the SWDD - workflow WS20000050, basic data, agent assigment for task, then I've added the posistion 'Manager', that has a user associated... but seems that the user associated has not received the trip to approve.

Any ideas?

Thanks and regards,

Roberto Falk


roberto_falk
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ronen,

After doing the steps mentioned by Anjan Paul and Modak Gupta here below, now I can see an entry when running tcode SWI2_FREQ, see below:

TaskTask textWorkflow Item TypeNumber
TS00008267Generic decision taskDialog Step1

Is this entry right? I mean, there is no place mentioning workflow WS20000050...

The event trace is here below in other answer.

Thanks and regards,

Roberto Falk

anjan_paul
Active Contributor
0 Likes

Hi,

  Either the task is not General task or the user is not added to possible agent. Or User is included in Excluded  agents