DBA Data[Home] [Help]

APPS.CSD_UPDATE_PROGRAMS_PVT dependencies on CSD_REPAIR_JOB_XREF

Line 136: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,

132: );
133:
134: TYPE JOB_COMPLETION_Rec_Type IS RECORD
135: (
136: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,
138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,
140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,

Line 137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,

133:
134: TYPE JOB_COMPLETION_Rec_Type IS RECORD
135: (
136: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,
138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,
140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
141: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,

Line 138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,

134: TYPE JOB_COMPLETION_Rec_Type IS RECORD
135: (
136: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,
138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,
140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
141: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
142: repair_number CSD_REPAIRS.repair_number%type,

Line 139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,

135: (
136: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,
138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,
140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
141: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
142: repair_number CSD_REPAIRS.repair_number%type,
143: promise_date CSD_REPAIRS.promise_date%type,

Line 140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,

136: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,
138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,
140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
141: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
142: repair_number CSD_REPAIRS.repair_number%type,
143: promise_date CSD_REPAIRS.promise_date%type,
144: ro_serial_num CSD_REPAIRS.serial_number%type ,

Line 141: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,

137: wip_entity_id CSD_REPAIR_JOB_XREF.wip_entity_id%type,
138: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
139: allocated_comp_qty CSD_REPAIR_JOB_XREF.quantity_completed%type ,
140: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
141: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
142: repair_number CSD_REPAIRS.repair_number%type,
143: promise_date CSD_REPAIRS.promise_date%type,
144: ro_serial_num CSD_REPAIRS.serial_number%type ,
145: ro_item_id CSD_REPAIRS.inventory_item_id%type ,

Line 157: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,

153: );
154:
155: TYPE JOB_CREATION_Rec_Type IS RECORD
156: (
157: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
158: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
159: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
160: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
161: wip_entity_id WIP_ENTITIES.wip_entity_id%type,

Line 158: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,

154:
155: TYPE JOB_CREATION_Rec_Type IS RECORD
156: (
157: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
158: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
159: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
160: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
161: wip_entity_id WIP_ENTITIES.wip_entity_id%type,
162: wip_entity_name WIP_ENTITIES.wip_entity_name%type,

Line 159: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,

155: TYPE JOB_CREATION_Rec_Type IS RECORD
156: (
157: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
158: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
159: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
160: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
161: wip_entity_id WIP_ENTITIES.wip_entity_id%type,
162: wip_entity_name WIP_ENTITIES.wip_entity_name%type,
163: job_qty WIP_DISCRETE_JOBS.start_quantity%type ,

Line 160: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,

156: (
157: repair_job_xref_id CSD_REPAIR_JOB_XREF.repair_job_xref_id%type,
158: repair_line_id CSD_REPAIR_JOB_XREF.repair_line_id%type,
159: organization_id CSD_REPAIR_JOB_XREF.organization_id%type,
160: allocated_job_qty CSD_REPAIR_JOB_XREF.quantity%type ,
161: wip_entity_id WIP_ENTITIES.wip_entity_id%type,
162: wip_entity_name WIP_ENTITIES.wip_entity_name%type,
163: job_qty WIP_DISCRETE_JOBS.start_quantity%type ,
164: creation_date WIP_DISCRETE_JOBS.creation_date%type

Line 729: -- This cursor gets all the records in csd_repair_job_xref for which

725:
726: -- User defined exception
727: SKIP_RECORD EXCEPTION;
728:
729: -- This cursor gets all the records in csd_repair_job_xref for which
730: -- the completed qty is less than the allocated
731: -- for the given repair line id, 11/9/04: Vijay
732: Cursor REPAIR_JOBS( p_rep_line_id in number )IS
733: SELECT

Line 750: from CSD_REPAIR_JOB_XREF crj,

746: wdj.date_completed,
747: wdj.primary_item_id job_item_id,
748: we.wip_entity_name,
749: mtl.serial_number_control_code
750: from CSD_REPAIR_JOB_XREF crj,
751: CSD_REPAIRS cra,
752: WIP_DISCRETE_JOBS wdj,
753: WIP_ENTITIES we,
754: MTL_SYSTEM_ITEMS mtl

Line 765: -- This cursor gets all the records in csd_repair_job_xref for which

761: and cra.repair_line_id = p_rep_line_id
762: and nvl(wdj.quantity_completed,0) > 0
763: order by crj.wip_entity_id, cra.promise_date;
764:
765: -- This cursor gets all the records in csd_repair_job_xref for which
766: -- the completed qty is less than the allocated
767: -- all records irrespective of rep_line_id 11/9/04: Vijay
768: Cursor REPAIR_JOBS_ALL IS
769: SELECT

Line 786: from CSD_REPAIR_JOB_XREF crj,

782: wdj.date_completed,
783: wdj.primary_item_id job_item_id,
784: we.wip_entity_name,
785: mtl.serial_number_control_code
786: from CSD_REPAIR_JOB_XREF crj,
787: CSD_REPAIRS cra,
788: WIP_DISCRETE_JOBS wdj,
789: WIP_ENTITIES we,
790: MTL_SYSTEM_ITEMS mtl

Line 882: --Get the sum of completed quantity from csd_repair_job_xref

878: Debug('repair_line_id ='||TO_CHAR(job.repair_line_id),l_mod_name,1);
879: Debug('quantity_completed ='||TO_CHAR(job.job_completed_qty),l_mod_name,1);
880: Debug('quantity ='||TO_CHAR(job.job_qty),l_mod_name,1);
881:
882: --Get the sum of completed quantity from csd_repair_job_xref
883: select nvl(sum(quantity_completed),0), count(repair_line_id) ---Added by vijay
884: into l_completed_qty, l_ro_count ----------------------------to put ro count in JC event
885: from csd_repair_job_xref
886: where wip_entity_id = JOB.wip_entity_id;

Line 885: from csd_repair_job_xref

881:
882: --Get the sum of completed quantity from csd_repair_job_xref
883: select nvl(sum(quantity_completed),0), count(repair_line_id) ---Added by vijay
884: into l_completed_qty, l_ro_count ----------------------------to put ro count in JC event
885: from csd_repair_job_xref
886: where wip_entity_id = JOB.wip_entity_id;
887:
888: l_ro_count := nvl(l_ro_Count,0); --Added by vijay to put ro count in JC event
889:

Line 962: -- Update csd_repair_job_xref with qty completed

958: and mt.transaction_action_id = 31 -- Wip Assembly Completion
959: and mut.serial_number = JOB.ro_serial_num
960: and mt.inventory_item_id = JOB.ro_item_id;
961:
962: -- Update csd_repair_job_xref with qty completed
963: update csd_repair_job_xref
964: set quantity_completed = nvl(quantity_completed,0) + 1,
965: object_version_number = object_version_number+1,
966: last_update_date = sysdate,

Line 963: update csd_repair_job_xref

959: and mut.serial_number = JOB.ro_serial_num
960: and mt.inventory_item_id = JOB.ro_item_id;
961:
962: -- Update csd_repair_job_xref with qty completed
963: update csd_repair_job_xref
964: set quantity_completed = nvl(quantity_completed,0) + 1,
965: object_version_number = object_version_number+1,
966: last_update_date = sysdate,
967: last_updated_by = fnd_global.user_id,

Line 1073: csd_repair_job_xref crj

1069: and mt.transaction_source_type_id = 5 -- Job or Schedule
1070: and mt.transaction_action_id = 31 -- Wip Assembly Completion
1071: and mut.serial_number not in (select crh.paramc3
1072: from csd_repair_history crh,
1073: csd_repair_job_xref crj
1074: where crh.repair_line_id = crj.repair_line_id
1075: and crj.wip_entity_id = JOB.wip_entity_id
1076: and crh.event_code = 'JC')
1077: and mut.serial_number not in (Select cra.serial_number

Line 1079: csd_repair_job_xref crj

1075: and crj.wip_entity_id = JOB.wip_entity_id
1076: and crh.event_code = 'JC')
1077: and mut.serial_number not in (Select cra.serial_number
1078: from csd_repairs cra,
1079: csd_repair_job_xref crj
1080: where cra.repair_line_id = crj.repair_line_id
1081: and crj.wip_entity_id = JOB.wip_entity_id
1082: and cra.serial_number is not null)
1083: and rownum = 1;

Line 1085: -- Update csd_repair_job_xref with qty completed

1081: and crj.wip_entity_id = JOB.wip_entity_id
1082: and cra.serial_number is not null)
1083: and rownum = 1;
1084:
1085: -- Update csd_repair_job_xref with qty completed
1086: update csd_repair_job_xref
1087: set quantity_completed = nvl(quantity_completed,0) + 1,
1088: object_version_number = object_version_number+1,
1089: last_update_date = sysdate,

Line 1086: update csd_repair_job_xref

1082: and cra.serial_number is not null)
1083: and rownum = 1;
1084:
1085: -- Update csd_repair_job_xref with qty completed
1086: update csd_repair_job_xref
1087: set quantity_completed = nvl(quantity_completed,0) + 1,
1088: object_version_number = object_version_number+1,
1089: last_update_date = sysdate,
1090: last_updated_by = fnd_global.user_id,

Line 1211: csd_repair_job_xref crj

1207: and mt.transaction_source_type_id = 5 -- Job or Schedule
1208: and mt.transaction_action_id = 31 -- Wip Assembly Completion
1209: and mut.serial_number not in (select crh.paramc3
1210: from csd_repair_history crh,
1211: csd_repair_job_xref crj
1212: where crh.repair_line_id = crj.repair_line_id
1213: and crj.wip_entity_id = JOB.wip_entity_id
1214: and crh.event_code = 'JC')
1215: and rownum = 1;

Line 1217: -- Update csd_repair_job_xref with qty completed

1213: and crj.wip_entity_id = JOB.wip_entity_id
1214: and crh.event_code = 'JC')
1215: and rownum = 1;
1216:
1217: -- Update csd_repair_job_xref with qty completed
1218: update csd_repair_job_xref
1219: set quantity_completed = nvl(quantity_completed,0) + 1,
1220: object_version_number = object_version_number+1,
1221: last_update_date = sysdate,

Line 1218: update csd_repair_job_xref

1214: and crh.event_code = 'JC')
1215: and rownum = 1;
1216:
1217: -- Update csd_repair_job_xref with qty completed
1218: update csd_repair_job_xref
1219: set quantity_completed = nvl(quantity_completed,0) + 1,
1220: object_version_number = object_version_number+1,
1221: last_update_date = sysdate,
1222: last_updated_by = fnd_global.user_id,

Line 1334: -- Update csd_repair_job_xref with qty completed

1330: -- Debug messages
1331: Debug('l_update_Qty ='||TO_CHAR(l_update_Qty),l_mod_name,1);
1332: Debug('l_remaining_qty ='||TO_CHAR(l_remaining_qty),l_mod_name,1);
1333:
1334: -- Update csd_repair_job_xref with qty completed
1335: update csd_repair_job_xref
1336: set quantity_completed = nvl(quantity_completed,0) + NVL(l_update_qty,0),
1337: object_version_number = object_version_number+1,
1338: last_update_date = sysdate,

Line 1335: update csd_repair_job_xref

1331: Debug('l_update_Qty ='||TO_CHAR(l_update_Qty),l_mod_name,1);
1332: Debug('l_remaining_qty ='||TO_CHAR(l_remaining_qty),l_mod_name,1);
1333:
1334: -- Update csd_repair_job_xref with qty completed
1335: update csd_repair_job_xref
1336: set quantity_completed = nvl(quantity_completed,0) + NVL(l_update_qty,0),
1337: object_version_number = object_version_number+1,
1338: last_update_date = sysdate,
1339: last_updated_by = fnd_global.user_id,

Line 1557: -- This cursor gets all the records in csd_repair_job_xref

1553: -- Variable used in FND log
1554: l_error_level number := FND_LOG.LEVEL_ERROR;
1555: l_mod_name varchar2(2000) := 'csd.plsql.csd_update_programs_pvt.job_creation_update';
1556:
1557: -- This cursor gets all the records in csd_repair_job_xref
1558: -- that does not have wip_entity_id.
1559: --Cursor split into two to remove OR condition
1560: -- Vijay 11/9/04
1561: Cursor JOB_CREATION( p_rep_line_id in number )IS

Line 1571: from CSD_REPAIR_JOB_XREF crj,

1567: we.wip_entity_id,
1568: we.wip_entity_name,
1569: wdj.start_quantity job_qty,
1570: wdj.creation_date
1571: from CSD_REPAIR_JOB_XREF crj,
1572: WIP_ENTITIES we,
1573: wip_discrete_jobs wdj
1574: where wdj.wip_entity_id = we.wip_entity_id
1575: and crj.job_name = we.wip_entity_name

Line 1579: -- This cursor gets all the records in csd_repair_job_xref

1575: and crj.job_name = we.wip_entity_name
1576: and crj.organization_id = we.organization_id
1577: and crj.repair_line_id = p_rep_line_id
1578: and crj.wip_entity_id is null;
1579: -- This cursor gets all the records in csd_repair_job_xref
1580: -- that does not have wip_entity_id.
1581: Cursor JOB_CREATION_ALL IS
1582: SELECT
1583: crj.repair_job_xref_id,

Line 1591: from CSD_REPAIR_JOB_XREF crj,

1587: we.wip_entity_id,
1588: we.wip_entity_name,
1589: wdj.start_quantity job_qty,
1590: wdj.creation_date
1591: from CSD_REPAIR_JOB_XREF crj,
1592: WIP_ENTITIES we,
1593: wip_discrete_jobs wdj
1594: where wdj.wip_entity_id = we.wip_entity_id
1595: and crj.job_name = we.wip_entity_name

Line 1628: -- When Jobs are created from the UI, a record is inserted in csd_repair_job_xref

1624: -- Keeping the running total of the records
1625: -- for commiting purpose
1626: l_count := 0;
1627:
1628: -- When Jobs are created from the UI, a record is inserted in csd_repair_job_xref
1629: -- with the job name. Once the WIP Job is created in wip_discrete_jobs
1630: -- then the update program will find the wip_entity_id and update it.
1631: -- Also it updates the quantity_in_wip in the csd_repairs with Job start quantity
1632: --

Line 1634: -- CSD_REPAIR_JOB_XREF

1630: -- then the update program will find the wip_entity_id and update it.
1631: -- Also it updates the quantity_in_wip in the csd_repairs with Job start quantity
1632: --
1633: -- When the WIP Job is submitted from the UI, the record would look as follows:
1634: -- CSD_REPAIR_JOB_XREF
1635: -- Repair Job Repair Order Allocated Qty Job Name Job Qty Wip_entity_ID
1636: -- RJ1 R1 1 JOB1 3
1637: -- RJ2 R2 1 JOB1 3
1638: -- RJ3 R3 1 JOB1 3

Line 1641: -- CSD_REPAIR_JOB_XREF

1637: -- RJ2 R2 1 JOB1 3
1638: -- RJ3 R3 1 JOB1 3
1639: --
1640: -- After Running the Update Program the record would look as follows:
1641: -- CSD_REPAIR_JOB_XREF
1642: -- Repair Job Repair Order Allocated Qty Job Name Job Qty Wip_entity_ID
1643: -- RJ1 R1 1 JOB1 3 1121
1644: -- RJ2 R2 1 JOB1 3 1121
1645: -- RJ3 R3 1 JOB1 3 1121

Line 1709: -- Updating csd_repair_job_xref with the wip_entity_id

1705: Debug('LOG_ACTIVITY api failed ',l_mod_name,4);
1706: RAISE FND_API.G_EXC_ERROR;
1707: END IF;
1708:
1709: -- Updating csd_repair_job_xref with the wip_entity_id
1710: Update csd_repair_job_xref
1711: set wip_entity_id = K.wip_entity_id,
1712: object_version_number = object_version_number+1,
1713: last_update_date = sysdate,

Line 1710: Update csd_repair_job_xref

1706: RAISE FND_API.G_EXC_ERROR;
1707: END IF;
1708:
1709: -- Updating csd_repair_job_xref with the wip_entity_id
1710: Update csd_repair_job_xref
1711: set wip_entity_id = K.wip_entity_id,
1712: object_version_number = object_version_number+1,
1713: last_update_date = sysdate,
1714: last_updated_by = fnd_global.user_id,