cancel
Showing results for 
Search instead for 
Did you mean: 

N - Step BADI Workflow, SC is approved when First Appover approvers

Former Member
0 Kudos

Hi,

I am using the N-Step BADI for Shopping Cart approval Process. We are able to populate the respective approvers by coding the logic and we are able to see them in the Approval Preview of the Shopping Cart as well. But when ever the first approver is approving the Shopping Cart, even though there are other higher level approvers how has to approver it furhter the Shopping Cart is seen as completely approved.

Ex: First Approver Manager 1, Second Approver Manager 2, Third Approver Manager 3.

When even Manager 1 Approves the Shopping Cart its not going to Manager 2 for approval and when ever I see the status of the Shopping Cart it is seen as Approved.

Pls advice.

Thanks,

Satya.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks for your inputs and we did figureout the issue. The Object ID in coding is pointing to wrong one.

SE12
Active Participant
0 Kudos

Hi Satya,

Try to debug to see what is being returned from your badi during the approval of the cart.

To do this you can do the following:

Create a cart which is ready for the first approver to approve.

Logon to the SAPgui as the approver.

Set a break-point in your implementation of badi BBP_WFL_APPROV_BADI via SE18.

Run transaction BBP_BGRD_APPROVAL

Enter :

Username = Approvers name e.g. manager1

Action = 0 (should be 0 for approving and 1 for rejecting)

Workitem ID = Workitem ID of the approval step. (you can see this in the last step of the workflow log)

Enter debugging mode (/h)

Click on Start

Set a break-point in FUNCTION BBP_PDH_WFL_DB_UPDATE

F8 to this break-point and change iv_in_dialog to 'X'.

F8 and the system should stop at your badi.

Let me know what your badi returns at this point.

Kind regards,

Siobhan

Former Member
0 Kudos

Siobhan Thanks for your reply.

I did check the way you said. When I was trying to debug, I was taken to BADI and the strange thing over there is I am not able to get the GUID of the Shopping Cart. May be because of this the Shopping Cart is not going for next Level for Approval.

Any Suggestion?

Regards,

Satya

Former Member
0 Kudos

I did follow up with one of our workflow consultants and he figured out that there is some issue with the workflow container.

Could anyone give inputs how we need to debug the issues related to workflow container.

-Satya

former_member186746
Active Contributor
0 Kudos

Hi,

Check the documentation of the badi

Goto Se18 type in BBP_WFL_APPROV_BADI now select menupath Goto>Documentation>display

There are a number of SAP notes mentioned, read them if you think they are usefull.

Also goto menupath Enhancement Implementation-->Overview

In SRM SAP has provided us with a number of examples.

My guess is, you're not using the logic correctly.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Rob,

We are using very simple scenario and we are not having any item based approvals. When ever I see the approval preview before ordering the Shopping Cart I am able to see the all the approvers in the approval table and approval preview as well. Even after ordering the SC i do see the same list of approvers in the Approval Preview.

I am wondering where exactly the things are going worng.

Regards,

Satya

khan_voyalpadusman
Active Contributor
0 Kudos

please have a look at the workflow log ( transaction SWI6) and let me know whether the second and third level approvers are available in the workflow container.

if yes what is the value for approval_state for the second and follow on approvers in the workflow container.

please also let me know the version of your SRM and support package level.

Former Member
0 Kudos

Hi All,

Thanks for the replies.

I did check the workflow in the Debugging mode and i see the Nofurther_approval Required attribute has no value when we were ordering the Shopping Cart. While Ordering the Shopping Cart I am seeing 3 approvers and when I look in the workflow trace swi6 there i see only one Approver as desired. If the approver approves the SC then the shopping cart is getting completely approved. I am not seeing any further approver.

When I see the Approval Preview of the approved Shopping Cart, I see nothing over there simply a message stating "Document Approved".

Your valuable inputs are highly appreciated.

Regards,

Satya

nabheetscn
Active Contributor
0 Kudos

Hello,

Determine all the approvers in the BADI and append it to the table.Only set the no further approval flag once all approval has been done.

Regards,

Nabheet MAdan

Former Member
0 Kudos

Hi Satya,

Please check for the value populated in the valriable "NOFurtherApprovalNeeded" in workflow container.

If the value is 'X' then even though further approvers exists the workflow will not consider them.

BR,

Navin