MSC_ATP_LANE_ITEM_V
Details
-
Schema: FUSION
-
Object owner: MSC
-
Object type: VIEW
Columns
Name |
---|
RECEIPT_ORG REC_LOCATION_ID INVENTORY_ITEM_ID SOURCING_RULE_ID SOURCE_ORGANIZATION_ID SOURCE_PARTNER_ID SOURCE_PARTNER_SITE_ID SRC_LOCATION_ID ALLOCATION_PERCENT RANK TRANSPORTMODE FULL_LEAD_TIME CARRIER_ID MODE_OF_TRANSPORT SERVICE_LEVEL SR_SOURCE_ID SOURCE_TYPE |
Query
SQL_Statement |
---|
SELECT DISTINCT asg.organization_id receipt_org, asg.organization_id rec_location_id, asg.inventory_item_id, asg.sourcing_rule_id, src.source_organization_id, src.source_partner_id, src.source_partner_site_id, decode(src.source_type,3,src.source_partner_id || ':' || src.source_partner_site_id, src.source_organization_id) src_location_id, src.allocation_percent, src.rank, decode(src.carrier_id || ':' || src.mode_of_transport || ':' || src.service_level,'::',to_char(null), src.carrier_id || ':' || src.mode_of_transport || ':' || src.service_level) transportMode, asg.full_lead_time, src.carrier_id, src.mode_of_transport, src.service_level, src.sr_source_id, src.source_type FROM msc_atp_sourcing_assign_v asg, msc_sourcing_rules msr, msc_sr_receipt_org rec, msc_sr_source_org src WHERE msr.sourcing_rule_id = asg.sourcing_rule_id AND msr.collected_flag <> -1 AND rec.sourcing_rule_id = msr.sourcing_rule_id AND rec.collected_flag <> -1 AND src.sr_receipt_id = rec.sr_receipt_id AND EXISTS ( SELECT 'X' FROM MSC_ATP_RULE_V items where items.inventory_item_id = asg.inventory_item_id and (src.source_organization_id is null OR items.organization_id = src.source_organization_id)) |