cancel
Showing results for 
Search instead for 
Did you mean: 

N Step BADI Approval Workflow Error in SRM 7.0

Former Member
0 Kudos

Hi,

I have implemented SC Workflow Approval based on line item(sequential approval). I implemented process controlled workflow for this using N step Badi. Necessasy configuration done for each level at schema. All steps are executed per line item and agents determined using N step Badi /SAPSRM/BD_WF_RESP_RESOLVER.

Even in SC after the document is ordered, in approval overview tab i see the all level sequence with approvers name for that line item.

But when approved by first approver, it doesnot move to the next level for approval and the SC is approved bypassing all approvers in the following levels.

For example, if there four levels of approvals for one line item. as soon as the first approver approves the SC is approved and in SC Approval Overiew tab that contained four level of approval in it is now reset to one level with SC marked as appproved.

Have anybody come across this error.

Not able to figure out why it is happening so... need some expert advice.

Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I think the issue is in your level evaluation definition. Please check the SLG1 log.

Regards,

Masa

Former Member
0 Kudos

Masa thanks for you rreply,

By level evaluation you mean at config for PWC where level sequence is set. I can see all set level are executed in debuggin and validated to triggered BADI for that level.

incase you are refering to some other level evatluation then please let me know where do i check.

SLG1 didnot show any error.

thanks.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Please check related SLG1 log. It shows level evaluation result. If level evaluation was blank, the level was skipped but your are expecting level evaluation = X.

Regards,

Masa

Former Member
0 Kudos

Masa .. thanks for repling ...

I think you are right ... I think logic is falling in second go after the SC is ordered.

could please help me how to find in Evalutaion id FM (BRF), for which line item the levels are triggereing.

For example

If in a SC i have 3 line items. and in config i have to validate 3 levels of approval for each line item. In that case how to find, for which line item the Evaluation ID FM is executed. In FM how to find current line item.

Thanks

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Evaluation ID is Event in BRF.

Process Level definition should be like this.

Level Eva.ID ; Resolver Task ID Decision Type

100 L100 R100 40007953 Item-Based decision for Partial Doc.

200 L200 R200 40007953 Item-Based decision for Partial Doc.

300 L300 R300 40007953 Item-Based decision for Partial Doc.

You have to define what is the grouping key (Area, Decision Set) like Purchasing Group, Plant and others.

Item 1 Area A1

Item 2 Area A2

Item 3 Area A1

Then implement /SAPSRM/BD_WF_RESP_RESOLVER for R100,R200,R300.

Regards,

Masa

Former Member
0 Kudos

Hi Masa .. thanks for your reply.

Was on vacation so could not reply.

I have below settings in SRM for SC

Process Level definition should be like this.

Level Eva.ID ; Resolver Task ID Decision Type

100 L100 R100 40007953 Item-Based decision for Partial Doc.

200 L200 R100 40007953 Item-Based decision for Partial Doc.

300 L300 R100 40007953 Item-Based decision for Partial Doc.

I have implemented /SAPSRM/BD_WF_RESP_RESOLVER for R100.

for grouping we are using line item number ... so each line item is a group.

Below are issues that i am facing now.

For say 2 line item in a SC... with 3 level of approvals for each line item. I am not able to approve one line item in a sequence. For example: If for first line item, when I approve level one .. then the workitem doesnot move to 2nd approver's inbox for that line item. Now if second items (asssuming there are only 2 line items in SC) first approver has approved then i see all second level of approvers available for all line item.

In short system waits for all one level approvers to approver for all line item and when all the line items are approved at one level then the workitems are available for seconds level of approval.

Is this the standard behaviour?

As per our requirement we wanted one line item shoudl follow the approveral sequence without being dependent on other items approval.

Former Member
0 Kudos

Hi Masa .. thanks for your reply.

Was on vacation so could not reply.

I have below settings in SRM for SC

Process Level definition should be like this.

Level Eva.ID ; Resolver Task ID Decision Type

100 L100 R100 40007953 Item-Based decision for Partial Doc.

200 L200 R100 40007953 Item-Based decision for Partial Doc.

300 L300 R100 40007953 Item-Based decision for Partial Doc.

I have implemented /SAPSRM/BD_WF_RESP_RESOLVER for R100.

for grouping we are using line item number ... so each line item is a group.

Below are issues that i am facing.

For say 2 line item in a SC... with 3 level of approvals for each line item. I am not able to approve one line item in a sequence. For example: If for first line item, when I approve level one .. then the workitem doesnot move to 2nd approver's inbox for that line item. Now if second items (asssuming there are only 2 line items in SC) first approver has approved then i see all second level of approvers available for all line item.

In short system waits for all one level approvers to approver for all line item and when all the line items are approved at one level then the workitems are available for seconds level of approval.

Is this the standard behaviour?

As per our requirement we wanted one line item shoudl follow the approveral sequence without being dependent on other items approval.

Former Member
0 Kudos

Hi,

Yes -This is standard, since you have implemented line item based approve the system will wait until all the items in the SC approve then route to next process level.

Saravanan

Former Member
0 Kudos

Hi Saravana .. thanks for repling and for clarification.

In SC as per our requiement we need to auto approve free text item and rest all line needs to go for approval process.

Each line item should be approved individually and moved to sourcing cokpit for PO creation at backend(ECC) except for catalog item where it is not going to sourcong cockpit and pO created at backend.

So far I saw, all catalog are grouped and PO are created and all non catalog are grouped and po are created from sourcing cockpit in backend. This is done after SC is approved when all items approved.

As per our requirement ... each line item after that line item is approved should create a PO at the backend and should not wait for other items in the SC to be approved.

Any idea how to achieve this.

That was the reason why i used Item-Based decision for Partial Doc assuming this will full fill the requirement.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

It is not possible in standard. Workaround is generating SC which has only 1 item from main SC.

Main SC (50 items) -> generate 50 SC with 1 item.

Regards,

Masa

Former Member
0 Kudos

Masa .. I appreciate your instant reply...

1. So SC will wait for all items to be approved. After all the line items are approved in the SC, then SC will be updated with status approved and then SC will be converted to PO?

2. 1 SC (50 lineitems) => 50 SC(line items). I think with this you mean 1 SC (50 line items) will create 50 PO's (1 line item) in backend? If yes, then ss i See already catalog and not catalog items are grouped and PO's are created at the backend, then If i have to switch to 1 SC( 50 items ) generates 50 PO's ( 1 line item ) were do i have to do the settings.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

>Each line item should be approved individually.

>As per our requirement ... each line item after that line item is approved should create a PO at the backend and

>should not wait for other items in the SC to be approved.

Your requirement is like this.

SC has 50 items (20 items are free text items, 30 items are catalog items)

- 20 free text items are approved automatically, and moved to Sourcing Cockpit.

- 30 catalog items go to approval and when each catalog item is approved PO should be created immediately. In this case 30 PO with 1 item will be created.

Is this correct understanding? It is not possible in standard. Please double check you really want to create 30 PO with just 1 item.

Regards,

Masa

Former Member
0 Kudos

Masa ... no .. thats not the requiement.

I think i was not specific.

let me put this again,

As per our current settings:

If 1 SC with 5 Non Catalogue line items and 5 Catalogue line items are created and ordered, then after all the 10 line items are approved. SC is approved and creates two po ( one po with 5 non catalogue line items and one po with 5 catalogue line items) in the backend.

My question here is, if 5 non catalogue line items are approved and 5 catalogue are not approved in the same SC, then will only 5 non catalogue line items will go to sourcing cockpit and create po at backend or vice versa?

Is this possible in standard SRM SC.

Thanks.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

No follow-on document is created until all items are approved/rejected.

SC has 10 items (5 free text items, 5 catalog items). When all 10 items have approve/rejected, 1 PO for 5 catalog items is created if supplier is same and 5 free text items go to sourcing cockpit.

Regards,

Masa

Former Member
0 Kudos

Thanks Masa for that information... appreciate your efforts.

In my config setting i have decision type as "Overall Decision for Partial Document". Each level waits for all line items to approved in the SC and then moves to next level.

In short system waits for all one level approvers to approve for all line item. After all the line items are approved at one level then the workitems are available for seconds level of approval.

What decision type should I use if I want to each line item to follows respective approval sequence without waiting for other line items in the SC to approved at that level.

Is this acheiveable?

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

No, it is not available in standard. To execute next level, current level has to be completed.

Regards,

Masa

Former Member
0 Kudos

Masa ... Thanks for all your help.

Former Member
0 Kudos

i need some immediate help ... can you help here please ...

please see the below link,

Link: []

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please have a look at the below thread..

Saravanan