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

Similar Messages

  • 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

  • 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

  • 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.

  • Urgent help needed to get this home page up!

    Hi,
    I need urgent help with this and it is driving me crazy. For
    some reason my animation starts at its fastest and won't stop until
    you click the area then it works properly. I have no clue why it is
    doing this and only seems to do it on a PC browser not on a Mac.
    Can anyone help please!!!!!
    Link to sample:
    http://www.totalamber.com/test.html
    Link to fla:
    http://www.totalamber.com/flash/homepage.fla
    Thanks so much for anyone who can help or tries to help me.
    Neil
    Ps this is urgent and i can't find a solution by searching on
    here

    Thanks to anyone who has looked at this but i have found the
    answer.
    It is due to what many of the users on here will already know
    and can be explained in this link:
    http://blog.deconcept.com/swfobject/
    I had forgot about the legal patent going on with microsoft!
    Hope it helps anyone else as bad as i am.
    Neil

  • Function module (FM) to read budget  to be used in n-step approval badi

    We have SRM 5.0 with ECC 6.0 (extended classic). For capital expenses we are going to have budget check in SRM based of account assignment internal orders in R/3. In shopping cart line item approval workflow, it is required to read the budget available for that internal order and compare with shopping cart value...what is the function module to read budget assigned to that internal order, that will used in n-step approval badi at every step??
    Thanks,
    Kim r.

    Hi
    <b>Please try the related SRM function modules, which will definitely help -></b>
    B470_BUDGET_READ   
    BBP_PD_USER_BUDGET_AMOUNTSPENT  
    BBP_PD_USER_BUDGET_CHECK        
    BBP_PD_USER_BUDGET_DEFINED_GET  
    BBP_PD_USER_BUDGET_SAVE         
    BBP_PD_USER_BUDGET_SCVALUE_GET  
    BBP_REQREQ_CHECK_BUDGET 
    META_BUDGET_READ   
    META_BUDGET_READ Function module in turn calls RFC-enabled 'BBP_BUDGET_READ' Function module in the R/3 or the ECC System.
    Hope this will definitely help.
    Do let me know.
    Regards
    - Atul

  • Problem in N-STEP Approval BADI

    Hi ,
    I'am new to Workflows,I need your guidance in finishing
    the Item_level Approval BADI.
    I'am working on N-Step Approval Badi(Item Level Implementation)
    I have pasted the code here.There will be Multiple levels(Max 15 Levels) of Approvals.
    When a new Shopping cart is created this BADI is not working.
    Can you please suggest me, am i missing  something in the code.?.I'am also new to ABAP but i hope i'am managing with it.
    Please Help me out.
    METHOD if_ex_bbp_wfl_approv_badi~get_remaing_approvers .
    Interface parameters:
    OBJECT_ID                  TYPE  CRMT_OBJECT_ID                "Import
    OBJECT_TYPE                TYPE  CRMT_SUBOBJECT_CATEGORY       "Import
    GUID                       TYPE  BBP_GUID_32                   "Import
    ACTUAL_APPROVAL_INDEX      TYPE  SWH_NUMC10                    "Import
    APPROVAL_HISTORY_TABLE     TYPE  BBP_WFL_APPROVAL_HISTORY_BADI "Import
    APPROVAL_TABLE             TYPE  BBPT_WFL_APPROVAL_TABLE_BADI  "Export
    NO_FURTHER_APPROVAL_NEEDED TYPE  BOOLEAN                       "Export
      INCLUDE <swfcntn01>.                  "Workflow
      DATA:
        ls_header                   TYPE bbp_pds_sc_header_d,
        lt_item                     TYPE TABLE OF bbp_pds_sc_item_d,
        ls_item                     TYPE bbp_pds_sc_item_d,
        lt_account                  TYPE TABLE OF bbp_pds_acc,
        ls_account                  TYPE bbp_pds_acc,
        lt_partner                  TYPE TABLE OF bbp_pds_partner,
        ls_partner                  TYPE bbp_pds_partner,
        lc_partner                  TYPE but000-partner,
        lt_result_tab               TYPE TABLE OF swhactor,
        ls_result_tab               TYPE swhactor,
        lc_cost_ctr                 TYPE bbp_pds_acc-cost_ctr,
        lv_co_code                  TYPE bbp_pds_sc_item_d-be_co_code,
        lt_prodcat                  TYPE TABLE OF zmwfprodcat,
        ls_prodcat                  TYPE zmwfprodcat,
    Inserted by Rakesh Palle for Assets DR # D0001055958
        lt_asset                    TYPE TABLE OF zmwfprodcat,
        lt_final                    TYPE TABLE OF zmwfprodcat,
        ls_asset                    TYPE zmwfprodcat,
        ls_final                    TYPE zmwfprodcat,
        lv_asset                    TYPE c,
    End of insertion DR # D0001055958
    Being D0001055958
        lt_order                    TYPE TABLE OF zmwfprodcat,
        ls_order                    TYPE zmwfprodcat,
        lv_order                    TYPE c,
    End D0001055958
        lt_sets                     TYPE TABLE OF zmwf_sets,
        ls_sets                     TYPE zmwf_sets,
        lt_roles                    TYPE TABLE OF str_agr2,
        ls_roles                    TYPE str_agr2,
        lt_users                    TYPE TABLE OF str_agrs,
        ls_users                    TYPE str_agrs,
        lc_persnumber               TYPE usr21-persnumber,
        ls_approver                 TYPE bbp_wfl_approval_table_badi,
        ls_approver_check           TYPE bbp_wfl_approval_table_badi,
        lv_guid                     TYPE crmd_orderadm_h-guid,
        lv_call_value1    TYPE bbp_wfl_app_property,
        ev_app_obj_guid   TYPE bbp_guid_32,
        lc_sobid                    TYPE req_name,
        lc_objid                    TYPE hrp1001-objid,
        lc_objid_s                  type hrp1001-objid,
       lt_appr_def       TYPE TABLE OF bbpt_wfl_lia_def,
       lt_approver       TYPE TABLE OF bbp_wfl_approval_table_badi,
        lc_slapprover               TYPE hrv1222a-low,
        li_limit                    TYPE bbp_limit,
        li_last_level               TYPE zmwfprodcat-appr_level,
        li_stepno                   TYPE i,
        lv_index                    type i,
        lc_stepno(3)                TYPE c,
        lc_first(1)                 TYPE c,
        lc_pass(1)                  TYPE c,
        li_last_setid               LIKE ls_prodcat-setid,
        c_cost_centre      TYPE bbp_wfl_app_criterion  VALUE 'COST_CTR',
        li_stop_amt                 LIKE ls_header-total_value,
        li_set_amt                  LIKE li_stop_amt,
        lt_cost_ctr                 type table of zitem_costctr,
        ls_cost_ctr                 type zitem_costctr,
       ls_approval_item  TYPE bbps_wfl_item_approval,
       lt_approval_items TYPE TABLE OF bbps_wfl_item_approval.
    Business objects type (local constants)
      CONSTANTS:
        c_shop          TYPE crmt_subobject_category VALUE 'BUS2121',
        c_aprover_value TYPE zmwf_setty VALUE 'AV',
        c_comp_value    TYPE zmwf_setty VALUE 'CD',
    **// Begin D0001055958
        c_ac_value      TYPE zmwf_setty VALUE 'AC',
        c_ad_value      TYPE zmwf_setty VALUE 'AD',
        c_oc_value      TYPE zmwf_setty VALUE 'OC',
        c_od_value      TYPE zmwf_setty VALUE 'OD',
    **// End D0001055958
        c_yes(1)        TYPE c VALUE 'X',
        c_no(1)         TYPE c VALUE ' ',
        c_requisitioner TYPE bbp_pds_partner-partner_fct VALUE '00000016'.
    **********begin of change D0001034557
      TYPES : BEGIN OF ty_swhactor,
                otype TYPE otype,
                objid TYPE actorid,
              END OF ty_swhactor.
      DATA : lt_user TYPE TABLE OF ty_swhactor,
             ls_user TYPE ty_swhactor,
             v_guid TYPE BBP_GUID_32.
    ***********end of change D0001034557
    ***********begin of change D0001043944
      DATA : lt_prodcat2  TYPE TABLE OF zmwfprodcat,
             new_approval_table TYPE BBPT_WFL_APPROVAL_TABLE_BADI,
             wa_new_approval_table TYPE BBP_WFL_APPROVAL_TABLE_BADI.
    ***********end of change D0001043944
    *****Change by suresh D0001110145
      data ws_set type zmwf_sets.
      data cd_flag.
    *****End of change by suresh D0001110145
      DEFINE set_approval_level.
        if lc_first = 'X' or
           ls_prodcat-appr_level gt li_last_level or
           ls_prodcat-setid ne li_last_setid.                  "D0001055958
          add 1 to li_stepno.
          clear lc_first.
        endif.
        ls_approver-approval_index = li_stepno.
      END-OF-DEFINITION.
      DEFINE set_approval_level_2.
        if lc_first = 'X' or
           ls_asset-appr_level gt li_last_level.
          add 1 to li_stepno.
          clear lc_first.
        endif.
        ls_approver-approval_index = li_stepno.
      END-OF-DEFINITION.
      DEFINE set_approval_description.
        write li_stepno to lc_stepno left-justified.
        concatenate 'Approval step #'
                    lc_stepno
                    into ls_approver-approval_description.
      END-OF-DEFINITION.
      CLEAR: lt_prodcat[], ls_approver.
      CLEAR: li_stepno.
      break-point.
    map input data to local data
    map char32 to raw16
      MOVE guid TO lv_guid.
      break-point.
      IF object_type = c_shop.
    get the details of the shopping cart
        CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
          EXPORTING
            i_guid      = lv_guid
            i_object_id = object_id
          IMPORTING
            e_header    = ls_header
          TABLES
            e_item      = lt_item
            e_account   = lt_account
            e_partner   = lt_partner.
    Modification for Item-Level Approval-Start
        select * from zitem_costctr
        into table lt_cost_ctr.
        lv_index = actual_approval_index.
        if lv_index = 0.
           lv_index = 1.
        endif.
        LI_STOP_AMT = LS_HEADER-TOTAL_VALUE.
    Modification for Item-Level Approval-End
        LOOP AT lt_item INTO ls_item.
    Modification for Item-Level Approval-Start
        if actual_approval_index le lv_index.
          ls_approval_item-approval_item_guid = ls_item-guid.
          READ TABLE lt_account INTO ls_account
                 WITH KEY p_guid = ls_item-guid.
          if sy-subrc is initial.
            READ TABLE LT_COST_CTR INTO LS_COST_CTR
            WITH KEY COST_CENTER_NO = LS_ACCOUNT-COST_CTR.
            LV_CALL_VALUE1 = LS_ACCOUNT-COST_CTR.
            CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
              EXPORTING
                sc_guid           = ls_header-guid
                criterion1        = 'COST_CTR'
                value1            = lv_call_value1
                iv_item_value     = ls_item-value
                iv_add_value      = 'X'
              IMPORTING
                approval_obj_guid = ev_app_obj_guid
              TABLES
                item_app_obj      = item_approval_obj.
            ls_approval_item-approval_object_guid = ev_app_obj_guid.
            LS_APPROVAL_ITEM-APPROVAL_ITEM_GUID = LS_ITEM-GUID.
            APPEND ls_approval_item TO lt_approval_items.
         approval_table[]      = lt_approver[].
    Get the Object ID of user
           SELECT SINGLE objid
                  INTO lc_objid
                  FROM hrp1001
                  WHERE sobid = ls_cost_ctr-CC_MANAGER_ID
                    AND otype = 'CP'
                    AND plvar = '01'.
           IF sy-subrc NE 0.
             EXIT.
           ENDIF.
           SELECT SINGLE objid
                  INTO lc_objid_s
                  FROM hrp1001
                  WHERE sobid = lc_objid
                    AND otype = 'S'
                    AND plvar = '01'.
           IF sy-subrc NE 0.
             EXIT.
           ENDIF.
    Get the Approver's Limit
            CLEAR li_limit.
            lc_sobid = ls_cost_ctr-CC_MANAGER_ID.
            CALL FUNCTION 'BBP_BW_GET_APPR_LIMIT'
              EXPORTING
                i_userid     = lc_sobid
              IMPORTING
                e_appr_limit = li_limit.
            IF LI_LIMIT > LS_ITEM-VALUE. "LI_STOP_AMT.
              SELECT SINGLE persnumber
                     INTO lc_persnumber
                     FROM usr21
                     WHERE bname = lc_sobid.
              IF sy-subrc IS INITIAL.
                SELECT name_text
                       INTO ls_approver-name
                       FROM adrp
                       UP TO 1 ROWS
                       WHERE persnumber =  lc_persnumber
                         AND date_from  LE sy-datum
                         AND date_to    GE sy-datum.
                ENDSELECT.
              ENDIF.
              ADD 1 TO li_stepno.
              ls_approver-approval_index = li_stepno.
              ls_approver-approval_agent = lc_SOBID.
              set_approval_description.
              APPEND ls_approver TO approval_table.
              CLEAR ls_approver.
            ELSE.
              do.
    Get the Object ID of user
                CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
                  EXPORTING
                    sc_guid           = ls_header-guid
                    criterion1        = 'COST_CTR'
                    value1            = lv_call_value1
                    iv_item_value     = ls_item-value
                    iv_add_value      = 'X'
                  IMPORTING
                    approval_obj_guid = ev_app_obj_guid
                  TABLES
                    item_app_obj      = item_approval_obj.
                ls_approval_item-approval_object_guid = ev_app_obj_guid.
                LS_APPROVAL_ITEM-APPROVAL_ITEM_GUID = LS_ITEM-GUID.
                APPEND ls_approval_item TO lt_approval_items.
                CLEAR : LC_OBJID,LC_OBJID_S.
                SELECT SINGLE objid
                       INTO lc_objid
                       FROM hrp1001
                       WHERE sobid = ls_cost_ctr-CC_MANAGER_ID
                         AND otype = 'CP'
                         AND plvar = '01'.
                IF sy-subrc NE 0.
                  EXIT.
                ENDIF.
                SELECT SINGLE objid
                       INTO lc_objid_s
                       FROM hrp1001
                       WHERE sobid = lc_objid
                         AND otype = 'S'
                         AND plvar = '01'.
                IF sy-subrc NE 0.
                  EXIT.
                ENDIF.
    Get the SL Approver
                SELECT SINGLE low
                         INTO lc_slapprover
                         FROM hrv1222a
                         WHERE plvar  =  '01'
                           AND otype  =  'S'
                           AND objid  =  lc_objid_s
                           AND begda  LE sy-datum
                           AND endda  GE sy-datum
                           AND attrib =  'SLAPPROVER'.
                IF sy-subrc NE 0.
                  EXIT.
                ENDIF.
    Get the Approver's Limit
                CLEAR li_limit.
                lc_sobid = lc_slapprover+2.
                CALL FUNCTION 'BBP_BW_GET_APPR_LIMIT'
                  EXPORTING
                    i_userid     = lc_sobid
                  IMPORTING
                    e_appr_limit = li_limit.
                SUBTRACT '.01' FROM li_limit.  "D0001093425
                IF li_limit GT 0.
    Add the approver to the list
                  SELECT SINGLE persnumber
                         INTO lc_persnumber
                         FROM usr21
                         WHERE bname = lc_sobid.
                  IF sy-subrc IS INITIAL.
                    SELECT name_text
                           INTO ls_approver-name
                           FROM adrp
                           UP TO 1 ROWS
                           WHERE persnumber =  lc_persnumber
                             AND date_from  LE sy-datum
                             AND date_to    GE sy-datum.
                    ENDSELECT.
                  ENDIF.
                  ADD 1 TO li_stepno.
                  ls_approver-approval_index = li_stepno.
                  ls_approver-approval_agent = lc_slapprover.
                  set_approval_description.
                  APPEND ls_approver TO approval_table.
                  CLEAR ls_approver.
                ENDIF.
    If the limit is greater than the stop amount, exit - we are finished
                IF li_limit GE li_stop_amt.
                  EXIT.
                ENDIF.
              ENDDO.
             endif.
             endif.
          ENDIF.
        endloop.
        data : cc type BBP_STEP_DESCRIPTION value 'CoCentre_Approvers'.
        if actual_approval_index le lv_index.
        CALL FUNCTION 'BBP_WFL_DIN_FILL_APPROVER'
          EXPORTING
            iv_approval_index   = lv_index
            ic_step_description = cc
            iv_criterion1       = 'COST_CTR'
          TABLES
            it_approval_def     = lt_appr_def
            it_approval_object  = item_approval_obj
            et_approver         = lt_approver
            it_approval_items   = lt_approval_items.
        endif.
        item_approval_table[] = lt_approval_items[].
        approval_table[]      = lt_approver[].
      endif.
    Modification for Item-Level Approval-End
    Use the product category to link to the Product Category Approval
    table and use the corresponding approver(s) for the total shopping
    cart value.
         SELECT *
                INTO TABLE lt_prodcat
                FROM zmwfprodcat.
                WHERE catid    LIKE  ls_item-category_id.
         IF sy-subrc IS INITIAL.
    ****begin of change D0001034557
    ***//Buyer to be the first approver
           MOVE lv_guid TO v_guid.
           READ TABLE lt_account INTO ls_account
                        WITH KEY p_guid = ls_item-guid.
    ****Begin of change by suresh for adding codition for buyer determination
    ****for company codes 7000 and greater D0001110145
           clear cd_flag.
           select single * into ws_set
                           from ZMWF_SETS
                            where setid = 'FCD1'.
           if ( ls_item-be_co_code GE ws_set-val_low and
                ls_item-be_co_code LE ws_set-val_high ).
             cd_flag = 'X'.
           endif.
           IF ( ls_item-itm_type = 'LIMI' OR
            ls_item-product_type = '02' OR
              ls_account-acc_cat = 'AS' ) AND
              cd_flag is initial.
    *****end of changes by suresh D0001110145
    Begin of changes by Suresh-EBDK902401
    Added the Object Type and Object ID
             CALL FUNCTION 'BBP_PDH_WFL_GET_PURCHASER_LIST'
                  EXPORTING
                    IV_GUID                 =   v_guid
        IV_OBJECT_TYPE                      =  'BUS2121'
        IV_OBJECT_ID                        = OBJECT_ID
              IV_GET_FIRST_PURCH_FROM_GROUP     =  'X'
                  TABLES
                    ET_USER                       =  lt_user.
    ***End of changes by Suresh-EBDK902401
             LOOP AT lt_user INTO ls_user.
               LOOP AT lt_prodcat INTO ls_prodcat.
                 IF NOT ls_prodcat-bname IS INITIAL.
                   CONCATENATE 'US' ls_user-objid INTO
                                 ls_approver-approval_agent.
                   READ TABLE approval_table INTO ls_approver_check
                      WITH KEY approval_agent =
    *ls_approver-approval_agent
                   IF SY-SUBRC NE 0.
                     set_approval_level.
                     set_approval_description.
                     ls_approver-name = ls_approver-approval_agent.
                     APPEND ls_approver TO approval_table.
                     CLEAR ls_approver-name.
                   ENDIF.
                 ENDIF.
                 CLEAR ls_prodcat.
               ENDLOOP.
               CLEAR ls_user.
             ENDLOOP.
           ENDIF.
           CLEAR ls_account.
    ****end of change D0001034557
    ****begin of change D0001043944
    **//Special Approvers to be right after the buyer
           IF NOT ls_item-z_spl_approval IS INITIAL.
             SELECT *  INTO TABLE lt_prodcat2
                           FROM zmwfprodcat
                           WHERE setid = ls_item-z_spl_approval.
             SORT lt_prodcat2 BY catid appr_level.
             LOOP AT lt_prodcat2 INTO ls_prodcat.
               IF NOT ls_prodcat-bname IS INITIAL.
                 CONCATENATE 'US' ls_prodcat-bname INTO
                               ls_approver-approval_agent.
                 READ TABLE approval_table INTO ls_approver_check
                    WITH KEY approval_agent = ls_approver-approval_agent.
                 IF SY-SUBRC NE 0.
                   set_approval_level.
                   set_approval_description.
                   ls_approver-name = ls_approver-approval_agent.
                   APPEND ls_approver TO approval_table.
                   CLEAR ls_approver-name.
                   li_last_level = ls_prodcat-appr_level.
                   li_last_setid = ls_prodcat-setid.
                 ENDIF.
               ENDIF.
               CLEAR: ls_prodcat,ls_approver_check.
             ENDLOOP.
           ENDIF.
    ****end of change D0001043944
           LOOP AT lt_prodcat INTO ls_prodcat.
             IF NOT ls_item-category_id CP ls_prodcat-catid.
               DELETE TABLE lt_prodcat FROM ls_prodcat.
             ENDIF.
           ENDLOOP.
    Inserted by Rakesh Palle for Assets DR # D0001055958
           LOOP AT lt_prodcat INTO ls_asset WHERE setid = 'AS01'.
             APPEND ls_asset TO lt_asset.
           ENDLOOP.
    Begin D0001055958
           LOOP AT lt_prodcat INTO ls_order WHERE setid = 'OR01'.
             APPEND ls_order TO lt_order.
           ENDLOOP.
    End D0001055958
           DELETE lt_prodcat WHERE setid = 'AS01' OR setid = 'OR01'.
           "D0001055958
    End of insertion DR # D0001055958
           SORT lt_prodcat BY catid setid appr_level ASCENDING.
           lc_first = 'X'.
           SELECT *
                  INTO TABLE lt_sets
                  FROM zmwf_sets
                  FOR ALL ENTRIES IN lt_prodcat
                  WHERE setid = lt_prodcat-setid.
    SORT lt_prodcat BY catid setid appr_level ASCENDING.
          lc_first = 'X'.
           LOOP AT lt_prodcat INTO ls_prodcat.
    Check the set data
             IF NOT ls_prodcat-setid IS INITIAL.
               READ TABLE lt_account INTO ls_account
                    WITH KEY p_guid = ls_item-guid.
    ***// Changed by Rakesh Palle to get ACC_STR & COST OBJ
    ***// if cost ctr is initial DR # D0001055958
               IF ls_account-cost_ctr IS INITIAL.
                 IF ls_account-acc_str IS INITIAL.
                   CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                     EXPORTING
                       input  = ls_account-cost_obj
                     IMPORTING
                       output = lc_cost_ctr.
                 ELSE.
                   CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                     EXPORTING
                       input  = ls_account-acc_str
                     IMPORTING
                       output = lc_cost_ctr.
                 ENDIF.
               ELSE.
                 CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                   EXPORTING
                     input  = ls_account-cost_ctr
                   IMPORTING
                     output = lc_cost_ctr.
               ENDIF.
    ***// End of insertion DR # D0001055958
    Check for valid Cost Center (set type = space)
               lc_pass = c_no.
               LOOP AT lt_sets INTO ls_sets
                    WHERE setid =  ls_prodcat-setid
                      AND setty =  space.
                 IF ls_sets-val_low = lc_cost_ctr OR
                    ( ls_sets-val_low  LE lc_cost_ctr AND
                      ls_sets-val_high GE lc_cost_ctr ).
                   lc_pass = c_yes.
                   EXIT.
                 ENDIF.
               ENDLOOP.
               IF sy-subrc IS INITIAL AND
                  lc_pass  = c_no.
                 CONTINUE.
               ENDIF.
    ***// Inserted by Rakesh Palle for Company code verification
    Check for valid Company Code (set type = CC)
               LOOP AT lt_sets INTO ls_sets
                    WHERE setid =  ls_prodcat-setid
                      AND setty =  c_comp_value.
                 IF ls_sets-val_low = ls_item-be_co_code OR
                    ( ls_sets-val_low  LE ls_item-be_co_code AND
                      ls_sets-val_high GE ls_item-be_co_code ).
                   lc_pass = c_yes.
                   EXIT.
                 ENDIF.
               ENDLOOP.
               IF sy-subrc IS INITIAL AND
                  lc_pass  = c_no.
                 CONTINUE.
               ENDIF.
    ***// End of Insertion for Company code verification
    ***// Inserted by Rakesh Palle for Asset Company code verification
      Check for valid Asset Company Code (set type = AD)
      DR # D0001055958
               IF lv_asset = 'X'.
                 LOOP AT lt_sets INTO ls_sets
                      WHERE setid = ls_prodcat-setid
                        AND setty = c_ad_value.
                   IF ls_sets-val_low = ls_item-be_co_code OR
                      ( ls_sets-val_low  LE ls_item-be_co_code AND
                        ls_sets-val_high GE ls_item-be_co_code ).
                     lc_pass = c_yes.
                     EXIT.
                   ENDIF.
                 ENDLOOP.
                 IF sy-subrc IS INITIAL AND
                    lc_pass  = c_no.
                   CONTINUE.
                 ENDIF.
    ***// End of Asset Company code verification
    ***// Check for valid Cost Center (set type = AC)
                 LOOP AT lt_sets INTO ls_sets
                      WHERE setid =  ls_prodcat-setid
                        AND setty =  c_ac_value.
                   IF ls_sets-val_low = lc_cost_ctr OR
                      ( ls_sets-val_low  LE lc_cost_ctr AND
                        ls_sets-val_high GE lc_cost_ctr ).
                     lc_pass = c_yes.
                     EXIT.
                   ENDIF.
                 ENDLOOP.
                 IF sy-subrc IS INITIAL AND
                    lc_pass  = c_no.
                   CONTINUE.
                 ENDIF.
               ENDIF.
    ***// End of Asset Cost Center
    ***// Inserted by Rakesh Palle for Order Company code verification
    Check for valid Order Company Code (set type = OD)
               IF lv_order = 'X'.
                 LOOP AT lt_sets INTO ls_sets
                      WHERE setid = ls_prodcat-setid
                        AND setty = c_od_value.
                   IF ls_sets-val_low = ls_item-be_co_code OR
                      ( ls_sets-val_low  LE ls_item-be_co_code AND
                        ls_sets-val_high GE ls_item-be_co_code ).
                     lc_pass = c_yes.
                     EXIT.
                   ENDIF.
                 ENDLOOP.
                 IF sy-subrc IS INITIAL AND
                    lc_pass  = c_no.
                   CONTINUE.
                 ENDIF.
    ***// End of Order Company code verification
    ***// Check for valid Order Cost Center (set type = OC)
                 LOOP AT lt_sets INTO ls_sets
                      WHERE setid =  ls_prodcat-setid
                        AND setty =  c_oc_value.
                   IF ls_sets-val_low = lc_cost_ctr OR
                      ( ls_sets-val_low  LE lc_cost_ctr AND
                        ls_sets-val_high GE lc_cost_ctr ).
                     lc_pass = c_yes.
                     EXIT.
                   ENDIF.
                 ENDLOOP.
                 IF sy-subrc IS INITIAL AND
                    lc_pass  = c_no.
                   CONTINUE.
                 ENDIF.
               ENDIF.
    ***// End of Order Cost Center
    ***// DR # D0001055958
    Check for SL Approver Value
               LOOP AT lt_sets INTO ls_sets
                    WHERE setid =  ls_prodcat-setid
                      AND setty =  c_aprover_value.
                 IF NOT ls_sets-val_low CN '1234567890 .'.
                   TRANSLATE ls_sets-val_low USING ', '.
                   CONDENSE ls_sets-val_low NO-GAPS.
                   li_set_amt = ls_sets-val_low.
                   IF ls_header-total_value LT li_set_amt AND
                      li_set_amt GT li_stop_amt.
                     li_stop_amt = li_set_amt.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
             ENDIF.
             CHECK ls_prodcat-val_from LE ls_header-total_value
               AND ls_prodcat-val_to   GE ls_header-total_value.
    Begin D0001055958
             IF lc_pass  = c_no.
               CONTINUE.
             ENDIF.
    End   D0001055958
    Handle Approver Name - Explicit
             IF NOT ls_prodcat-bname IS INITIAL.
               CONCATENATE 'US' ls_prodcat-bname INTO
                           ls_approver-approval_agent.
               READ TABLE approval_table INTO ls_approver_check
                    WITH KEY approval_agent = ls_approver-approval_agent.
               IF sy-subrc NE 0.
                 set_approval_level.
                 set_approval_description.
                 ls_approver-name = ls_prodcat-name_text.
                 APPEND ls_approver TO approval_table.
                 CLEAR ls_approver-name.
                 li_last_level = ls_prodcat-appr_level.
                 li_last_setid = ls_prodcat-setid.          "D0001055958
               ENDIF.
             ENDIF.
    Handle Approver Names - Derive from Role
             IF NOT ls_prodcat-agr_name IS INITIAL.
               ls_roles-agr_name = ls_prodcat-agr_name.
               APPEND ls_roles TO lt_roles.
               CALL FUNCTION 'BBP_READ_USERS_OF_ROLES'
                 TABLES
                   roles              = lt_roles
                   users_of_roles     = lt_users
                 EXCEPTIONS
                   no_users_available = 1
                   OTHERS             = 2.
               IF sy-subrc IS INITIAL.
                 LOOP AT lt_users INTO ls_users.
                   SELECT SINGLE persnumber
                          INTO lc_persnumber
                          FROM usr21
                          WHERE bname = ls_users-uname.
                   IF sy-subrc IS INITIAL.
                     SELECT name_text
                            INTO ls_approver-name
                            FROM adrp
                            UP TO 1 ROWS
                            WHERE persnumber =  lc_persnumber
                              AND date_from  LE sy-datum
                              AND date_to    GE sy-datum.
                     ENDSELECT.
                   ENDIF.
                   CONCATENATE 'US' ls_users-uname INTO
                               ls_approver-approval_agent.
                   READ TABLE approval_table INTO ls_approver_check
                      WITH KEY approval_agent = ls_approver-approval_agent.
                   IF sy-subrc NE 0.
                     set_approval_level.
                     set_approval_description.
                     APPEND ls_approver TO approval_table.
                     CLEAR ls_approver-name.
                     li_last_level = ls_prodcat-appr_level.
                     li_last_setid = ls_prodcat-setid.       "D0001055958
                   ENDIF.
                 ENDLOOP.
               ENDIF.
               REFRESH: lt_roles, lt_users.
             ENDIF.
           ENDLOOP.
         ENDIF.
       ENDLOOP.
    Add the SL approvers
       CLEAR lc_sobid.
    Get the requisioner - in case the cart is created 'on behalf of'
       READ TABLE lt_partner INTO ls_partner
                  WITH KEY partner_fct = c_requisitioner.
       IF sy-subrc IS INITIAL.
         SELECT SINGLE partner INTO lc_partner
                FROM but000
                WHERE partner = ls_partner-partner_id.
         CALL FUNCTION 'RH_STRUC_GET'
           EXPORTING
             act_otype      = 'BP'
             act_objid      = lc_partner
             act_wegid      = 'BP_US'
           TABLES
             result_tab     = lt_result_tab
           EXCEPTIONS
             no_plvar_found = 1
             no_entry_found = 2
             OTHERS         = 3.
         READ TABLE lt_result_tab INTO ls_result_tab WITH KEY otype = 'US'.
         lc_sobid = ls_result_tab-objid.
       ENDIF.
    If the above code failed for any reason use the Created By user as the
    requisioner
       IF lc_sobid IS INITIAL.
         lc_sobid = ls_header-created_by.
       ENDIF.
    Set the stop amount to the total value of the cart
       IF li_stop_amt IS INITIAL.
         li_stop_amt = ls_header-total_value.
       ENDIF.
       DO.
    Get the Object ID of user
         SELECT SINGLE objid
                INTO lc_objid
                FROM hrp1001
                WHERE sobid = lc_sobid
                  AND otype = 'S'
                  AND plvar = '01'.
         IF sy-subrc NE 0.
           EXIT.
         ENDIF.
    Get the SL Approver
         SELECT SINGLE low
                  INTO lc_slapprover
                  FROM hrv1222a
                  WHERE plvar  =  '01'
                    AND otype  =  'S'
                    AND objid  =  lc_objid
                    AND begda  LE sy-datum
                    AND endda  GE sy-datum
                    AND attrib =  'SLAPPROVER'.
         IF sy-subrc NE 0.
           EXIT.
         ENDIF.
    **break-point.
    Get the Approver's Limit
         CLEAR li_limit.
         lc_sobid = lc_slapprover+2.
         CALL FUNCTION 'BBP_BW_GET_APPR_LIMIT'
           EXPORTING
             i_userid     = lc_sobid
           IMPORTING
             e_appr_limit = li_limit.
         SUBTRACT '.01' FROM li_limit.  "D0001093425
         IF li_limit GT 0.
    Add the approver to the list
           SELECT SINGLE persnumber
                  INTO lc_persnumber
                  FROM usr21
                  WHERE bname = lc_sobid.
           IF sy-subrc IS INITIAL.
             SELECT name_text
                    INTO ls_approver-name
                    FROM adrp
                    UP TO 1 ROWS
                    WHERE persnumber =  lc_persnumber
                      AND date_from  LE sy-datum
                      AND date_to    GE sy-datum.
             ENDSELECT.
           ENDIF.
           ADD 1 TO li_stepno.
           ls_approver-approval_index = li_stepno.
           ls_approver-approval_agent = lc_slapprover.
           set_approval_description.
           APPEND ls_approver TO approval_table.
           CLEAR ls_approver.
         ENDIF.
    If the limit is greater than the stop amount, exit - we are finished
         IF li_limit GE li_stop_amt.
           EXIT.
         ENDIF.
       ENDDO.
    ENDIF.
    Inserted by Rakesh Palle for Order
    DR # D0001055958
    IF lv_order = 'X'.
       lc_first = 'X'.
       LOOP AT lt_order INTO ls_order.
         CHECK ls_order-val_from LE ls_header-total_value
           AND ls_order-val_to   GE ls_header-total_value.
    Handle Approver Name - Explicit
         IF NOT ls_order-bname IS INITIAL.
           CONCATENATE 'US' ls_order-bname INTO
                       ls_approver-approval_agent.
           READ TABLE approval_table INTO ls_approver_check
                WITH KEY approval_agent = ls_approver-approval_agent.
           IF sy-subrc NE 0.
             set_approval_level_2.
             set_approval_description.
             ls_approver-name = ls_order-name_text.
             APPEND ls_approver TO approval_table.
             CLEAR ls_approver-name.
             li_last_level = ls_order-appr_level.
           ENDIF.
         ENDIF.
    Handle Approver Names - Derive from Role
         IF NOT ls_order-agr_name IS INITIAL.
           ls_roles-agr_name = ls_order-agr_name.
           APPEND ls_roles TO lt_roles.
           CALL FUNCTION 'BBP_READ_USERS_OF_ROLES'
             TABLES
               roles              = lt_roles
               users_of_roles     = lt_users
             EXCEPTIONS
               no_users_available = 1
               OTHERS             = 2.
           IF sy-subrc IS INITIAL.
             LOOP AT lt_users INTO ls_users.
               SELECT SINGLE persnumber
                      INTO lc_persnumber
                      FROM usr21
                      WHERE bname = ls_users-uname.
               IF sy-subrc IS INITIAL.
                 SELECT name_text
                        INTO ls_approver-name
                        FROM adrp
                        UP TO 1 ROWS
                        WHERE persnumber =  lc_persnumber
                          AND date_from  LE sy-datum
                          AND date_to    GE sy-datum.
                 ENDSELECT.
               ENDIF.
               CONCATENATE 'US' ls_users-uname INTO
                           ls_approver-approval_agent.
               READ TABLE approval_table INTO ls_approver_check

    hi,
    let me know the following things
    1) how many levels are working ? is the workitem send to the second approver (or) not?
    is the issue occuring with the first approver?
    2) are you using the index value correctly in your approval badi? please check out.
    Badi is called during each approval stage 
    3)  what is the value of approval_state in the workflow container ? 
    if the value is 5 --> it will go to the next approver.
    4) have you been able to debug --> the approval process --> this will enable you to find root cause of the issue.
    check out FM
    BBP_WFL_DIN_APPR_CONTAINER_SET --> this is the point where the approval update happens --> when the approver approves (or) rejects the cart.

  • IIOP and firewalls - urgent help!!!

    Hello there,
    we have problems connecting with a Java applet to BC4J deployed as EJBs in an OracleJVM (Oracle9i AS 1.0.2) over IIOP throu a firewall. Is anyone out there who can help us? We need urgent help!!!
    Thanks in advance!
    Stefan
    null

    AFAIK, you have only three options:
    1. Configure your IIOP connection to use an existing open port on the firewall (e.g., port 80 which is usually reserved for HHTP protocol) - THIS IS A BAD IDEA
    2. Configure the firewall to allow inbound traffic on the IIOP port you are using (Oracle uses 2481 by default) - this is fine if you control the firewall.
    3. Wrap your EJB client code in a servlet and communicate from the applet to the servlet via HTTP. This is the normal "firewall-puncturing" approach (aka "tunneling").
    John H.

  • Regarding DMS configuration - urgent help

    Hi,
    I need urgent help with the below scenario.
    I created one document,attached a drawing,now i want to submit to a higher level authority using workflow who can approve/reject.how do i do this.
    Also i would like to create  two vaults Vault A and Vault B ,user A has read/write to vault A and user B has read/write to only Vault B ,but user C has read.write to both vaults.
    Please let me know how do i create users,configure vaults and give permissions.
    thanks
    prasad suresh

    first u have to create  status for approval
    i give u one example of it
    first u have to create different stauts  for approval process
    for this u have to configure in SPRO with the relevant document type
    and give the  proper authorization in PFCG to relavant user , who create the doc and who chek and who released the doc
    read this carefully , i made this kind of approval process in my project
    1 --- "CR"   means "Create"  by document Creater
    2 --- "Ch"   "Checked" by X authority    /  if any mistake found then  "R1"    "Rework"  by X authority
    3 ---  "Re"   " Released" by Y authority / if any mistake found then "R2"    "Rework"  by Y authority
    think that there is three  stage for approval of any drawing
    first stage  -
    document creat   (Draft Man Creat Drawing and attached )
                              at that time document status is "Cr" after creating doc , that DIR info is sent to higher
                              authority using document distribution functionality
    second stage----- document checker (Receive document from Draft Man in SAP Inbox)
                               he chek that drawing (DIR) . if there is not any other mistake than it again
                              follow the cycle of document distribution to his higher authority. this time
                                document status updated from " Cr "  to " Ch" means from "creat" to "checked "
                                if any mistake found than he change status "Cr"  to "R1" means
                                create to rework  and send it back to drafts man
                                 and drafts man again modify drawing and modify status "R1" to "Cr"
                                 and send it to higher authority
    third stage -
        document aprover  (Receive document from document checker in SAP Inbox)
                               he chek that drawing (DIR) . if there is not any other mistake than he update
                                document status  from  " Ch" to "Re"  means from  "checked " to "Released"
                                if any mistake found than he change status "ch"  to "R2" means
                                checked  to rework  and send it back to drafts man
                                 and drafts man again modify drawing and modify status "R2" to "Cr"
                                 and send it to higher authority
    and in second question , pls tell me clear what u wana do
    vaults means what ?
    is it Repository or what ?
    give me idea by some example

  • Urgent help requested- MSS

    Hello people,
    consider the following scenario
    work flow is getting triggered to the Line manager (chief) and so on to next agents
    How can we make use of substitution in following scenarios
    scenario1- planned leave by Line manager (I think this can be done using substitution in MSS)
    Scenario 2- Unplanned leave by Line manager
    scenario 3- position of Line manager is vacant
    The workflow i am using is not a standard woprkflow.
    The above scenarios are applicable in case of leave approval and trip request approval.
    Urgent help appreciated.
    Thx

    Forgive if the terms are not excact - my system is not in English.
    For scenario 1: Use substitution rule "receives my tasks" when setting up substitutions in the uWL
    For scenario 2: All managers should have a substitution rule "is my substitute".  Then the substitute can go into the substitution rule and take over the tasks.  This can then be discontinued when manager is back
    For scenario 3: Switch WFLOW VAPOS = X  determines the behaviour when manager position is empty. .  For some reason the switch is not there in standard - but we set it just for this scenario. The Workflow then checks up the hierachy and finds the next manager.
    /Kirsten

  • Error in RZ20 : No administrator defined in approval BAdI

    Hi All,
    We are working on SRM 5.0 extended classic scenario.
    I got the error in RZ20 like shown below under the starting conditions like
    Object BUS2121 <shopping cart number>: No administrator defined in approval BAdI.
    and also one more error under the other errors
    Error during setting of status for contract <contract number> to 'Approved'
    I tried in checking BBP_PD but did not find anything.
    can you please let me know how and where to check to find the root cause for this error.
    Thank you
    Regards
    Jay

    Hi Jay,
    Your screen shot shows "Release Rejected", which is bit confusing.
    Suspect some issue with BBP_WFL_APPROV_BADI implementation. Are you using this BADI?
    Please wait replies from other experts.
    Meanwhile you may refer,
    http://scn.sap.com/thread/443102
    http://scn.sap.com/thread/695465
    Regards,
    Ganapathi

  • 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.

  • 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

  • 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 PLEASE - drop index hangs on SAP

    Hi all,
    OS = Linux
    DBVersion = Oracle10.2.0.2
    Need some urgent help advise please on how to get around this problem.
    On a SAP system, am trying to drop six indexes, largest is 300MB and smallest is 50MB.
    I tried running drop index sapusername.index_name on the 50MB index via SQL*Plus and it seems to be taking forever. Can anyone please suggest if there is anything I can check on the database on why it is taking such a long time?
    I can leave it to run overnight but worried that when I come back the next day, it will still be hanged. Is there any quick way of dropping the index, .i.e. drop immediate ... :-)
    Am not using SAP's BRTOOLs as it is also hanging from there and the SAP-ADMIN had approved for the DBA to drop it from our end instead.
    Any response and advise on this will be very much appreciated.
    From Google'ing, I found some that mentioned that the fault could be because of the existence of the constraints on the table that I am dropping the index of.
    Checking the table, it has 17 SYS_ named constraints. None of these constraints have INDEX_NAME that refers to the indexes that am dropping.
    Should I disable the constraints and then run the drop index again?
    Thanks in advance.
    Edited by: user649596 on Apr 13, 2010 11:49 PM

    Should I disable the constraints and then run the drop index again?NO, certainly not !!
    Ask SAP Support on what methods you should use to diagnose the "hang" and what your next step(s) should be.
    Hemant K Chitale

Maybe you are looking for

  • About Lumia 1520 discharge rate

    Hello I have a question about my L1520 battery life and its discharge rate. Cellular: On ( LTE ) Internet Sharing: On ( One laptop connected ) Display: Off BT: Off Location: Off Double tap to wake: Off Glance: Peek Apps open on the background: Nothin

  • Error in transaction SOAMANAGER from Dev ECC6

    Hi, I am getting below error in transaction SOAMANAGER  -- Application & scenario comm -- single service admin -- select service Z* -- apply selection -- Open Web Service navigator for selected binding then getting error as below: Error: Cannot downl

  • Accessign webservice result from another mxml file

    HI, I have an mxml application that uses the <mx:webservice function to load a wsdl and get some values. I have tested the code and it works fine and i can get the result and fault methods correctly. I would now like to call this service from another

  • Google Map Marker Pin at Incorrect Location

    Hi Can anyone help regarding why a Google map marker is located off the coast of Africa when I have included the app item location/address details as being in Queensland, Australia? It only comes up when a full search is done, when you click the Get

  • How to open show detail item on ADF link click

    Hi, Can anybody tell me how to open show detail item tab on link click ?? thanks, Nitesh