Thursday, July 21, 2016

COGS query R12 ,COST OF GOODS SOLD, Cogs Query oracle apps 12

COST OF GOODS SOLD
===================

SELECT
a.order_number,
b.line_number
|| '.'
|| b.shipment_number line_number
FROM
apps.oe_order_headers_all a,
apps.oe_order_lines_all b,
--apps.org_organization_definitions c,
--apps.hr_legal_entities d,
apps.mtl_parameters e,
apps.mtl_material_transactions mmt
WHERE
b.line_id = mmt.trx_source_line_id
AND mmt.trx_source_line_id NOT IN
(
SELECT
mmt.trx_source_line_id
FROM
apps.mtl_material_transactions mmt
WHERE
mmt.transaction_type_id = 10008
)
AND mmt.transaction_type_id = 33
AND mmt.organization_id = b.ship_from_org_id
AND a.header_id =b.header_id
--AND b.ship_from_org_id =c.organization_id
--AND c.legal_entity =d.organization_id
--AND c.organization_id =e.organization_id
AND b.ship_from_org_id =e.organization_id
AND e.organization_id ='1472'
--AND b.org_id =c.operating_unit
AND a.org_id =b.org_id
GROUP BY
a.order_number,
b.line_number
|| '.'
|| b.shipment_number

==================================

No comments:

Post a Comment

Types of animations

Animation is a diverse and creative field with a variety of styles that artists and filmmakers use to bring their visions to life. Here are ...