on 12-23-2013 7:49 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.