Approval_history_table of BADI BBP_WFL_APPROV_BADI

Hi all,
Can anybudy tell me what all entries will come in runtime for the table approval_history_table of BADI BBP_WFL_APPROV_BADI.
Will it contain all the approving agents populated in previous BADI calls? And what does flag "type" in the table brings?
Thanks
Sangharsh

Hi Sunil,
I don't think you need to code with the actual_approval_index.
We don't use the actual_approval_index, but just add approvers and levels to the export-table as needed.
Suppose you would need the follwing scenario:
- total value <= 100   : no approval
- total value > 100 : 1-step approval
- total value > 1000 : 2-step approval
- total value > 10000 : 3-step approval
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = lv_guid
i_object_id = object_id
IMPORTING
e_header = ls_header.
IF ls_header-total_value le 100.
  no_further_approval_needed = 'X'.
endif.
IF ls_header-total_value > 100.
  ls_approver-approval_index = 1.
  ls_approver-approval_agent = 'US 146296'.
  ls_approver-name = 'SA'.
  ls_approver-approval_description = 'First approval step'.
  APPEND ls_approver TO approval_table.
endif.
if  ls_header-total_value > 1000.
  ls_approver-approval_index = 2.
  ls_approver-approval_agent = 'US 146720'.
  ls_approver-name = 'BA'.
  ls_approver-approval_description = 'Second approval step1'.
  APPEND ls_approver TO approval_table.
endif.
if  ls_header-total_value > 10000.
  ls_approver-approval_index = 3.
  ls_approver-approval_agent = 'US 146474'.
  ls_approver-name = 'SU'.
  ls_approver-approval_description = 'Third approval step1'.
  APPEND ls_approver TO approval_table.
endif.
regards,
Hendrik-Jan Bosma

Similar Messages

  • How to capture the Actual approver from BADI :BBP_WFL_APPROV_BADI

    If the approval branch(index) has 5 approvers and  If any one of them is approving,
    the APPROVAL_HISTORY_TABLE has all the 5 approvers of that branch.
    User1 is one of the 5 users.When he is approving,the approval table has all the 5 approvers and no where the actual approver of that branch is  captured.
    Can  we capture the actual approver based on Sy-Uname?
    Or is there any other specific solution?please suggest.

    Hello Kittu,
    Here is below process for BBP_WFL_APPROV_BADI BAdI call by function modul:
    BBP_WFL_DIN_APPR_CONTAINER_SET > BBP_WFL_DIN_APPR_FINALLIST_GET > BBP_WFL_DIN_APPR_CONTAINER_GET > BAdI BBP_WFL_APPROV_BADI.
    Now, check what's happened for first function module local variable lv_actual_index and local table lt_cont_approver
    coming from BAdI parameters ACTUAL_APPROVAL_INDEX and APPROVAL_TABLE.
    Maybe your BAdI method is not correctly implemented.
    Regards.
    Laurent.

  • Purpose of table of APPROVAL_ADMINISTRATORS in BADI BBP_WFL_APPROV_BADI

    Hi Gyus,
    what is the purpose of the table parameter APPROVAL_ADMINISTRATORS in BADI BBP_WFL_APPROV_BADI? Is it to pass on approval information to the WF-Administrator?
    Where can I find a useful description on this?
    Kind regards,
    Thomas

    Hi,
    You need to populate this table in the badi if you need to define an administrator for the workflow.
    If the approvers are not found in the badi,you can fill the adminsitartor table with workflow admin deatils in the badi because of which the work item will go to the workflow admin.
    See these useful related threads:
    Re: Workflow Administrator appears in workflow without cause
    how to code APPROVAL_ADMINISTRATORS in n-step WF?
    Re: doubt
    Re: ADMINISTRATOR_APPROVAL parameter in n-step approval badi
    SRM 5.0 N-Step : No Administrator Defined in BADI
    Re: N-step BADI workflow
    BR,
    Disha.

  • Debbuger never stop in BADI 'BBP_WFL_APPROV_BADI' 's Method Implementation

    Hi Experts,
    We are implementing the PO n-step BADI workflow WS14000145 . I have implemented the method 'GET_REMAING_APPROVERS' of BADI 'BBP_WFL_APPROV_BADI', but when I put a break-point, the debbuger never stop!!!... please help about it!.
    Thanks in advance.

    Hello,
    Try the following:
    - Set a breakpoint at function BBP_PDH_WFL_DB_UPDATE;
    - Craete the cart. Breakpoint should stop in FM above;
    - Change variable IV_IN_DIALOG to X (it is blank originally);
    - Set a breakpoint at BBP_WFL_DIN_APPR_BY_RULE_GET. In here the badi to determine the approvers is called;
    - F6 down until the call of this badi, i.e. CALL METHOD lv_wfl_appr_list_exit->get_remaing_approvers.
    Regards,
    Ricardo

  • Urgent help on SC approval BADI BBP_WFL_APPROV_BADI

    Hello SRM Gurus,
       I am working on the BADI BBP_WFL_APPROV_BADI for SC Approval.I need some clarifications on the foll points  before I can proceed with the development...
    My requirement is
    1>The no of levels of Approval depends on the total Value fo SC and the Product Category  of the Items(i.e. the Whole  shopping cart since all the Items will be  of the same Product category as  well  as  same  cost centre).
       Based on the combination of these 2 values,I will have to set the approval_index field.
    2>Also after this,based on the combination of the  value for the fields Product Category + Cost centre,the  approvers  have  to be  determined.
    Now  for the  deteremination of  Approvers,either a  custom table can be   maintained  or  they ca be  retrieved  form teh Org structure  itself.
    But now  here,for getting the Approvers,if I have to get the apporvers from the Table(database  table bbpt_wfl_lia_def),I can only maintain the combination of values for the fields  Cost center  and Prod category and the corresponding agent and not the approval level.How  do I link the approval index and the approvers???
      Also, if i ma  getting the approvers  form the Org structure how is the link between Cost centre+Prod cat and Corresponding approver maintained????Or in case of  getting the approvers for the Org structure,I just need to get the Chief/manager of the Person who is creating the Shopping cart(Since  cost centre will be  maintained at the User level)???
    3>Also since  my  approval is  purely at the Header level,whcih of the example implementations given with the std BADI will be usitable  for my reqt(particularly for the APprovers  part)????
      Also  since mine is Header level approval(since  cost center+Prod  cat will necessarily be same the whole of the SC,do I need to activate  only the workflow  14000133(and  no other wfs i.e.WS14500015,WS10000031,WS10000060,WS10000129 )?
      Also,Please correct me if i have gone wrong in any of my understanding.Any help on this is highly appreciated.
    Regards,
    Disha.

    Though i think this was posted long back, but still:
    You need to do a BRF configration which will take care of ur approval levels and the corresponding approvers.
    You need to define the schemas there.
    Thanks
    Nitin

  • Error with workflow approval BADI- BBP_WFL_APPROV_BADI

    Hi All,
    We are running SRM 5.5 Classic Scenario.
    We have activated "BBP_WFL_APPROV_BADI" for n-step approval process of shopping carts. From a certain period of time I am facing the following problem: when a user, with defined output limit in the extended attributes, creates shopping cart below this limit, the shopping cart instead to be ordered immediately stays in status u201CIn your inboxu201D and there is a message in the field "notes for approval" that the user WF-BATCH is not assigned in the organizational structure, and the item status is u201Cawaiting approvalu201D. Although, if you go to approval preview, the message is that no approval is required, the shopping cat is sent for approving to the manager.
    It is very strange, because workflow user has never been assigned to the organizational structure and the other strange thing is that this problem exists in all SRM systems (development, quality and training).
    We tried to debug the BADI, and we couldn't find any problem. The BADI first checks the spent limit of the user (which is the set output limit in the extended attributes of that user) and because the validation is ok (the value of the shopping cart is below the spent limit) the process stops. But at the same time the shopping cart is sent for approving to the first manager.
    Has anybody of you faced this problem?
    Thank you in advance!
    Desislava

    Hi Masa,
    Yes, this is my issue, that the shopping cart is sent to the manager for approving! And at the same time when the user is checking the status of the shopping cart -the status is"In your inbox" and the status of the item is "awaiting approval". When you go to item details-> to additional specification tab(field),  a system message is generated in the field "notes for approval" and the message is "Cannot find org unit for user WF-BATCH". In my opinion that means that the system is searching for WF-batch as approver. Let me briefly tell you how the BADi works, first validates the spent limit of the user if the value of the shopping cart is below then the shopping cart should be sent directly to r/3 system and a PO should be created. If the value is above, the system start checking to which organizational unit the users belongs, and after that determines the first approver!
    Hope it is more clear for you!
    Thanks
    Desislava

  • N Step Approval BADI - BBP_WFL_APPROV_BADI

    We have implemented this BADI and are having problems with the agent determination.
    When creating and ordering the cart the approval preview shows the correct approval agents.
    When clicking the 'Agents' button within the workflow log via SWI1, the message 'No selected agents' (Message no. WL795) is shown.
    The buffers have been refreshed via SWU_OBUF and the indexes and organisational environment have been refreshed.
    Has anyone had this problem before, and if so what steps did you have to undertake to cure it ?
    Thanks
    Keith

    Hi
    <b>Please specify the SRM version(Support packs) details in next reply.</b>
    <u>Meanwhile, please go through the following SAP OSS Notes, which will definitely help -></u>
    Note 798295 BADI workflow: SRM 3.0 upgrade to 4.0 approver list -> main
    Note 748655 SC APPROVAL GRAPHIC PREVIEW NOT CORRECT FOR BADI APPROVERS
    Note 843636 PO BADI WORKFLOW does not assign correct approvers
    Note 861147 BAdI workflow: Adjusting step name to runtime
    Note 883207 BBP_WFL_DIN_APPR_BY_RULE_GET: if BAdI not implemented
    Note 713567 SRM-EBP-WFL: Limit is ignored in WS14000109
    Note 923463 BAdI n-step approval - Container inconsistent for 1st step
    Note 901068 BAdI Workflows: Enhancement of Note 896556
    Note 898768 BADI Workflow: Determining current approvers
    Note 861147 BAdI workflow: Adjusting step name to runtime
    Note 688724 BADI workflow: Problems with substitute
    Note 788584 BADI Workflow: empty WI_ID in approver table
    Note 780021 BADI Workflow: subsequent approvers after rejection
    Do let me know.
    Regards
    - Atul

  • How to use rules in BADI for 3 step approval SRM WF

    Hi all,
    i am working on three step approval workflow...based on the costcentre and product category it has to be approved...i have defined rule responsibility for this...now i need to bring this rule responility values to my BADI bbp_wfl_approv_badi...i think there is a std function module available for this..can anyone tell me what is the fm or else is there anyother way to do that..
    Thanks&Regards,
    Hari

    Hi,
    Please refer the foll link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/95/ed94ee764c11d3b535006094b9c9b4/frameset.htm
    You can try the foll  FM's:
    RH_GET_STRUCTURE
    SWY_DEMO_GET_MANAGER
    BR,
    Disha.
    Pls reward points for useful answers.

  • SRM BADI

    Hi All,
    I am new to SRM . please help me to find badi's for below questions.
    Only Goods item type is allowed for Intercompany PO recharges and specific error handling must be built.
    Mixture of Intercompany PO recharges and IPO items is not allowed within the same Shopping Cart and specific error handling must be built.
    Both Technical Contract and Sourced Contract are out of scope for the Intercompany PO recharges and specific error handling must be built.
    Vendors selected for Intercompany PO recharges must begin with IC* series and specific error handling must be built.
    Vendors selected for IPO mustnu2019t begin with IC* series and specific error handling must be built.
    Intercompany PO recharges doesnu2019t required Procurement Approval and specific workflow routine for Procurement Approval must be suppressed for Intercompany PO recharges.
    Shopping carts/Purchase order should not be GR based i.e. no Goods Receipt required.
    PO Extend option on the ITS screen must be suppressed off when ICPO (new) account assignment category is selected.
    Thanks & Regards,
    juhi.

    As you talk of ITS in your request I assume you work on SRM 5
    Only Goods item type is allowed for Intercompany PO recharges and specific error handling must be built.
    -BADI BBP_SC_MODIFY_UI for SC: Restrict functions that can be used in SC
    -BADI BBP_ITEM_CHECK_BADI for SC and/or PO: Check and alert messages
    Mixture of Intercompany PO recharges and IPO items is not allowed within the same Shopping Cart and specific error handling must be built.
    -BADI BBP_ITEM_CHECK_BADI for SC and/or PO: Check and alert messages
    Both Technical Contract and Sourced Contract are out of scope for the Intercompany PO recharges and specific error handling must be built.
    -BADI BBP_ITEM_CHECK_BADI for SC and/or PO: Check and alert messages
    Vendors selected for Intercompany PO recharges must begin with IC* series and specific error handling must be built.
    -BADI BBP_SOS_BADI: Detyermine/Control vendors
    -BADI BBP_ITEM_CHECK_BADI for SC and/or PO: Check and alert messages
    Vendors selected for IPO mustnu2019t begin with IC* series and specific error handling must be built.
    -BADI BBP_SOS_BADI: Detyermine/Control vendors
    -BADI BBP_ITEM_CHECK_BADI for SC and/or PO: Check and alert messages
    Intercompany PO recharges doesnu2019t required Procurement Approval and specific workflow routine for Procurement Approval must be suppressed for Intercompany PO recharges.
    -BADI BBP_WFL_APPROV_BADI
    -or manage Starting conditions of your workflows (with Doc Type for example)
    Shopping carts/Purchase order should not be GR based i.e. no Goods Receipt required.
    -Define in the purchasing view of the suppliers
    PO Extend option on the ITS screen must be suppressed off when ICPO (new) account assignment category is selected.
    -What extend option do you talk about ?

  • How to fetch Requestor of the PO in BBP_WFL_APPROV_BADI

    Hi All,
    While processing PO in, I need to retrieve the approvers based on the approval limit of the Requestor.
    However, I am not able to execute the FM BBP_PD_PO_GETDETAIL as during creation of PO, system is not giving the value of the OBJECT_ID. (I am getting the guid into the BADI)
    Hence, can any one specify what exactly I need to do to fetch the Requestor (creator) of the Purchase Order details in the BADI BBP_WFL_APPROV_BADI.
    Thanks in Advance
    Venky

    Hi,
    I guess you can pass the GUID also to the FM "BBP_PD_PO_GETDETAIL ".If not,you can always get the object ID using the GUID from the tbale CRMD_ORDERADM_H.
    You will get the requestor name in the tables E_HEADER(PO header data ) e_header-created_by by field .
    You just need to use this FM directly to get all the details of the PO.
    BR,
    Disha.
    <b>Pls reward points  for useful answers.</b>

  • BBP_WFL_APPROV_BADI  error scenario

    Hi,
    SRM 5.0
    I have activated N-Step BADI BBP_WFL_APPROV_BADI  and it works well (good scenario cases) as per the customization.
    In the customization, many tables are accessed. Due to some reasons if the record is not available, how do I error out ?
    I want the user to see the error in the "approval preview" as well.
    Is it possible ?
    Pranav

    Hi
    Thanks
    In my case, if there is an error (say no record), the work item has not been sent to the approver. When I check the SC (in approval preview), it shows "approver...." BLANK.
    The reason is that the custom program can't get the record as it doesn't exist.
    Do you mean in this scenario I can use BBP_DOC_CHECK_BADI ?
    -Pranav

  • BBP_WFL_APPROV_BADI - There are already implementations active

    Hi
    I was thinking about using badi BBP_WFL_APPROV_BADI to set up different approvers for approval of the Shopping Cart in SRM. But unfortunately I get the message "There are already implementations active". Looks like SAP is already using this BADI. Does that mean that there is no way that I can use this BADI too?
    Best regards
    Steen

    Hi Steen,
    please look at BBP_WFL_APPROV_BADI  in SE80. In the object tree you should see the implemantation(s).
    Regards,
    Clemens

  • Using BBP_WFL_APPROV_BADI for a user defined WF

    Hi SRM Workflow Gurus,
    May I know if it is possible to use BADI BBP_WFL_APPROV_BADI for a custom workflow aside from the standard WS14000145? If yes, how do we differentiate (ABAP code) in the BADI?
    What I want is to have different starting conditions based on the GOODS RECIPIENT's org unit. I don't know if you can use the org unit as a criteria in your BADI since from the samples, it is purely PO header fields that are used...I'm not too sure. Is there a better alternative to creating a new workflow?
    Regards,
    Marvin

    The Badi is there to provide a means of creating your own approval behaviour of SC's and PO's.
    The examples of the badi implementations are not used as guidelines.
    Just create your own custom logic in the Badi, which can be based on anything..
    Kind regards, Rob Dielemans

  • BADI to manage approver with SC workflow WS 14000109

    Hello,
    Is it possible to manage the approvers determined by the SC workflow WS 14000109 Approval n-step over Value Limit ?
    By default, this workflow get the approver defined in the attribute SLAPPROVER. But is there any possibility to determined another approver ?
    It seems the badi BBP_WFL_APPROV_BADI can only be used with the SC workflow WS 14000133.
    Thanks for your help.

    Hello,
    As far as I know, badi BBP_WFL_APPROV_BADI can only be used with workflow 14000133.
    Other workflows determine approvers hardcoded.
    Regards,
    Ricardo

  • Regarding srm badis

    Hi all,
    my problem is when shopping cart is created, an RFC  call is made to ECC5 to from SRM to determine the release strategies and agents, to do this do i need to implement the badi  bbp_doc_save_badi or bbp_wfl_approv_badi.
    when i have to use the badi bbp_wfl_approv_badi.
    thanks
    kishore

    Hi,
    If you are using the n step approval workflow (header level) i.e. WS14000133for Shopping cart approval,then you need to write the code in the badi BBP_WFL_APPROV_BADI to determine the agents.In this BADI,you can then make the call to ECC system to fetch the approvers users  based on the release startegy.All this logic needs to be written in the Badi.
    See the foll link for more deatils:
    http://help.sap.com/saphelp_srm40/helpdata/en/84/dda441e79ead5fe10000000a1550b0/content.htm
    BR,
    Disha.
    Do reward points for useful answers.

Maybe you are looking for