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

Limit PO Confirmation workflow

Hi Experts,


We are in SRM 7.02, ECC 6.0 EHP 7. We have recently enabled Process Controlled workflow for Limit PO Confirmations.


Conditions to trigger the workflow is if account assignment is changed while doing the limit PO confirmation from SRM, system should pick the newly introduced cost object owner. So far for a single account assignment everything is working fine. But if i create a limit PO with split account assignment for two different cost centers then while doing the limit confirmation system is still picking the approvals even if there is no changes in the confirmation account assignment. So, when we checked the relation between the PO account assignment and Confirmation account assignment, there is no relation to match the GUID or etc to figure out what is different from PO account assignment and confirmation account assignment. Due to that, as per the code, when the loop is executed on Account Assignment line 1 in confirmation, it is comparing both the cost centers of PO Account Assignment and since Accounting line 2 cost center is different from line 1 cost center system is triggering the approval and the same vice versa when the validation is happening for accounting line 2. Kindly assist on the same how to proceed further in case of split account assignment. I am attaching the custom code implemented for your reference.

Regards,

Manoj

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 03, 2014 at 05:47 PM

    Hello,

    try with this code:

      LOOP AT it_item_conf INTO wa_item_conf WHERE del_ind IS INITIAL
    READ TABLE it_item_po INTO wa_item_po WITH KEY be_object_type = wa_item_conf-be_refobj
    number_int = wa_item_conf-be_refobj_item
    itm_type = lc_limi
    del_ind = space.

    IF sy-subrc EQ 0.
    LOOP AT it_acc_po INTO wa_acc_po WHERE p_guid = wa_item_po-guid
    AND del_ind IS INITIAL.
    READ TABLE it_acc_conf INTO wa_acc_conf WITH KEY p_guid = wa_item_conf-guid
    acc_no = wa_acc_po-acc_no
    del_ind = space.

    IF sy-subrc EQ 0.
    IF wa_acc_conf-acc_cat NE wa_acc_po-acc_cat.
    rv_approval_reqd = lc_x.
    ENDIF.

    CASE wa_acc_conf-acc_cat.
    WHEN lc_cc.
    IF wa_acc_conf-cost_ctr NE wa_acc_po-cost_ctr.
    v_approval_reqd = lc_x.
    ENDIF.

    WHEN lc_wbs.
    IF wa_acc_conf-wbs_elem_e NE wa_acc-zprofit_ctr.
    v_approval_reqd = lc_x.
    ENDIF.

    WHEN lc_pc.
    IF wa_acc_conf-zprofit_ctr NE wa_acc-zprofit_ctr.
    v_approval_reqd = lc_x.
    ENDIF.

    ENDCASE.

    CLEAR wa_acc_conf.
    ENDIF.

    CLEAR wa_acc_po.
    ENDLOOP.

    CLEAR wa_item_po.
    ENDIF.

    CLEAR wa_item_conf.
    ENDLOOP.

    Regards.

    Laurent.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

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

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