cancel
Showing results for 
Search instead for 
Did you mean: 

WS14000145 Approval N-Step for PO skips others approvers

Former Member
0 Kudos

Hi All:

Here is my scenario.

WS14000145 was working fine before SP08 application to SRM SERVER 500 component.

Now (after sp08):

You create a PO (based on a SC of course) and because of the amount of the purchase it needs to be approved by several people, let's say John, Mike (john's boss), and Peter (mike`s boss)

When you create the PO it shows the authorization flow like this: 1st approver John, 2nd approver Mike, 3rd approver Peter; and it is retained awaiting for all three approvals.

Now all three of them got an entry in their authorizations pool.

The problem is: when John authorizes the PO the workflow skips the others approvers and the PO gets fully approved. And the PO disappears from 2nd and 3rd approvers inbox, because it is already approved by 1st approver.

The Org Structure is well defined, 3rd approver Mike is a Director, 2nd approver Mike is a Manager, and 1st approver John is an employee. (also it was working fine before the sp08)

Any ideas please.

Greetings,

Dario

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dario,

You talked about WF WS14000145, and you said "<i>You create a PO (based on a SC of course)</i>"

The WF WS14000145 (n-level approval based on BADI) is a PO WF, so it is called only for:

-manual PO creation (not based on a SC)

-PO changes (PO created manually or from a SC)

If you were talking of a SC creation , the corresponding WF is WS14000133.

About your issue description, it seems that all your approver are considered at the same step for the approval.

In the BADI check you've incremented <i>approval_index</i>

and managed <i>ls_approver-approval_branch</i> (always = 1) in the approval table.

Regards.

Vadim

Former Member
0 Kudos

Vadim,

That's correct it is a PO WF we're talking about.

I've checked the badi it is implemented in the BBP_WFL_APPROV_BADI definition as ZW_APPROVAL_PO in the method GET_REMAING_APPROVERS.

As i see the approval_index is been incremented according to the level; although there is no place where ls_approver-approval_branch is assigned ( should it be always = 1 ??)

I'm pasting the code here, hope it doesn´t matters.

Thanks!

method IF_EX_BBP_WFL_APPROV_BADI~GET_REMAING_APPROVERS.

  • -------------------------------------------------------------------- *

  • Interface parameters:

  • -------------------------------------------------------------------- *

  • OBJECT_ID TYPE CRMT_OBJECT_ID "Import

  • OBJECT_TYPE TYPE CRMT_SUBOBJECT_CATEGORY "Import

  • GUID TYPE BBP_GUID_32 "Import

  • ACTUAL_APPROVAL_INDEX TYPE SWH_NUMC10 "Import

  • APPROVAL_HISTORY_TABLE TYPE BBP_WFL_APPROVAL_HISTORY_BADI "Import

  • ITEM_APPROVAL_HISTORY_TABLE TYPE BBPT_WFL_ITEM_APPROVAL_BADI "Import

  • APPROVAL_TABLE TYPE BBPT_WFL_APPROVAL_TABLE_BADI "Export

  • ITEM_APPROVAL_TABLE TYPE BBPT_WFL_ITEM_APPROVAL_BADI "Export

  • NO_FURTHER_APPROVAL_NEEDED TYPE BOOLEAN "Export

  • ITEM_APPROVAL_OBJ TYPE BBPT_WFL_ITEM_APPROVAL_OBJ "Changing

  • -------------------------------------------------------------------- *

  • This is the 2nd example of the BADI implementation that includes

  • dynamic spending limit approval for PO

  • INCLUDE <CNTAIN>.

DEFINE swc_set_element.

call function 'SWC_ELEMENT_SET'

EXPORTING

element = &2

field = &3

TABLES

container = &1

EXCEPTIONS

others = 1.

END-OF-DEFINITION.

INCLUDE .

data: swc_object type swotobjid.

DATA:

ls_header_sc TYPE bbp_pds_sc_header_d,

ls_header_po TYPE BBP_PDS_PO_HEADER_D,

ls_approver TYPE bbp_wfl_approval_table_badi,

ls_approver1 TYPE bbp_wfl_approval_table_badi,

ls_approver2 TYPE bbp_wfl_approval_table_badi,

ls_approverc TYPE bbp_wfl_approval_table_badi,

ls_approver3 TYPE bbp_wfl_approval_table_badi,

ls_approver4 TYPE bbp_wfl_approval_table_badi,

lv_approval_index TYPE swh_numc10,

lv_guid TYPE crmt_object_guid,

lo_new_instance TYPE swf_bor_object,

lt_approval_agent_obj TYPE TABLE OF swf_bor_object,

ls_wa_agent_obj TYPE swf_bor_object,

lo_user TYPE swf_bor_object,

ls_approval_agent TYPE bbp_wfl_approval_table,

lv_index TYPE syindex,

lv_usr01_name TYPE ad_namtext,

lt_approval_init_agents TYPE TABLE OF bbp_wfl_approval_table,

ls_wa_approval_init_agents TYPE bbp_wfl_approval_table,

ls_wa_approval_history TYPE bbps_wfl_history_line_badi,

lt_partner type table of BBP_PDS_PARTNER,

ls_partner type BBP_PDS_PARTNER,

lt_item type table of BBP_PDS_SC_ITEM_D,

ls_item type BBP_PDS_SC_ITEM_D,

lt_item_po type table of BBP_PDS_PO_ITEM_D,

ls_item_po type BBP_PDS_PO_ITEM_D,

lv_record type ZRECTYPE.

data: ac_container type table of swcont,

org_object type swhactor,

actor_tab type table of swhactor.

data: partner_guid type BU_PARTNER_GUID.

data: lastname type BBP_USR01-LASTNAME,

firstname type BBP_USR01-FIRSTNAME,

title type BBP_USR01-TITLE.

data: userid_app type BBP_USR01-USERID,

ret type table of BAPIRET2,

val_mxp type BBP_TOTAL_VALUE.

  • Organitational Data

Data: lt_orgdata type table of BBP_PDS_ORG,

ls_orgdata type BBP_PDS_ORG,

lv_unidorg type BBP_PROC_GROUP_ID.

Data: lt_OBJECTS TYPE OBJEC_T,

lt_STRUCTURE TYPE STRUC_T,

lv_level like sy-tabix.

data: lv_obj_guid type CRMD_ORDERADM_H-GUID.

  • Business objects type (local constants)

CONSTANTS:

c_po TYPE crmt_subobject_category_db VALUE 'BUS2201',

c_biddingdoc TYPE crmt_subobject_category_db VALUE 'BUS2200',

c_quotation TYPE crmt_subobject_category_db VALUE 'BUS2202',

c_grse TYPE crmt_subobject_category_db VALUE 'BUS2203',

c_invoice TYPE crmt_subobject_category_db VALUE 'BUS2205',

c_shop TYPE crmt_subobject_category_db VALUE 'BUS2121',

c_contract TYPE crmt_subobject_category_db VALUE 'BUS2000113',

c_salescontract TYPE crmt_subobject_category_db VALUE 'BUS2000114',

c_avl TYPE crmt_subobject_category_db VALUE 'BUS2206',

c_invoicegrp TYPE crmt_subobject_category_db VALUE 'BUS2207',

c_vendor_obj TYPE crmt_subobject_category_db VALUE 'BUS1006200'.

      • workflow approval states

CONSTANTS:

c_wf_approved TYPE bbp_wfl_approvalstate VALUE '0',

c_wf_rejected TYPE bbp_wfl_approvalstate VALUE '1',

c_wf_not_instanced TYPE bbp_wfl_approvalstate VALUE '2',

c_wf_changed TYPE bbp_wfl_approvalstate VALUE '3',

c_wf_partialapproved TYPE bbp_wfl_approvalstate VALUE '4',

c_wf_step_in_process TYPE bbp_wfl_approvalstate VALUE '5'.

CLEAR: lt_approval_init_agents[], lt_approval_agent_obj[],

ls_wa_agent_obj, ls_approval_agent, ls_wa_approval_init_agents,

ls_wa_approval_history.

  • -------------------------------------------------------------------- *

  • map input data to local data

  • map char32 to raw16

MOVE guid TO lv_guid.

data: lt_zzs_approver_tec type table of ZZS_APPROVER_TEC,

ls_zzs_approver_tec type ZZS_APPROVER_TEC.

data: lt_zzs_approver_rep type table of ZZS_APPROVER_REP,

ls_zzs_approver_rep type ZZS_APPROVER_REP,

userid type syuname.

data: lt_sc_approvers type table of ZSRM_SC_APPROVER,

ls_sc_approver type ZSRM_SC_APPROVER.

CASE object_type.

  • ====================== shopping cart =========================== *

WHEN c_shop.

  • get the approvers

select * from ZSRM_SC_APPROVER into table lt_sc_approvers.

      • get the details of the SC

CALL FUNCTION 'BBP_PD_SC_GETDETAIL'

EXPORTING

i_object_id = object_id

IMPORTING

e_header = ls_header_sc

TABLES

e_item = lt_item.

read table lt_item with key BE_DOC_TYPE = 'ECDP' transporting no fields.

if sy-subrc eq 0. "or ls_header_sc-ZZSTATUS = 'A' or ls_header_sc-ZZSTATUS = 'C'

no_further_approval_needed = 'X'.

else.

clear: lastname,

firstname,

title.

  • Cambio 28.01., Oli: We don't take a single approver anymore, we use table ZSR_SC_APPROVERS

data: lv_uid type BBP_USR01-USERID.

loop at lt_sc_approvers into ls_sc_approver.

move ls_sc_approver-uname to lv_uid.

CALL FUNCTION 'BBP_USER_GET_DETAIL_BBP_USR01'

EXPORTING

BBP_USR01_USERID = lv_uid

IMPORTING

BBP_USR01_LASTNAME = lastname

BBP_USR01_FIRSTNAME = firstname

BBP_USR01_TITLE = title

TABLES

RETURN = ret.

concatenate title firstname lastname into ls_approver-name separated by space.

concatenate 'US' ls_sc_approver-uname into ls_approver-approval_agent.

ls_approver-approval_index = 1.

ls_approver-approval_description = 'Single approval step'.

APPEND ls_approver TO approval_table.

endloop.

no_further_approval_needed = 'X'.

endif.

  • ====================== purchase order ============================= *

WHEN c_po.

move guid to lv_obj_guid .

      • get the details of the po

CALL FUNCTION 'BBP_PD_PO_GETDETAIL'

EXPORTING

  • i_object_id = object_id

i_guid = lv_obj_guid

IMPORTING

e_header = ls_header_po

TABLES

e_item = lt_item_po

e_partner = lt_partner

E_ORGDATA = lt_orgdata.

read table lt_item_po index 1 into ls_item_po.

lv_record = ls_item_po-zzrecordtype.

  • No approval in case of AOG or Critico (Oli, 08.12.)

if ls_header_po-zzstatus = 'A' or

ls_header_po-zzstatus = 'C' or ls_header_po-zzcapturista = 'X'.

no_further_approval_needed = 'X'.

exit.

endif.

if lv_record ne 'R'.

select * from ZZS_APPROVER_TEC into table lt_zzs_approver_tec.

else.

select * from ZZS_APPROVER_REP into table lt_zzs_approver_tec.

endif.

read table lt_partner into ls_partner with key PARTNER_FCT = '00000016'.

partner_guid = ls_partner-partner_no.

read table lt_orgdata into ls_orgdata index 1.

move ls_orgdata-PROC_GROUP_ID to lv_unidorg.

CALL FUNCTION 'HR_STRUCTURE_GET'

EXPORTING

ROOT_PLVAR = '01'

ROOT_OTYPE = 'O'

ROOT_OBJID = lv_unidorg

PATHID = 'A002'

IMPORTING

RESULT_OBJECTS = lt_OBJECTS

RESULT_STRUCTURE = lt_STRUCTURE

  • ROOT_COPY =

EXCEPTIONS

PLVAR_NOT_FOUND = 1

ROOT_NOT_FOUND = 2

PATH_NOT_FOUND = 3

INTERNAL_ERROR = 4

OTHERS = 5

.

IF SY-SUBRC eq 0.

describe table lt_structure lines lv_level.

ELSE.

move 10 to lv_level.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'BP_CENTRALPERSON_GET'

EXPORTING

IV_BU_PARTNER_GUID = partner_guid

IMPORTING

EV_USERNAME = userid

EXCEPTIONS

NO_CENTRAL_PERSON = 1

NO_BUSINESS_PARTNER = 2

NO_ID = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

if lv_level gt 2.

org_object-otype = 'O' .

org_object-objid = ls_orgdata-PROC_GROUP_ID.

SWC_SET_ELEMENT AC_CONTAINER 'ORG_OBJECT' ORG_OBJECT.

*Get first approver

CALL FUNCTION 'SWX_GET_MANAGER'

TABLES

ACTOR_TAB = ACTOR_TAB

AC_CONTAINER = AC_CONTAINER

EXCEPTIONS

NOBODY_FOUND = 1

OTHERS = 2.

read table actor_tab index 1 into ls_approver1-approval_agent.

clear: userid_app,

lastname,

firstname,

title.

userid_app = ls_approver1-approval_agent+2.

CALL FUNCTION 'BBP_USER_GET_DETAIL_BBP_USR01'

EXPORTING

BBP_USR01_USERID = userid_app

IMPORTING

BBP_USR01_LASTNAME = lastname

BBP_USR01_FIRSTNAME = firstname

BBP_USR01_TITLE = title

TABLES

RETURN = ret.

concatenate title firstname lastname into ls_approver1-name separated by space.

endif.

if lv_level gt 3.

ORG_OBJECT = ls_approver1-approval_agent.

SWC_SET_ELEMENT AC_CONTAINER 'ORG_OBJECT' ORG_OBJECT.

  • Get Planeador (in case of Reparaciones)

CALL FUNCTION 'BBP_USER_GET_DETAIL_BBP_USR01'

EXPORTING

BBP_USR01_USERID = 'PLANEADOR01'

IMPORTING

BBP_USR01_LASTNAME = lastname

BBP_USR01_FIRSTNAME = firstname

BBP_USR01_TITLE = title

TABLES

RETURN = ret.

concatenate title firstname lastname into ls_approverc-name separated by space.

*Get second approver

CALL FUNCTION 'SWX_GET_MANAGER'

TABLES

ACTOR_TAB = ACTOR_TAB

AC_CONTAINER = AC_CONTAINER

EXCEPTIONS

NOBODY_FOUND = 1

OTHERS = 2.

read table actor_tab index 1 into ls_approver2-APPROVAL_AGENT.

clear: userid_app,

lastname,

firstname,

title.

userid_app = ls_approver2-approval_agent+2.

CALL FUNCTION 'BBP_USER_GET_DETAIL_BBP_USR01'

EXPORTING

BBP_USR01_USERID = userid_app

IMPORTING

BBP_USR01_LASTNAME = lastname

BBP_USR01_FIRSTNAME = firstname

BBP_USR01_TITLE = title

TABLES

RETURN = ret.

concatenate title firstname lastname into ls_approver2-name separated by space.

endif.

if lv_level gt 4.

ORG_OBJECT = ls_approver2-APPROVAL_AGENT.

SWC_SET_ELEMENT AC_CONTAINER 'ORG_OBJECT' ORG_OBJECT.

*Get third approver

CALL FUNCTION 'SWX_GET_MANAGER'

TABLES

ACTOR_TAB = ACTOR_TAB

AC_CONTAINER = AC_CONTAINER

EXCEPTIONS

NOBODY_FOUND = 1

OTHERS = 2.

read table actor_tab index 1 into ls_approver3-APPROVAL_AGENT.

clear: userid_app,

lastname,

firstname,

title.

userid_app = ls_approver3-approval_agent+2.

CALL FUNCTION 'BBP_USER_GET_DETAIL_BBP_USR01'

EXPORTING

BBP_USR01_USERID = userid_app

IMPORTING

BBP_USR01_LASTNAME = lastname

BBP_USR01_FIRSTNAME = firstname

BBP_USR01_TITLE = title

TABLES

RETURN = ret.

concatenate title firstname lastname into ls_approver3-name separated by space.

endif.

if lv_level gt 5.

ORG_OBJECT = ls_approver3-APPROVAL_AGENT.

SWC_SET_ELEMENT AC_CONTAINER 'ORG_OBJECT' ORG_OBJECT.

*Get fourth approver

CALL FUNCTION 'SWX_GET_MANAGER'

TABLES

ACTOR_TAB = ACTOR_TAB

AC_CONTAINER = AC_CONTAINER

EXCEPTIONS

NOBODY_FOUND = 1

OTHERS = 2.

read table actor_tab index 1 into ls_approver4-APPROVAL_AGENT.

clear: userid_app,

lastname,

firstname,

title.

userid_app = ls_approver4-approval_agent+2.

CALL FUNCTION 'BBP_USER_GET_DETAIL_BBP_USR01'

EXPORTING

BBP_USR01_USERID = userid_app

IMPORTING

BBP_USR01_LASTNAME = lastname

BBP_USR01_FIRSTNAME = firstname

BBP_USR01_TITLE = title

TABLES

RETURN = ret.

concatenate title firstname lastname into ls_approver4-name separated by space.

endif.

if ls_header_po-CURRENCY ne 'USD' and ls_header_po-CURRENCY ne 'MXN'.

call function 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

date = sy-datlo

foreign_amount = ls_header_po-total_value

foreign_currency = ls_header_po-CURRENCY

local_currency = 'USD'

IMPORTING

local_amount = val_mxp.

else.

val_mxp = ls_header_po-total_value.

endif.

if ls_header_po-CURRENCY = 'MXN'.

loop at lt_zzs_approver_tec into ls_zzs_approver_tec

where low_mxp le val_mxp

and high_mxp ge val_mxp.

endloop.

else.

loop at lt_zzs_approver_tec into ls_zzs_approver_tec

where low_usd le val_mxp

and high_usd ge val_mxp.

endloop.

endif.

  • In case of Reparaciones we have the first approval, when the value of the PO is still 0.

if lv_record = 'R' and val_mxp le '0.01'.

ls_approver-approval_index = 1.

ls_approver-approval_agent = ls_approver1-approval_agent.

ls_approver-name = ls_approver1-name.

ls_approver-approval_description = 'First approval step'.

APPEND ls_approver TO approval_table.

no_further_approval_needed = 'X'.

exit.

endif.

if sy-subrc eq 0.

case ls_zzs_approver_tec-nivel.

when 1.

      • 1 step approval

if lv_level gt 2.

ls_approver-approval_index = 1.

ls_approver-approval_agent = ls_approver1-approval_agent.

ls_approver-name = ls_approver1-name.

ls_approver-approval_description = 'First approval step'.

APPEND ls_approver TO approval_table.

endif.

when 2.

      • 2 step approval

if lv_level gt 2.

ls_approver-approval_index = 1.

ls_approver-approval_agent = ls_approver1-approval_agent.

ls_approver-name = ls_approver1-name.

ls_approver-approval_description = 'First approval step'.

APPEND ls_approver TO approval_table.

if lv_level gt 3.

ls_approver-approval_index = 2.

ls_approver-approval_agent = ls_approver2-approval_agent.

ls_approver-name = ls_approver2-name.

ls_approver-approval_description = 'Second approval step'.

APPEND ls_approver TO approval_table.

endif.

endif.

no_further_approval_needed = 'X'.

when 3.

      • 3 step approval

if lv_level gt 2.

ls_approver-approval_index = 1.

ls_approver-approval_agent = ls_approver1-approval_agent.

ls_approver-name = ls_approver1-name.

ls_approver-approval_description = 'First approval step'.

APPEND ls_approver TO approval_table.

if lv_level gt 3.

ls_approver-approval_index = 2.

ls_approver-approval_agent = ls_approver2-approval_agent.

ls_approver-name = ls_approver2-name.

ls_approver-approval_description = 'Second approval step'.

APPEND ls_approver TO approval_table.

if lv_level gt 4.

ls_approver-approval_index = 3.

ls_approver-approval_agent = ls_approver3-approval_agent.

ls_approver-name = ls_approver3-name.

ls_approver-approval_description = 'Third approval step'.

APPEND ls_approver TO approval_table.

endif.

endif.

endif.

no_further_approval_needed = 'X'.

when 4.

      • 4 step approval

if lv_level gt 2.

ls_approver-approval_index = 1.

ls_approver-approval_agent = ls_approver1-approval_agent.

ls_approver-name = ls_approver1-name.

ls_approver-approval_description = 'First approval step'.

APPEND ls_approver TO approval_table.

if lv_level gt 3.

ls_approver-approval_index = 2.

ls_approver-approval_agent = ls_approver2-approval_agent.

ls_approver-name = ls_approver2-name.

ls_approver-approval_description = 'Second approval step'.

APPEND ls_approver TO approval_table.

if lv_level gt 4.

ls_approver-approval_index = 3.

ls_approver-approval_agent = ls_approver3-approval_agent.

ls_approver-name = ls_approver3-name.

ls_approver-approval_description = 'Third approval step'.

APPEND ls_approver TO approval_table.

if lv_level gt 5.

ls_approver-approval_index = 4.

ls_approver-approval_agent = ls_approver4-approval_agent.

ls_approver-name = ls_approver4-name.

ls_approver-approval_description = 'Fourth approval step'.

APPEND ls_approver TO approval_table.

endif.

endif.

endif.

endif.

no_further_approval_needed = 'X'.

when 5.

endcase.

else.

  • Auto approval for value less than 10000 pesos.

  • if ls_header_po-total_value le 10000.

  • no_further_approval_needed = 'X'.

  • endif.

  • Nothing found in table

no_further_approval_needed = 'X'.

endif.

ENDCASE.

ENDMETHOD.

Former Member
0 Kudos

Hi Dario,

Quite a long coding doesn't it ...

Apparently the approval index is well managed, but therer is something wrong in your coding: ONLY THE REMAINING APPROVERS HAVE TO BE ADDED IN THE EXPORT TABLE () you have to test against BADI parameter actual_approval_index.

Regards.

VAdim

Answers (5)

Answers (5)

former_member1229370
Participant
0 Kudos

Hi Dario,

I had this problem before.

Check Approval Index in your appproval_table.

If for example

John has approval Index as 1

Mike has 2

and Peter has 3.

It will work fine But if the approval index is 1,3,4 or not in sequence then as soon as john approves it, it will skip everything and PO will get approved.

Hope this will help. Please reward few points if this answer is helpful.

Kind Regards

Pras

Former Member
0 Kudos

Hello Dario,

From your description, it seems to me that you should use a less complex WF. The N-Step is generally used for staggered approval. You setup seems quite linear...ie John -> Mike -> Peter.. each one being the boss of the last. The standard WF will do this for one step. Creating a 2 or 3 step from the basics seems like a better option.

Dont forget if you stick with WS14000145 nstep for po, then you will have to use th APPROVAL Badi and endure that the approval table is returning the desired approvers. Easiest was to check this is set and external BP in the BADI, do the process via the browser, (Order/Preview) and when you hit the BP, step out of the badi with F7 and check the values contained in the approval table that the BADI tried to populate.

Hope this helps!

Will

khan_voyalpadusman
Active Contributor
0 Kudos

Hi,

there were number of changes done in the workflow container area , might be because of the changes , the issue happens in your system.

Please let me know the following things?

1. Have you got any shopping cart created before the upgrade , if you have please let me know the workflow log for the shopping cart.

what is the value for the approval_state in the table approva_agents in the workflow container.

you can get the workflow log using the transaction SWI6 for the shopping cart.

2) please check the workflow log for the shopping cart which was created after the upgrade.

please look for aporal_state in the table approal_agents in the workflow container.

looks like when the shopping cart is created , approval_state is 5 for all the approvers involved.

Approval state should be 5 ' for the first level and '2' for the remaining . please check for this.

3) check for any OSS notes which deal with updation of containers

Former Member
0 Kudos

No Dario,

As this is an implementation project, we have started with SP08 version only!

Well, I ll go through the OSS note you have got, lets see if anything works.

Please do update in case you find any solution. I too will update you.

Thanks,

Rahul.

Former Member
0 Kudos

Ok Rahul,

I'm now responding to SAP, hoping they give me some more notes related to the problem.

I've found some notes by my own and may be useful, but I don't want to apply them until SAP says so...

If you want tho check them: 901068, 903015, 894978(this one's the one SAP sent me).

keep in touch.

Dario

Former Member
0 Kudos

Hi ,

I do have exactly the same problem before the implementation of the SP08 everything was working fine

Now after the implementation everytime there is more than one approver in the workflow is not stopping and keep on returning in the inbox of the last approver when he approves. The problem seems to be coming from the workflow WS14000146 the step called Determine next approver never returns a blank current approver or the No further approval flag.

Behind this step is task TS14007989, BUS4101 with method NEXTDYNAMICAPPROVERGET. All the binding seems correct.

When testing the Method directly the result is the same as within the workflow ( ActualAgent is not correct and No_further_approval is not set)

It seems to be coming from Function BBP_WFL_DIN_APPR_CONTAINER_GET where the approvallist-state = 2 for the last approver.

(Code: * get the list of dynamic approvers from wi-container

swf_get_element ev_wi_container_handle c_wf_appr_list lt_cont_approver.)

While testing the BADI function directly the no_further_approval flag is present

Furthermore the set release to purchase order is also causing problem ( with the n step Badi workflow but also with the standard no approval workflow) the method needs to be run twice in a row to work ( first time there is a strange message)

Do anyone have a solution already around those problems ?

Or anyone encounter this strange behavior ?

Best regards

Stephane

Former Member
0 Kudos

Hi all,

We are running on SRM 4.0 (SP08) and have implemented the WF WS14000133 succesfully through BADI BBP_WFL_APPROV_BADI...but had to really work hard for it!

Jst to help you all who are still on SP08...We had to apply the foll OSS notes :

--923463 BAdI n-step approval - Container inconsistent for 1st step

--901068 BAdI Workflows: Enhancement of Note 896556

--898768 BADI Workflow: Determining current approvers

--909871 Error in BAdI workflow without approval

--903015 BAdI Workflows: Events and parallel steps

--894978 APPROVERLIST container element has incorrect approver status

--870391 Programming for the BAdI workflow

--784408 Item approval: Rejected items in BADI

And what Vadim said is right...at each approval step you need to pass only the list of approvers from that step onwards which is important...also check whteher the approval index(level of approval for the approver)is being picked up properly at each step(step controlled by "actual_approval_index")..Hope this helps...

regards,

Disha.

Former Member
0 Kudos

Hi all, yes in fact we'd also applied several notes part of SP09 that SAP sent us ( includes all yo've applied ) and that solved the problem.

Greetings,

Former Member
0 Kudos

Hi,

I am experiencing the same issue - although i am using SRM 5.0 (SRM SERVER 5.5 SP 9).

Does anyone have experience solving the issue in this version?

Thanks,

Nick

Former Member
0 Kudos

Hi Dario,

Please do let me know if you have found any solution for this problem? I too am facing the same problem and have even posted a question in SDN.

In my case I am using the standard code given in implementation SAP_APP_BADI_EXAMPL3 for PO's case only.

Please do update.

Thanks,

Rahul.

Former Member
0 Kudos

Hi,

No I didn't yet...

SAP sent me an OSS note 894978, but it make it worst. The authorization flow is still well defined 1st approver Fmiron 2nd approver Vcabre 3rd approver ESu01, but now when Fmiron accepts the po in the auth.flow now appears Fmiron as 1st and 2nd approver, and the po is again in his inbox, when he approves it for second time then Fmiron appears as 3rd approver. Weird.

Did you have the problem sinces SP08?