Get Approval Group by pass item or its category

We make Approval Group based on item category for PR or PO approval. The question is , i want to get approval group based on item or its category. Just pass item id and get which approval group is going to approval this item.
i got po_control_rules table it just contains categories range in description form, but didn't get any proper help.
Pl suggest solution
Regards,
Edited by: user9092987 on Apr 14, 2011 6:35 AM

Shaukat,
First do select category_id from mtl_item_categories using inventory_item_id.
You may get multiple records back. In that case, use the category_set_id to narrow down to the record that is applicable.
Then select the category segments from mtl_categories using the category_id.
Then compare the segments with the segment fields in po_control_rules to identify the correct approval group.
Hope this answers your question,
Sandeep Gandhi

Similar Messages

  • Claims  Error " Please Impliment BADI for Approver and Approver Group"

    Hi all,
    We have configured all the Eligibility criteria for an employee to create an
    Advance and claim request through ESS.
    while raising a claim or Advance request it is
    showing the message request validation sucess full
    but when we are sending the request it is throwing the error.
    " Please Impliment BADI for Approver and Approver Group"
    we have configured the
    1. Privileges Group
    2.Approver Group
    3.Map Privileges Groups to Approver Groups
    still Issue is there?
    Warm Regards
    Hari Sankar M

    Hi All,
    We have Implemented Badi to determine Approver and Approver Group.
    while executing the Application its throwing a new error
    "Incorrect Status Movement(New:New to In-Process:Approved) for Claim"
    We have put a break point inside the Badi but it is not getting called?
    Regards
    Hari Sankar M

  • [CS3 JS] Getting a page item by its script label

    I have a text frame on a master page with its script label set. In my script, I am trying to get a reference to the text frame with this:
    var doc = app.activeDocument;
    var spread = doc.masterSpreads[0];
    var tabFrame = spread.allPageItems.item("TabLeft");
    I get the error "spread.allPageItems.item is not a function"
    Any help will be appreciated. Thanks.
    Rick

    Hi Rick,
    spread.allPageItems returns a flattened array of all of the page items in the spread, at any level of the hierarchy (i.e., inside groups and other page items). Is that what you want? Sadly, allPageItems does not benefit from the special case where we use the label as a name, so you'll have to iterate if that's what you want.
    As Peter says (thanks, Peter!), spread.pageItems.item("label") gives you all of the page items whose label matches the string, but it does so in sort of a weird way--you'll always get a page item object. If no page items match, you get an invalid page item; if one matched, you get a single page item, and if multiple page items matched, you get a page item object that actually contains multiple page items. It can take a little testing to figure out exactly what it is that was returned.
    Thanks,
    Ole

  • How to get the group key, which an approval task assign to

    Hi,
    When a user is assign to OIM Group (i.e. from User Detail >> Group Membership form), I will call an approval process (using Access Policy).
    In that approval process, I have defined two tasks.
    1) Assign Approval to Group -> NOT conditional
    2) Remove OIM Group From User -> conditional
    So, from the 1) task, I will assign this approval to a OIM Group.
    If the user click "Approva", a provisioning process will be fired.
    If the user click "Deny" (Reject), 2) task will be run.
    What I want is this.
    From this 2) task, I need to get the "OIM Approval group" key or name (which this approval is assigned to)......
    Note: I need to get this group info in the "Approval Process Task" -> "Integration" -> "Map"
    Regards,
    Chaturanga

    Hi,
    Yes. I have done that.
    Now what I want is this. If the approver "Deny" (Reject) the approval task, I will call another task in the approval process. From that task, I need to run a code, which remove the user from OIM Group.
    So, to do it, I have written a java code and created a adapter. So, as a input parameter for that code, I need to give the approval group name(i.e. the OIM group, above approval task is assign to).
    How can I get the OIM approval group, which the person who Deny the approval belongs to, from this new approval process task???
    Regards,
    Chaturanga

  • Does SharePoint allow to Approve/Reject non-pending items

    I am confused on the behaviour SharePoint is handling content approval, as sometimes it will hide the Approve/Reject links if the item status is not pending. While on some senarios it will allow to Approve/Reject items regardless of their statuses. Let
    for example examine these two senarions.
    I have a document library and I set “Require content approval for submitted item” under its versioning settings.
    Now when users access the page , the “Approve/Reject” links will be disabled unless the page status is pending. For example this is an approved page and the “Apprve/Reject” links are disabled:-
    However this is not always true, because if I access the same page but from this location “Site content>>Library”, select the page, from the drop-down menu there will be “Approve/Reject” link for the same page:-
    So this means that there is inconsistency behavior inside SharePoint , as for the same item it will disabled “Approve/Reject” link while on other places it will enable them (as shown above),, so can anyone advice on this please , and if there is a reason
    behind this ?

    Hi John,
    I tested the same scenario per your post, and I got the same results as you got.
    It seems that this issue occurs with  lists and wiki pages libraries.
    We will help to submit the issue to proper pipeline for you.
    Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay. 
    Appreciate your time and patience.
    As a workaround, you can code to achieve what you want which is not an easy way.
    You can use client object model to get the current selected items and check the _ModerationStatus of the items.
    If the _ModerationStatus is equal to 0 (which means approved in SharePoint) or 1(which means rejected in SharePoint), then disable the Approve/Reject button.
    In the meanwhile, you need to monitor the ribbon if the Files has been opened.
    More references:
    http://spdailytips.blogspot.jp/2011/08/get-selected-items-javascript-client.html
    http://ranaictiu-technicalblog.blogspot.jp/2011/02/sharepoint-2010-approvereject-content.html
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Parallel Approval for Approval Groups

    I have a doubt in AME rules which can be created for the ‘Payables Invoice Approval’ Transaction Type. I have to configure AME rule for the particular Scenario. (Issue is the item marked in red)
    Scenario:-
    Created a Line item attribute to get the value of minor account from invoice distribution line. SQL query for same is given below.
    select glcc.segment3
    from ap_invoice_distributions_all apd, gl_code_combinations glcc
    where
    apd.dist_code_combination_id=glcc.code_combination_id and
    apd.invoice_id = :transactionId and apd.invoice_distribution_id in (select invoice_distribution_id
    from ap_invoice_distributions_all
    where invoice_id = :transactionId
    order by apd.invoice_distribution_id
    Created 2 conditions with this attribute, Minor1 - for segment3 17240 and Minor2 for segment3=44496
    Created two different rules using these conditions (used two different approval groups, with one approver each in approval group)
    I created an invoice with 2 distributions. First dist has minor 17240 (satisfying rule1) and second with minor 44496 (satisfying rule2)
    I expected both these rules to be executed at the same time and e-mail to be sent to these approvers parallely (we tried to set order num in approval group to not unique and num=1. But it didn’t work)
    However, these rules are processed serially and notification is sent to second approver after first approver approves it.
    We need to figure out a way, how notifications can be sent to both approvers (of different approval groups) at the same time also can item level approval be configured for approval groups?
    I even tried Dual Chain of authority. But Dual Chain of authority is again for supervisory hierarchy. I also tried the pre-chain-of-authority approvals (which will be an approval group) along with the main approval group. But parallel processing was not possible.
    Also tried the exception condition but could not obtain the desired functionality.
    Any pointers would be appreciated. Thanking you in anticipation.

    Did a little digging and it worked!

  • Approving agents of an item in SC ?

    Hi  :{),
    I am trying to get the list of agents who approved an item in a shopping cart.
    ( Item based workflow)
    I know how to get the agent list for the SC itself, using the FM SAP_WAPI_WORKITEMS_TO_OBJECT, OBJTYPE = 'BUS2121',OBJKEY ='10000001319'
    ,  but I don't know how to get the approvers for specific items inside the SC.
    can anyone help??
    thanks
    Ofer

    Hi
    <u>Please refer to this Sample code for Line-item Approval - SRM workflow.</u>
    <b>* This code gives idea about of how line item approval should work</b>
      INCLUDE <swfcntn01>.                  "Workflow
      DATA:
       ls_header         TYPE bbp_pds_sc_header_d,
    * approval object related structures
       ls_approver       TYPE bbp_wfl_approval_table_badi,
       ls_approver_a     TYPE bbp_wfl_approval_table_badi,
       ls_approver_b     TYPE bbp_wfl_approval_table_badi,
       lt_approver       TYPE TABLE OF bbp_wfl_approval_table_badi,
       ls_item_app_obj   TYPE bbps_wfl_item_approval_obj,
       ls_approval_def   TYPE bbpt_wfl_lia_def,
    * tables for different approval criteria
       lt_appr_def       TYPE TABLE OF bbpt_wfl_lia_def,
       lv_call_crit1     TYPE bbp_wfl_app_criterion,
       lv_call_value1    TYPE bbp_wfl_app_property,
    * approval item fields and structures
       ls_approval_item  TYPE bbps_wfl_item_approval,
       lt_approval_items TYPE TABLE OF bbps_wfl_item_approval,
       lv_approval_index TYPE bbp_wfl_approval_table_badi-approval_index,
       lv_guid           TYPE crmt_object_guid,
       ev_app_obj_guid   TYPE bbp_guid_32,
       lv_object_value   TYPE bbp_wfl_lia_value,
       lv_def_value      TYPE bbp_wfl_lia_value,
       lv_object_found   LIKE syst-subrc,
       lv_ob_tbx         LIKE syst-tabix,
    * item fields and structures
       ls_item           TYPE bbp_pds_sc_item_d,
       lt_item           TYPE TABLE OF bbp_pds_sc_item_d,
       ls_account        TYPE bbp_pds_acc,
       lt_account        TYPE TABLE OF bbp_pds_acc.
    * purchase order special...
      DATA:
      lt_approval_agent_obj       TYPE TABLE OF swf_bor_object,
      lt_approval_init_agents     TYPE TABLE OF bbp_wfl_approval_table,
      ls_wa_agent_obj             TYPE swf_bor_object,
      ls_approval_agent           TYPE bbp_wfl_approval_table,
      ls_wa_approval_init_agents  TYPE bbp_wfl_approval_table,
      ls_wa_approval_history      TYPE bbps_wfl_history_line_badi,
      lv_index                    TYPE syindex,
      lv_usr01_name               TYPE ad_namtext,
      lo_new_instance             TYPE swf_bor_object,
      lo_user                     TYPE swf_bor_object.
    * Business objects (local)
      CONSTANTS:
       c_po            TYPE crmt_subobject_category_db VALUE 'BUS2201',
       c_biddingdoc    TYPE crmt_subobject_category_db VALUE 'BUS2200',
       c_quotation     TYPE crmt_subobject_category_db VALUE 'BUS2202',
       c_grse          TYPE crmt_subobject_category_db VALUE 'BUS2203',
       c_invoice       TYPE crmt_subobject_category_db VALUE 'BUS2205',
       c_shop          TYPE crmt_subobject_category_db VALUE 'BUS2121',
       c_contract      TYPE crmt_subobject_category_db VALUE 'BUS2000113',
       c_salescontract TYPE crmt_subobject_category_db VALUE 'BUS2000114',
       c_avl           TYPE crmt_subobject_category_db VALUE 'BUS2206',
       c_invoicegrp    TYPE crmt_subobject_category_db VALUE 'BUS2207',
       c_vendor_obj    TYPE crmt_subobject_category_db VALUE 'BUS1006200'.
    * Approval Criteria and properties used (local)
      CONSTANTS:
        c_3_step_limit     TYPE i VALUE 510000000,
        c_no_approval      TYPE i VALUE 501000000,
        c_item_value       TYPE bbp_wfl_app_criterion  VALUE 'ITEM_VALUE',
        c_item_value_desc  TYPE bbp_step_description
                           VALUE 'Item Vaue Approval',
        c_cost_centre      TYPE bbp_wfl_app_criterion  VALUE 'COST_CTR',
        c_cost_centre_desc TYPE bbp_step_description
                           VALUE 'Cost Centre Approval',
        c_prod_categ       TYPE bbp_wfl_app_criterion  VALUE 'PROD_CAT',
        c_prod_categ_desc  TYPE bbp_step_description
                           VALUE 'Product Category'.
      CONSTANTS:
          c_agent_is_user TYPE otype VALUE 'US'.
    *** workflow approval states
      CONSTANTS:
       c_wf_approved           TYPE  bbp_wfl_approvalstate VALUE '0',
       c_wf_rejected           TYPE  bbp_wfl_approvalstate VALUE '1',
       c_wf_not_instanced      TYPE  bbp_wfl_approvalstate VALUE '2',
       c_wf_changed            TYPE  bbp_wfl_approvalstate VALUE '3',
       c_wf_partialapproved    TYPE  bbp_wfl_approvalstate VALUE '4',
       c_wf_step_in_process    TYPE  bbp_wfl_approvalstate VALUE '5'.
    * map char32 to raw16
      MOVE guid TO lv_guid.
      CASE object_type.
        WHEN c_shop.
    * -----------   shopping cart ---------------------------------- *
    *** get the nevessary field entries from 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.
          IF ls_header-total_value LT c_no_approval.
    *** we define a threshold value of 501 000 000 that means, if the
    *** shopping cart value is below that, ther's no approval required
            no_further_approval_needed = 'X'.
          ELSE.
    * read definition table
            CLEAR lt_appr_def.
            SELECT *  FROM bbpt_wfl_lia_def
                      INTO CORRESPONDING FIELDS OF ls_approval_def.
              APPEND    ls_approval_def TO lt_appr_def.
            ENDSELECT.
    *** We build up the item_approval_table and coplete approval object.
    *** For that we loop over the items, investigate if it belongs to
    *** one of the approval definitions we have made in the data base
    *** table " BBPT_WFL_IA_DEF ". I.e. if we have defined an approver
    *** for cost centre '1000' and the line item is assigned to cost
    *** centre '1000' the approver can be set - also, if there is no
    *** specific definition for the costcentre, but there is a definition
    *** for cost centre 'OTHERS'. However, if there is no entry with
    *** value 'OTHERS' in the cost centre table, there is no approval
    *** for that item
            LOOP AT lt_item INTO ls_item WHERE del_ind IS INITIAL.
    *** the item guid is set to all 'approval item' entries - this table
    *** provides a link between the approval object (defined by its GUID)
    *** and the line item in the shopping cart
              ls_approval_item-approval_item_guid = ls_item-guid.
    * 1st approval step executed for indices 1 and 0
              IF actual_approval_index LE 1.
                CLEAR ls_item_app_obj.
                ls_item_app_obj-sc_guid = ls_header-guid.
    *** 1st level: distinguish according to item value:
    *** for items with price less than 1000 we have a different approver
    *** - or none if none is defined - than for items costing more than 1000
                IF ls_item-value LT 1000.
                  lv_call_value1 = 'LOW'.
                ELSE.
                  lv_call_value1 = 'HIGH'.
                ENDIF.
    *** the following function now creates a GUID and an entry in the item
    *** approval object table if the criterion/value pair does not yet have
    *** a definition in that table - otherwise it returns the GUID already
    *** defined. The table lt_item_app_obj is updated in that function and
    *** there is no other modification to this table necessary in the BADI.
    *** The only important thing is, that the function has to be called with
    *** exactely the same key in order to identify the correct entry.
                CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
                  EXPORTING
                    sc_guid           = ls_header-guid
                    criterion1        = c_item_value
                    value1            = lv_call_value1
                  IMPORTING
                    approval_obj_guid = ev_app_obj_guid
                  TABLES
                    item_app_obj      = item_approval_obj.
    *** now we can also complete the approval item table with the approval
    *** object number and append it. The approver(s) for that object will be
    *** completed in a second step after this loop over the items.
                ls_approval_item-approval_object_guid = ev_app_obj_guid.
                APPEND ls_approval_item TO lt_approval_items.
              ENDIF. " 1st approval step
    * 2nd approval step executed for indices 1 and 0
              IF actual_approval_index LE 2.
                CLEAR ls_item_app_obj.
                ls_item_app_obj-sc_guid = ls_header-guid.
    * 2nd level: cost centre approval
    *** read cost centre in the account table (filled in the getdetail)
                READ TABLE lt_account INTO ls_account
                              WITH KEY p_guid = ls_item-guid.
    *** try to find an approver definition for the cost centre found
                READ TABLE lt_appr_def INTO ls_approval_def
                            WITH KEY  app_crit_name1 = c_cost_centre
                                     app_crit_value1 = ls_account-cost_ctr.
                IF sy-subrc = 4.
    *** if no cost centre found, check if there's an aprover for others
                  lv_call_value1 = 'OTHERS'.
                  READ TABLE lt_appr_def INTO ls_approval_def
                             WITH KEY  app_crit_name1 = c_cost_centre
                                      app_crit_value1 = lv_call_value1.
                ELSE.
                  MOVE ls_account-cost_ctr TO lv_call_value1.
                ENDIF.
                IF sy-subrc = 0.
    *** as in the 1st step, we call the function that filles the approval
    *** object table. Now we would also like this function fo add the values
    *** of the items belonging to a specific approval object to be
    *** summarised in the field APP_CRIT_VALUE3. For that we provide the
    *** item value and fill the flag 'iv_add_value'
    *** the item table is filled in the interface in order to check if an
    *** item exists for the approver before inserted
                  CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
                    EXPORTING
                      sc_guid           = ls_header-guid
                      criterion1        = c_cost_centre
                      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.
                  APPEND ls_approval_item TO lt_approval_items.
                ENDIF.
              ENDIF. "2nd approval step
    *** 3 step approval - 3rd step executed
    ***   we want to execute the 3rd step only for shopping carts with a
    ***   value exceeding a certain limit
              IF actual_approval_index LE 3
                       AND ls_header-total_value GE c_3_step_limit.
    * 3rd level: item category is evaluated
                CLEAR ls_item_app_obj.
                ls_item_app_obj-sc_guid = ls_header-guid.
    * find out if there's a specific definition for that product category
                READ TABLE lt_appr_def INTO ls_approval_def
                            WITH KEY  app_crit_name1 = c_prod_categ
                                     app_crit_value1 = ls_item-category_id.
                IF sy-subrc = 4.
    *** ceck if there is a default entry (similar to 2nd step)...
                  lv_call_value1 = 'OTHERS'.
                  READ TABLE lt_appr_def INTO ls_approval_def
                             WITH KEY  app_crit_name1 = c_prod_categ
                                      app_crit_value1 = lv_call_value1.
                ELSE.
                  MOVE ls_item-category_id TO lv_call_value1.
                ENDIF.
                IF sy-subrc = 0.
    *** if a definition (either specific or not) is found and we can fill a
    *** new entry in the approval object table or find the corresponding one
                  CALL FUNCTION 'BBP_WFL_DIN_APP_OBJ_GET'
                    EXPORTING
                      sc_guid           = ls_header-guid
                      criterion1        = c_prod_categ
                      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.
                  APPEND ls_approval_item TO lt_approval_items.
                ENDIF.
              ENDIF. " 3rd approval step
            ENDLOOP.
    * now fill the approver for the different approval definitions
    * 1st approval step executed for indices 1 and 0
            IF actual_approval_index LE 1.
    *** fill the approver table lt_approver using the guid/key combination
    *** from the item approval object table to assign the approval object
    *** guid to the approvers specified for the key in the definition table
    *** the hide items flag specifies, that for those steps where it is set
    *** the approver can only see the items of their responsibility
              CALL FUNCTION 'BBP_WFL_DIN_FILL_APPROVER'
                EXPORTING
                  iv_approval_index   = 1
                  ic_step_description = c_item_value_desc
                  iv_criterion1       = c_item_value
                  iv_hide_items_flag  = 'X'
                TABLES
                  it_approval_def     = lt_appr_def
                  it_approval_object  = item_approval_obj
                  et_approver         = lt_approver
                  it_approval_items   = lt_approval_items.
            ENDIF.
    * 2nd aproval step executed for actual indices 1, 2 and 0
            IF actual_approval_index LE 2.
    *** fill approvers for 2nd step
              CALL FUNCTION 'BBP_WFL_DIN_FILL_APPROVER'
                EXPORTING
                  iv_approval_index   = 2
                  ic_step_description = c_cost_centre_desc
                  iv_criterion1       = c_cost_centre
                TABLES
                  it_approval_def     = lt_appr_def
                  it_approval_object  = item_approval_obj
                  et_approver         = lt_approver
                  it_approval_items   = lt_approval_items.
            ENDIF.
            IF actual_approval_index GT 2 AND
               ls_header-total_value LT c_3_step_limit.
    *** 2 step approval if value is less than c_3_step_limit
              no_further_approval_needed = 'X'.
            ELSEIF actual_approval_index LE 3
               AND ls_header-total_value GE c_3_step_limit.
    *** 3 step approval - 3rd step executed
              CALL FUNCTION 'BBP_WFL_DIN_FILL_APPROVER'
                EXPORTING
                  iv_approval_index   = 3
                  ic_step_description = c_prod_categ_desc
                  iv_criterion1       = c_prod_categ
                TABLES
                  it_approval_def     = lt_appr_def
                  it_approval_object  = item_approval_obj
                  et_approver         = lt_approver
                  it_approval_items   = lt_approval_items.
            ELSEIF actual_approval_index GT 3.
    *** we don't define more than 3 steps
              no_further_approval_needed = 'X'.
            ENDIF.
            item_approval_table[] = lt_approval_items[].
            approval_table[]      = lt_approver[].
          ENDIF. " value less than "c_no_approval"
        WHEN c_po.
    * ---------------------   purchase order ---------------------------- *
    ** 08/15 implementation - well at least this shows it's not the
    ** auto-approval work flow ruinning
    *      IF actual_approval_index LE 1.
    *        ls_approval_agent-approval_branch = 1.
    *        ls_approval_agent-initial_index = 1.                " Index = 1
    *        ls_approval_agent-initial_agent = 'MANAGER2'.
    *        ls_approval_agent-approval_state = c_wf_not_instanced.
    *        APPEND ls_approval_agent TO lt_approval_init_agents.
    *      ENDIF.
    *      IF actual_approval_index LE 2.
    *        ls_approval_agent-approval_branch = 1.
    *        ls_approval_agent-initial_index = 2.                " Index = 2
    *        ls_approval_agent-initial_agent = 'MANAGER10'.
    *        ls_approval_agent-approval_state = c_wf_not_instanced.
    *        APPEND ls_approval_agent TO lt_approval_init_agents.
    *        ls_approval_agent-approval_branch = 1.
    *        ls_approval_agent-initial_index = 2.                " Index = 2
    *        ls_approval_agent-initial_agent = 'MANAGER5'.
    *        ls_approval_agent-approval_state = c_wf_not_instanced.
    *        APPEND ls_approval_agent TO lt_approval_init_agents.
    *      ENDIF.
    *      IF actual_approval_index LE 3.
    *        ls_approval_agent-approval_branch = 1.
    *        ls_approval_agent-initial_index = 2.                " Index = 3
    *        ls_approval_agent-initial_agent = 'MANAGER44'.
    *        ls_approval_agent-approval_state = c_wf_not_instanced.
    *        APPEND ls_approval_agent TO lt_approval_init_agents.
    *      ENDIF.
    ** 1) Evaluate the list of spending limit approvers from BOR
    **    attributes
          swf_create_object  lo_new_instance  object_type   guid.
          swf_get_property   lo_new_instance 'SLManagerUserList'
                                              lt_approval_agent_obj[].
          lv_index = 1.
          LOOP AT lt_approval_agent_obj INTO ls_wa_agent_obj.
            swf_get_property ls_wa_agent_obj 'User' lo_user.
            swf_get_property lo_user 'NameWithLeadingUS'
                                    ls_approval_agent-approval_agent.
            swf_get_property lo_user 'Name' lv_usr01_name.
            MOVE lv_usr01_name TO ls_approval_agent-name.
            ls_approval_agent-approval_index = lv_index.
            ls_approval_agent-approval_branch = 1.
            ls_approval_agent-initial_index = lv_index.
            ls_approval_agent-initial_agent =
                                 ls_approval_agent-approval_agent.
            ls_approval_agent-approval_state = c_wf_not_instanced.
            APPEND ls_approval_agent TO lt_approval_init_agents.
            lv_index = lv_index + 1.
          ENDLOOP.
    *** 2) Evaluate the list of remaining approvers. The actual approver
    ***    belongs to the list as well.
          LOOP AT approval_history_table INTO
                       ls_wa_approval_history WHERE type <> 'I'.
            LOOP AT lt_approval_init_agents INTO
                                      ls_wa_approval_init_agents.
              IF ls_wa_approval_init_agents-approval_index LT
                        ls_wa_approval_history-approval_index.
                DELETE lt_approval_init_agents.
              ENDIF.
            ENDLOOP.
          ENDLOOP.
    * fill the import table
          CLEAR ls_wa_approval_init_agents.
          LOOP AT lt_approval_init_agents INTO
                                    ls_wa_approval_init_agents.
            CLEAR ls_wa_approval_history.
            MOVE-CORRESPONDING ls_wa_approval_init_agents TO
                                              ls_wa_approval_history.
            APPEND ls_wa_approval_history TO approval_table.
          ENDLOOP.
          IF approval_table[] IS INITIAL.
            no_further_approval_needed = 'X'.
          ENDIF.
    * fill administrators for WIs with missing approver assignment:
          CLEAR ls_approver.
          ls_approver-approval_agent = 'USADMIN1'.
          APPEND ls_approver TO approval_administrators.
          ls_approver-approval_agent = 'USADMIN2'.
          APPEND ls_approver TO approval_administrators.
    *      approval_table[]      = lt_approver[].
    * -----------------------   contract -------------------------------- *
        WHEN c_contract.
    *   to be implemented
          CALL FUNCTION 'BBP_WFL_DIN_EXAMPLE_APPROVAL'
            IMPORTING
              et_approval_agents = approval_table[].
    * ---------------------  quotation ---------------------------------- *
        WHEN c_quotation.
          ls_approver-approval_description = '1st Approval'.
          ls_approver-approval_index = 1.
          ls_approver-approval_branch = 1.
    *      ls_approval_agent-initial_index = 1.
          ls_approver-approval_agent = 'USMANAGER11'.
          ls_approver-name = 'Karina Manager11'.
    *      ls_approval_agent-approval_state = c_wf_not_instanced.
          APPEND ls_approver TO lt_approver.
          ls_approver-approval_index = 1.
          ls_approver-approval_branch = 1.
    *      ls_approval_agent-initial_index = 1.
          ls_approver-approval_agent = 'USMANAGER10'.
          ls_approver-name = 'Armin Manager10'.
    *      ls_approval_agent-approval_state = c_wf_not_instanced.
          APPEND ls_approver TO lt_approver.
          ls_approver-approval_description = '2nd Approval'.
          ls_approver-approval_index = 2.
          ls_approver-approval_branch = 1.
    *      ls_approval_agent-initial_index = 2.
          ls_approver-approval_agent = 'USMANAGER44'.
          ls_approver-name = 'Paola Manager44'.
    *      ls_approval_agent-approval_state = c_wf_not_instanced.
          APPEND ls_approver TO lt_approver.
          ls_approver-approval_description = '3rd Approval'.
          ls_approver-approval_index = 3.
          ls_approver-approval_branch = 1.
    *      ls_approval_agent-initial_index = 2.
          ls_approver-approval_agent = 'USMANAGER2'.
          ls_approver-name = 'Arnold Manager2'.
    *      ls_approval_agent-approval_state = c_wf_not_instanced.
          APPEND ls_approver TO lt_approver.
          approval_table[]      = lt_approver[].
      ENDCASE.
    Hope this will help.
    Please reward suitable points, incase it suits your requirements.
    Regards
    - Atul

  • Using ldap Network Management Functions how to get nested groups that are members of a parent group

    Using NetLocalGetMembers() I can get the users withing a group
    Using NetUserGetGroups() I can get the groups a user is part of.
    However, I cant find a function that will list the GROUPS that are part of another group.
    I have a group called APP_ADMIN,  it has user1, user2 and also groups ADMIN_GRP_A and ADMIN_GROUP_B
    I need a function to return ADMIN_GROUP_A, ADMIN_GOUP_B if I pass in APP_ADMIN
    or Alternativly, given ADMIN_GROUP_A give me its parent group (APP_ADMIN)
    I am writing a C++  dll that accesses these functions.

    Hi,
    Plz check this link.
    http://gallery.technet.microsoft.com/scriptcenter/Get-nested-group-15f725f2
    Ashish Gaur

  • Shoppin cart getting approve after rejection in BADI WF

    Hi all,
    I am using Item level SC Approval WF WS1450000015.
    When The SC is being rejected its getting approved. And the Status at the header level is coming as approved and item level atatus is Rejected.
    Has anybody else has faced this prob?
    Any suggestion will help.
    No body got this bugg??
    Regards,
    Edited by: Rahul Azi on May 30, 2008 8:18 PM

    Hi Raj,
    > can you tell me the steps to investigate the agent determination and mail send function in workflow.
    Check the Following Links:-
    /people/sapna.modi/blog/2007/02/19/workflows-for-dummies--introductionpart-i
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/572614f6ca11d1952e0000e82dec10/frameset.htm
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
    http://****************/Tutorials/Workflow/Workflow.htm
    Regards,
    Kanika..:-)

  • ORA-2001:The approver group Process MFG Approvals has dynamic query in wron

    ERROR ORA-2001:The approver group Process MFG Approvals has dynamic query in
    wrong format in 11i
    We are setting up the Approver Group 'Process MFG
    Approvals" using a dynamic query, like:
    SELECT PAPF.EMPLOYEE_NUMBER
    FROM PER_ALL_PEOPLE_F PAPF,
    fnd_lookup_values FLV
    WHERE FLV.MEANING=PAPF.EMPLOYEE_NUMBER
    AND lookup_type='SUG_SAMPLE_NOTIFICATION'
    AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
    AND FLV.LOOKUP_CODE= (SELECT GME.PLANT_CODE FROM GME_BATCH_HEADER GME WHERE
    GME.BATCH_ID=:transactionId)
    - Above query is passing the validation action from within the setup screen.
    - However, when this approver group is being invoked via Sample Creation
    workflow, there is following error raised:
    ORA-20001:The approver group Process MFG Approvals has dynamic query in
    wrong format
    More, if user is trying to use a more simple query like:
    select distinct person_id from PER_ALL_PEOPLE_F where full_name = 'Mr.
    Oliverking G' we are getting same error
    Any idea, plse, would be gretaly apprciated.
    txs
    Peter

    Hi,
    You need to prefix the value with a text string which indicates what kind of value you are returning.
    E.g. if you are returning a user ID, prefix the value with 'user_id:'; if you are returning a person ID, then prefix it with 'person_id:'
    There is an article on my blog about creating a dynamic approval group in AME as part 5 in the series on AME: http://www.workflowfaq.com/ame-part-five-defining-a-dynamic-approval-group
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Passing item id based on checkbox selection in sharepoint library

    Seeking help on how to pass item id via query string into InfoPath form webpart (via connector)
    I have the infopath webpart form and query string all set up and the url works when I provide the value required for the field
    My problem is, the value will be driven by the user based on them selecting the checkbox next to the document in the library
    Its then actioned through them selecting the quickstep button I have set up in the ribbon which has the url in it
    The url I have set up is: http: / / test.abc.com.au/sites/abcd/Lists/NEW FEEDBACK/newform.aspx?title=blah
    'title' is what the string is detecting and blah is what is being pulled through to the form
    Any ideas?
    Tom.

    Here is how you get selected items using JavaScript client object model:
    var context = SP.ClientContext.get_current();
    var selectedItems = SP.ListOperation.Selection.getSelectedItems(context);
    var itemIds = "";
        for (var i = 0; i < selectedItems.length; i++) {
            itemIds += selectedItems[i].id + ",";
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Get approver details in doc check

    Is there any way to get the current approver and corresponding item guid determined by the system in doc check badi?

    Hi Saravanan,
    I am getting the approvers in the method GET_APPROVERS_BY_AREA_GUID via Z class which is a copy of /SAPSRM/CL_IM_WF_RR_CCTR_SC
    Now in this method I am getting the approver details from ECC, if no approver details is found I want to throw a error in the SC saying no approvers found. Since I could not pass any error message via that method I wanted to implement a check in doc_check badi if there is an approver against a line item, if not then it will show error to the user. Instead of calling and using the entire logic again in doc_check badi I wanted to check if any method can be used to retrieve the approver for the item during runtime.

  • Why can't i add playlists to my iPhone from my mac while they are connected? I keep getting the following message "some items (meaning all of them) were not transferred because iTunes match is enabled." This is incredibly frustrating.

    I keep getting the following message "some items (meaning all of them) were not transferred because iTunes match is enabled." when I try to drag and drop a playlist, song, or album to my iPhone. This was NEVER a problem before iTunes match or the last iOS update. So what is the deal? Why can't i just add music to my phone from the mac? There is space on the phone. The only way I have found to get the music i want to the phone is to have it download from the phone. This is not something i want to have to do: go through and manually add every album and recreate a playlist on the phone when its there on the mac. And, even more irritating, since the new update, when the phone is plugged into the mac i can't actually view from the mac what music is on the phone. This is incredibly frustrating and any help would be much appreciated in managing my music libraries for each device.

    Hi,
    You cannot manually manage music with match turned on on your iOS device. If you want to manage music manually, you will need to turn off match on your iPhone.
    Jim

  • Last line item gets changed to first line item for cs01

    HI experts,
               I have writen a BDC for Tcode cs01.
    I am facing a problem in that.If sucppose there are 4 line items,
    the first three line itmes are getting uploaded correctly but the kast line item gets changed to first line item.
    below is part of my code.
    DELETE ADJACENT DUPLICATES FROM T_MAT COMPARING MATNR.
    SORT T_MAT BY MATNR. "HEADER DATA
    SORT T_BOM BY MATNR1. "ITEM DATA
    *CLEAR : COUNTER, ITEM_NO.
    LOOP AT T_MAT INTO W_MAT.
      REFRESH GT_BDCDATA.
      CLEAR   GW_BDCDATA.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR' W_MAT-MATNR.
                                 'lejn44001'.
    perform bdc_field       using 'RC29N-WERKS' W_MAT-PLANT.
                                 '4600'.
    perform bdc_field       using 'RC29N-STLAN' W_MAT-BOM_USAGE.
                                 '1'.
    *perform bdc_field       using 'RC29N-DATUV'
                                 '22.06.2010'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    LOOP AT T_BOM INTO W_BOM WHERE MATNR1 = W_MAT-MATNR.
      cnt = cnt + 1.
      CONCATENATE  '0' CNT INTO VAR.
       ADD 1 TO COUNTER.
       ITEM_NO = 10 * COUNTER.
       OVERLAY ITEM_NO WITH '0000'.
       W_BOM-ITM_NO = ITEM_NO.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSTP(03)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    CONCATENATE 'RC29P-IDNRK(' var ')' INTO new_mark.
    PERFORM bdc_field USING new_mark W_BOM-BOM_COMP.
    clear new_mark.
    CONCATENATE 'RC29P-MENGE(' var ')' INTO new_mark.
    PERFORM bdc_field USING new_mark W_BOM-QTY.
    clear new_mark.
    CONCATENATE 'RC29P-POSTP(' VAR ')' INTO NEW_MARK.
    perform bdc_field USING new_mark W_BOM-ITM_CAT.
    clear new_mark.
    clear VAR.
      ENDLOOP.
    loop at T_BOM INTO W_BOM WHERE MATNR1 = W_MAT-MATNR.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR' V_CNT.
                                 '0010'.
    perform bdc_field       using 'RC29P-IDNRK' W_BOM-BOM_COMP.
                                 'PURCHASECOST'.
    perform bdc_field       using 'RC29P-MENGE' W_BOM-QTY.
                                 '20'.
    perform bdc_field       using 'RC29P-MEINS'
                                  'M'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    V_CNT = V_CNT + 10.
    ENDLOOP.
    CLEAR V_CNT.
      perform screen_data. " IS ALL ABOUT CALLING TRANSACTION......
      ENDLOOP.
    following is The input file format m providing.
    Material     Plant     BOM usage     Item No     Item Cat     BOM component     QUANTITY
    WRJN46106     4600     1     10     z     PURCHASECOST     10
    WRJN46106     4600     1     20     z     SOURCINGCOST     15
    WRJN46106     4600     1     30     z     INVRESERVE     12
    WRJN46106     4600     1     40     Z     INVRESERVE1     20
    in this the first 3 line items are coming correctly but the 4th one gets changed to
    first line item.
    e.g INVRESERVE1 changes to purchasecost.
    plz help.
    Thanks n regards,
    Ashmita singh.

    Hi Suneel,
    I hardly can't believe that. There must be an mistake by your own in the smartform itself. Would you please share some screens or better, the smartform-XML itself. You can pass out everything else and just share the table and a dataset to try this.
    I'm pretty sure that there is something wrong with the settings or even the loop itself. I never faced a problem like that or even heared about such things.
    I would love to have a look inside.
    Before you share it, create a new one with just the table inside and try it with the same data. Perhaps it is just of to much folders or something like that, so the generating comes in trouble.
    Regards
    Florian

  • How to get the groups info for user

    Hi guys i am new to ALUI..
    i am trying to do some enhancement.
    i want to know how to get the information of the users group and the group details using the IDK API?
    Can sombody share some code?

    Hello,
    You are welcome. Here is one way of get what you want:
    1) get all groups id's
    IPortletContext - >IRemoteSession -> IUserManager - > getCurrentUserGroups() -> int []
    2) get details about group
    IRemoteSession.getObjectManager(ObjectClass.UserGroup ) ->
    cycle over int []: {
    IObjectManager -> querySingleObject(comminity id) -> IObjectQueryRow -> getName()
    Because you are going to use PRC and make SOAP calls to portal don't forget setup WS to pass token to portlet (check WS settings)
    Edited by Bryazgin at 05/29/2008 7:48 PM

Maybe you are looking for

  • Hierarchy where a single Child has been assigned to multiple Parents

    Hi BPC guru, I encountered error "Dimension members 30000010 has multiple parents in PARENTH1" when loading GL hierarchy from BW to BPC. This GL account 30000010 is configured to display in both asset(debit) and liabilities(credit) side in ECC. There

  • Ideas for a new product: Combining RMI, JMS, ...

    Hello! I am an experienced Java programmer trying to think of a mid-sized (i.e., less than 10,000 lines of code) project that uses remote computing (RMI and the like) and JMS to create a product that would be of frequent utility. I have some ideas bu

  • How come Verizon keeps installing junk apps on my blackberry?

    I go to remove cheesy games, social networking apps, and other junk that I'll never use, and guess what?  They appear right back on the phone!  Turns out that Verizon is pushing that junk right back on the phone.  Why?  Why can't I choose what softwa

  • Can someone explain this behavior?? (session 0 with htp.init)

    Hi, I've noticed that when you access a page using the Session 0 and that page contains an "htp.init" in a before header process, for some reason the session expires and creates a new one. I made an example on apex.oracle.com, but first let me explai

  • SSD/Library/Preferences/.GlobalPreferences.plist Resets After Editing

    Hello, After editing the SSD/Library/Preferences/.GlobalPreferences.plist to fix an issue with my ColorSync profiles (Unable to change profile on external monitor) I lose the settings when I reboot. Here's a more detailed description. I have an error