Skip to Content
0
Former Member
Jan 15, 2013 at 05:40 AM

N-Step Approval BADI not triggering for Vendor BID

25 Views

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