on 11-24-2010 4:17 PM
Hello Everyone,
We created a shopping cart in the SRM with one line item and this line item is mix of order and cost center.
SAP requires the cost center and order be separated on line item. So for this we cancel requisition and reissue with item splits. So in this split we have one line item with the order and the other one with the cost center in account assignment of the purchase order.
But we want the permanent solution of this situation. We need hard error to prevent the user mixing cost center and order OR we have to develop a process to handle this situation.
Can you guys advice me on this?
What should I do to prevent this situation?
Regards,
Khushbu.
Hi,
We had the same issue and we put the code in Doc check BADI. Something like below.
CLEAR : t_item, l_temp_cat, l_line_item, l_partner_guid.
l_partner_guid = wa_partner-partner_no.
*-- For each line item
LOOP AT it_item INTO t_item.
CLEAR l_line_item.
l_line_item = sy-tabix.
CHECK t_item-del_ind EQ ' '.
CLEAR t_acc.
*-- Read the first category
READ TABLE it_account INTO t_acc WITH KEY p_guid = t_item-guid
del_ind = ' '.
l_temp_cat = t_acc-acc_cat.
CLEAR t_acc.
*-- Check for category other than the first one
LOOP AT it_account INTO t_acc WHERE p_guid EQ t_item-guid
AND acc_cat NE l_temp_cat
AND del_ind EQ ' '.
*-- If found then populate the error message and exit from the loop
regards,
MRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks everyone for your reply.
@ Masa : We have one line item with order and cost center. So we want just one account assignment object for one line item. So we want to restrict user to select more than one account assignment objects for one line item. So the question is that how can we raise a hard error when user selects more than one account assignment object at shopping cart?
@ Sanjeev : Can you give me the detailed steps to do this?
Thanks,
Khushbu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is the actual error message?
Regards,
Masa
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.