77: where organization_code = p_org_code and
78: partner_type = 3 and
79: company_id is null;
80:
81: INSERT INTO MSC_PLANNING_ORGS(
82: SR_INSTANCE_ID,
83: ORGANIZATION_ID,
84: SOURCE_LOCATIONS)
85: VALUES (p_sr_instance_id,
91: else
92: p_org_id := null;
93: p_sr_instance_id := null;
94:
95: INSERT INTO MSC_PLANNING_ORGS(
96: SR_INSTANCE_ID,
97: ORGANIZATION_ID,
98: SOURCE_LOCATIONS)
99: SELECT SR_INSTANCE_ID,
103: WHERE PARTNER_TYPE = 3;
104:
105: end if;
106:
107: insert into msc_planning_orgs (
108: ship_to_site_id,
109: source_locations)
110: select distinct map.tp_key,
111: 2