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

Shopping Cart Workflow: Agent Determination error.

Former Member
0 Kudos
551

Hi All,

I am using SC workflow multiple level approval at line item. Required config and badi activated and code written.

every level might have multi level approval and this was working fine. But suddently got few errors.

Issue Details.

1. When I create a SC with one Line item that qualifies say 3 level of approval. All three level Approvers are determined from the badi (i checked this in debugging (say level 1 : user01, level 2: user02,level 3: user03)).

2. In shopping cart after I order the SC, in the Approval overview section I see the 3 level of approvals with approver name(same user01, user02, user03 as in BADI). so first user01 will approve followed by user02 and user03.

3. In the workflow log i see the first level of approver is not the one determined from badi and nor displayed in SC approval section. This is some other user (say user04).

4. If i go to user01's web portal inbox i dont see the workitem in his UWL inbox. But user04 has the workitem in his UWL inbox.

5. Still in shopping cart i see (same user01, user02, user03 as in BADI).

6. Now if I approve the SC from User04's UWL inbox then in SC is approved and all 3 levels with approvers name in approval overwiew tab disapeares and i see only User04 as level 1 approver with approved status.

I was using user04 previously but not anymore but it pops up. I am not able to get where to check why agent deteminations are resetting to user04.

And this was working as designed few days back.

can somebody help here?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi..

This could be due to buffer is not refreshed.. can you please refresh the buffer using SWU_OBUF and try again..

Saravanan

Former Member
0 Kudos

saravanam .. thanks for the reply ... SWU_OBUF did not resolve the error.

So i recreated the whole scenario buffer issue is resolved (but natural)

Now the issue is:

1. When I create a SC with one Line item that qualifies say 3 level of approval. All three level Approvers are determined from the badi (i checked this in debugging (say level 1 : user01, level 2: user02,level 3: user03)).

2. In shopping cart after I order the SC, in the Approval overview section I see the 3 level of approvals with approver name(same user01, user02, user03 as in BADI). so first user01 will approve followed by user02 and user03.

3. In the workflow log i see the first level of approver is user01.

4. User01 has the workitem in his UWL inbox.

5. Still in shopping cart i see (same user01, user02, user03 as in BADI).

6. Now if I approve the SC from User01's UWL inbox then in SC is approved and all 3 levels with approvers name in approval overwiew tab disapeares and i see only User01 as level 1 approver with approved status.

To summarise, despite SC item beign qualifing for 3 level of approval .. as soon as the first level user01 has approved the whole item is approved. and all level status in approval oweriview in SC is also changed to 1 level.

Am i missing something?

Former Member
0 Kudos

Hi..

Did you implement the Badi /SAPSRM/BD_WF_PROCESS_CONFIG?.. In SRM 5.0 we have only "BBP_WFL_APPROV_BADI" use to increase the approval index dynamically based on the level of approval need for a SC, where us in SRM 7.0 if you want to have N-Step approval then you have to implement both badis /SAPSRM/BD_WF_PROCESS_CONFIG & /SAPSRM/BD_WF_RESP_RESOLVER..hope this will help you..

Saravanan

Former Member
0 Kudos

I have already implemented /SAPSRM/BD_WF_RESP_RESOLVER, but not /SAPSRM/BD_WF_PROCESS_CONFIG.

I read in a Link: [link|; we should not use both the badi in SRM 7.o.

As I see all agents per level for one line item determined for SC in approval overview section, Why is it not working after approved by first level approver.

Where should i check this for example after i click approve in UWL.

thanks in advance.

Former Member
0 Kudos

Hi..

I think you misunderstood the link Swetha was asking, is there a way to implement N-Step Badi using PCW.. this is nothing to do with /SAPSRM/BD_WF_PROCESS_CONFIG & /SAPSRM/BD_WF_RESP_RESOLVER Badi's..

Here is how PCW works.. the Badi /SAPSRM/BD_WF_PROCESS_CONFIG is used to increase the process level sequence dynamically based on the condition you define in Evaluation Id ( For example SL Approval same as N-step BADI in SRM 5.0 ACW ) . Badi /SAPSRM/BD_WF_RESP_RESOLVER is to find the item details and corresponding approvers..can you please explain your requirement with some more details..

if you are trying to increase the process level sequence dynamically based on the each item in SC then its little tricky..

Saravanan..

Former Member
0 Kudos

Check in SLG1 log for errors.

Former Member
0 Kudos

Saravana ... thanks for replying...

I have set process level config for this with 2 level of approval with Evaluation ID and resolver defined for each level for item level approval. These evaluation ID's are lnked to Function module using BRF to validate that level and then calls Badi for agent determination where it is creating the Area Guid for each level of approval and later agents is determined.

In the debugging i can see FM linked evaluation ID beign called and evaluated if that level needs to be processed for agent determination. so this all is happening when SC is ordered and i can see the same being displayed in approval overview tab in SC.

But after first approval the later levels are not executed or goes through all level and approved the SC.

What i am not able to understand is where is this Badi /SAPSRM/BD_WF_PROCESS_CONFIG used in above process?

Or i am missing some thing in the proces... could you help me understand what code should be in the Badi /SAPSRM/BD_WF_PROCESS_CONFIG.

Thanks in advance.

Former Member
0 Kudos

Hi..

/SAPSRM/BD_WF_PROCESS_CONFIG is needed if you want to increase the process level sequence dynamically.. For example

SC SL Approval .. You will define only one process level sequence in SPRO, but based on the approval limit and the sc value the process level sequence will be increaded dynamically.. if you use /SAPSRM/BD_WF_PROCESS_CONFIG then the leading_object_id will be created as level_guid in the same badi, then /SAPSRM/BD_WF_RESP_RESOLVER will kick off to read the agent level guid..

If you don't want process level sequence dynamically determine then you don't need to /SAPSRM/BD_WF_PROCESS_CONFIG.. basically this badi is used to determine the agent and that agent level guid will be passed to /SAPSRM/BD_WF_RESP_RESOLVER..

Saravanan..

Former Member
0 Kudos

Saravanan,

we are using custom table for agent determination where cutoff value is also maintained.

this is table is checked in config evaluation id FM and activates the respective level which in turn calls badi 1.maping area guid 2. agent determination.

so if in config for PCW in schema if i have 3 levels defined then for each line item then each level is calling evaluation id FM, where it checks if that level is active and if level is active BADI is tirggered.

In FM and BADI i am using custom table for agent determination.

This is working and before and after ordering SC, i can see levels and corresponding agents per level in SC.

It resets all level after first approver has approved the SC.

I more thing i noticed today. after the shopping cart is approved if close the same window and try to open the same sc using advanced search then at that moment also the levels are reset to 1st level before approval.

thanks.

Former Member
0 Kudos

Hi,

I am trying to understand your workflow logic, Can you please share your business requirement in detail..

correct me if i am wrong , You have configured a Process level sequence for example

100 Approval 0EV000 ( True ) RR Task Item based decision for Parial Document

now .. if you create a SC with 4 line ltems and each line item is suppose to approve by different approver then you will see as

"Multiple Decision Sets" if you only implement /SAPSRM/BD_WF_RESP_RESOLVER Badi.. is this working?

Saravanan..

Former Member
0 Kudos

i have configured as below

100 zevid zrr item based decision for entire document.

200 zevid zrr item based decision for entire document.

so sequence number 100 and 200. maximumn level of approver is 2.

zevid is linked iwth z fm to evaluate if the current sequence number needs to be executed.

so for every line item sequence 100 and 200 will be executed and checked if badi needs to be executed.

Hope you got the config.

-


One more thing how to find line item number or line item value in a FM linked to sequnce number.

For example if there are 2 line items, then with above config each line item will go for 100 and 200 evaluation, if both are true then particular line item will go for 2 level of approval. Now when system is evaluating first line item in sequence 100 then in 100 how to get line item number or line item value. As we are using custom table for agent determination so wanted to have line item number or value to check the responsible agent in the particualr sequence FM.

Thanks.

Former Member
0 Kudos

Saravana .... Thanks for all your help.

Answers (2)

Answers (2)

venkatakrishna
Active Participant
0 Kudos

Hi sajeed,

FM: BBP_PDH_WFL_WI_FROM_OBJECT_GET Get Work Items for bid invitation

      
    RH_STRUC_GET    to Get Org strct

Tables:

hrp1001     HR Relationship
sww_cont    Workflow Container
swr_wihdr   WorkItem Header
swp_header  WorkItem Header
bbp_pds_org Org. Data
hrp5503     DB Table for Info Record 5503

Thanks,

Krishna    

shaik_sajeed2
Explorer
0 Kudos

Hi sainath ,

I have same requirement i need to add this field sequene no. and Process step  in to my report.can you please give ur contact details.or the tables from which this fields can be extracted.

thanks and Regards

Sajeed