Hi All,
We have implemented a purchase requisition approval workflow in our organisation, where all new PR's created are subject to approval before release & conversion to PO.
The workflow is set up to identify release strategy based on a number of characteristics for example: total PR value.
Approval levels & approver names are identified depending on the release strategy triggered.
The current functionality is set up to re-trigger the workflow if total PR value is changed after approval at any level.
e.g. a PR with three approval levels will re-trigger workflow if approved at level 1 and then the total value is changed; therefore a new release strategy will be determined.
A 2% tolerance limit has been set before the workflow re-triggers only if PR total value increases; with changeability value of: 4 (changeable, new release in case of new strat. or val. change).
The workflow is required to re-trigger if the total PR value has been increased after approval at any level, which is currently working correctly as desired.
Is it possible to prevent the workflow from re-triggering if the total PR value is decreased after approval at any level?
Any advice would be much appreciated.
Regards,
ZA
Request clarification before answering.
Hello,
"The current functionality is set up to re-trigger the workflow if total PR value is changed after approval at any level."
How is that done? If it's a specific piece of ABAP code then (of course) you just have to adjust that.
Otherwise, is it the case that any significant change will do this? Is it done by creating an event?
regards
Rick Bakker
Hanabi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rick,
'' How is that done? If it's a specific piece of ABAP code then (of course) you just have to adjust that.
Otherwise, is it the case that any significant change will do this? Is it done by creating an event? ''
This is not a triggered by piece of ABAP code or an event.
This is a configuration where a 2% tolerance limit has been set before the workflow re-triggers only if PR total value increases; with changeability value of: 4 (changeable, new release in case of new strat. or val. change).
Is it possible to prevent the workflow from re-triggering if the total PR value is decreased after approval at any level via the configuration?
Regards,
ZA
Hi Rob,
that for PR's -- and there's no such option like you have with the PO's.
Hi Rick,
the reset of the release code(s) of the PR is done during the check of the release strategy within the SAP Standard processing of ME5xN.
Hi Murali,
if the Standard has created such an event, there's no healing way to turn the requisition back to approved, if you avoided the event by check function. It's way too late.
Hi Zuber,
as you now know, it's not part of the SAP Standard to check for a lower limit rather than for a variance of the total value. However, there is a way to do so, as I've already implemented that customer requirement.
But before I explain that, let me tell you, that the similar process for PO's is also resetting all the releases, once a different release strategy would match. So this is a hard lower limit, regardless of the 2% (high/low) setting and such. My quick solution on that is not taking that detail into account: Regardless of how low you set it, there's no other release strategy chosen. If you wish so, you need to have a smarter algorithm. That's possible, too, but its not the right place here in such a post to describe that.
So here it goes:
FIELD-SYMBOLS: <ls_eban> TYPE EBAN.
READ TABLE c_eban ASSIGNING <ls_eban> INDEX 1.
IF sy-subrc <> 0.
EXIT. "No requisition, no calculation
ENDIF.
SELECT COUNT( * ) FROM eban WHERE banfn = <ls_eban>-banfn.
IF sy-dbnct = 0. EXIT. ENDIF. "Nothing to do, at the moment
DATA: lt_eban TYPE STANDARD TABLE OF EBAN.
"Read the previous state of the requisition from the database.
"You may reference the global table of YEBAN, if you feel safe to access it without
"breaching good programmer's guidelines.
SELECT * FROM EBAN INTO TABLE lt_eban WHERE banfn = <ls_eban>-banfn.
"Calculate the previous total net value. (Use lines 706-710 of LEBNDF01 for full impl.)
DATA: lv_old_gfwrt TYPE CEBAN-GFWRT.
LOOP AT mt_eban ASSIGNING <ls_eban> WHERE loekz = SPACE.
lv_old_gfwrt = lv_old_gfwrt + ( <ls_eban>-menge * <ls_eban>-preis / ls_eban-peinh / 1000 ).
IF lv_old_gfwrt > 999999999999 OR lv_old_gfwrt < -999999999999.
lv_old_gfwrt = 999999999999.
EXIT. "No need to worry about further eban entries, once you've reached the max
ENDIF.
ENDLOOP.
IF sy-subrc <> 0.
"Somehwat strange, having an empty requisition at that stage... so it's better to
EXIT.
ENDIF.
"Now, we got the old total value ready for comparison
IF ceban-gfwrt < lv_old_gfwrt.
ceban-gfwrt = lv_old_gfwrt. "Avoid changing release strategy, when new total is lower...
ENDIF.
With the very best wishes
Florin
Hi Zuber,
Try in this way, create a check function module for the workflow with the condition (comparing b/w) of PR's old value and new value.
Regards,
Murali Krishna.
Message was edited by: Murali Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.