DBA Data[Home] [Help]

APPS.CS_SPLIT_REPAIRS dependencies on CS_REPAIRS

Line 15: x_total_quantity quantity_received in CS_REPAIRS table.

11: x_user_id user who performed the split
12: x_repair_line_id repair line that is being split
13: x_first_quantity user-defined quantity. Null if the user
14: has indicated split into quantities of 1 each
15: x_total_quantity quantity_received in CS_REPAIRS table.
16:
17: How it works:
18: If we have to split into multiple quantites of 1 each (x_first_quantity
19: is NULL).

Line 24: Get the next repair_line_id from cs_repairs_s

20:
21: 1. The repair record is updated with quantity_received = 1 and
22: a history is written with a status of SPLIT.
23: 2. LOOP from 1 to (x_total_quantity - 1)
24: Get the next repair_line_id from cs_repairs_s
25: Insert into cs_repairs (quantity_received=1) by setting all
26: other columns the same as in the original repair line
27: Insert repair history records.
28:

Line 25: Insert into cs_repairs (quantity_received=1) by setting all

21: 1. The repair record is updated with quantity_received = 1 and
22: a history is written with a status of SPLIT.
23: 2. LOOP from 1 to (x_total_quantity - 1)
24: Get the next repair_line_id from cs_repairs_s
25: Insert into cs_repairs (quantity_received=1) by setting all
26: other columns the same as in the original repair line
27: Insert repair history records.
28:
29: If we have to split into 2 lines with user_defined quantities

Line 32: 2. Get the next repair_line_id from cs_repairs_s

28:
29: If we have to split into 2 lines with user_defined quantities
30: 1. The original repair record is updated with quantity_received =
31: x_first_quantity and history is written indicating the split.
32: 2. Get the next repair_line_id from cs_repairs_s
33: 3. Insert into cs_repairs (quantity_received = x_total_quantity -
34: x_first_quantity)
35: 4. Insert history records.
36: */

Line 33: 3. Insert into cs_repairs (quantity_received = x_total_quantity -

29: If we have to split into 2 lines with user_defined quantities
30: 1. The original repair record is updated with quantity_received =
31: x_first_quantity and history is written indicating the split.
32: 2. Get the next repair_line_id from cs_repairs_s
33: 3. Insert into cs_repairs (quantity_received = x_total_quantity -
34: x_first_quantity)
35: 4. Insert history records.
36: */
37:

Line 54: UPDATE cs_repairs

50: /* Insert a history record to indicate the split */
51:
52: IF (X_first_quantity IS NULL) THEN
53:
54: UPDATE cs_repairs
55: SET quantity_received = 1
56: where repair_line_id = X_repair_line_id;
57:
58: INSERT INTO cs_repair_history

Line 128: SELECT cs_repairs_s.nextval

124: /* original repair line. */
125:
126: FOR split_lines in 1..(X_total_quantity - 1) LOOP
127:
128: SELECT cs_repairs_s.nextval
129: INTO new_line_id
130: FROM dual;
131:
132: SELECT to_number(cs_repair_number_s.nextval)

Line 135: INSERT INTO cs_repairs

131:
132: SELECT to_number(cs_repair_number_s.nextval)
133: INTO new_repair_number
134: FROM dual;
135: INSERT INTO cs_repairs
136: (
137: repair_line_id,
138: last_update_date,
139: last_updated_by,

Line 270: FROM cs_repairs

266: diagnosis_id,
267: diagnosed_by_id,
268: job_completion_date,
269: promised_delivery_date
270: FROM cs_repairs
271: WHERE repair_line_id = X_repair_line_id;
272:
273: /* Insert history records for the new lines */
274:

Line 349: UPDATE cs_repairs

345: First update the quantity in the existing record to first quantity
346: Insert a history record to indicate the split
347: */
348:
349: UPDATE cs_repairs
350: SET quantity_received = x_first_quantity
351: where repair_line_id = X_repair_line_id;
352:
353: INSERT INTO cs_repair_history

Line 422: SELECT cs_repairs_s.nextval

418: /* Insert a repair line with the total_quantity - first_quantity */
419:
420: /* dbms_output.put_line('New repair record'); */
421:
422: SELECT cs_repairs_s.nextval
423: INTO new_line_id
424: FROM dual;
425:
426: SELECT to_number(cs_repair_number_s.nextval)

Line 430: INSERT INTO cs_repairs

426: SELECT to_number(cs_repair_number_s.nextval)
427: INTO new_repair_number
428: FROM dual;
429:
430: INSERT INTO cs_repairs
431: (
432: repair_line_id,
433: last_update_date,
434: last_updated_by,

Line 565: FROM cs_repairs

561: diagnosis_id,
562: diagnosed_by_id,
563: job_completion_date,
564: promised_delivery_date
565: FROM cs_repairs
566: WHERE repair_line_id = X_repair_line_id;
567:
568: /* Insert history records for the new line */
569: