To check low margin while booking the order getting error
Hi All,
Working in EBS Version : 12.2.10
i have requirement to check low margin while booking the order
if it is multiple lines it shows errors
kindly see the screen shot below
this is my below query
(select trunc(scsa_actc_cost(oel.inventory_item_id,oel.org_id) /(1-
to_char((case when (iim.attribute2 in ('SBIN', 'WBIN')) then 25
when (iim.attribute2 not in ('SBIN', 'WBIN')) then 20
end
)) /100),2) sp
from oe_order_lines_all oel, mtl_system_items_b iim
where iim.organization_id = 94
and iim.inventory_item_id = oel.inventory_item_id
and oel.header_id = :line.header_id