DBA Data[Home] [Help]

APPS.CSD_REPAIR_MANAGER_UTIL dependencies on CSD_REPAIRS

Line 107: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,

103: end if;
104:
105: end prepare_error_message_table;
106:
107: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
108: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type);
109:
110: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
111: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type)

Line 108: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type);

104:
105: end prepare_error_message_table;
106:
107: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
108: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type);
109:
110: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
111: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type)
112: is

Line 110: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,

106:
107: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
108: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type);
109:
110: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
111: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type)
112: is
113: begin
114:

Line 111: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type)

107: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
108: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type);
109:
110: procedure get_repln_rec(l_interface_rec IN csd_repairs_interface%rowtype,
111: lx_repln_rec OUT NOCOPY csd_repairs_pub.repln_rec_type)
112: is
113: begin
114:
115: lx_repln_rec.REPAIR_NUMBER := l_interface_rec.REPAIR_NUMBER;

Line 215: from csd_repairs_interface

211:
212: -- get the repair line ids
213: select repair_line_id
214: bulk collect into l_repair_line_ids
215: from csd_repairs_interface
216: where group_id = p_group_id
217: and processing_phase = 2;
218:
219: if l_repair_line_ids.count > 0 then

Line 222: from csd_repairs cr,

218:
219: if l_repair_line_ids.count > 0 then
220: select cr.repair_number,cs.incident_number,cr.serial_number,csi.instance_number
221: bulk collect into l_repair_numbers,l_incident_numbers,l_serial_numbers,l_instance_numbers
222: from csd_repairs cr,
223: cs_incidents_all_b cs,
224: csi_item_instances csi
225: where cr.incident_id = cs.incident_id
226: and cr.repair_line_id in

Line 255: p_repln_tbl IN csd_repairs_pub.repln_tbl_type,

251:
252: PROCEDURE create_internal_orders(p_api_version IN NUMBER,
253: p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
254: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
255: p_repln_tbl IN csd_repairs_pub.repln_tbl_type,
256: p_repair_line_ids IN JTF_NUMBER_TABLE,
257: x_return_status OUT NOCOPY VARCHAR2,
258: x_msg_count OUT NOCOPY NUMBER,
259: x_msg_data OUT NOCOPY VARCHAR2)

Line 598: csd_repairs cr ,

594:
595: SELECT to_number('1')
596: into l_aging_threshold
597: FROM csd_aging_thresholds_b cat,
598: csd_repairs cr ,
599: (select * from csd_repair_history
600: where repair_line_id = p_repair_line_id and event_code = 'SC') crh ,
601: csd_flow_statuses_b cfs
602: WHERE cat.inventory_item_id = p_inventory_item_id

Line 613: FROM csd_repairs

609: AND cr.flow_status_id = cfs.flow_status_id
610: AND cfs.flow_status_code = DECODE(crh.event_code,'SC',crh.paramc1,cfs.flow_status_code)
611: AND DECODE(cat.flow_status_id, NULL,
612: (SELECT SYSDATE-creation_date
613: FROM csd_repairs
614: WHERE repair_line_id = cr.repair_line_id
615: ), DECODE(crh.paramc1, NULL,
616: (SELECT SYSDATE-creation_date
617: FROM csd_repairs

Line 617: FROM csd_repairs

613: FROM csd_repairs
614: WHERE repair_line_id = cr.repair_line_id
615: ), DECODE(crh.paramc1, NULL,
616: (SELECT SYSDATE-creation_date
617: FROM csd_repairs
618: WHERE repair_line_id = cr.repair_line_id
619: AND flow_status_id = cat.flow_status_id -- bug#8972971, subhat
620: ),
621: (SELECT SYSDATE - crh1.creation_date

Line 650: csd_repairs cr ,

646: );*/
647: SELECT to_number('1')
648: INTO l_aging_threshold
649: FROM csd_aging_thresholds_b cat,
650: csd_repairs cr ,
651: (select * from csd_repair_history
652: where repair_line_id = p_repair_line_id and event_code = 'SC') crh,
653: csd_flow_statuses_b cfs
654: WHERE cat.inventory_org_id = p_organization_id

Line 671: FROM csd_repairs

667: AND cr.flow_status_id = cfs.flow_status_id
668: AND cfs.flow_status_code = DECODE(crh.event_code,'SC',crh.paramc1,cfs.flow_status_code)
669: AND DECODE(cat.flow_status_id, NULL,
670: (SELECT SYSDATE-creation_date
671: FROM csd_repairs
672: WHERE repair_line_id = cr.repair_line_id
673: ), DECODE(crh.paramc1, NULL,
674: (SELECT SYSDATE-creation_date
675: FROM csd_repairs

Line 675: FROM csd_repairs

671: FROM csd_repairs
672: WHERE repair_line_id = cr.repair_line_id
673: ), DECODE(crh.paramc1, NULL,
674: (SELECT SYSDATE-creation_date
675: FROM csd_repairs
676: WHERE repair_line_id = cr.repair_line_id
677: AND flow_status_id = cat.flow_status_id -- bug#8972971, subhat
678: ),
679: (SELECT SYSDATE - crh1.creation_date

Line 735: TYPE l_repln_rec_tbl_type is table of Csd_Repairs_Pub.REPLN_Rec_Type

731: IS
732:
733: l_api_version_number constant number := 1.0;
734: l_api_name constant varchar2(100) := 'CSD_REPAIR_MANAGER_UTIL.MASS_UPDATE_REPAIR_ORDERS';
735: TYPE l_repln_rec_tbl_type is table of Csd_Repairs_Pub.REPLN_Rec_Type
736: index by binary_integer;
737: l_repln_rec_tbl l_repln_rec_tbl_type;
738: l_repobj_ver JTF_NUMBER_TABLE := p_ro_obj_ver_nos;
739: --l_repair_line_ids JTF_NUMBER_TABLE;

Line 827: if NOT csd_repairs_pvt.is_flwsts_update_allowed

823:
824: FOR J in 1 ..p_repair_line_ids.COUNT
825: LOOP
826: if p_to_ro_status is not null then
827: if NOT csd_repairs_pvt.is_flwsts_update_allowed
828: (p_repair_type_id => p_orig_ro_type_ids(j),
829: p_from_flow_status_id => p_from_ro_status(j) ,
830: p_to_flow_status_id => p_to_ro_status,
831: p_responsibility_id => FND_GLOBAL.RESP_ID)

Line 849: csd_repairs_pvt.update_flow_status

845: IF (Fnd_Log.LEVEL_PROCEDURE >= Fnd_Log.G_CURRENT_RUNTIME_LEVEL) THEN
846: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, l_api_name,
847: 'Call update flow status API to update the status');
848: END IF;
849: csd_repairs_pvt.update_flow_status
850: ( p_api_version => 1.0,
851: p_commit => p_commit,
852: p_init_msg_list => p_init_msg_list,
853: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 899: if NOT csd_repairs_pvt.is_rt_update_allowed

895: end if; -- end ro status is not null
896:
897: -- repair type update
898: if p_ro_type_id is not null then
899: if NOT csd_repairs_pvt.is_rt_update_allowed
900: (p_from_repair_type_id => p_orig_ro_type_ids(j),
901: p_to_repair_type_id => p_ro_type_id,
902: p_common_flow_status_id => p_from_ro_status(j),
903: p_responsibility_id => fnd_global.resp_id)

Line 923: csd_repairs_pvt.update_repair_type

919: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, l_api_name,
920: 'Call update repair type API to update the status');
921: END IF;
922:
923: csd_repairs_pvt.update_repair_type
924: ( p_api_version => 1.0,
925: p_commit => p_commit,
926: p_init_msg_list => p_init_msg_list,
927: p_validation_level => fnd_api.g_valid_level_full,

Line 1014: csd_repairs_pvt.update_repair_order

1010: IF (Fnd_Log.LEVEL_PROCEDURE >= Fnd_Log.G_CURRENT_RUNTIME_LEVEL) THEN
1011: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, l_api_name,
1012: 'Call update repair order API');
1013: END IF;
1014: csd_repairs_pvt.update_repair_order
1015: (p_api_version_number => 1.0,
1016: p_init_msg_list => p_init_msg_list,
1017: p_commit => p_commit,
1018: p_validation_level => Fnd_Api.G_VALID_LEVEL_FULL,

Line 1400: 'CSD_REPAIRS', -- bug#9908690, subhat

1396: l_user_id,
1397: l_user_id,
1398: 5,
1399: --'Csd_RepairLineId',
1400: 'CSD_REPAIRS', -- bug#9908690, subhat
1401: p_repair_line_ids(i),
1402: null,
1403: null,
1404: null,

Line 1466: l_repln_tbl csd_repairs_pub.repln_tbl_type;

1462: IS
1463: l_api_version_number number := 1.0;
1464: lc_api_name constant varchar2(100) := 'CSD_REPAIR_MANAGER_UTIL.MASS_CREATE_REPAIR_ORDERS';
1465:
1466: l_repln_tbl csd_repairs_pub.repln_tbl_type;
1467:
1468: x_repair_line_id number;
1469: l_sr_rec sr_rec_type;
1470: l_repair_line_ids JTF_NUMBER_TABLE := JTF_NUMBER_TABLE();

Line 1553: /* csd_repairs_interface table. The API does minimal validation and then */

1549:
1550: /******************************************************************************/
1551: /* Procedure Name: mass_create_repair_orders_cp */
1552: /* Description: The concurrent wrapper to process the records from */
1553: /* csd_repairs_interface table. The API does minimal validation and then */
1554: /* calls create_sr_repair_order in a loop. */
1555: /******************************************************************************/
1556: procedure mass_create_repair_orders_cp(errbuf out nocopy varchar2,
1557: retcode out nocopy varchar2,

Line 1563: --l_interface_rec_type csd.csd_repairs_interface%rowtype;

1559: p_group_id in number
1560: )
1561: is
1562: lc_api_name varchar2(100) := 'csd_repair_manager_util.mass_create_repair_orders_cp';
1563: --l_interface_rec_type csd.csd_repairs_interface%rowtype;
1564: type l_interface_tbl_type is table of csd_repairs_interface%rowtype index by binary_integer;
1565: --type repln_tbl_type is table of csd_repairs_pub.repln_rec_type;
1566: l_repln_tbl csd_repairs_pub.repln_tbl_type;
1567: l_interface_tbl l_interface_tbl_type;

Line 1564: type l_interface_tbl_type is table of csd_repairs_interface%rowtype index by binary_integer;

1560: )
1561: is
1562: lc_api_name varchar2(100) := 'csd_repair_manager_util.mass_create_repair_orders_cp';
1563: --l_interface_rec_type csd.csd_repairs_interface%rowtype;
1564: type l_interface_tbl_type is table of csd_repairs_interface%rowtype index by binary_integer;
1565: --type repln_tbl_type is table of csd_repairs_pub.repln_rec_type;
1566: l_repln_tbl csd_repairs_pub.repln_tbl_type;
1567: l_interface_tbl l_interface_tbl_type;
1568: l_sr_tbl sr_tbl_type;

Line 1565: --type repln_tbl_type is table of csd_repairs_pub.repln_rec_type;

1561: is
1562: lc_api_name varchar2(100) := 'csd_repair_manager_util.mass_create_repair_orders_cp';
1563: --l_interface_rec_type csd.csd_repairs_interface%rowtype;
1564: type l_interface_tbl_type is table of csd_repairs_interface%rowtype index by binary_integer;
1565: --type repln_tbl_type is table of csd_repairs_pub.repln_rec_type;
1566: l_repln_tbl csd_repairs_pub.repln_tbl_type;
1567: l_interface_tbl l_interface_tbl_type;
1568: l_sr_tbl sr_tbl_type;
1569: l_dummy varchar2(1);

Line 1566: l_repln_tbl csd_repairs_pub.repln_tbl_type;

1562: lc_api_name varchar2(100) := 'csd_repair_manager_util.mass_create_repair_orders_cp';
1563: --l_interface_rec_type csd.csd_repairs_interface%rowtype;
1564: type l_interface_tbl_type is table of csd_repairs_interface%rowtype index by binary_integer;
1565: --type repln_tbl_type is table of csd_repairs_pub.repln_rec_type;
1566: l_repln_tbl csd_repairs_pub.repln_tbl_type;
1567: l_interface_tbl l_interface_tbl_type;
1568: l_sr_tbl sr_tbl_type;
1569: l_dummy varchar2(1);
1570: l_continue_further boolean := true;

Line 1595: update csd_repairs_interface set transaction_id = csd_repairs_interface_s2.nextval

1591: 'Begin processing for group_id ='||p_group_id||' p_one_sr_per_group '||p_one_sr_per_group);
1592: END IF;
1593:
1594: -- we will generate the transaction ids to identify each row.
1595: update csd_repairs_interface set transaction_id = csd_repairs_interface_s2.nextval
1596: where group_id = p_group_id;
1597:
1598: select *
1599: bulk collect into l_interface_tbl

Line 1600: from csd_repairs_interface

1596: where group_id = p_group_id;
1597:
1598: select *
1599: bulk collect into l_interface_tbl
1600: from csd_repairs_interface
1601: where group_id = p_group_id
1602: and processing_phase = 1;
1603:
1604: -- mark all the records as in progress for this group.

Line 1606: update csd_repairs_interface set processing_phase = 2

1602: and processing_phase = 1;
1603:
1604: -- mark all the records as in progress for this group.
1605:
1606: update csd_repairs_interface set processing_phase = 2
1607: where group_id = p_group_id;
1608:
1609: -- we will commit the changes here. So that any subsequent reads will not pick up these records.
1610: commit;

Line 1636: update csd_repairs_interface set processing_phase = 3

1632: l_sr_tbl(i).create_sr_flag := 'N';
1633: exception
1634: when no_data_found then
1635: -- the passed incident id is invalid. skip the record.
1636: update csd_repairs_interface set processing_phase = 3
1637: where transaction_id = l_interface_tbl(i).transaction_id;
1638: l_continue_further := false;
1639: end;
1640:

Line 1645: update csd_repairs_interface set processing_phase = 3

1641: elsif l_interface_tbl(i).sr_incident_id is null then
1642: if not (l_interface_tbl(i).sr_account_id is not null and
1643: l_interface_tbl(i).sr_party_id is not null ) then
1644: -- not enough data to create a new SR. So we cannot create RO for this rec.
1645: update csd_repairs_interface set processing_phase = 3
1646: where transaction_id = l_interface_tbl(i).transaction_id;
1647: l_continue_further := false;
1648: else
1649: l_sr_tbl(i).sr_account_id := l_interface_tbl(i).sr_account_id;

Line 1679: update csd_repairs_interface set processing_phase = 3

1675: and organization_id = fnd_profile.value('CSD_DEF_REP_INV_ORG');
1676: end if;
1677: else
1678: -- the record is not eligible for the RO creation.
1679: update csd_repairs_interface set processing_phase = 3
1680: where transaction_id = l_interface_tbl(i).transaction_id;
1681: end if;
1682: end if;
1683: -- Create the SR, RO and product transaction lines.

Line 1702: update csd_repairs_interface set processing_phase = 4

1698: p_external_reference => l_interface_tbl(i).external_reference,
1699: p_lot_num => l_interface_tbl(i).lot_number
1700: );
1701: if x_return_status <> fnd_api.g_ret_sts_success then
1702: update csd_repairs_interface set processing_phase = 4
1703: where transaction_id = l_interface_tbl(i).transaction_id;
1704: else
1705: update csd_repairs_interface set incident_id = x_incident_id,repair_line_id = x_repair_line_id
1706: where transaction_id = l_interface_tbl(i).transaction_id;

Line 1705: update csd_repairs_interface set incident_id = x_incident_id,repair_line_id = x_repair_line_id

1701: if x_return_status <> fnd_api.g_ret_sts_success then
1702: update csd_repairs_interface set processing_phase = 4
1703: where transaction_id = l_interface_tbl(i).transaction_id;
1704: else
1705: update csd_repairs_interface set incident_id = x_incident_id,repair_line_id = x_repair_line_id
1706: where transaction_id = l_interface_tbl(i).transaction_id;
1707:
1708:
1709: if p_one_sr_per_group <> 'Y' then

Line 1734: delete from csd_repairs_interface where

1730:
1731: -- write the concurrent program output.
1732: write_cp_output(p_group_id);
1733: -- delete all successfully processed records.
1734: delete from csd_repairs_interface where
1735: group_id = p_group_id and processing_phase = 2;
1736: commit;
1737: exception
1738: when fnd_api.g_exc_error then

Line 1752: p_repln_rec in OUT NOCOPY csd_repairs_pub.repln_rec_type,

1748: procedure create_sr_repair_order(p_api_version IN NUMBER,
1749: p_init_msg_list in varchar2 default fnd_api.g_false,
1750: p_commit in varchar2 default fnd_api.g_false,
1751: p_sr_rec in sr_rec_type,
1752: p_repln_rec in OUT NOCOPY csd_repairs_pub.repln_rec_type,
1753: p_rev_ctrl_flag in number,
1754: p_serial_ctrl_flag in number,
1755: p_ib_ctrl_flag in varchar2,
1756: x_incident_id IN OUT NOCOPY number,

Line 2116: 'Calling csd_repairs_util.create_inst_party_relation');

2112: THEN
2113: -- need to create a new association.
2114: IF (Fnd_Log.LEVEL_PROCEDURE >= Fnd_Log.G_CURRENT_RUNTIME_LEVEL) THEN
2115: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, lc_api_name,
2116: 'Calling csd_repairs_util.create_inst_party_relation');
2117: END IF;
2118:
2119: csd_repairs_util.create_inst_party_relation
2120: (p_api_version_number => 1.0,

Line 2119: csd_repairs_util.create_inst_party_relation

2115: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, lc_api_name,
2116: 'Calling csd_repairs_util.create_inst_party_relation');
2117: END IF;
2118:
2119: csd_repairs_util.create_inst_party_relation
2120: (p_api_version_number => 1.0,
2121: p_commit => 'F',
2122: p_init_msg_list => 'F',
2123: x_return_status => x_return_status,

Line 2168: csd_repairs_util.change_item_ib_owner

2164: (p_in_param => l_create_tca_rel_in,
2165: x_out_param => l_create_tca_rel_out
2166: );
2167:
2168: csd_repairs_util.change_item_ib_owner
2169: (p_create_tca_relation => l_create_tca_rel_out.create_tca_rel_flag,
2170: p_instance_id => l_instance_id,
2171: p_new_owner_account_id => p_sr_rec.sr_account_id,
2172: p_new_owner_party_id => p_sr_rec.sr_party_id,

Line 2293: 'Calling CSD_REPAIRS_UTIL.GET_ENTITLEMENTS to get contracts if any.');

2289: -- we can possibly cache the information here.
2290: fnd_profile.get('SERVER_TIMEZONE_ID', l_server_tz_id);
2291: IF (Fnd_Log.LEVEL_PROCEDURE >= Fnd_Log.G_CURRENT_RUNTIME_LEVEL) THEN
2292: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, lc_api_name,
2293: 'Calling CSD_REPAIRS_UTIL.GET_ENTITLEMENTS to get contracts if any.');
2294: END IF;
2295: CSD_REPAIRS_UTIL.GET_ENTITLEMENTS(
2296: p_api_version_number => 1.0,
2297: p_init_msg_list => fnd_api.g_false,

Line 2295: CSD_REPAIRS_UTIL.GET_ENTITLEMENTS(

2291: IF (Fnd_Log.LEVEL_PROCEDURE >= Fnd_Log.G_CURRENT_RUNTIME_LEVEL) THEN
2292: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, lc_api_name,
2293: 'Calling CSD_REPAIRS_UTIL.GET_ENTITLEMENTS to get contracts if any.');
2294: END IF;
2295: CSD_REPAIRS_UTIL.GET_ENTITLEMENTS(
2296: p_api_version_number => 1.0,
2297: p_init_msg_list => fnd_api.g_false,
2298: p_commit => fnd_api.g_false,
2299: p_contract_number => null,

Line 2403: 'Just before calling CSD_REPAIRS_PVT.Create_Repair_Order to create repair order');

2399:
2400: -- call the create repair orders API.
2401: IF (Fnd_Log.LEVEL_PROCEDURE >= Fnd_Log.G_CURRENT_RUNTIME_LEVEL) THEN
2402: Fnd_Log.STRING(Fnd_Log.LEVEL_PROCEDURE, lc_api_name,
2403: 'Just before calling CSD_REPAIRS_PVT.Create_Repair_Order to create repair order');
2404: END IF;
2405: x_repair_line_id := null;
2406:
2407: CSD_REPAIRS_PVT.Create_Repair_Order

Line 2407: CSD_REPAIRS_PVT.Create_Repair_Order

2403: 'Just before calling CSD_REPAIRS_PVT.Create_Repair_Order to create repair order');
2404: END IF;
2405: x_repair_line_id := null;
2406:
2407: CSD_REPAIRS_PVT.Create_Repair_Order
2408: (p_api_version_number => 1.0,
2409: p_commit => fnd_api.g_false,
2410: p_init_msg_list => fnd_api.g_true,
2411: p_validation_level => fnd_api.g_valid_level_full,