cancel
Showing results for 
Search instead for 
Did you mean: 

WS14500015.....

Former Member
0 Kudos

Hi,

I have assigned to developed SC item level Approval workflow based on the Product Category.

i have found standard workflow and standard BAdi for the above scenario.

I know how to implement that BAdi.

my doubt is after i implemented that badi , i have to write my custom coding for determine approval agent based on the SC Product Category.

please if any body already done this same scenario, please help me to write coding on BAdi.

Small requiest,

one thread is going on the same issue but, i don't know who is Kavin Kumar, he made some mistake. so that i want to close that thread and open new thread.

Jayasankar, Vadim COURTHEOUX, please close that thread and please answer for this one. i am so very sorry.

thanks,

Durai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Durai,

I worked on this Workflow. Did you manage to resolve this ? Please write in detail what you want.

You will have to implement BADI - BBP_WFL_APPROV_BADI.

Thanks and Warm Regards.

Pras

Former Member
0 Kudos

hi pras,

How many levels of approval are you implemented?

how do you say to BAdi this is first level or second level?

if you don't mind can you please send me your BAdi coding.

i hope you well do this ,

thanks

durai.

Former Member
0 Kudos

Hi Durai,

There are parameters called approval index.

If approval index is 1 then he will be the first approver, if it is 2 then he will be the second approver.

If you assign approval index as 1 to two approvers, you will see their names on first approval.

I am implemented this workflow in a very complex environment where approvers ( cost center managers) are sitting in R/3 and then I need to get them using RFC + in other scenarios I need to read attributes from org structure to get approvers.

Please go through sample coding of BBP_WFL_APPROV_BADI, there are 4 sample codes available but you will have to get idea from complex n-step itembased approval code.

I am having a coding of more than 1800 lines which may not suite your scenario plus it is specific to customer.

If you see sample code and compare with my following piece of code, it willbe useful and will give you a starting point.

Please reward few points if you find my answer as very helpful.

  • Fill Approval Table.

  • First Approval.

IF i_actual_approval_index <= 1.

LOOP AT lt_appr_def INTO ls_appr_def.

CASE ls_appr_def-app_crit_name1.

WHEN gc_field_cost_ctr.

l_step_desc = 'Cost Centre Approval'.

WHEN gc_field_wbs_elem_e.

l_step_desc = 'WBS Element Approval'.

WHEN gc_field_order_no.

l_step_desc = 'Internal Order Approval'.

ENDCASE.

CALL FUNCTION 'BBP_WFL_DIN_FILL_APPROVER'

EXPORTING

iv_approval_index = 1

ic_step_description = l_step_desc

iv_criterion1 = ls_appr_def-app_crit_name1

iv_hide_items_flag = 'X'

TABLES

it_approval_def = lt_appr_def

it_approval_object = item_approval_obj

et_approver = approval_table

it_approval_items = item_approval_table.

ENDLOOP.

ENDIF.

IF NOT approval_table[] IS INITIAL.

LOOP AT approval_table INTO ls_approval_table.

MOVE sy-tabix TO l_tabix.

PERFORM get_approvers_name USING ls_approval_table-approval_agent CHANGING ls_approval_table-name.

ls_approval_table-APPROVAL_DESCRIPTION = 'CCManager/WBSManager'

.

MODIFY approval_table FROM ls_approval_table INDEX l_tabix.

ENDLOOP.

ENDIF.

ENDIF.

*

Regards.

Pras

pr_srinivas
Contributor
0 Kudos

HI Pras.

We have same requiremt as u having yaar...

where approvers ( cost center managers- fund manager ) are sitting in R/3 and then I need to get them using RFC + in other scenarios I need to read attributes (like approver limit)from org structure to get approvers.

Can u please mail me the your badi coding to meetmani22@rediffmail.com, so that i can keep it as references.., it will very much helpful for me..

Regards,

Mani

Answers (0)