cancel
Showing results for 
Search instead for 
Did you mean: 

PR05 history and WF status

Former Member
0 Kudos

All,

We are on ECC 6.0 EHP5 

Two questions: 

1) We have a customized WF that has 2 approvals but the status in PR05 is seen as "released for approval" until the 2nd approval is completed.   Is there a way to have it reflect that it went through the 1st approval?    This is the flow:

     1- traveler enters trip and submits for approval

     2- WF routes it to the accounting dept for approval

     3- accountant (approves/rejects) 

     4- if approved it goes on to the manager for approval

     5- manager (approves/rejects)

In PR05 steps 2-4 are seen as one line in the trip history and that is "released for approval"

Looking for a way to show that the accountant approved the Trip in PR05

2)  In the event there isn't an acceptable answer for question #1, we will need to write an ABAP that allows us to look at the trip history or perhaps better said where it is in the WF process.   The user will know the trip and the PERNR but I do not see any reference to trip and PERNR in any of the WF tables.   Is there another field that links the WF to the original document in this case the trip?   SWWWIHEAD has the WF_ID but I cannot find that in any of the PTRV* tables I have looked at.  

Sandra

Accepted Solutions (1)

Accepted Solutions (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Sandra,

concerning your first question, there are numerous ways to achieve this, none of them are 'clean' or recommended to be used:

1) Like Ankur stated, you could write your custom detached business logic with a Z-Table a Z-Status etc. This will meddle fewest of all with the standard, but:

     - you will have no visualisation in the POWL/UWL/BWP concerning the standard flow

     - the process is or will sooner or later become inconsistent because you have no relation to

       the standard coding whatsoever

2) You can use a fixed-value-append (enhancement) in the domain ANTRG to add you own status like 'Z' - 'Approved by Accountant'. Doing this is often considered 'heresy' because this meddles with the standard of FI-TV on a level that can cause a lot of damage and might not allow for consistentcy in the standard business logic.

3) You can modify the domain ANTRG and 'abuse' the status 5 (request waiting for documents), in case you would actually never use it, and change its text. This status isn't considered in any events of BUS2089 so there won't happen anything if it's set somewhere.... probably the most "elegant" way to solve this even though it's a DDIC-modification (yet another heresy! ); there shouldn't be any inconsistencies in the standard logic and you would have a visualization everywhere (even in PR05)

Concerning your second question:

SWWWIHEAD never shows you the content of objects and the BUS2089 is in the object 'TRIP' of the WF-Container. The keys of this Object (PERNR+REINR) can be accessed via table SWW_CONTOB, Element 'TRIP'.

Cheers, Lukas

0 Kudos

Ankur and Lukas are exactly right that on the 1st approach the problem is that the history updates with WF-BATCH in most cases but as per KBA 1772588 you can replace the WF-BATCH with the actual user and this will of course reflect in AEND also.    

Its actually quite off topic and will sticky it elsewhere as have seen this mentioned in SCN quite a few times but we enhanced the logging functionality with the report RPR_DEL_LOG with the note 1876453 and it might be useful along the topic of change log/delete/history etc for trips

cheers

Sally

Answers (2)

Answers (2)

Former Member
0 Kudos

Awesome - thanks everyone for your quick replies.   After I posted this message, we found that there is a button on the PR05 History screen that shows the WF-log just like it appears in SWI6.  We are hoping this will satisfy the users as it gives them everything they are asking for just not in the same format as the PR05 history screen.  If not we have some options based on the ideas you provided. 

Lukas - thanks for the SWW_CONTOB table exactly what I needed. 

Sandra

Former Member
0 Kudos

Hi Sandra,

In principle this can be done and you can have your custom status based on who is approving and it would be easy to show this in portal (webdynpro abap) application but I am not sure if this can be achieved in PR05 screen too without any modification - which is obviously NOT recommended.

I hope technical experts will not hate me for having a go at this but basically, I believe you can do this by saving your custom status in a custom table, write your code/logic/condition in the method and then have this method call in your workflow task after the after the approval task and pass the values for your custom status in the WF container.

There is also a document by Sally Redmond (see link below) which talks about where and how to view the status of the filled by workflow.

http://wiki.sdn.sap.com/wiki/display/ERPHCM/Workflow+Customizings+in+Travel+Management

I hope other will shed some light on this topic from a technical/workflow perspective.

Ankur