cancel
Showing results for 
Search instead for 
Did you mean: 

N-Step Approval BADI not triggering for Vendor BID

Former Member
0 Kudos

Dear Experts,

We have recently upgraded to SRM 7.0 and we are using Application Controlled Workflow.

I have a requirement to activate N-Step Approval Workflow ( WS14500044) for VENDOR bid.

I have activated the event linkage and has also defined the start condition for this workflow via SPRO.

I have also implemented the BADI: BBP_WFL_APPROV_BADI to fill the approval table.

When i am accepting a Vendor BID the workflow (#WS14500044) is getting triggered successfully i can see that in Workflow Log, but the Approvers are not picked from the BADI impl. It is always going to the workflow administrator.

Below is the code i have written to fill the approver table.

        WHEN c_quotation.

         

           CASE actual_approval_index.

           WHEN 0.

            ls_approver-approval_index = 1.
            ls_approver-approval_agent = 'USMANAGER1'.
            ls_approver-name = 'MANAGER1'.
            ls_approver-approval_description = 'First approval step'.
            APPEND ls_approver TO approval_table.

            ls_approver-approval_index = 2.
            ls_approver-approval_agent = 'USMANAGER2'.
            ls_approver-name = 'Manager2 '.
            ls_approver-approval_description = 'Second approval step'.
            APPEND ls_approver TO approval_table.

          WHEN 1.

            ls_approver-approval_index = 1.
            ls_approver-approval_agent = 'USMANAGER1'.
            ls_approver-name = 'MANAGER1'.
            ls_approver-approval_description = 'First approval step'.
            APPEND ls_approver TO approval_table.

            ls_approver-approval_index = 2.
            ls_approver-approval_agent = 'USMANAGER2'.
            ls_approver-name = 'Manager2 '.
            ls_approver-approval_description = 'Second approval step'.
            APPEND ls_approver TO approval_table.

         WHEN 2.

            ls_approver-approval_index = 2.
            ls_approver-approval_agent = 'USMANAGER2'.
            ls_approver-name = 'Manager2'.
            ls_approver-approval_description = 'Second approval step'.
            APPEND ls_approver TO approval_table.

         WHEN OTHERS.
            no_further_approval_needed = 'X'.
        ENDCASE.

   ENDCASE.

The CODE is syntactically correct i am not getting any error there.

Please let me know where i am going wrong as i am new to the workflow.

Regards

Punit

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Just found out the BADI Impl was not acitve.

Activated and it worked.

But the problem now is it is still going to the Workflow Admin at first but when i check the workflow container for the corresponding workfitem it is showing me both the approvers:

Approval[1]

Approval_Index = 1

Workitem_agent = USMANAGER1

Approval_state = 2

Approval[2]

Approval_Index = 2

Workitem_agent = USMANAGER2

Approval_state = 2

Any thought on this