Skip to Content
author's profile photo Former Member
Former Member

N-Step Approval BADI not triggering for Vendor BID

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2013 at 08:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.