DBA Data[Home] [Help]

APPS.CSI_UTL_PKG dependencies on FND_API

Line 162: x_return_status := fnd_api.g_ret_sts_success;

158: x_obj_version_number OUT NOCOPY NUMBER,
159: x_return_status OUT NOCOPY VARCHAR2)
160: IS
161: BEGIN
162: x_return_status := fnd_api.g_ret_sts_success;
163:
164: api_log('get_ext_attribs');
165:
166: SELECT object_version_number,

Line 182: x_return_status := fnd_api.g_ret_sts_error;

178: fnd_message.set_name('CSI','CSI_INT_INV_EXT_ATTR_ID');
179: fnd_message.set_token('INSTANCE_ID',p_instance_id);
180: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
181: fnd_msg_pub.add;
182: x_return_status := fnd_api.g_ret_sts_error;
183: WHEN too_many_rows THEN
184: fnd_message.set_name('CSI','CSI_INT_MANY_ATTR_FOUND');
185: fnd_message.set_token('INSTANCE_ID',p_instance_id);
186: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );

Line 188: x_return_status := fnd_api.g_ret_sts_error;

184: fnd_message.set_name('CSI','CSI_INT_MANY_ATTR_FOUND');
185: fnd_message.set_token('INSTANCE_ID',p_instance_id);
186: fnd_message.set_token('ATTRIBUTE_ID',p_attribute_id );
187: fnd_msg_pub.add;
188: x_return_status := fnd_api.g_ret_sts_error;
189: END get_ext_attribs;
190:
191: PROCEDURE get_org_assign(
192: p_instance_id IN NUMBER,

Line 200: x_return_status := fnd_api.g_ret_sts_success;

196: x_obj_version_number OUT NOCOPY NUMBER,
197: x_return_status OUT NOCOPY VARCHAR2)
198: IS
199: BEGIN
200: x_return_status := fnd_api.g_ret_sts_success;
201: api_log('get_org_assign');
202:
203: SELECT object_version_number,
204: instance_ou_id

Line 220: x_return_status := fnd_api.g_ret_sts_error;

216: fnd_message.set_token('INSTANCE_ID',p_instance_id);
217: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
218: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
219: fnd_msg_pub.add;
220: x_return_status := fnd_api.g_ret_sts_error;
221: WHEN too_many_rows THEN
222: fnd_message.set_name('CSI','CSI_INT_MANY_OU_FOUND');
223: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_id);
224: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);

Line 227: x_return_status := fnd_api.g_ret_sts_error;

223: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_id);
224: fnd_message.set_token('OPERATING_UNIT_ID',p_operating_unit_id);
225: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
226: fnd_msg_pub.add;
227: x_return_status := fnd_api.g_ret_sts_error;
228: END get_org_assign;
229:
230: PROCEDURE get_party_account(
231: p_instance_pty_id IN NUMBER ,

Line 239: x_return_status := fnd_api.g_ret_sts_success;

235: x_return_status OUT NOCOPY VARCHAR2)
236: IS
237: BEGIN
238:
239: x_return_status := fnd_api.g_ret_sts_success;
240: api_log('get_party_account');
241:
242: SELECT object_version_number,
243: ip_account_id

Line 258: x_return_status := fnd_api.g_ret_sts_error;

254: fnd_message.set_name('CSI','CSI_INT_INV_ACCT_ID');
255: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
256: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
257: fnd_msg_pub.add;
258: x_return_status := fnd_api.g_ret_sts_error;
259: WHEN too_many_rows THEN
260: fnd_message.set_name('CSI','CSI_INT_MANY_ACCT_FOUND');
261: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
262: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);

Line 264: x_return_status := fnd_api.g_ret_sts_error;

260: fnd_message.set_name('CSI','CSI_INT_MANY_ACCT_FOUND');
261: fnd_message.set_token('INSTANCE_PARTY_ID',p_instance_pty_id);
262: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
263: fnd_msg_pub.add;
264: x_return_status := fnd_api.g_ret_sts_error;
265: END get_party_account;
266:
267: PROCEDURE get_instance_party(
268: p_instance_id IN NUMBER ,

Line 278: x_return_status := fnd_api.g_ret_sts_success;

274: BEGIN
275:
276: api_log('get_instance_party');
277:
278: x_return_status := fnd_api.g_ret_sts_success;
279:
280: SELECT object_version_number,
281: instance_party_id
282: INTO x_obj_version_number,

Line 297: x_return_status := fnd_api.g_ret_sts_error;

293: fnd_message.set_name('CSI','CSI_INT_INV_INSTA_PTY_ID');
294: fnd_message.set_token('INSTANCE_ID',p_instance_id);
295: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
296: fnd_msg_pub.add;
297: x_return_status := fnd_api.g_ret_sts_error;
298: WHEN too_many_rows THEN
299: fnd_message.set_name('CSI','CSI_INT_MANY_INSTA_PTY_FOUND');
300: fnd_message.set_token('INSTANCE_ID',p_instance_id);
301: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);

Line 303: x_return_status := fnd_api.g_ret_sts_error;

299: fnd_message.set_name('CSI','CSI_INT_MANY_INSTA_PTY_FOUND');
300: fnd_message.set_token('INSTANCE_ID',p_instance_id);
301: fnd_message.set_token('RELATIONSHIP_TYPE_CODE',p_rel_type_code);
302: fnd_msg_pub.add;
303: x_return_status := fnd_api.g_ret_sts_error;
304:
305: END get_instance_party;
306:
307: PROCEDURE get_instance(

Line 315: x_return_status := fnd_api.g_ret_sts_success;

311: x_return_status OUT NOCOPY VARCHAR2)
312: IS
313: BEGIN
314:
315: x_return_status := fnd_api.g_ret_sts_success;
316:
317: api_log('get_instance');
318:
319: SELECT object_version_number,

Line 335: x_return_status := fnd_api.g_ret_sts_error;

331: WHEN no_data_found THEN
332: fnd_message.set_name('CSI','CSI_INT_INV_INST_ID');
333: fnd_message.set_token('INSTANCE_ID',p_instance_id);
334: fnd_msg_pub.add;
335: x_return_status := fnd_api.g_ret_sts_error;
336: END get_instance;
337:
338: FUNCTION get_ext_obj_ver_num(
339: p_attrib_value_id IN NUMBER)

Line 427: x_return_status := fnd_api.g_ret_sts_success;

423: BEGIN
424:
425: api_log('get_dflt_sub_type_id');
426:
427: x_return_status := fnd_api.g_ret_sts_success;
428:
429: SELECT sub_type_id
430: INTO x_sub_type_id
431: FROM csi_source_ib_types

Line 443: x_return_status := fnd_api.g_ret_sts_error;

439: WHEN no_data_found THEN
440: fnd_message.set_name('CSI', 'CSI_DFLT_SUB_TYPE_MISSING');
441: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
442: fnd_msg_pub.add;
443: x_return_status := fnd_api.g_ret_sts_error;
444: WHEN too_many_rows THEN
445: fnd_message.set_name('CSI', 'CSI_MANY_DFLT_SUB_TYPES');
446: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
447: fnd_msg_pub.add;

Line 448: x_return_status := fnd_api.g_ret_sts_error;

444: WHEN too_many_rows THEN
445: fnd_message.set_name('CSI', 'CSI_MANY_DFLT_SUB_TYPES');
446: fnd_message.set_token('TXN_TYPE_ID', p_transaction_type_id);
447: fnd_msg_pub.add;
448: x_return_status := fnd_api.g_ret_sts_error;
449: END get_dflt_sub_type_id;
450:
451: PROCEDURE get_dflt_inst_status_id(
452: x_instance_status_id OUT NOCOPY number,

Line 458: x_return_status := fnd_api.g_ret_sts_success;

454: IS
455: l_status_name varchar2(80);
456: BEGIN
457:
458: x_return_status := fnd_api.g_ret_sts_success;
459:
460: l_status_name := fnd_profile.value('CSI_DEFAULT_INSTANCE_STATUS');
461:
462: SELECT instance_status_id

Line 472: x_return_status := fnd_api.g_ret_sts_error;

468: WHEN no_data_found THEN
469: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
470: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
471: fnd_msg_pub.add;
472: x_return_status := fnd_api.g_ret_sts_error;
473: WHEN too_many_rows THEN
474: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
475: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
476: fnd_msg_pub.add;

Line 477: x_return_status := fnd_api.g_ret_sts_error;

473: WHEN too_many_rows THEN
474: fnd_message.set_name('CSI','CSI_API_INVALID_STATUS_ID');
475: fnd_message.set_token('INSTANCE_STATUS', l_status_name);
476: fnd_msg_pub.add;
477: x_return_status := fnd_api.g_ret_sts_error;
478: END get_dflt_inst_status_id;
479:
480: FUNCTION get_primay_uom(
481: p_inv_item_id IN NUMBER,

Line 806: x_return_status := fnd_api.g_ret_sts_success;

802:
803: l_install_party_site_id NUMBER;
804: BEGIN
805:
806: x_return_status := fnd_api.g_ret_sts_success;
807:
808: api_log('split_ship_rec');
809:
810: l_rem_qty_to_proc := p_proc_qty;

Line 848: x_txn_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

844:
845: x_txn_line_dtl_rec := x_txn_line_detail_rec ;
846:
847: /* assign values for the columns in Txn_line_details_tbl */
848: x_txn_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
849: x_txn_line_dtl_rec.instance_id := l_instance_id;
850: x_txn_line_dtl_rec.instance_exists_flag := 'Y';
851: x_txn_line_dtl_rec.source_transaction_flag := 'Y';
852: x_txn_line_dtl_rec.inventory_item_id := p_order_shipment_rec.inventory_item_id ;

Line 855: x_txn_line_dtl_rec.item_condition_id := fnd_api.g_miss_num;

851: x_txn_line_dtl_rec.source_transaction_flag := 'Y';
852: x_txn_line_dtl_rec.inventory_item_id := p_order_shipment_rec.inventory_item_id ;
853: x_txn_line_dtl_rec.inv_organization_id := p_order_shipment_rec.organization_id ;
854: x_txn_line_dtl_rec.inventory_revision := p_order_shipment_rec.revision ;
855: x_txn_line_dtl_rec.item_condition_id := fnd_api.g_miss_num;
856: x_txn_line_dtl_rec.instance_type_code := fnd_api.g_miss_char;
857: x_txn_line_dtl_rec.quantity := l_rem_qty_to_proc;
858: x_txn_line_dtl_rec.unit_of_measure := p_order_shipment_rec.transaction_uom ;
859: x_txn_line_dtl_rec.serial_number := p_order_shipment_rec.serial_number;

Line 856: x_txn_line_dtl_rec.instance_type_code := fnd_api.g_miss_char;

852: x_txn_line_dtl_rec.inventory_item_id := p_order_shipment_rec.inventory_item_id ;
853: x_txn_line_dtl_rec.inv_organization_id := p_order_shipment_rec.organization_id ;
854: x_txn_line_dtl_rec.inventory_revision := p_order_shipment_rec.revision ;
855: x_txn_line_dtl_rec.item_condition_id := fnd_api.g_miss_num;
856: x_txn_line_dtl_rec.instance_type_code := fnd_api.g_miss_char;
857: x_txn_line_dtl_rec.quantity := l_rem_qty_to_proc;
858: x_txn_line_dtl_rec.unit_of_measure := p_order_shipment_rec.transaction_uom ;
859: x_txn_line_dtl_rec.serial_number := p_order_shipment_rec.serial_number;
860: x_txn_line_dtl_rec.processing_status := 'IN_PROCESS';

Line 880: RAISE fnd_api.g_exc_error;

876: WHEN no_data_found THEN
877: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
878: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
879: fnd_msg_pub.add;
880: RAISE fnd_api.g_exc_error;
881: WHEN too_many_rows THEN
882: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
883: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
884: fnd_msg_pub.add;

Line 885: RAISE fnd_api.g_exc_error;

881: WHEN too_many_rows THEN
882: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
883: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_current_loc_id); -- ship_to_org_id);
884: fnd_msg_pub.add;
885: RAISE fnd_api.g_exc_error;
886: END ;
887:
888: IF p_order_shipment_rec.ib_install_loc is not null
889: AND

Line 892: p_order_shipment_rec.ib_install_loc_id <> fnd_api.g_miss_num

888: IF p_order_shipment_rec.ib_install_loc is not null
889: AND
890: p_order_shipment_rec.ib_install_loc_id is not null
891: AND
892: p_order_shipment_rec.ib_install_loc_id <> fnd_api.g_miss_num
893: Then
894: BEGIN
895: SELECT party_site_id
896: INTO l_install_party_site_id

Line 907: raise fnd_api.g_exc_error;

903: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
904: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
905: fnd_msg_pub.add;
906: debug('Party_site_id not found');
907: raise fnd_api.g_exc_error;
908: when too_many_rows then
909: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
910: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
911: fnd_msg_pub.add;

Line 913: raise fnd_api.g_exc_error;

909: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
910: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ib_install_loc_id); -- ship_to_org_id);
911: fnd_msg_pub.add;
912: debug('Party_site_id not found');
913: raise fnd_api.g_exc_error;
914: end ;
915: END IF;
916:
917: x_txn_line_dtl_rec.lot_number := p_order_shipment_rec.lot_number;

Line 932: RAISE fnd_api.g_exc_error;

928:
929: l_inst_party_id := csi_utl_pkg.get_instance_party_id(l_instance_id);
930: IF l_inst_party_id = -1 THEN
931: debug('get_instance_party_id failed');
932: RAISE fnd_api.g_exc_error;
933: END IF;
934:
935: -- assign values for the columns in x_txn_party_dtl_tbl
936: x_txn_party_dtl_tbl(l_index).instance_party_id := l_inst_party_id;

Line 968: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN

964: x_txn_pty_acct_dtl_tbl(l_index).object_version_number := 1;
965: x_txn_pty_acct_dtl_tbl(l_index).txn_party_details_index := l_index;
966:
967: -- assign values for the columns in x_txn_org_assgn_tbl
968: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
969: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
970: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
971: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
972: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;

Line 969: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;

965: x_txn_pty_acct_dtl_tbl(l_index).txn_party_details_index := l_index;
966:
967: -- assign values for the columns in x_txn_org_assgn_tbl
968: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
969: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
970: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
971: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
972: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;
973: x_txn_org_assgn_tbl(l_index).relationship_type_code := 'SOLD_FROM';

Line 970: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;

966:
967: -- assign values for the columns in x_txn_org_assgn_tbl
968: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
969: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
970: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
971: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
972: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;
973: x_txn_org_assgn_tbl(l_index).relationship_type_code := 'SOLD_FROM';
974: x_txn_org_assgn_tbl(l_index).active_start_date := sysdate;

Line 971: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;

967: -- assign values for the columns in x_txn_org_assgn_tbl
968: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
969: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
970: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
971: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
972: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;
973: x_txn_org_assgn_tbl(l_index).relationship_type_code := 'SOLD_FROM';
974: x_txn_org_assgn_tbl(l_index).active_start_date := sysdate;
975: x_txn_org_assgn_tbl(l_index).preserve_detail_flag := 'Y';

Line 983: p_commit => fnd_api.g_false,

979:
980: -- call api to create the transaction line details
981: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
982: p_api_version => 1.0 ,
983: p_commit => fnd_api.g_false,
984: p_init_msg_list => fnd_api.g_true,
985: p_validation_level => fnd_api.g_valid_level_none,
986: p_txn_line_dtl_index => l_index,
987: p_txn_line_dtl_rec => x_txn_line_dtl_rec,

Line 984: p_init_msg_list => fnd_api.g_true,

980: -- call api to create the transaction line details
981: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
982: p_api_version => 1.0 ,
983: p_commit => fnd_api.g_false,
984: p_init_msg_list => fnd_api.g_true,
985: p_validation_level => fnd_api.g_valid_level_none,
986: p_txn_line_dtl_index => l_index,
987: p_txn_line_dtl_rec => x_txn_line_dtl_rec,
988: px_txn_party_dtl_tbl => x_txn_party_dtl_tbl,

Line 985: p_validation_level => fnd_api.g_valid_level_none,

981: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
982: p_api_version => 1.0 ,
983: p_commit => fnd_api.g_false,
984: p_init_msg_list => fnd_api.g_true,
985: p_validation_level => fnd_api.g_valid_level_none,
986: p_txn_line_dtl_index => l_index,
987: p_txn_line_dtl_rec => x_txn_line_dtl_rec,
988: px_txn_party_dtl_tbl => x_txn_party_dtl_tbl,
989: px_txn_pty_acct_detail_tbl => x_txn_pty_acct_dtl_tbl,

Line 997: IF x_return_status <> fnd_api.g_ret_sts_success THEN

993: x_return_status => x_return_status,
994: x_msg_count => x_msg_count,
995: x_msg_data => x_msg_data);
996:
997: IF x_return_status <> fnd_api.g_ret_sts_success THEN
998: raise fnd_api.g_exc_error;
999: END IF;
1000:
1001: END IF;

Line 998: raise fnd_api.g_exc_error;

994: x_msg_count => x_msg_count,
995: x_msg_data => x_msg_data);
996:
997: IF x_return_status <> fnd_api.g_ret_sts_success THEN
998: raise fnd_api.g_exc_error;
999: END IF;
1000:
1001: END IF;
1002: EXCEPTION

Line 1003: WHEN fnd_api.g_exc_error THEN

999: END IF;
1000:
1001: END IF;
1002: EXCEPTION
1003: WHEN fnd_api.g_exc_error THEN
1004: x_return_status := fnd_api.g_ret_sts_error ;
1005: WHEN fnd_api.g_exc_unexpected_error THEN
1006: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1007: END split_ship_rec;

Line 1004: x_return_status := fnd_api.g_ret_sts_error ;

1000:
1001: END IF;
1002: EXCEPTION
1003: WHEN fnd_api.g_exc_error THEN
1004: x_return_status := fnd_api.g_ret_sts_error ;
1005: WHEN fnd_api.g_exc_unexpected_error THEN
1006: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1007: END split_ship_rec;
1008:

Line 1005: WHEN fnd_api.g_exc_unexpected_error THEN

1001: END IF;
1002: EXCEPTION
1003: WHEN fnd_api.g_exc_error THEN
1004: x_return_status := fnd_api.g_ret_sts_error ;
1005: WHEN fnd_api.g_exc_unexpected_error THEN
1006: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1007: END split_ship_rec;
1008:
1009: PROCEDURE create_txn_details(

Line 1006: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1002: EXCEPTION
1003: WHEN fnd_api.g_exc_error THEN
1004: x_return_status := fnd_api.g_ret_sts_error ;
1005: WHEN fnd_api.g_exc_unexpected_error THEN
1006: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1007: END split_ship_rec;
1008:
1009: PROCEDURE create_txn_details(
1010: x_txn_line_dtl_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_line_detail_rec,

Line 1035: x_return_status := fnd_api.g_ret_sts_success;

1031: x_txn_ii_rltns_tbl csi_t_datastructures_grp.txn_ii_rltns_tbl;
1032:
1033: BEGIN
1034:
1035: x_return_status := fnd_api.g_ret_sts_success;
1036:
1037: api_log('create_txn_details');
1038:
1039: x_txn_line_dtl_rec := x_txn_line_dtl_rec;

Line 1046: x_txn_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

1042:
1043: l_instance_id := p_order_shipment_rec.instance_id;
1044:
1045: /* assign values for the columns in Txn_line_details_tbl */
1046: x_txn_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
1047: x_txn_line_dtl_rec.instance_id := l_instance_id;
1048: x_txn_line_dtl_rec.instance_exists_flag := 'Y';
1049: x_txn_line_dtl_rec.source_transaction_flag := 'Y';
1050: x_txn_line_dtl_rec.sub_type_id := p_txn_sub_type_rec.sub_type_id;

Line 1054: x_txn_line_dtl_rec.item_condition_id := fnd_api.g_miss_num;

1050: x_txn_line_dtl_rec.sub_type_id := p_txn_sub_type_rec.sub_type_id;
1051: x_txn_line_dtl_rec.inventory_item_id := p_order_shipment_rec.inventory_item_id ;
1052: x_txn_line_dtl_rec.inv_organization_id := p_order_shipment_rec.organization_id ;
1053: x_txn_line_dtl_rec.inventory_revision := p_order_shipment_rec.revision ;
1054: x_txn_line_dtl_rec.item_condition_id := fnd_api.g_miss_num;
1055: x_txn_line_dtl_rec.instance_type_code := fnd_api.g_miss_char;
1056: x_txn_line_dtl_rec.quantity := p_order_shipment_rec.shipped_quantity ;
1057: x_txn_line_dtl_rec.unit_of_measure := p_order_shipment_rec.transaction_uom ;
1058: x_txn_line_dtl_rec.serial_number := p_order_shipment_rec.serial_number;

Line 1055: x_txn_line_dtl_rec.instance_type_code := fnd_api.g_miss_char;

1051: x_txn_line_dtl_rec.inventory_item_id := p_order_shipment_rec.inventory_item_id ;
1052: x_txn_line_dtl_rec.inv_organization_id := p_order_shipment_rec.organization_id ;
1053: x_txn_line_dtl_rec.inventory_revision := p_order_shipment_rec.revision ;
1054: x_txn_line_dtl_rec.item_condition_id := fnd_api.g_miss_num;
1055: x_txn_line_dtl_rec.instance_type_code := fnd_api.g_miss_char;
1056: x_txn_line_dtl_rec.quantity := p_order_shipment_rec.shipped_quantity ;
1057: x_txn_line_dtl_rec.unit_of_measure := p_order_shipment_rec.transaction_uom ;
1058: x_txn_line_dtl_rec.serial_number := p_order_shipment_rec.serial_number;
1059: x_txn_line_dtl_rec.processing_status := 'IN_PROCESS';

Line 1079: RAISE fnd_api.g_exc_error;

1075: WHEN no_data_found then
1076: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
1077: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1078: fnd_msg_pub.add;
1079: RAISE fnd_api.g_exc_error;
1080: WHEN too_many_rows then
1081: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1082: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1083: fnd_msg_pub.add;

Line 1084: RAISE fnd_api.g_exc_error;

1080: WHEN too_many_rows then
1081: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1082: fnd_message.set_token('LOCATION_ID', p_order_shipment_rec.ship_to_org_id);
1083: fnd_msg_pub.add;
1084: RAISE fnd_api.g_exc_error;
1085: END;
1086:
1087: x_txn_line_dtl_rec.lot_number := p_order_shipment_rec.lot_number;
1088: x_txn_line_dtl_rec.location_type_code := 'HZ_PARTY_SITES';

Line 1099: RAISE fnd_api.g_exc_error;

1095: l_inst_party_id := csi_utl_pkg.get_instance_party_id(l_instance_id);
1096:
1097: IF l_inst_party_id = -1 THEN
1098: debug('get_instance_party_id failed');
1099: RAISE fnd_api.g_exc_error;
1100: END IF;
1101:
1102: -- assign values for the columns in txn_party_detail_tbl
1103: x_txn_party_dtl_tbl(l_index).instance_party_id := l_inst_party_id;

Line 1137: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN

1133: x_txn_pty_acct_dtl_tbl(l_index).preserve_detail_flag := 'Y';
1134: x_txn_pty_acct_dtl_tbl(l_index).object_version_number := 1;
1135: x_txn_pty_acct_dtl_tbl(l_index).txn_party_details_index := l_index;
1136:
1137: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
1138: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
1139: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
1140: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
1141: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;

Line 1138: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;

1134: x_txn_pty_acct_dtl_tbl(l_index).object_version_number := 1;
1135: x_txn_pty_acct_dtl_tbl(l_index).txn_party_details_index := l_index;
1136:
1137: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
1138: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
1139: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
1140: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
1141: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;
1142: x_txn_org_assgn_tbl(l_index).relationship_type_code := 'SOLD_FROM';

Line 1139: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;

1135: x_txn_pty_acct_dtl_tbl(l_index).txn_party_details_index := l_index;
1136:
1137: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
1138: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
1139: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
1140: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
1141: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;
1142: x_txn_org_assgn_tbl(l_index).relationship_type_code := 'SOLD_FROM';
1143: x_txn_org_assgn_tbl(l_index).active_start_date := sysdate;

Line 1140: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;

1136:
1137: IF nvl(p_order_shipment_rec.sold_from_org_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
1138: x_txn_org_assgn_tbl(l_index).txn_operating_unit_id := fnd_api.g_miss_num;
1139: x_txn_org_assgn_tbl(l_index).txn_line_detail_id := fnd_api.g_miss_num;
1140: x_txn_org_assgn_tbl(l_index).instance_ou_id := fnd_api.g_miss_num;
1141: x_txn_org_assgn_tbl(l_index).operating_unit_id := p_order_shipment_rec.sold_from_org_id;
1142: x_txn_org_assgn_tbl(l_index).relationship_type_code := 'SOLD_FROM';
1143: x_txn_org_assgn_tbl(l_index).active_start_date := sysdate;
1144: x_txn_org_assgn_tbl(l_index).txn_line_details_index := l_index;

Line 1152: p_commit => fnd_api.g_false,

1148:
1149: -- call api to create the transaction line details
1150: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
1151: p_api_version => 1.0 ,
1152: p_commit => fnd_api.g_false,
1153: p_init_msg_list => fnd_api.g_true,
1154: p_validation_level => fnd_api.g_valid_level_none,
1155: p_txn_line_dtl_index => l_index,
1156: p_txn_line_dtl_rec => x_txn_line_dtl_rec,

Line 1153: p_init_msg_list => fnd_api.g_true,

1149: -- call api to create the transaction line details
1150: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
1151: p_api_version => 1.0 ,
1152: p_commit => fnd_api.g_false,
1153: p_init_msg_list => fnd_api.g_true,
1154: p_validation_level => fnd_api.g_valid_level_none,
1155: p_txn_line_dtl_index => l_index,
1156: p_txn_line_dtl_rec => x_txn_line_dtl_rec,
1157: px_txn_party_dtl_tbl => x_txn_party_dtl_tbl,

Line 1154: p_validation_level => fnd_api.g_valid_level_none,

1150: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
1151: p_api_version => 1.0 ,
1152: p_commit => fnd_api.g_false,
1153: p_init_msg_list => fnd_api.g_true,
1154: p_validation_level => fnd_api.g_valid_level_none,
1155: p_txn_line_dtl_index => l_index,
1156: p_txn_line_dtl_rec => x_txn_line_dtl_rec,
1157: px_txn_party_dtl_tbl => x_txn_party_dtl_tbl,
1158: px_txn_pty_acct_detail_tbl => x_txn_pty_acct_dtl_tbl,

Line 1166: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1162: x_return_status => x_return_status,
1163: x_msg_count => x_msg_count,
1164: x_msg_data => x_msg_data);
1165:
1166: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1167: raise fnd_api.g_exc_error;
1168: END IF;
1169:
1170: EXCEPTION

Line 1167: raise fnd_api.g_exc_error;

1163: x_msg_count => x_msg_count,
1164: x_msg_data => x_msg_data);
1165:
1166: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1167: raise fnd_api.g_exc_error;
1168: END IF;
1169:
1170: EXCEPTION
1171: WHEN fnd_api.g_exc_error THEN

Line 1171: WHEN fnd_api.g_exc_error THEN

1167: raise fnd_api.g_exc_error;
1168: END IF;
1169:
1170: EXCEPTION
1171: WHEN fnd_api.g_exc_error THEN
1172: x_return_status := fnd_api.g_ret_sts_error ;
1173: WHEN fnd_api.g_exc_unexpected_error THEN
1174: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1175: END create_txn_details;

Line 1172: x_return_status := fnd_api.g_ret_sts_error ;

1168: END IF;
1169:
1170: EXCEPTION
1171: WHEN fnd_api.g_exc_error THEN
1172: x_return_status := fnd_api.g_ret_sts_error ;
1173: WHEN fnd_api.g_exc_unexpected_error THEN
1174: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1175: END create_txn_details;
1176:

Line 1173: WHEN fnd_api.g_exc_unexpected_error THEN

1169:
1170: EXCEPTION
1171: WHEN fnd_api.g_exc_error THEN
1172: x_return_status := fnd_api.g_ret_sts_error ;
1173: WHEN fnd_api.g_exc_unexpected_error THEN
1174: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1175: END create_txn_details;
1176:
1177:

Line 1174: x_return_status := fnd_api.g_ret_sts_unexp_error ;

1170: EXCEPTION
1171: WHEN fnd_api.g_exc_error THEN
1172: x_return_status := fnd_api.g_ret_sts_error ;
1173: WHEN fnd_api.g_exc_unexpected_error THEN
1174: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1175: END create_txn_details;
1176:
1177:
1178: FUNCTION Check_config_exists(

Line 1209: x_return_status := fnd_api.g_ret_sts_success;

1205: BEGIN
1206:
1207: api_log('get_party_id');
1208:
1209: x_return_status := fnd_api.g_ret_sts_success;
1210:
1211: BEGIN
1212: SELECT party_id,
1213: status

Line 1230: RAISE fnd_api.g_exc_error;

1226: WHEN no_data_found THEN
1227: fnd_message.set_name('CSI','CSI_INT_INV_CUST_ACCT_ID');
1228: fnd_message.set_token('CUST_ACCOUNT_ID', p_cust_acct_id);
1229: fnd_msg_pub.add;
1230: RAISE fnd_api.g_exc_error;
1231: END;
1232:
1233: EXCEPTION
1234: WHEN fnd_api.g_exc_error THEN

Line 1234: WHEN fnd_api.g_exc_error THEN

1230: RAISE fnd_api.g_exc_error;
1231: END;
1232:
1233: EXCEPTION
1234: WHEN fnd_api.g_exc_error THEN
1235: x_return_status := fnd_api.g_ret_sts_error;
1236: END get_party_id;
1237:
1238:

Line 1235: x_return_status := fnd_api.g_ret_sts_error;

1231: END;
1232:
1233: EXCEPTION
1234: WHEN fnd_api.g_exc_error THEN
1235: x_return_status := fnd_api.g_ret_sts_error;
1236: END get_party_id;
1237:
1238:
1239: FUNCTION validate_inst_party(

Line 1455: l_fnd_success VARCHAR2(1) := fnd_api.g_ret_sts_success;

1451: p_master_organization_id OUT NOCOPY NUMBER,
1452: x_return_status OUT NOCOPY VARCHAR2
1453: ) IS
1454:
1455: l_fnd_success VARCHAR2(1) := fnd_api.g_ret_sts_success;
1456: l_fnd_error VARCHAR2(1) := fnd_api.g_ret_sts_error;
1457: l_fnd_unexpected VARCHAR2(1) := fnd_api.g_ret_sts_unexp_error;
1458: l_master_org_id NUMBER;
1459:

Line 1456: l_fnd_error VARCHAR2(1) := fnd_api.g_ret_sts_error;

1452: x_return_status OUT NOCOPY VARCHAR2
1453: ) IS
1454:
1455: l_fnd_success VARCHAR2(1) := fnd_api.g_ret_sts_success;
1456: l_fnd_error VARCHAR2(1) := fnd_api.g_ret_sts_error;
1457: l_fnd_unexpected VARCHAR2(1) := fnd_api.g_ret_sts_unexp_error;
1458: l_master_org_id NUMBER;
1459:
1460: BEGIN

Line 1457: l_fnd_unexpected VARCHAR2(1) := fnd_api.g_ret_sts_unexp_error;

1453: ) IS
1454:
1455: l_fnd_success VARCHAR2(1) := fnd_api.g_ret_sts_success;
1456: l_fnd_error VARCHAR2(1) := fnd_api.g_ret_sts_error;
1457: l_fnd_unexpected VARCHAR2(1) := fnd_api.g_ret_sts_unexp_error;
1458: l_master_org_id NUMBER;
1459:
1460: BEGIN
1461:

Line 1492: x_return_status := fnd_api.g_ret_sts_success;

1488:
1489: BEGIN
1490: api_log('get_int_party');
1491:
1492: x_return_status := fnd_api.g_ret_sts_success;
1493:
1494: --commented SQL below to make changes for the bug 4028827
1495: /*
1496: SELECT internal_party_id

Line 1505: x_return_status := fnd_api.g_ret_sts_error;

1501:
1502: IF x_int_party_id IS NULL THEN
1503: fnd_message.set_name('CSI','CSI_INT_INT_PTY_ID_MISSING');
1504: fnd_msg_pub.add;
1505: x_return_status := fnd_api.g_ret_sts_error;
1506: ELSE
1507: x_return_status := fnd_api.g_ret_sts_success;
1508: END IF;
1509:

Line 1507: x_return_status := fnd_api.g_ret_sts_success;

1503: fnd_message.set_name('CSI','CSI_INT_INT_PTY_ID_MISSING');
1504: fnd_msg_pub.add;
1505: x_return_status := fnd_api.g_ret_sts_error;
1506: ELSE
1507: x_return_status := fnd_api.g_ret_sts_success;
1508: END IF;
1509:
1510: exception
1511: when others then

Line 1514: x_return_status := fnd_api.g_ret_sts_error;

1510: exception
1511: when others then
1512: fnd_message.set_name('CSI','CSI_INT_INT_PTY_ID_MISSING');
1513: fnd_msg_pub.add;
1514: x_return_status := fnd_api.g_ret_sts_error;
1515: END get_int_party;
1516:
1517: FUNCTION get_serial_contl_code
1518: ( p_inv_item_id IN NUMBER,

Line 1572: x_return_status := fnd_api.g_ret_sts_success;

1568:
1569: BEGIN
1570: api_log('get_order_line_dtls');
1571:
1572: x_return_status := fnd_api.g_ret_sts_success;
1573:
1574: SELECT b.header_id,
1575: b.line_id,
1576: mmt.inventory_item_id,

Line 1668: RAISE fnd_api.g_exc_error;

1664: WHEN no_data_found THEN
1665: fnd_message.set_name('CSI','CSI_INT_PTY_SITE_MISSING');
1666: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1667: fnd_msg_pub.add;
1668: RAISE fnd_api.g_exc_error;
1669: WHEN too_many_rows THEN
1670: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1671: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1672: fnd_msg_pub.add;

Line 1673: RAISE fnd_api.g_exc_error;

1669: WHEN too_many_rows THEN
1670: fnd_message.set_name('CSI','CSI_INT_MANY_PTY_SITE_FOUND');
1671: fnd_message.set_token('LOCATION_ID', l_order_line_rec.ship_to_org_id);
1672: fnd_msg_pub.add;
1673: RAISE fnd_api.g_exc_error;
1674: END;
1675:
1676: debug(' order_number : '||l_order_line_rec.order_number);
1677: debug(' header_id : '||l_order_line_rec.header_id);

Line 1699: raise fnd_api.g_exc_error;

1695: l_order_line_rec.ib_owner := 'END_CUSTOMER';
1696: IF l_partner_rec.END_CUSTOMER_ID is null Then
1697: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1698: fnd_msg_pub.add;
1699: raise fnd_api.g_exc_error;
1700: ELSE
1701: l_order_line_rec.end_customer_id := l_partner_rec.end_customer_id;
1702: END IF;
1703: ELSIF l_partner_rec.IB_OWNER = 'INSTALL_BASE'

Line 1706: l_order_line_rec.end_customer_id := fnd_api.g_miss_num;

1702: END IF;
1703: ELSIF l_partner_rec.IB_OWNER = 'INSTALL_BASE'
1704: THEN
1705: l_order_line_rec.ib_owner := l_partner_rec.IB_OWNER;
1706: l_order_line_rec.end_customer_id := fnd_api.g_miss_num;
1707: ELSE
1708: l_order_line_rec.end_customer_id := l_order_line_rec.sold_to_org_id;
1709: END IF;
1710:

Line 1720: raise fnd_api.g_exc_error;

1716: IF l_partner_rec.end_customer_site_use_id is null
1717: THEN
1718: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1719: fnd_msg_pub.add;
1720: raise fnd_api.g_exc_error;
1721: ELSE
1722: l_order_line_rec.ib_install_loc_id := l_partner_rec.end_customer_site_use_id;
1723: END IF;
1724: ELSIF l_order_line_rec.ib_install_loc = 'SHIP_TO'

Line 1730: raise fnd_api.g_exc_error;

1726: IF l_order_line_rec.ship_to_org_id is null
1727: THEN
1728: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1729: fnd_msg_pub.add;
1730: raise fnd_api.g_exc_error;
1731: ELSE
1732: l_order_line_rec.ib_install_loc_id := l_order_line_rec.ship_to_org_id;
1733: END IF;
1734: ELSIF l_order_line_rec.ib_install_loc = 'SOLD_TO'

Line 1740: raise fnd_api.g_exc_error;

1736: IF l_partner_rec.SOLD_TO_SITE_USE_ID is null -- 3412544 l_order_line_rec.sold_to_org_id is null
1737: THEN
1738: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1739: fnd_msg_pub.add;
1740: raise fnd_api.g_exc_error;
1741: ELSE
1742: l_order_line_rec.ib_install_loc_id := l_partner_rec.SOLD_TO_SITE_USE_ID; -- 3412544 l_order_line_rec.sold_to_org_id;
1743: END IF;
1744: ELSIF l_order_line_rec.ib_install_loc = 'DELIVER_TO'

Line 1750: raise fnd_api.g_exc_error;

1746: IF l_order_line_rec.deliver_to_org_id is null
1747: THEN
1748: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1749: fnd_msg_pub.add;
1750: raise fnd_api.g_exc_error;
1751: ELSE
1752: l_order_line_rec.ib_install_loc_id := l_order_line_rec.deliver_to_org_id;
1753: END IF;
1754: ELSIF l_order_line_rec.ib_install_loc = 'BILL_TO'

Line 1760: raise fnd_api.g_exc_error;

1756: IF l_order_line_rec.invoice_to_org_id is null
1757: THEN
1758: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1759: fnd_msg_pub.add;
1760: raise fnd_api.g_exc_error;
1761: ELSE
1762: l_order_line_rec.ib_install_loc_id := l_order_line_rec.invoice_to_org_id;
1763: END IF;
1764: ELSIF l_order_line_rec.ib_install_loc = 'INSTALL_BASE'

Line 1766: l_order_line_rec.ib_install_loc_id := fnd_api.g_miss_num;

1762: l_order_line_rec.ib_install_loc_id := l_order_line_rec.invoice_to_org_id;
1763: END IF;
1764: ELSIF l_order_line_rec.ib_install_loc = 'INSTALL_BASE'
1765: THEN
1766: l_order_line_rec.ib_install_loc_id := fnd_api.g_miss_num;
1767: END IF;
1768: ELSE
1769: l_order_line_rec.ib_install_loc_id := l_order_line_rec.ship_to_org_id;
1770: END IF;

Line 1781: raise fnd_api.g_exc_error;

1777: IF l_partner_rec.end_customer_site_use_id is null
1778: THEN
1779: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1780: fnd_msg_pub.add;
1781: raise fnd_api.g_exc_error;
1782: ELSE
1783: l_order_line_rec.ib_current_loc_id := l_partner_rec.end_customer_site_use_id;
1784: END IF;
1785: ELSIF l_order_line_rec.ib_current_loc = 'SHIP_TO'

Line 1791: raise fnd_api.g_exc_error;

1787: IF l_order_line_rec.ship_to_org_id is null
1788: THEN
1789: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1790: fnd_msg_pub.add;
1791: raise fnd_api.g_exc_error;
1792: ELSE
1793: l_order_line_rec.ib_current_loc_id := l_order_line_rec.ship_to_org_id;
1794: END IF;
1795: ELSIF l_order_line_rec.ib_current_loc = 'SOLD_TO'

Line 1801: raise fnd_api.g_exc_error;

1797: IF l_partner_rec.SOLD_TO_SITE_USE_ID is null -- 3412544 l_order_line_rec.sold_to_org_id is null
1798: THEN
1799: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1800: fnd_msg_pub.add;
1801: raise fnd_api.g_exc_error;
1802: ELSE
1803: l_order_line_rec.ib_current_loc_id := l_partner_rec.SOLD_TO_SITE_USE_ID; -- 3412544 l_order_line_rec.sold_to_org_id;
1804: END IF;
1805: ELSIF l_order_line_rec.ib_current_loc = 'DELIVER_TO'

Line 1811: raise fnd_api.g_exc_error;

1807: IF l_order_line_rec.deliver_to_org_id is null
1808: THEN
1809: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1810: fnd_msg_pub.add;
1811: raise fnd_api.g_exc_error;
1812: ELSE
1813: l_order_line_rec.ib_current_loc_id := l_order_line_rec.deliver_to_org_id;
1814: END IF;
1815: ELSIF l_order_line_rec.ib_current_loc = 'BILL_TO'

Line 1821: raise fnd_api.g_exc_error;

1817: IF l_order_line_rec.invoice_to_org_id is null
1818: THEN
1819: fnd_message.set_name('CSI','CSI_PARTNER_VAL_MISSING');
1820: fnd_msg_pub.add;
1821: raise fnd_api.g_exc_error;
1822: ELSE
1823: l_order_line_rec.ib_current_loc_id := l_order_line_rec.invoice_to_org_id;
1824: END IF;
1825: ELSIF l_order_line_rec.ib_current_loc = 'INSTALL_BASE'

Line 1827: l_order_line_rec.ib_current_loc_id := fnd_api.g_miss_num;

1823: l_order_line_rec.ib_current_loc_id := l_order_line_rec.invoice_to_org_id;
1824: END IF;
1825: ELSIF l_order_line_rec.ib_current_loc = 'INSTALL_BASE'
1826: THEN
1827: l_order_line_rec.ib_current_loc_id := fnd_api.g_miss_num;
1828: END IF;
1829: ELSE
1830: l_order_line_rec.ib_current_loc_id := l_order_line_rec.ship_to_org_id;
1831: END IF;

Line 1833: IF NVL(l_order_line_rec.config_header_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num

1829: ELSE
1830: l_order_line_rec.ib_current_loc_id := l_order_line_rec.ship_to_org_id;
1831: END IF;
1832:
1833: IF NVL(l_order_line_rec.config_header_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1834: AND NVL(l_order_line_rec.config_rev_nbr,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1835: AND NVL(l_order_line_rec.configuration_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1836: THEN
1837:

Line 1834: AND NVL(l_order_line_rec.config_rev_nbr,fnd_api.g_miss_num) <> fnd_api.g_miss_num

1830: l_order_line_rec.ib_current_loc_id := l_order_line_rec.ship_to_org_id;
1831: END IF;
1832:
1833: IF NVL(l_order_line_rec.config_header_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1834: AND NVL(l_order_line_rec.config_rev_nbr,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1835: AND NVL(l_order_line_rec.configuration_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1836: THEN
1837:
1838: l_om_session_key.session_hdr_id := l_order_line_rec.config_header_id;

Line 1835: AND NVL(l_order_line_rec.configuration_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num

1831: END IF;
1832:
1833: IF NVL(l_order_line_rec.config_header_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1834: AND NVL(l_order_line_rec.config_rev_nbr,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1835: AND NVL(l_order_line_rec.configuration_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
1836: THEN
1837:
1838: l_om_session_key.session_hdr_id := l_order_line_rec.config_header_id;
1839: l_om_session_key.session_rev_num := l_order_line_rec.config_rev_nbr;

Line 1847: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1843: ( p_config_session_key => l_om_session_key,
1844: x_return_status => x_return_status
1845: );
1846: --
1847: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1848: RAISE fnd_api.g_exc_error;
1849: END IF;
1850:
1851: IF NOT l_macd_processing THEN

Line 1848: RAISE fnd_api.g_exc_error;

1844: x_return_status => x_return_status
1845: );
1846: --
1847: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1848: RAISE fnd_api.g_exc_error;
1849: END IF;
1850:
1851: IF NOT l_macd_processing THEN
1852: l_order_line_rec.macd_order_line := fnd_api.g_false ;

Line 1852: l_order_line_rec.macd_order_line := fnd_api.g_false ;

1848: RAISE fnd_api.g_exc_error;
1849: END IF;
1850:
1851: IF NOT l_macd_processing THEN
1852: l_order_line_rec.macd_order_line := fnd_api.g_false ;
1853: ELSE
1854: l_order_line_rec.macd_order_line := fnd_api.g_true ;
1855: END IF;
1856:

Line 1854: l_order_line_rec.macd_order_line := fnd_api.g_true ;

1850:
1851: IF NOT l_macd_processing THEN
1852: l_order_line_rec.macd_order_line := fnd_api.g_false ;
1853: ELSE
1854: l_order_line_rec.macd_order_line := fnd_api.g_true ;
1855: END IF;
1856:
1857: END IF;
1858: x_order_line_rec := l_order_line_rec;

Line 1861: WHEN fnd_api.g_exc_error THEN

1857: END IF;
1858: x_order_line_rec := l_order_line_rec;
1859:
1860: EXCEPTION
1861: WHEN fnd_api.g_exc_error THEN
1862: x_return_status := fnd_api.g_ret_sts_error;
1863: WHEN others THEN
1864: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
1865: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);

Line 1862: x_return_status := fnd_api.g_ret_sts_error;

1858: x_order_line_rec := l_order_line_rec;
1859:
1860: EXCEPTION
1861: WHEN fnd_api.g_exc_error THEN
1862: x_return_status := fnd_api.g_ret_sts_error;
1863: WHEN others THEN
1864: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
1865: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
1866: fnd_msg_pub.add;

Line 1867: x_return_status := fnd_api.g_ret_sts_error;

1863: WHEN others THEN
1864: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
1865: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
1866: fnd_msg_pub.add;
1867: x_return_status := fnd_api.g_ret_sts_error;
1868:
1869: END get_order_line_dtls;
1870:
1871: /* Added p_order_header_id as part of fix for Bug : 2897324 */

Line 1881: x_return_status := fnd_api.g_ret_sts_success;

1877: x_return_status OUT NOCOPY VARCHAR2)
1878: IS
1879: BEGIN
1880: api_log('get_split_order_line');
1881: x_return_status := fnd_api.g_ret_sts_success;
1882:
1883: /* Added p_order_header_id as part of fix for Bug : 2897324 */
1884:
1885: SELECT line_id

Line 1893: x_return_status := fnd_api.g_ret_sts_success;

1889: AND header_id = p_order_header_id;
1890:
1891: EXCEPTION
1892: WHEN no_data_found THEN
1893: x_return_status := fnd_api.g_ret_sts_success;
1894: WHEN too_many_rows THEN
1895: x_return_status := fnd_api.g_ret_sts_success;
1896: WHEN others THEN
1897: fnd_message.set_name('CSI','CSI_INT_SPL_ORD_LINE_MISSING');

Line 1895: x_return_status := fnd_api.g_ret_sts_success;

1891: EXCEPTION
1892: WHEN no_data_found THEN
1893: x_return_status := fnd_api.g_ret_sts_success;
1894: WHEN too_many_rows THEN
1895: x_return_status := fnd_api.g_ret_sts_success;
1896: WHEN others THEN
1897: fnd_message.set_name('CSI','CSI_INT_SPL_ORD_LINE_MISSING');
1898: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1899: fnd_msg_pub.add;

Line 1900: x_return_status := fnd_api.g_ret_sts_error;

1896: WHEN others THEN
1897: fnd_message.set_name('CSI','CSI_INT_SPL_ORD_LINE_MISSING');
1898: fnd_message.set_token('ORDER_LINE_ID', p_order_line_id);
1899: fnd_msg_pub.add;
1900: x_return_status := fnd_api.g_ret_sts_error;
1901: END get_split_order_line;
1902:
1903: PROCEDURE get_sub_type_rec(
1904: p_sub_type_id IN NUMBER,

Line 1911: x_return_status := fnd_api.g_ret_sts_success;

1907: x_return_status OUT NOCOPY VARCHAR2)
1908: IS
1909: BEGIN
1910: api_log('get_sub_type_rec');
1911: x_return_status := fnd_api.g_ret_sts_success;
1912: SELECT sub_type_id ,
1913: src_change_owner_to_code,
1914: src_status_id,
1915: nvl(src_change_owner,'N'),

Line 1946: x_return_status := fnd_api.g_ret_sts_error;

1942: fnd_message.set_name('CSI','CSI_INT_SUB_TYPE_REC_MISSING');
1943: fnd_message.set_token('SUB_TYPE_ID', p_sub_type_id);
1944: fnd_message.set_token('TRANSACTION_TYPE_ID', p_trx_type_id);
1945: fnd_msg_pub.add;
1946: x_return_status := fnd_api.g_ret_sts_error;
1947: END get_sub_type_rec;
1948:
1949: PROCEDURE get_inst_relation
1950: ( p_ii_relationship_id IN NUMBER,

Line 1960: x_return_status := fnd_api.g_ret_sts_success;

1956: BEGIN
1957:
1958: api_log('get_inst_relation');
1959:
1960: x_return_status := fnd_api.g_ret_sts_success;
1961:
1962: SELECT
1963: object_id,
1964: subject_id

Line 1977: x_return_status := fnd_api.g_ret_sts_error;

1973: when others then
1974: fnd_message.set_name('CSI','CSI_INT_INV_II_REL_ID');
1975: fnd_message.set_token('RELATIONSHIP_ID', p_ii_relationship_id);
1976: fnd_msg_pub.add;
1977: x_return_status := fnd_api.g_ret_sts_error;
1978: END get_inst_relation;
1979:
1980: PROCEDURE get_model_inst_lst(
1981: p_parent_line_id IN number,

Line 2032: x_return_status := fnd_api.g_ret_sts_success;

2028: api_log('get_qty_ratio');
2029:
2030:
2031: /* Initialize API return status to success */
2032: x_return_status := fnd_api.g_ret_sts_success;
2033:
2034: IF nvl(p_model_remnant_flag,'N') = 'Y' THEN
2035: BEGIN
2036: select sum(ordered_quantity)

Line 2134: x_return_status := fnd_api.g_ret_sts_success;

2130:
2131: api_log('get_link_to_line_id');
2132:
2133: /* Initialize API return status to success */
2134: x_return_status := fnd_api.g_ret_sts_success;
2135:
2136: WHILE NOT(l_found) LOOP
2137:
2138: BEGIN

Line 2172: x_return_status := fnd_api.g_ret_sts_error;

2168: debug('Passed link_to_line_id '||x_link_to_line_id||' does not exists in oe order lines');
2169: fnd_message.set_name('CSI','CSI_OE_LINK_TO_LINE_ID_INVALID');
2170: fnd_message.set_token('OE_LINK_TO_LINE_ID', x_link_to_line_id);
2171: fnd_msg_pub.add;
2172: x_return_status := fnd_api.g_ret_sts_error;
2173: l_found := TRUE;
2174: --end of fix--
2175: end;
2176: WHEN others THEN

Line 2202: x_return_status := fnd_api.g_ret_sts_success;

2198: BEGIN
2199:
2200: api_log('build_inst_ii_tbl');
2201:
2202: x_return_status := fnd_api.g_ret_sts_success;
2203:
2204: IF p_txn_ii_rltns_tbl.count > 0 THEN
2205: FOR i in p_txn_ii_rltns_tbl.first..p_txn_ii_rltns_tbl.last LOOP
2206: IF p_txn_ii_rltns_tbl(i).subject_id = p_orig_inst_id THEN

Line 2301: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

2297: IS
2298:
2299: l_bom_item_type mtl_system_items.bom_item_type%TYPE;
2300: l_bom_found varchar2(1);
2301: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2302: l_explosion_level number;
2303: l_explode_flag varchar2(3);
2304: l_leaf_node varchar2(100);
2305: l_item_type_code varchar2(30);

Line 2396: WHEN fnd_api.g_exc_error THEN

2392: EXCEPTION
2393: WHEN no_explosion THEN
2394: debug(' check_standard_bom : FALSE');
2395: RETURN FALSE;
2396: WHEN fnd_api.g_exc_error THEN
2397: RETURN FALSE;
2398: END check_standard_bom;
2399:
2400: PROCEDURE get_parties_and_accounts(

Line 2435: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

2431:
2432: l_pa_rec csi_datastructures_pub.party_account_rec;
2433: l_pa_tbl csi_datastructures_pub.party_account_tbl;
2434:
2435: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2436: l_msg_count number;
2437: l_msg_data varchar2(2000);
2438:
2439: PROCEDURE convert_tpty_to_ipty(

Line 2453: x_i_party_rec.active_start_date := fnd_api.g_miss_date;

2449: x_i_party_rec.party_id := p_t_party_rec.party_source_id;
2450: x_i_party_rec.party_source_table := p_t_party_rec.party_source_table;
2451: x_i_party_rec.relationship_type_code := p_t_party_rec.relationship_type_code;
2452: x_i_party_rec.contact_flag := p_t_party_rec.contact_flag;
2453: x_i_party_rec.active_start_date := fnd_api.g_miss_date;
2454: x_i_party_rec.active_end_date := p_t_party_rec.active_end_date;
2455: x_i_party_rec.context := p_t_party_rec.context;
2456: x_i_party_rec.attribute1 := p_t_party_rec.attribute1;
2457: x_i_party_rec.attribute2 := p_t_party_rec.attribute2;

Line 2472: IF nvl(p_t_party_rec.instance_party_id, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN

2468: x_i_party_rec.attribute13 := p_t_party_rec.attribute13;
2469: x_i_party_rec.attribute14 := p_t_party_rec.attribute14;
2470: x_i_party_rec.attribute15 := p_t_party_rec.attribute15;
2471:
2472: IF nvl(p_t_party_rec.instance_party_id, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN
2473: BEGIN
2474: SELECT instance_party_id,
2475: object_version_number
2476: INTO x_i_party_rec.instance_party_id,

Line 2485: x_i_party_rec.object_version_number := fnd_api.g_miss_num;

2481: AND relationship_type_code = x_i_party_rec.relationship_type_code
2482: AND contact_flag = x_i_party_rec.contact_flag;
2483: EXCEPTION
2484: WHEN no_data_found THEN
2485: x_i_party_rec.object_version_number := fnd_api.g_miss_num;
2486: END;
2487: /*null check added-bug 6455823*/
2488: ELSIF Nvl(p_t_party_rec.instance_party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
2489: SELECT object_version_number

Line 2488: ELSIF Nvl(p_t_party_rec.instance_party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN

2484: WHEN no_data_found THEN
2485: x_i_party_rec.object_version_number := fnd_api.g_miss_num;
2486: END;
2487: /*null check added-bug 6455823*/
2488: ELSIF Nvl(p_t_party_rec.instance_party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
2489: SELECT object_version_number
2490: INTO x_i_party_rec.object_version_number
2491: FROM csi_i_parties
2492: WHERE instance_party_id = p_t_party_rec.instance_party_id;

Line 2530: IF nvl(p_t_pa_rec.ip_account_id, fnd_api.g_miss_num) = fnd_api.g_miss_num

2526: x_i_pa_rec.attribute13 := p_t_pa_rec.attribute13;
2527: x_i_pa_rec.attribute14 := p_t_pa_rec.attribute14;
2528: x_i_pa_rec.attribute15 := p_t_pa_rec.attribute15;
2529:
2530: IF nvl(p_t_pa_rec.ip_account_id, fnd_api.g_miss_num) = fnd_api.g_miss_num
2531: AND
2532: nvl(p_instance_party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num
2533: THEN
2534: BEGIN

Line 2532: nvl(p_instance_party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num

2528: x_i_pa_rec.attribute15 := p_t_pa_rec.attribute15;
2529:
2530: IF nvl(p_t_pa_rec.ip_account_id, fnd_api.g_miss_num) = fnd_api.g_miss_num
2531: AND
2532: nvl(p_instance_party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num
2533: THEN
2534: BEGIN
2535: SELECT ip_account_id,
2536: object_version_number

Line 2549: IF nvl(x_i_pa_rec.bill_to_address, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN

2545: x_i_pa_rec.object_version_number := 1;
2546: END;
2547: END IF;
2548:
2549: IF nvl(x_i_pa_rec.bill_to_address, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN
2550: x_i_pa_rec.bill_to_address := p_order_line_rec.invoice_to_org_id;
2551: END IF;
2552:
2553: IF nvl(x_i_pa_rec.ship_to_address, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN

Line 2553: IF nvl(x_i_pa_rec.ship_to_address, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN

2549: IF nvl(x_i_pa_rec.bill_to_address, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN
2550: x_i_pa_rec.bill_to_address := p_order_line_rec.invoice_to_org_id;
2551: END IF;
2552:
2553: IF nvl(x_i_pa_rec.ship_to_address, fnd_api.g_miss_num) = fnd_api.g_miss_num THEN
2554: x_i_pa_rec.ship_to_address := p_order_line_rec.ship_to_org_id;
2555: END IF;
2556:
2557: END convert_tpa_to_ipa;

Line 2585: x_return_status := fnd_api.g_ret_sts_success;

2581: END get_contact_parties;
2582:
2583: BEGIN
2584:
2585: x_return_status := fnd_api.g_ret_sts_success;
2586:
2587: api_log('get_parties_and_accounts');
2588:
2589: BEGIN

Line 2609: IF nvl(p_owner_pty_rec.party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN

2605: END IF;
2606: END LOOP;
2607: END IF;
2608:
2609: IF nvl(p_owner_pty_rec.party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
2610: l_pty_ind := l_pty_ind + 1;
2611: l_pty_tbl(l_pty_ind) := p_owner_pty_rec;
2612:
2613: IF nvl(p_owner_acct_rec.party_account_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN

Line 2613: IF nvl(p_owner_acct_rec.party_account_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN

2609: IF nvl(p_owner_pty_rec.party_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
2610: l_pty_ind := l_pty_ind + 1;
2611: l_pty_tbl(l_pty_ind) := p_owner_pty_rec;
2612:
2613: IF nvl(p_owner_acct_rec.party_account_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
2614: l_pa_ind := l_pa_ind + 1;
2615: l_pa_tbl(l_pa_ind) := p_owner_acct_rec;
2616: l_pa_tbl(l_pa_ind).parent_tbl_index := l_pty_ind;
2617: END IF;

Line 2707: nvl(p_order_line_rec.ship_to_contact_id, fnd_api.g_miss_num ) <> fnd_api.g_miss_num

2703:
2704: /* Build BILL_TO and SHIP_TO from OM line if the TD does not have it */
2705: IF NOT(l_ship_to_con_entered)
2706: AND
2707: nvl(p_order_line_rec.ship_to_contact_id, fnd_api.g_miss_num ) <> fnd_api.g_miss_num
2708: THEN
2709:
2710: csi_utl_pkg.derive_party_id(
2711: p_cust_acct_role_id => p_order_line_rec.ship_to_contact_id,

Line 2715: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2711: p_cust_acct_role_id => p_order_line_rec.ship_to_contact_id,
2712: x_party_id => l_contact_party_id,
2713: x_return_status => x_return_status );
2714:
2715: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2716: RAISE fnd_api.g_exc_error;
2717: END IF;
2718:
2719: debug(' ship_to_contact_id :'||p_order_line_rec.ship_to_contact_id);

Line 2716: RAISE fnd_api.g_exc_error;

2712: x_party_id => l_contact_party_id,
2713: x_return_status => x_return_status );
2714:
2715: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2716: RAISE fnd_api.g_exc_error;
2717: END IF;
2718:
2719: debug(' ship_to_contact_id :'||p_order_line_rec.ship_to_contact_id);
2720: debug(' ship_to_contact_party_id :'||l_contact_party_id);

Line 2723: l_pty_rec.instance_party_id := fnd_api.g_miss_num;

2719: debug(' ship_to_contact_id :'||p_order_line_rec.ship_to_contact_id);
2720: debug(' ship_to_contact_party_id :'||l_contact_party_id);
2721:
2722: l_pty_rec := l_init_pty_rec;
2723: l_pty_rec.instance_party_id := fnd_api.g_miss_num;
2724: l_pty_rec.instance_id := p_instance_id;
2725: l_pty_rec.party_id := l_contact_party_id;
2726: l_pty_rec.party_source_table := 'HZ_PARTIES';
2727: l_pty_rec.relationship_type_code := 'SHIP_TO';

Line 2730: l_pty_rec.active_start_date := fnd_api.g_miss_date;

2726: l_pty_rec.party_source_table := 'HZ_PARTIES';
2727: l_pty_rec.relationship_type_code := 'SHIP_TO';
2728: l_pty_rec.contact_flag := 'Y';
2729: l_pty_rec.contact_ip_id := l_owner_inst_pty_id;
2730: l_pty_rec.active_start_date := fnd_api.g_miss_date;
2731: l_pty_rec.object_version_number := fnd_api.g_miss_num;
2732:
2733: BEGIN
2734: SELECT instance_party_id,

Line 2731: l_pty_rec.object_version_number := fnd_api.g_miss_num;

2727: l_pty_rec.relationship_type_code := 'SHIP_TO';
2728: l_pty_rec.contact_flag := 'Y';
2729: l_pty_rec.contact_ip_id := l_owner_inst_pty_id;
2730: l_pty_rec.active_start_date := fnd_api.g_miss_date;
2731: l_pty_rec.object_version_number := fnd_api.g_miss_num;
2732:
2733: BEGIN
2734: SELECT instance_party_id,
2735: object_version_number

Line 2757: nvl(p_order_line_rec.invoice_to_contact_id, fnd_api.g_miss_num ) <> fnd_api.g_miss_num

2753: END IF;
2754:
2755: IF NOT(l_bill_to_con_entered)
2756: AND
2757: nvl(p_order_line_rec.invoice_to_contact_id, fnd_api.g_miss_num ) <> fnd_api.g_miss_num
2758: THEN
2759:
2760: csi_utl_pkg.derive_party_id(
2761: p_cust_acct_role_id => p_order_line_rec.invoice_to_contact_id,

Line 2765: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2761: p_cust_acct_role_id => p_order_line_rec.invoice_to_contact_id,
2762: x_party_id => l_contact_party_id,
2763: x_return_status => x_return_status );
2764:
2765: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2766: RAISE fnd_api.g_exc_error;
2767: END IF;
2768:
2769: debug(' bill_to_contact_id :'||p_order_line_rec.invoice_to_contact_id);

Line 2766: RAISE fnd_api.g_exc_error;

2762: x_party_id => l_contact_party_id,
2763: x_return_status => x_return_status );
2764:
2765: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2766: RAISE fnd_api.g_exc_error;
2767: END IF;
2768:
2769: debug(' bill_to_contact_id :'||p_order_line_rec.invoice_to_contact_id);
2770: debug(' bill_to_contact_party_id :'||l_contact_party_id);

Line 2774: l_pty_rec.instance_party_id := fnd_api.g_miss_num;

2770: debug(' bill_to_contact_party_id :'||l_contact_party_id);
2771:
2772: l_pty_rec := l_init_pty_rec;
2773:
2774: l_pty_rec.instance_party_id := fnd_api.g_miss_num;
2775: l_pty_rec.instance_id := p_instance_id;
2776: l_pty_rec.party_id := l_contact_party_id;
2777: l_pty_rec.party_source_table := 'HZ_PARTIES';
2778: l_pty_rec.relationship_type_code := 'BILL_TO';

Line 2781: l_pty_rec.active_start_date := fnd_api.g_miss_date;

2777: l_pty_rec.party_source_table := 'HZ_PARTIES';
2778: l_pty_rec.relationship_type_code := 'BILL_TO';
2779: l_pty_rec.contact_flag := 'Y';
2780: l_pty_rec.contact_ip_id := l_owner_inst_pty_id;
2781: l_pty_rec.active_start_date := fnd_api.g_miss_date;
2782: l_pty_rec.object_version_number := fnd_api.g_miss_num;
2783:
2784: BEGIN
2785: SELECT instance_party_id,

Line 2782: l_pty_rec.object_version_number := fnd_api.g_miss_num;

2778: l_pty_rec.relationship_type_code := 'BILL_TO';
2779: l_pty_rec.contact_flag := 'Y';
2780: l_pty_rec.contact_ip_id := l_owner_inst_pty_id;
2781: l_pty_rec.active_start_date := fnd_api.g_miss_date;
2782: l_pty_rec.object_version_number := fnd_api.g_miss_num;
2783:
2784: BEGIN
2785: SELECT instance_party_id,
2786: object_version_number

Line 2810: WHEN fnd_api.g_exc_error THEN

2806: x_i_pty_tbl := l_pty_tbl;
2807: x_i_pty_acct_tbl := l_pa_tbl;
2808:
2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error ;
2812: WHEN fnd_api.g_exc_unexpected_error THEN
2813: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2814: END get_parties_and_accounts;

Line 2811: x_return_status := fnd_api.g_ret_sts_error ;

2807: x_i_pty_acct_tbl := l_pa_tbl;
2808:
2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error ;
2812: WHEN fnd_api.g_exc_unexpected_error THEN
2813: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2814: END get_parties_and_accounts;
2815:

Line 2812: WHEN fnd_api.g_exc_unexpected_error THEN

2808:
2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error ;
2812: WHEN fnd_api.g_exc_unexpected_error THEN
2813: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2814: END get_parties_and_accounts;
2815:
2816: PROCEDURE create_txn_dtls(

Line 2813: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error ;
2812: WHEN fnd_api.g_exc_unexpected_error THEN
2813: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2814: END get_parties_and_accounts;
2815:
2816: PROCEDURE create_txn_dtls(
2817: p_source_trx_id IN number,

Line 2847: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

2843: l_csi_ea_tbl csi_t_datastructures_grp.csi_ext_attribs_tbl;
2844: l_csi_eav_tbl csi_t_datastructures_grp.csi_ext_attrib_vals_tbl;
2845: l_txn_systems_tbl csi_t_datastructures_grp.txn_systems_tbl;
2846:
2847: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
2848: l_msg_count number;
2849: l_msg_data varchar2(2000);
2850:
2851: CURSOR tld_cur(

Line 2869: x_return_status := fnd_api.g_ret_sts_success;

2865: AND ctld.quantity > 1;
2866:
2867: BEGIN
2868:
2869: x_return_status := fnd_api.g_ret_sts_success;
2870:
2871: api_log('create_txn_dtls');
2872:
2873: FOR tld_rec IN tld_cur( p_source_trx_id, p_source_trx_table )

Line 2880: p_commit => fnd_api.g_false,

2876: l_txn_line_detail_query_rec.txn_line_detail_id := tld_rec.txn_line_detail_id;
2877:
2878: csi_t_txn_details_grp.get_transaction_details(
2879: p_api_version => 1.0,
2880: p_commit => fnd_api.g_false,
2881: p_init_msg_list => fnd_api.g_true,
2882: p_validation_level => fnd_api.g_valid_level_full,
2883: p_txn_line_query_rec => l_txn_line_query_rec,
2884: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,

Line 2881: p_init_msg_list => fnd_api.g_true,

2877:
2878: csi_t_txn_details_grp.get_transaction_details(
2879: p_api_version => 1.0,
2880: p_commit => fnd_api.g_false,
2881: p_init_msg_list => fnd_api.g_true,
2882: p_validation_level => fnd_api.g_valid_level_full,
2883: p_txn_line_query_rec => l_txn_line_query_rec,
2884: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
2885: x_txn_line_detail_tbl => o_line_dtl_tbl,

Line 2882: p_validation_level => fnd_api.g_valid_level_full,

2878: csi_t_txn_details_grp.get_transaction_details(
2879: p_api_version => 1.0,
2880: p_commit => fnd_api.g_false,
2881: p_init_msg_list => fnd_api.g_true,
2882: p_validation_level => fnd_api.g_valid_level_full,
2883: p_txn_line_query_rec => l_txn_line_query_rec,
2884: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
2885: x_txn_line_detail_tbl => o_line_dtl_tbl,
2886: p_get_parties_flag => fnd_api.g_true,

Line 2886: p_get_parties_flag => fnd_api.g_true,

2882: p_validation_level => fnd_api.g_valid_level_full,
2883: p_txn_line_query_rec => l_txn_line_query_rec,
2884: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
2885: x_txn_line_detail_tbl => o_line_dtl_tbl,
2886: p_get_parties_flag => fnd_api.g_true,
2887: x_txn_party_detail_tbl => o_pty_dtl_tbl,
2888: p_get_pty_accts_flag => fnd_api.g_true,
2889: x_txn_pty_acct_detail_tbl => o_pty_acct_tbl,
2890: p_get_ii_rltns_flag => fnd_api.g_true,

Line 2888: p_get_pty_accts_flag => fnd_api.g_true,

2884: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
2885: x_txn_line_detail_tbl => o_line_dtl_tbl,
2886: p_get_parties_flag => fnd_api.g_true,
2887: x_txn_party_detail_tbl => o_pty_dtl_tbl,
2888: p_get_pty_accts_flag => fnd_api.g_true,
2889: x_txn_pty_acct_detail_tbl => o_pty_acct_tbl,
2890: p_get_ii_rltns_flag => fnd_api.g_true,
2891: x_txn_ii_rltns_tbl => o_ii_rltns_tbl,
2892: p_get_org_assgns_flag => fnd_api.g_true,

Line 2890: p_get_ii_rltns_flag => fnd_api.g_true,

2886: p_get_parties_flag => fnd_api.g_true,
2887: x_txn_party_detail_tbl => o_pty_dtl_tbl,
2888: p_get_pty_accts_flag => fnd_api.g_true,
2889: x_txn_pty_acct_detail_tbl => o_pty_acct_tbl,
2890: p_get_ii_rltns_flag => fnd_api.g_true,
2891: x_txn_ii_rltns_tbl => o_ii_rltns_tbl,
2892: p_get_org_assgns_flag => fnd_api.g_true,
2893: x_txn_org_assgn_tbl => o_org_assgn_tbl,
2894: p_get_ext_attrib_vals_flag => fnd_api.g_true,

Line 2892: p_get_org_assgns_flag => fnd_api.g_true,

2888: p_get_pty_accts_flag => fnd_api.g_true,
2889: x_txn_pty_acct_detail_tbl => o_pty_acct_tbl,
2890: p_get_ii_rltns_flag => fnd_api.g_true,
2891: x_txn_ii_rltns_tbl => o_ii_rltns_tbl,
2892: p_get_org_assgns_flag => fnd_api.g_true,
2893: x_txn_org_assgn_tbl => o_org_assgn_tbl,
2894: p_get_ext_attrib_vals_flag => fnd_api.g_true,
2895: x_txn_ext_attrib_vals_tbl => o_ext_attrib_tbl,
2896: p_get_csi_attribs_flag => fnd_api.g_false,

Line 2894: p_get_ext_attrib_vals_flag => fnd_api.g_true,

2890: p_get_ii_rltns_flag => fnd_api.g_true,
2891: x_txn_ii_rltns_tbl => o_ii_rltns_tbl,
2892: p_get_org_assgns_flag => fnd_api.g_true,
2893: x_txn_org_assgn_tbl => o_org_assgn_tbl,
2894: p_get_ext_attrib_vals_flag => fnd_api.g_true,
2895: x_txn_ext_attrib_vals_tbl => o_ext_attrib_tbl,
2896: p_get_csi_attribs_flag => fnd_api.g_false,
2897: x_csi_ext_attribs_tbl => o_csi_ea_tbl,
2898: p_get_csi_iea_values_flag => fnd_api.g_false,

Line 2896: p_get_csi_attribs_flag => fnd_api.g_false,

2892: p_get_org_assgns_flag => fnd_api.g_true,
2893: x_txn_org_assgn_tbl => o_org_assgn_tbl,
2894: p_get_ext_attrib_vals_flag => fnd_api.g_true,
2895: x_txn_ext_attrib_vals_tbl => o_ext_attrib_tbl,
2896: p_get_csi_attribs_flag => fnd_api.g_false,
2897: x_csi_ext_attribs_tbl => o_csi_ea_tbl,
2898: p_get_csi_iea_values_flag => fnd_api.g_false,
2899: x_csi_iea_values_tbl => o_csi_eav_tbl,
2900: p_get_txn_systems_flag => fnd_api.g_false,

Line 2898: p_get_csi_iea_values_flag => fnd_api.g_false,

2894: p_get_ext_attrib_vals_flag => fnd_api.g_true,
2895: x_txn_ext_attrib_vals_tbl => o_ext_attrib_tbl,
2896: p_get_csi_attribs_flag => fnd_api.g_false,
2897: x_csi_ext_attribs_tbl => o_csi_ea_tbl,
2898: p_get_csi_iea_values_flag => fnd_api.g_false,
2899: x_csi_iea_values_tbl => o_csi_eav_tbl,
2900: p_get_txn_systems_flag => fnd_api.g_false,
2901: x_txn_systems_tbl => o_txn_systems_tbl,
2902: x_return_status => l_return_status,

Line 2900: p_get_txn_systems_flag => fnd_api.g_false,

2896: p_get_csi_attribs_flag => fnd_api.g_false,
2897: x_csi_ext_attribs_tbl => o_csi_ea_tbl,
2898: p_get_csi_iea_values_flag => fnd_api.g_false,
2899: x_csi_iea_values_tbl => o_csi_eav_tbl,
2900: p_get_txn_systems_flag => fnd_api.g_false,
2901: x_txn_systems_tbl => o_txn_systems_tbl,
2902: x_return_status => l_return_status,
2903: x_msg_count => l_msg_count,
2904: x_msg_data => l_msg_data);

Line 2906: IF l_return_status <> fnd_api.g_ret_sts_success THEN

2902: x_return_status => l_return_status,
2903: x_msg_count => l_msg_count,
2904: x_msg_data => l_msg_data);
2905:
2906: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2907: RAISE fnd_api.g_exc_error;
2908: END IF;
2909:
2910:

Line 2907: RAISE fnd_api.g_exc_error;

2903: x_msg_count => l_msg_count,
2904: x_msg_data => l_msg_data);
2905:
2906: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2907: RAISE fnd_api.g_exc_error;
2908: END IF;
2909:
2910:
2911: debug('after csi_t_txn_details_grp.get_transaction_details for splitting ');

Line 2949: l_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;

2945:
2946: l_line_dtl_rec := l_line_dtl_tbl(1);
2947:
2948: --l_line_dtl_rec.source_txn_line_detail_id := tld_rec.source_txn_line_detail_id;
2949: l_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;
2950: l_line_dtl_rec.transaction_system_id := tld_rec.transaction_system_id;
2951: l_line_dtl_rec.csi_system_id := tld_rec.csi_system_id;
2952: l_line_dtl_rec.quantity := 1 ;
2953: l_line_dtl_rec.transaction_line_id := tld_rec.transaction_line_id ;

Line 2957: p_commit => fnd_api.g_false,

2953: l_line_dtl_rec.transaction_line_id := tld_rec.transaction_line_id ;
2954:
2955: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
2956: p_api_version => 1.0,
2957: p_commit => fnd_api.g_false,
2958: p_init_msg_list => fnd_api.g_true,
2959: p_validation_level => fnd_api.g_valid_level_full,
2960: p_txn_line_dtl_index => 1,
2961: p_txn_line_dtl_rec => l_line_dtl_rec,

Line 2958: p_init_msg_list => fnd_api.g_true,

2954:
2955: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
2956: p_api_version => 1.0,
2957: p_commit => fnd_api.g_false,
2958: p_init_msg_list => fnd_api.g_true,
2959: p_validation_level => fnd_api.g_valid_level_full,
2960: p_txn_line_dtl_index => 1,
2961: p_txn_line_dtl_rec => l_line_dtl_rec,
2962: px_txn_party_dtl_tbl => l_pty_dtl_tbl,

Line 2959: p_validation_level => fnd_api.g_valid_level_full,

2955: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
2956: p_api_version => 1.0,
2957: p_commit => fnd_api.g_false,
2958: p_init_msg_list => fnd_api.g_true,
2959: p_validation_level => fnd_api.g_valid_level_full,
2960: p_txn_line_dtl_index => 1,
2961: p_txn_line_dtl_rec => l_line_dtl_rec,
2962: px_txn_party_dtl_tbl => l_pty_dtl_tbl,
2963: px_txn_pty_acct_detail_tbl => l_pty_acct_tbl,

Line 2971: IF l_return_status <> fnd_api.g_ret_sts_success THEN

2967: x_return_status => l_return_status,
2968: x_msg_count => l_msg_count,
2969: x_msg_data => l_msg_data);
2970:
2971: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974:
2975: END LOOP;

Line 2972: RAISE fnd_api.g_exc_error;

2968: x_msg_count => l_msg_count,
2969: x_msg_data => l_msg_data);
2970:
2971: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974:
2975: END LOOP;
2976: END IF; -- count chk

Line 2980: WHEN fnd_api.g_exc_error THEN

2976: END IF; -- count chk
2977: END LOOP;
2978:
2979: EXCEPTION
2980: WHEN fnd_api.g_exc_error THEN
2981: x_return_status := fnd_api.g_ret_sts_error ;
2982: WHEN fnd_api.g_exc_unexpected_error THEN
2983: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2984: END create_txn_dtls;

Line 2981: x_return_status := fnd_api.g_ret_sts_error ;

2977: END LOOP;
2978:
2979: EXCEPTION
2980: WHEN fnd_api.g_exc_error THEN
2981: x_return_status := fnd_api.g_ret_sts_error ;
2982: WHEN fnd_api.g_exc_unexpected_error THEN
2983: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2984: END create_txn_dtls;
2985:

Line 2982: WHEN fnd_api.g_exc_unexpected_error THEN

2978:
2979: EXCEPTION
2980: WHEN fnd_api.g_exc_error THEN
2981: x_return_status := fnd_api.g_ret_sts_error ;
2982: WHEN fnd_api.g_exc_unexpected_error THEN
2983: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2984: END create_txn_dtls;
2985:
2986: PROCEDURE conv_to_prim_uom(

Line 2983: x_return_status := fnd_api.g_ret_sts_unexp_error ;

2979: EXCEPTION
2980: WHEN fnd_api.g_exc_error THEN
2981: x_return_status := fnd_api.g_ret_sts_error ;
2982: WHEN fnd_api.g_exc_unexpected_error THEN
2983: x_return_status := fnd_api.g_ret_sts_unexp_error ;
2984: END create_txn_dtls;
2985:
2986: PROCEDURE conv_to_prim_uom(
2987: p_inv_organization_id IN NUMBER,

Line 3000: x_return_status := fnd_api.g_ret_sts_success;

2996:
2997: api_log('conv_to_prim_uom');
2998:
2999: /* Initialize API return status to success */
3000: x_return_status := fnd_api.g_ret_sts_success;
3001:
3002: l_primary_uom := csi_utl_pkg.get_primay_uom(
3003: p_inv_item_id => p_inventory_item_id,
3004: p_inv_org_id => p_inv_organization_id);

Line 3019: RAISE fnd_api.g_exc_error;

3015: debug('UOM Rate :'||l_uom_rate);
3016:
3017: IF l_uom_rate = -99999 THEN
3018: debug('inv_convert.inv_um_conversion failed ');
3019: RAISE fnd_api.g_exc_error;
3020: END IF;
3021:
3022: IF x_txn_line_dtl_tbl.count > 0 THEN
3023: FOR i in x_txn_line_dtl_tbl.first..x_txn_line_dtl_tbl.last

Line 3030: WHEN fnd_api.g_exc_error THEN

3026: END LOOP;
3027: END IF;
3028:
3029: EXCEPTION
3030: WHEN fnd_api.g_exc_error THEN
3031: x_return_status := fnd_api.g_ret_sts_error ;
3032: WHEN fnd_api.g_exc_unexpected_error THEN
3033: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3034: END conv_to_prim_uom;

Line 3031: x_return_status := fnd_api.g_ret_sts_error ;

3027: END IF;
3028:
3029: EXCEPTION
3030: WHEN fnd_api.g_exc_error THEN
3031: x_return_status := fnd_api.g_ret_sts_error ;
3032: WHEN fnd_api.g_exc_unexpected_error THEN
3033: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3034: END conv_to_prim_uom;
3035:

Line 3032: WHEN fnd_api.g_exc_unexpected_error THEN

3028:
3029: EXCEPTION
3030: WHEN fnd_api.g_exc_error THEN
3031: x_return_status := fnd_api.g_ret_sts_error ;
3032: WHEN fnd_api.g_exc_unexpected_error THEN
3033: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3034: END conv_to_prim_uom;
3035:
3036: PROCEDURE build_non_source_rec(

Line 3033: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3029: EXCEPTION
3030: WHEN fnd_api.g_exc_error THEN
3031: x_return_status := fnd_api.g_ret_sts_error ;
3032: WHEN fnd_api.g_exc_unexpected_error THEN
3033: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3034: END conv_to_prim_uom;
3035:
3036: PROCEDURE build_non_source_rec(
3037: p_transaction_line_id IN number,

Line 3063: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

3059: l_n_org_assgn_tbl csi_t_datastructures_grp.txn_org_assgn_tbl;
3060: l_n_ext_attrib_tbl csi_t_datastructures_grp.txn_ext_attrib_vals_tbl;
3061: l_n_ii_rltns_tbl csi_t_datastructures_grp.txn_ii_rltns_tbl;
3062:
3063: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
3064: l_msg_count number;
3065: l_msg_data varchar2(4000);
3066:
3067: BEGIN

Line 3069: x_return_status := fnd_api.g_ret_sts_success;

3065: l_msg_data varchar2(4000);
3066:
3067: BEGIN
3068:
3069: x_return_status := fnd_api.g_ret_sts_success;
3070:
3071: api_log('build_non_source_rec');
3072:
3073: l_g_instance_rec.instance_id := p_instance_id;

Line 3082: p_commit => fnd_api.g_false,

3078:
3079: -- get the instance party and party account info
3080: csi_item_instance_pub.get_item_instance_details(
3081: p_api_version => 1.0,
3082: p_commit => fnd_api.g_false,
3083: p_init_msg_list => fnd_api.g_true,
3084: p_validation_level => fnd_api.g_valid_level_full,
3085: p_instance_rec => l_g_instance_rec,
3086: p_get_parties => fnd_api.g_false,

Line 3083: p_init_msg_list => fnd_api.g_true,

3079: -- get the instance party and party account info
3080: csi_item_instance_pub.get_item_instance_details(
3081: p_api_version => 1.0,
3082: p_commit => fnd_api.g_false,
3083: p_init_msg_list => fnd_api.g_true,
3084: p_validation_level => fnd_api.g_valid_level_full,
3085: p_instance_rec => l_g_instance_rec,
3086: p_get_parties => fnd_api.g_false,
3087: p_party_header_tbl => l_g_ph_tbl,

Line 3084: p_validation_level => fnd_api.g_valid_level_full,

3080: csi_item_instance_pub.get_item_instance_details(
3081: p_api_version => 1.0,
3082: p_commit => fnd_api.g_false,
3083: p_init_msg_list => fnd_api.g_true,
3084: p_validation_level => fnd_api.g_valid_level_full,
3085: p_instance_rec => l_g_instance_rec,
3086: p_get_parties => fnd_api.g_false,
3087: p_party_header_tbl => l_g_ph_tbl,
3088: p_get_accounts => fnd_api.g_false,

Line 3086: p_get_parties => fnd_api.g_false,

3082: p_commit => fnd_api.g_false,
3083: p_init_msg_list => fnd_api.g_true,
3084: p_validation_level => fnd_api.g_valid_level_full,
3085: p_instance_rec => l_g_instance_rec,
3086: p_get_parties => fnd_api.g_false,
3087: p_party_header_tbl => l_g_ph_tbl,
3088: p_get_accounts => fnd_api.g_false,
3089: p_account_header_tbl => l_g_pah_tbl,
3090: p_get_org_assignments => fnd_api.g_false,

Line 3088: p_get_accounts => fnd_api.g_false,

3084: p_validation_level => fnd_api.g_valid_level_full,
3085: p_instance_rec => l_g_instance_rec,
3086: p_get_parties => fnd_api.g_false,
3087: p_party_header_tbl => l_g_ph_tbl,
3088: p_get_accounts => fnd_api.g_false,
3089: p_account_header_tbl => l_g_pah_tbl,
3090: p_get_org_assignments => fnd_api.g_false,
3091: p_org_header_tbl => l_g_ouh_tbl,
3092: p_get_pricing_attribs => fnd_api.g_false,

Line 3090: p_get_org_assignments => fnd_api.g_false,

3086: p_get_parties => fnd_api.g_false,
3087: p_party_header_tbl => l_g_ph_tbl,
3088: p_get_accounts => fnd_api.g_false,
3089: p_account_header_tbl => l_g_pah_tbl,
3090: p_get_org_assignments => fnd_api.g_false,
3091: p_org_header_tbl => l_g_ouh_tbl,
3092: p_get_pricing_attribs => fnd_api.g_false,
3093: p_pricing_attrib_tbl => l_g_pa_tbl,
3094: p_get_ext_attribs => fnd_api.g_false,

Line 3092: p_get_pricing_attribs => fnd_api.g_false,

3088: p_get_accounts => fnd_api.g_false,
3089: p_account_header_tbl => l_g_pah_tbl,
3090: p_get_org_assignments => fnd_api.g_false,
3091: p_org_header_tbl => l_g_ouh_tbl,
3092: p_get_pricing_attribs => fnd_api.g_false,
3093: p_pricing_attrib_tbl => l_g_pa_tbl,
3094: p_get_ext_attribs => fnd_api.g_false,
3095: p_ext_attrib_tbl => l_g_eav_tbl,
3096: p_ext_attrib_def_tbl => l_g_ea_tbl,

Line 3094: p_get_ext_attribs => fnd_api.g_false,

3090: p_get_org_assignments => fnd_api.g_false,
3091: p_org_header_tbl => l_g_ouh_tbl,
3092: p_get_pricing_attribs => fnd_api.g_false,
3093: p_pricing_attrib_tbl => l_g_pa_tbl,
3094: p_get_ext_attribs => fnd_api.g_false,
3095: p_ext_attrib_tbl => l_g_eav_tbl,
3096: p_ext_attrib_def_tbl => l_g_ea_tbl,
3097: p_get_asset_assignments => fnd_api.g_false,
3098: p_asset_header_tbl => l_g_iah_tbl,

Line 3097: p_get_asset_assignments => fnd_api.g_false,

3093: p_pricing_attrib_tbl => l_g_pa_tbl,
3094: p_get_ext_attribs => fnd_api.g_false,
3095: p_ext_attrib_tbl => l_g_eav_tbl,
3096: p_ext_attrib_def_tbl => l_g_ea_tbl,
3097: p_get_asset_assignments => fnd_api.g_false,
3098: p_asset_header_tbl => l_g_iah_tbl,
3099: p_time_stamp => l_g_time_stamp,
3100: x_return_status => l_return_status,
3101: x_msg_count => l_msg_count,

Line 3104: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3100: x_return_status => l_return_status,
3101: x_msg_count => l_msg_count,
3102: x_msg_data => l_msg_data);
3103:
3104: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3105: RAISE fnd_api.g_exc_error;
3106: END IF;
3107:
3108: l_n_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;

Line 3105: RAISE fnd_api.g_exc_error;

3101: x_msg_count => l_msg_count,
3102: x_msg_data => l_msg_data);
3103:
3104: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3105: RAISE fnd_api.g_exc_error;
3106: END IF;
3107:
3108: l_n_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;
3109: l_n_line_dtl_rec.transaction_line_id := p_transaction_line_id;

Line 3108: l_n_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;

3104: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3105: RAISE fnd_api.g_exc_error;
3106: END IF;
3107:
3108: l_n_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;
3109: l_n_line_dtl_rec.transaction_line_id := p_transaction_line_id;
3110: l_n_line_dtl_rec.sub_type_id := csi_order_ship_pub.g_dflt_sub_type_id;
3111: l_n_line_dtl_rec.processing_status := 'IN_PROCESS';
3112: l_n_line_dtl_rec.source_transaction_flag := 'N';

Line 3134: p_commit => fnd_api.g_false,

3130: l_n_line_dtl_rec.object_version_number := 1.0;
3131:
3132: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3133: p_api_version => 1.0,
3134: p_commit => fnd_api.g_false,
3135: p_init_msg_list => fnd_api.g_true,
3136: p_validation_level => fnd_api.g_valid_level_full,
3137: p_txn_line_dtl_index => 1,
3138: p_txn_line_dtl_rec => l_n_line_dtl_rec,

Line 3135: p_init_msg_list => fnd_api.g_true,

3131:
3132: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3133: p_api_version => 1.0,
3134: p_commit => fnd_api.g_false,
3135: p_init_msg_list => fnd_api.g_true,
3136: p_validation_level => fnd_api.g_valid_level_full,
3137: p_txn_line_dtl_index => 1,
3138: p_txn_line_dtl_rec => l_n_line_dtl_rec,
3139: px_txn_party_dtl_tbl => l_n_pty_dtl_tbl,

Line 3136: p_validation_level => fnd_api.g_valid_level_full,

3132: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3133: p_api_version => 1.0,
3134: p_commit => fnd_api.g_false,
3135: p_init_msg_list => fnd_api.g_true,
3136: p_validation_level => fnd_api.g_valid_level_full,
3137: p_txn_line_dtl_index => 1,
3138: p_txn_line_dtl_rec => l_n_line_dtl_rec,
3139: px_txn_party_dtl_tbl => l_n_pty_dtl_tbl,
3140: px_txn_pty_acct_detail_tbl => l_n_pty_acct_tbl,

Line 3148: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3144: x_return_status => l_return_status,
3145: x_msg_count => l_msg_count,
3146: x_msg_data => l_msg_data);
3147:
3148: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3149: RAISE fnd_api.g_exc_error;
3150: END IF;
3151:
3152: debug('Non Source Txn Line Detail ID :'||l_n_line_dtl_rec.txn_line_detail_id);

Line 3149: RAISE fnd_api.g_exc_error;

3145: x_msg_count => l_msg_count,
3146: x_msg_data => l_msg_data);
3147:
3148: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3149: RAISE fnd_api.g_exc_error;
3150: END IF;
3151:
3152: debug('Non Source Txn Line Detail ID :'||l_n_line_dtl_rec.txn_line_detail_id);
3153: x_txn_line_dtl_id := l_n_line_dtl_rec.txn_line_detail_id;

Line 3156: WHEN fnd_api.g_exc_error THEN

3152: debug('Non Source Txn Line Detail ID :'||l_n_line_dtl_rec.txn_line_detail_id);
3153: x_txn_line_dtl_id := l_n_line_dtl_rec.txn_line_detail_id;
3154:
3155: EXCEPTION
3156: WHEN fnd_api.g_exc_error THEN
3157: x_return_status := fnd_api.g_ret_sts_error;
3158: END build_non_source_rec;
3159:
3160: PROCEDURE build_parent_relation(

Line 3157: x_return_status := fnd_api.g_ret_sts_error;

3153: x_txn_line_dtl_id := l_n_line_dtl_rec.txn_line_detail_id;
3154:
3155: EXCEPTION
3156: WHEN fnd_api.g_exc_error THEN
3157: x_return_status := fnd_api.g_ret_sts_error;
3158: END build_non_source_rec;
3159:
3160: PROCEDURE build_parent_relation(
3161: p_order_line_rec IN csi_order_ship_pub.order_line_rec,

Line 3171: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

3167: l_txn_ii number := 0;
3168: l_nsrc_line_dtl_id number;
3169: x_txn_line_dtls_lst txn_line_dtl_tbl;
3170: l_txn_processed varchar2(1);
3171: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
3172:
3173: PROCEDURE filter_model_instances( --modified for bug5096435
3174: p_child_item_id IN number,
3175: px_model_inst_tbl IN OUT NOCOPY csi_order_ship_pub.model_inst_tbl)

Line 3206: x_return_status := fnd_api.g_ret_sts_success;

3202:
3203: api_log('build_parent_relation');
3204:
3205: /* Initialize API return status to success */
3206: x_return_status := fnd_api.g_ret_sts_success;
3207:
3208: x_txn_ii_rltns_tbl.delete;
3209:
3210: filter_model_instances(

Line 3226: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3222: p_instance_id => x_model_inst_tbl(l_mod).instance_id,
3223: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3224: x_return_status => l_return_status);
3225:
3226: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3227: RAISE fnd_api.g_exc_error;
3228: END IF;
3229:
3230: x_model_inst_tbl(l_mod).txn_line_detail_id := l_nsrc_line_dtl_id;

Line 3227: RAISE fnd_api.g_exc_error;

3223: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3224: x_return_status => l_return_status);
3225:
3226: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3227: RAISE fnd_api.g_exc_error;
3228: END IF;
3229:
3230: x_model_inst_tbl(l_mod).txn_line_detail_id := l_nsrc_line_dtl_id;
3231: END LOOP;

Line 3248: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3244: p_instance_id => x_model_inst_tbl(1).instance_id,
3245: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3246: x_return_status => l_return_status);
3247:
3248: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3249: RAISE fnd_api.g_exc_error;
3250: END IF;
3251:
3252: x_model_inst_tbl(1).txn_line_detail_id := l_nsrc_line_dtl_id;

Line 3249: RAISE fnd_api.g_exc_error;

3245: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3246: x_return_status => l_return_status);
3247:
3248: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3249: RAISE fnd_api.g_exc_error;
3250: END IF;
3251:
3252: x_model_inst_tbl(1).txn_line_detail_id := l_nsrc_line_dtl_id;
3253:

Line 3262: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;

3258: x_txn_ii_rltns_tbl(l_txn_ii).transaction_line_id := x_txn_line_dtl_tbl(l_ind).transaction_line_id;
3259: x_txn_ii_rltns_tbl(l_txn_ii).relationship_type_code := 'COMPONENT-OF';
3260: x_txn_ii_rltns_tbl(l_txn_ii).object_id := x_model_inst_tbl(1).txn_line_detail_id;
3261: x_txn_ii_rltns_tbl(l_txn_ii).subject_id := x_txn_line_dtl_tbl(l_ind).txn_line_detail_id ;
3262: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;
3263:
3264: -- mark the model instance that it is processed
3265: x_model_inst_tbl(1).process_flag := 'Y';
3266:

Line 3294: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3290: p_instance_id => x_model_inst_tbl(k).instance_id,
3291: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3292: x_return_status => l_return_status);
3293:
3294: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3295: RAISE fnd_api.g_exc_error;
3296: END IF;
3297:
3298: x_model_inst_tbl(k).txn_line_detail_id := l_nsrc_line_dtl_id;

Line 3295: RAISE fnd_api.g_exc_error;

3291: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3292: x_return_status => l_return_status);
3293:
3294: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3295: RAISE fnd_api.g_exc_error;
3296: END IF;
3297:
3298: x_model_inst_tbl(k).txn_line_detail_id := l_nsrc_line_dtl_id;
3299:

Line 3307: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;

3303: x_txn_ii_rltns_tbl(l_txn_ii).transaction_line_id := x_txn_line_dtl_tbl(l_ind).transaction_line_id;
3304: x_txn_ii_rltns_tbl(l_txn_ii).relationship_type_code := 'COMPONENT-OF';
3305: x_txn_ii_rltns_tbl(l_txn_ii).object_id := x_model_inst_tbl(k).txn_line_detail_id;
3306: x_txn_ii_rltns_tbl(l_txn_ii).subject_id := x_txn_line_dtl_tbl(l_ind).txn_line_detail_id ;
3307: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;
3308:
3309: -- mark the model instance that it is processed
3310: x_model_inst_tbl(k).process_flag := 'Y';
3311:

Line 3345: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3341: p_instance_id => x_model_inst_tbl(j).instance_id,
3342: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3343: x_return_status => l_return_status);
3344:
3345: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3346: RAISE fnd_api.g_exc_error;
3347: END IF;
3348:
3349: x_model_inst_tbl(j).txn_line_detail_id := l_nsrc_line_dtl_id;

Line 3346: RAISE fnd_api.g_exc_error;

3342: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3343: x_return_status => l_return_status);
3344:
3345: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3346: RAISE fnd_api.g_exc_error;
3347: END IF;
3348:
3349: x_model_inst_tbl(j).txn_line_detail_id := l_nsrc_line_dtl_id;
3350:

Line 3359: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;

3355: x_txn_ii_rltns_tbl(l_txn_ii).transaction_line_id := x_txn_line_dtl_tbl(l_ind).transaction_line_id;
3356: x_txn_ii_rltns_tbl(l_txn_ii).relationship_type_code := 'COMPONENT-OF';
3357: x_txn_ii_rltns_tbl(l_txn_ii).subject_id := x_txn_line_dtl_tbl(l_ind).txn_line_detail_id;
3358: x_txn_ii_rltns_tbl(l_txn_ii).object_id := x_model_inst_tbl(j).txn_line_detail_id;
3359: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;
3360:
3361: x_model_inst_tbl(j).rem_qty := x_model_inst_tbl(j).rem_qty - x_txn_line_dtl_tbl(l_ind).quantity;
3362:
3363: l_txn_processed := 'Y';

Line 3392: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3388: split_txn_dtl_id => x_txn_line_dtl_tbl(l_ind).txn_line_detail_id,
3389: x_txn_line_dtls_lst => x_txn_line_dtls_lst,
3390: x_return_status => l_return_status );
3391:
3392: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3393: debug('split_txn_dtls failed ');
3394: RAISE fnd_api.g_exc_error;
3395: END IF;
3396: END IF;

Line 3394: RAISE fnd_api.g_exc_error;

3390: x_return_status => l_return_status );
3391:
3392: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3393: debug('split_txn_dtls failed ');
3394: RAISE fnd_api.g_exc_error;
3395: END IF;
3396: END IF;
3397:
3398: debug('x_txn_line_dtls_lst.count ='||x_txn_line_dtls_lst.count);

Line 3417: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3413: p_instance_id => x_model_inst_tbl(j).instance_id,
3414: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3415: x_return_status => l_return_status);
3416:
3417: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3418: RAISE fnd_api.g_exc_error;
3419: END IF;
3420:
3421: x_model_inst_tbl(j).txn_line_detail_id := l_nsrc_line_dtl_id;

Line 3418: RAISE fnd_api.g_exc_error;

3414: x_txn_line_dtl_id => l_nsrc_line_dtl_id,
3415: x_return_status => l_return_status);
3416:
3417: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3418: RAISE fnd_api.g_exc_error;
3419: END IF;
3420:
3421: x_model_inst_tbl(j).txn_line_detail_id := l_nsrc_line_dtl_id;
3422:

Line 3431: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;

3427: x_txn_ii_rltns_tbl(l_txn_ii).transaction_line_id := x_txn_line_dtl_tbl(l_ind).transaction_line_id;
3428: x_txn_ii_rltns_tbl(l_txn_ii).relationship_type_code := 'COMPONENT-OF';
3429: x_txn_ii_rltns_tbl(l_txn_ii).subject_id := x_txn_line_dtls_lst(x_txn).txn_line_detail_id;
3430: x_txn_ii_rltns_tbl(l_txn_ii).object_id := x_model_inst_tbl(j).txn_line_detail_id;
3431: x_txn_ii_rltns_tbl(l_txn_ii).active_start_date := sysdate;--FND_API.G_MISS_DATE;
3432:
3433: x_model_inst_tbl(j).rem_qty := x_model_inst_tbl(j).rem_qty - 1;
3434:
3435: ---Added (Start) for m-to-m enhancements

Line 3468: WHEN fnd_api.g_exc_error THEN

3464:
3465: debug('x_txn_ii_rltns_tbl.count ='||x_txn_ii_rltns_tbl.count );
3466:
3467: EXCEPTION
3468: WHEN fnd_api.g_exc_error THEN
3469: x_return_status := fnd_api.g_ret_sts_error ;
3470: WHEN fnd_api.g_exc_unexpected_error THEN
3471: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3472: END build_parent_relation;

Line 3469: x_return_status := fnd_api.g_ret_sts_error ;

3465: debug('x_txn_ii_rltns_tbl.count ='||x_txn_ii_rltns_tbl.count );
3466:
3467: EXCEPTION
3468: WHEN fnd_api.g_exc_error THEN
3469: x_return_status := fnd_api.g_ret_sts_error ;
3470: WHEN fnd_api.g_exc_unexpected_error THEN
3471: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3472: END build_parent_relation;
3473:

Line 3470: WHEN fnd_api.g_exc_unexpected_error THEN

3466:
3467: EXCEPTION
3468: WHEN fnd_api.g_exc_error THEN
3469: x_return_status := fnd_api.g_ret_sts_error ;
3470: WHEN fnd_api.g_exc_unexpected_error THEN
3471: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3472: END build_parent_relation;
3473:
3474:

Line 3471: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3467: EXCEPTION
3468: WHEN fnd_api.g_exc_error THEN
3469: x_return_status := fnd_api.g_ret_sts_error ;
3470: WHEN fnd_api.g_exc_unexpected_error THEN
3471: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3472: END build_parent_relation;
3473:
3474:
3475: PROCEDURE get_source_trx_dtls(

Line 3511: x_return_status := fnd_api.g_ret_sts_success;

3507:
3508: debug(' Order Number :'||x_mtl_txn_rec.source_header_ref);
3509: debug(' Line Number :'||x_mtl_txn_rec.source_line_ref);
3510:
3511: x_return_status := fnd_api.g_ret_sts_success;
3512:
3513: EXCEPTION
3514: WHEN no_data_found THEN
3515: x_return_status := fnd_api.g_ret_sts_error;

Line 3515: x_return_status := fnd_api.g_ret_sts_error;

3511: x_return_status := fnd_api.g_ret_sts_success;
3512:
3513: EXCEPTION
3514: WHEN no_data_found THEN
3515: x_return_status := fnd_api.g_ret_sts_error;
3516: fnd_message.set_name('CSI','CSI_INT_ORD_LINE_MISSING');
3517: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_transaction_id);
3518: fnd_msg_pub.add;
3519: END get_source_trx_dtls;

Line 3541: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

3537: l_csi_eav_tbl csi_t_datastructures_grp.csi_ext_attrib_vals_tbl;
3538: l_txn_systems_tbl csi_t_datastructures_grp.txn_systems_tbl;
3539: l_transaction_line_id number;
3540:
3541: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
3542: l_msg_count number;
3543: l_msg_data varchar2(2000);
3544:
3545: BEGIN

Line 3549: x_return_status := fnd_api.g_ret_sts_success;

3545: BEGIN
3546:
3547: api_log('split_txn_dtls_with_qty');
3548:
3549: x_return_status := fnd_api.g_ret_sts_success;
3550:
3551:
3552: l_txn_line_detail_query_rec.txn_line_detail_id := split_txn_dtl_id;
3553:

Line 3556: p_commit => fnd_api.g_false,

3552: l_txn_line_detail_query_rec.txn_line_detail_id := split_txn_dtl_id;
3553:
3554: csi_t_txn_details_grp.get_transaction_details(
3555: p_api_version => 1.0,
3556: p_commit => fnd_api.g_false,
3557: p_init_msg_list => fnd_api.g_true,
3558: p_validation_level => fnd_api.g_valid_level_full,
3559: p_txn_line_query_rec => l_txn_line_query_rec,
3560: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,

Line 3557: p_init_msg_list => fnd_api.g_true,

3553:
3554: csi_t_txn_details_grp.get_transaction_details(
3555: p_api_version => 1.0,
3556: p_commit => fnd_api.g_false,
3557: p_init_msg_list => fnd_api.g_true,
3558: p_validation_level => fnd_api.g_valid_level_full,
3559: p_txn_line_query_rec => l_txn_line_query_rec,
3560: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3561: x_txn_line_detail_tbl => l_line_dtl_tbl,

Line 3558: p_validation_level => fnd_api.g_valid_level_full,

3554: csi_t_txn_details_grp.get_transaction_details(
3555: p_api_version => 1.0,
3556: p_commit => fnd_api.g_false,
3557: p_init_msg_list => fnd_api.g_true,
3558: p_validation_level => fnd_api.g_valid_level_full,
3559: p_txn_line_query_rec => l_txn_line_query_rec,
3560: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3561: x_txn_line_detail_tbl => l_line_dtl_tbl,
3562: p_get_parties_flag => fnd_api.g_true,

Line 3562: p_get_parties_flag => fnd_api.g_true,

3558: p_validation_level => fnd_api.g_valid_level_full,
3559: p_txn_line_query_rec => l_txn_line_query_rec,
3560: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3561: x_txn_line_detail_tbl => l_line_dtl_tbl,
3562: p_get_parties_flag => fnd_api.g_true,
3563: x_txn_party_detail_tbl => l_pty_dtl_tbl,
3564: p_get_pty_accts_flag => fnd_api.g_true,
3565: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3566: p_get_ii_rltns_flag => fnd_api.g_false,

Line 3564: p_get_pty_accts_flag => fnd_api.g_true,

3560: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3561: x_txn_line_detail_tbl => l_line_dtl_tbl,
3562: p_get_parties_flag => fnd_api.g_true,
3563: x_txn_party_detail_tbl => l_pty_dtl_tbl,
3564: p_get_pty_accts_flag => fnd_api.g_true,
3565: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3566: p_get_ii_rltns_flag => fnd_api.g_false,
3567: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3568: p_get_org_assgns_flag => fnd_api.g_true,

Line 3566: p_get_ii_rltns_flag => fnd_api.g_false,

3562: p_get_parties_flag => fnd_api.g_true,
3563: x_txn_party_detail_tbl => l_pty_dtl_tbl,
3564: p_get_pty_accts_flag => fnd_api.g_true,
3565: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3566: p_get_ii_rltns_flag => fnd_api.g_false,
3567: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3568: p_get_org_assgns_flag => fnd_api.g_true,
3569: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3570: p_get_ext_attrib_vals_flag => fnd_api.g_true,

Line 3568: p_get_org_assgns_flag => fnd_api.g_true,

3564: p_get_pty_accts_flag => fnd_api.g_true,
3565: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3566: p_get_ii_rltns_flag => fnd_api.g_false,
3567: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3568: p_get_org_assgns_flag => fnd_api.g_true,
3569: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3570: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3571: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3572: p_get_csi_attribs_flag => fnd_api.g_false,

Line 3570: p_get_ext_attrib_vals_flag => fnd_api.g_true,

3566: p_get_ii_rltns_flag => fnd_api.g_false,
3567: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3568: p_get_org_assgns_flag => fnd_api.g_true,
3569: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3570: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3571: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3572: p_get_csi_attribs_flag => fnd_api.g_false,
3573: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3574: p_get_csi_iea_values_flag => fnd_api.g_false,

Line 3572: p_get_csi_attribs_flag => fnd_api.g_false,

3568: p_get_org_assgns_flag => fnd_api.g_true,
3569: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3570: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3571: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3572: p_get_csi_attribs_flag => fnd_api.g_false,
3573: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3574: p_get_csi_iea_values_flag => fnd_api.g_false,
3575: x_csi_iea_values_tbl => l_csi_eav_tbl,
3576: p_get_txn_systems_flag => fnd_api.g_false,

Line 3574: p_get_csi_iea_values_flag => fnd_api.g_false,

3570: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3571: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3572: p_get_csi_attribs_flag => fnd_api.g_false,
3573: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3574: p_get_csi_iea_values_flag => fnd_api.g_false,
3575: x_csi_iea_values_tbl => l_csi_eav_tbl,
3576: p_get_txn_systems_flag => fnd_api.g_false,
3577: x_txn_systems_tbl => l_txn_systems_tbl,
3578: x_return_status => l_return_status,

Line 3576: p_get_txn_systems_flag => fnd_api.g_false,

3572: p_get_csi_attribs_flag => fnd_api.g_false,
3573: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3574: p_get_csi_iea_values_flag => fnd_api.g_false,
3575: x_csi_iea_values_tbl => l_csi_eav_tbl,
3576: p_get_txn_systems_flag => fnd_api.g_false,
3577: x_txn_systems_tbl => l_txn_systems_tbl,
3578: x_return_status => l_return_status,
3579: x_msg_count => l_msg_count,
3580: x_msg_data => l_msg_data);

Line 3582: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3578: x_return_status => l_return_status,
3579: x_msg_count => l_msg_count,
3580: x_msg_data => l_msg_data);
3581:
3582: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3583: debug('Get_transaction_details failed ');
3584: RAISE fnd_api.g_exc_error;
3585: END IF;
3586:

Line 3584: RAISE fnd_api.g_exc_error;

3580: x_msg_data => l_msg_data);
3581:
3582: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3583: debug('Get_transaction_details failed ');
3584: RAISE fnd_api.g_exc_error;
3585: END IF;
3586:
3587: l_transaction_line_id := l_line_dtl_tbl(1).transaction_line_id;
3588:

Line 3599: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

3595: px_ext_attrib_tbl => l_ext_attrib_tbl,
3596: px_txn_systems_tbl => l_txn_systems_tbl);
3597:
3598: l_line_dtl_rec := l_line_dtl_tbl(1);
3599: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
3600: l_line_dtl_rec.transaction_line_id := l_transaction_line_id;
3601: l_line_dtl_rec.quantity := p_split_qty ;
3602: l_line_dtl_rec.processing_status := 'SUBMIT';
3603:

Line 3610: p_commit => fnd_api.g_false,

3606:
3607:
3608: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3609: p_api_version => 1.0,
3610: p_commit => fnd_api.g_false,
3611: p_init_msg_list => fnd_api.g_true,
3612: p_validation_level => fnd_api.g_valid_level_full,
3613: p_txn_line_dtl_index => 1,
3614: p_txn_line_dtl_rec => l_line_dtl_rec,

Line 3611: p_init_msg_list => fnd_api.g_true,

3607:
3608: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3609: p_api_version => 1.0,
3610: p_commit => fnd_api.g_false,
3611: p_init_msg_list => fnd_api.g_true,
3612: p_validation_level => fnd_api.g_valid_level_full,
3613: p_txn_line_dtl_index => 1,
3614: p_txn_line_dtl_rec => l_line_dtl_rec,
3615: px_txn_party_dtl_tbl => l_pty_dtl_tbl,

Line 3612: p_validation_level => fnd_api.g_valid_level_full,

3608: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3609: p_api_version => 1.0,
3610: p_commit => fnd_api.g_false,
3611: p_init_msg_list => fnd_api.g_true,
3612: p_validation_level => fnd_api.g_valid_level_full,
3613: p_txn_line_dtl_index => 1,
3614: p_txn_line_dtl_rec => l_line_dtl_rec,
3615: px_txn_party_dtl_tbl => l_pty_dtl_tbl,
3616: px_txn_pty_acct_detail_tbl => l_pty_acct_tbl,

Line 3624: IF l_return_status <> fnd_api.g_ret_sts_success THEN

3620: x_return_status => l_return_status,
3621: x_msg_count => l_msg_count,
3622: x_msg_data => l_msg_data);
3623:
3624: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3625: debug('Error Splitting txn line detail ');
3626: RAISE fnd_api.g_exc_error;
3627: END IF;
3628: EXCEPTION

Line 3626: RAISE fnd_api.g_exc_error;

3622: x_msg_data => l_msg_data);
3623:
3624: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3625: debug('Error Splitting txn line detail ');
3626: RAISE fnd_api.g_exc_error;
3627: END IF;
3628: EXCEPTION
3629: WHEN fnd_api.g_exc_error THEN
3630: x_return_status := fnd_api.g_ret_sts_error ;

Line 3629: WHEN fnd_api.g_exc_error THEN

3625: debug('Error Splitting txn line detail ');
3626: RAISE fnd_api.g_exc_error;
3627: END IF;
3628: EXCEPTION
3629: WHEN fnd_api.g_exc_error THEN
3630: x_return_status := fnd_api.g_ret_sts_error ;
3631: WHEN fnd_api.g_exc_unexpected_error THEN
3632: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3633: END split_txn_dtls_with_qty;

Line 3630: x_return_status := fnd_api.g_ret_sts_error ;

3626: RAISE fnd_api.g_exc_error;
3627: END IF;
3628: EXCEPTION
3629: WHEN fnd_api.g_exc_error THEN
3630: x_return_status := fnd_api.g_ret_sts_error ;
3631: WHEN fnd_api.g_exc_unexpected_error THEN
3632: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3633: END split_txn_dtls_with_qty;
3634:

Line 3631: WHEN fnd_api.g_exc_unexpected_error THEN

3627: END IF;
3628: EXCEPTION
3629: WHEN fnd_api.g_exc_error THEN
3630: x_return_status := fnd_api.g_ret_sts_error ;
3631: WHEN fnd_api.g_exc_unexpected_error THEN
3632: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3633: END split_txn_dtls_with_qty;
3634:
3635:

Line 3632: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3628: EXCEPTION
3629: WHEN fnd_api.g_exc_error THEN
3630: x_return_status := fnd_api.g_ret_sts_error ;
3631: WHEN fnd_api.g_exc_unexpected_error THEN
3632: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3633: END split_txn_dtls_with_qty;
3634:
3635:
3636: PROCEDURE split_txn_dtls(

Line 3664: x_return_status := fnd_api.g_ret_sts_success;

3660: BEGIN
3661:
3662: api_log('split_txn_dtls');
3663:
3664: x_return_status := fnd_api.g_ret_sts_success;
3665:
3666: x_txn_line_dtls_lst.delete;
3667:
3668: l_txn_line_detail_query_rec.txn_line_detail_id := split_txn_dtl_id;

Line 3672: p_commit => fnd_api.g_false,

3668: l_txn_line_detail_query_rec.txn_line_detail_id := split_txn_dtl_id;
3669:
3670: csi_t_txn_details_grp.get_transaction_details(
3671: p_api_version => 1.0,
3672: p_commit => fnd_api.g_false,
3673: p_init_msg_list => fnd_api.g_true,
3674: p_validation_level => fnd_api.g_valid_level_full,
3675: p_txn_line_query_rec => l_txn_line_query_rec,
3676: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,

Line 3673: p_init_msg_list => fnd_api.g_true,

3669:
3670: csi_t_txn_details_grp.get_transaction_details(
3671: p_api_version => 1.0,
3672: p_commit => fnd_api.g_false,
3673: p_init_msg_list => fnd_api.g_true,
3674: p_validation_level => fnd_api.g_valid_level_full,
3675: p_txn_line_query_rec => l_txn_line_query_rec,
3676: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3677: x_txn_line_detail_tbl => l_line_dtl_tbl,

Line 3674: p_validation_level => fnd_api.g_valid_level_full,

3670: csi_t_txn_details_grp.get_transaction_details(
3671: p_api_version => 1.0,
3672: p_commit => fnd_api.g_false,
3673: p_init_msg_list => fnd_api.g_true,
3674: p_validation_level => fnd_api.g_valid_level_full,
3675: p_txn_line_query_rec => l_txn_line_query_rec,
3676: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3677: x_txn_line_detail_tbl => l_line_dtl_tbl,
3678: p_get_parties_flag => fnd_api.g_true,

Line 3678: p_get_parties_flag => fnd_api.g_true,

3674: p_validation_level => fnd_api.g_valid_level_full,
3675: p_txn_line_query_rec => l_txn_line_query_rec,
3676: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3677: x_txn_line_detail_tbl => l_line_dtl_tbl,
3678: p_get_parties_flag => fnd_api.g_true,
3679: x_txn_party_detail_tbl => l_pty_dtl_tbl,
3680: p_get_pty_accts_flag => fnd_api.g_true,
3681: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3682: p_get_ii_rltns_flag => fnd_api.g_false,

Line 3680: p_get_pty_accts_flag => fnd_api.g_true,

3676: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
3677: x_txn_line_detail_tbl => l_line_dtl_tbl,
3678: p_get_parties_flag => fnd_api.g_true,
3679: x_txn_party_detail_tbl => l_pty_dtl_tbl,
3680: p_get_pty_accts_flag => fnd_api.g_true,
3681: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3682: p_get_ii_rltns_flag => fnd_api.g_false,
3683: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3684: p_get_org_assgns_flag => fnd_api.g_true,

Line 3682: p_get_ii_rltns_flag => fnd_api.g_false,

3678: p_get_parties_flag => fnd_api.g_true,
3679: x_txn_party_detail_tbl => l_pty_dtl_tbl,
3680: p_get_pty_accts_flag => fnd_api.g_true,
3681: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3682: p_get_ii_rltns_flag => fnd_api.g_false,
3683: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3684: p_get_org_assgns_flag => fnd_api.g_true,
3685: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3686: p_get_ext_attrib_vals_flag => fnd_api.g_true,

Line 3684: p_get_org_assgns_flag => fnd_api.g_true,

3680: p_get_pty_accts_flag => fnd_api.g_true,
3681: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
3682: p_get_ii_rltns_flag => fnd_api.g_false,
3683: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3684: p_get_org_assgns_flag => fnd_api.g_true,
3685: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3686: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3687: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3688: p_get_csi_attribs_flag => fnd_api.g_false,

Line 3686: p_get_ext_attrib_vals_flag => fnd_api.g_true,

3682: p_get_ii_rltns_flag => fnd_api.g_false,
3683: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
3684: p_get_org_assgns_flag => fnd_api.g_true,
3685: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3686: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3687: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3688: p_get_csi_attribs_flag => fnd_api.g_false,
3689: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3690: p_get_csi_iea_values_flag => fnd_api.g_false,

Line 3688: p_get_csi_attribs_flag => fnd_api.g_false,

3684: p_get_org_assgns_flag => fnd_api.g_true,
3685: x_txn_org_assgn_tbl => l_org_assgn_tbl,
3686: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3687: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3688: p_get_csi_attribs_flag => fnd_api.g_false,
3689: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3690: p_get_csi_iea_values_flag => fnd_api.g_false,
3691: x_csi_iea_values_tbl => l_csi_eav_tbl,
3692: p_get_txn_systems_flag => fnd_api.g_false,

Line 3690: p_get_csi_iea_values_flag => fnd_api.g_false,

3686: p_get_ext_attrib_vals_flag => fnd_api.g_true,
3687: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
3688: p_get_csi_attribs_flag => fnd_api.g_false,
3689: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3690: p_get_csi_iea_values_flag => fnd_api.g_false,
3691: x_csi_iea_values_tbl => l_csi_eav_tbl,
3692: p_get_txn_systems_flag => fnd_api.g_false,
3693: x_txn_systems_tbl => l_txn_systems_tbl,
3694: x_return_status => x_return_status,

Line 3692: p_get_txn_systems_flag => fnd_api.g_false,

3688: p_get_csi_attribs_flag => fnd_api.g_false,
3689: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
3690: p_get_csi_iea_values_flag => fnd_api.g_false,
3691: x_csi_iea_values_tbl => l_csi_eav_tbl,
3692: p_get_txn_systems_flag => fnd_api.g_false,
3693: x_txn_systems_tbl => l_txn_systems_tbl,
3694: x_return_status => x_return_status,
3695: x_msg_count => x_msg_count,
3696: x_msg_data => x_msg_data);

Line 3698: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3694: x_return_status => x_return_status,
3695: x_msg_count => x_msg_count,
3696: x_msg_data => x_msg_data);
3697:
3698: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3699: debug('Get_transaction_details failed ');
3700: RAISE fnd_api.g_exc_error;
3701: END IF;
3702:

Line 3700: RAISE fnd_api.g_exc_error;

3696: x_msg_data => x_msg_data);
3697:
3698: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3699: debug('Get_transaction_details failed ');
3700: RAISE fnd_api.g_exc_error;
3701: END IF;
3702:
3703: l_transaction_line_id := l_line_dtl_tbl(1).transaction_line_id;
3704:

Line 3715: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

3711: px_ext_attrib_tbl => l_ext_attrib_tbl,
3712: px_txn_systems_tbl => l_txn_systems_tbl);
3713:
3714: l_line_dtl_rec := l_line_dtl_tbl(1);
3715: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
3716: l_line_dtl_rec.transaction_line_id := l_transaction_line_id;
3717: l_line_dtl_rec.quantity := 1 ;
3718: l_line_dtl_rec.processing_status := 'IN_PROCESS';
3719:

Line 3733: p_commit => fnd_api.g_false,

3729: LOOP
3730:
3731: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3732: p_api_version => 1.0,
3733: p_commit => fnd_api.g_false,
3734: p_init_msg_list => fnd_api.g_true,
3735: p_validation_level => fnd_api.g_valid_level_full,
3736: p_txn_line_dtl_index => 1,
3737: p_txn_line_dtl_rec => l_line_dtl_rec,

Line 3734: p_init_msg_list => fnd_api.g_true,

3730:
3731: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3732: p_api_version => 1.0,
3733: p_commit => fnd_api.g_false,
3734: p_init_msg_list => fnd_api.g_true,
3735: p_validation_level => fnd_api.g_valid_level_full,
3736: p_txn_line_dtl_index => 1,
3737: p_txn_line_dtl_rec => l_line_dtl_rec,
3738: px_txn_party_dtl_tbl => l_pty_dtl_tbl,

Line 3735: p_validation_level => fnd_api.g_valid_level_full,

3731: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
3732: p_api_version => 1.0,
3733: p_commit => fnd_api.g_false,
3734: p_init_msg_list => fnd_api.g_true,
3735: p_validation_level => fnd_api.g_valid_level_full,
3736: p_txn_line_dtl_index => 1,
3737: p_txn_line_dtl_rec => l_line_dtl_rec,
3738: px_txn_party_dtl_tbl => l_pty_dtl_tbl,
3739: px_txn_pty_acct_detail_tbl => l_pty_acct_tbl,

Line 3747: IF x_return_status <> fnd_api.g_ret_sts_success THEN

3743: x_return_status => x_return_status,
3744: x_msg_count => x_msg_count,
3745: x_msg_data => x_msg_data);
3746:
3747: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3748: debug('Error Splitting txn line detail ');
3749: RAISE fnd_api.g_exc_error;
3750: END IF;
3751:

Line 3749: RAISE fnd_api.g_exc_error;

3745: x_msg_data => x_msg_data);
3746:
3747: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3748: debug('Error Splitting txn line detail ');
3749: RAISE fnd_api.g_exc_error;
3750: END IF;
3751:
3752: x_txn_line_dtls_lst(x_txn_line_dtls_lst.count+1).txn_line_detail_id :=
3753: l_line_dtl_rec.txn_line_detail_id;

Line 3767: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

3763: px_ext_attrib_tbl => l_ext_attrib_tbl,
3764: px_txn_systems_tbl => l_txn_systems_tbl);
3765:
3766: l_line_dtl_rec := l_line_dtl_tbl(1);
3767: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
3768: l_line_dtl_rec.transaction_line_id := l_transaction_line_id;
3769: l_line_dtl_rec.quantity := 1 ;
3770: l_line_dtl_rec.processing_status := 'IN_PROCESS';
3771:

Line 3779: WHEN fnd_api.g_exc_error THEN

3775: debug('No of txn line detail ='||x_txn_line_dtls_lst.count);
3776: debug('Txn line detail for Non Source created Successfully');
3777:
3778: EXCEPTION
3779: WHEN fnd_api.g_exc_error THEN
3780: x_return_status := fnd_api.g_ret_sts_error ;
3781: WHEN fnd_api.g_exc_unexpected_error THEN
3782: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3783: END split_txn_dtls;

Line 3780: x_return_status := fnd_api.g_ret_sts_error ;

3776: debug('Txn line detail for Non Source created Successfully');
3777:
3778: EXCEPTION
3779: WHEN fnd_api.g_exc_error THEN
3780: x_return_status := fnd_api.g_ret_sts_error ;
3781: WHEN fnd_api.g_exc_unexpected_error THEN
3782: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3783: END split_txn_dtls;
3784:

Line 3781: WHEN fnd_api.g_exc_unexpected_error THEN

3777:
3778: EXCEPTION
3779: WHEN fnd_api.g_exc_error THEN
3780: x_return_status := fnd_api.g_ret_sts_error ;
3781: WHEN fnd_api.g_exc_unexpected_error THEN
3782: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3783: END split_txn_dtls;
3784:
3785: PROCEDURE get_system_tbl(

Line 3782: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3778: EXCEPTION
3779: WHEN fnd_api.g_exc_error THEN
3780: x_return_status := fnd_api.g_ret_sts_error ;
3781: WHEN fnd_api.g_exc_unexpected_error THEN
3782: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3783: END split_txn_dtls;
3784:
3785: PROCEDURE get_system_tbl(
3786: p_txn_systems_rec IN csi_t_datastructures_grp.txn_system_rec,

Line 3825: x_cre_systems_rec.object_version_numbeR := fnd_api.g_miss_num;

3821: x_cre_systems_rec.attribute12 := p_txn_systems_rec.attribute12;
3822: x_cre_systems_rec.attribute13 := p_txn_systems_rec.attribute13;
3823: x_cre_systems_rec.attribute14 := p_txn_systems_rec.attribute14;
3824: x_cre_systems_rec.attribute15 := p_txn_systems_rec.attribute15;
3825: x_cre_systems_rec.object_version_numbeR := fnd_api.g_miss_num;
3826:
3827: END get_system_tbl;
3828:
3829:

Line 3848: x_return_status := fnd_api.g_ret_sts_success;

3844: BEGIN
3845:
3846: api_log('get_org_assignment_tbl');
3847:
3848: x_return_status := fnd_api.g_ret_sts_success;
3849:
3850: /* Build org_assignment table for create/update */
3851: IF p_txn_org_assgn_tbl.count > 0 THEN
3852: FOR j in p_txn_org_assgn_tbl.FIRST..p_txn_org_assgn_tbl.LAST LOOP

Line 3856: (p_txn_org_assgn_tbl(j).active_end_date = FND_API.G_MISS_DATE )) THEN

3852: FOR j in p_txn_org_assgn_tbl.FIRST..p_txn_org_assgn_tbl.LAST LOOP
3853:
3854: IF (p_txn_org_assgn_tbl(j).txn_line_detail_id = p_txn_line_detail_rec.txn_line_detail_id) AND
3855: (( NVL(p_txn_org_assgn_tbl(j).active_end_date,l_date) > sysdate ) OR
3856: (p_txn_org_assgn_tbl(j).active_end_date = FND_API.G_MISS_DATE )) THEN
3857:
3858:
3859: l_instance_ou_id := p_txn_org_assgn_tbl(j).instance_ou_id;
3860:

Line 3861: IF NVL(p_txn_org_assgn_tbl(j).instance_ou_id ,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM then

3857:
3858:
3859: l_instance_ou_id := p_txn_org_assgn_tbl(j).instance_ou_id;
3860:
3861: IF NVL(p_txn_org_assgn_tbl(j).instance_ou_id ,FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM then
3862:
3863: /* there should be only one org assign rec for the alternate primary key
3864: this is a rectriction from the api
3865: */

Line 3896: IF NVL(l_instance_ou_id,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM then

3892: END;
3893: END;
3894: END IF;
3895:
3896: IF NVL(l_instance_ou_id,FND_API.G_MISS_NUM) <> FND_API.G_MISS_NUM then
3897:
3898: /* if the instance_ou_id does not exist then update for org_units */
3899: l_obj_ver_num := csi_utl_pkg.get_org_obj_ver_num(
3900: l_instance_ou_id);

Line 3904: RAISE fnd_api.g_exc_error;

3900: l_instance_ou_id);
3901:
3902: IF l_obj_ver_num = -1 THEN
3903: debug('csi_utl_pkg.get_org_obj_ver_num failed ');
3904: RAISE fnd_api.g_exc_error;
3905: END IF;
3906:
3907: x_upd_org_units_tbl(l_upd_org).instance_ou_id := l_instance_ou_id;
3908: x_upd_org_units_tbl(l_upd_org).instance_id := p_txn_line_detail_rec.instance_id;

Line 3935: x_cre_org_units_tbl(l_cre_org).instance_ou_id := FND_API.G_MISS_NUM;

3931: ELSE
3932:
3933: /* if instance_ou_id does exist then create for org assignment */
3934:
3935: x_cre_org_units_tbl(l_cre_org).instance_ou_id := FND_API.G_MISS_NUM;
3936: x_cre_org_units_tbl(l_cre_org).operating_unit_id := p_txn_org_assgn_tbl(j).operating_unit_id;
3937: x_cre_org_units_tbl(l_cre_org).instance_id := p_txn_line_detail_rec.instance_id;
3938: x_cre_org_units_tbl(l_cre_org).relationship_type_code := p_txn_org_assgn_tbl(j).relationship_type_code;
3939: x_cre_org_units_tbl(l_cre_org).active_start_date := FND_API.G_MISS_DATE ;

Line 3939: x_cre_org_units_tbl(l_cre_org).active_start_date := FND_API.G_MISS_DATE ;

3935: x_cre_org_units_tbl(l_cre_org).instance_ou_id := FND_API.G_MISS_NUM;
3936: x_cre_org_units_tbl(l_cre_org).operating_unit_id := p_txn_org_assgn_tbl(j).operating_unit_id;
3937: x_cre_org_units_tbl(l_cre_org).instance_id := p_txn_line_detail_rec.instance_id;
3938: x_cre_org_units_tbl(l_cre_org).relationship_type_code := p_txn_org_assgn_tbl(j).relationship_type_code;
3939: x_cre_org_units_tbl(l_cre_org).active_start_date := FND_API.G_MISS_DATE ;
3940: x_cre_org_units_tbl(l_cre_org).active_end_date := p_txn_org_assgn_tbl(j).active_end_date;
3941: x_cre_org_units_tbl(l_cre_org).context := p_txn_org_assgn_tbl(j).context ;
3942: x_cre_org_units_tbl(l_cre_org).attribute1 := p_txn_org_assgn_tbl(j).attribute1 ;
3943: x_cre_org_units_tbl(l_cre_org).attribute2 := p_txn_org_assgn_tbl(j).attribute2 ;

Line 3957: x_cre_org_units_tbl(l_cre_org).object_version_number := FND_API.G_MISS_NUM;

3953: x_cre_org_units_tbl(l_cre_org).attribute12 := p_txn_org_assgn_tbl(j).attribute12;
3954: x_cre_org_units_tbl(l_cre_org).attribute13 := p_txn_org_assgn_tbl(j).attribute13;
3955: x_cre_org_units_tbl(l_cre_org).attribute14 := p_txn_org_assgn_tbl(j).attribute14;
3956: x_cre_org_units_tbl(l_cre_org).attribute15 := p_txn_org_assgn_tbl(j).attribute15 ;
3957: x_cre_org_units_tbl(l_cre_org).object_version_number := FND_API.G_MISS_NUM;
3958:
3959: l_cre_org := l_cre_org + 1;
3960: END IF; -- end if for instance_ou_id is not null
3961:

Line 3968: WHEN fnd_api.g_exc_error THEN

3964: END LOOP; -- end of org assignment table loop
3965: END IF;-- end of org assignment table count > 0
3966:
3967: EXCEPTION
3968: WHEN fnd_api.g_exc_error THEN
3969: x_return_status := fnd_api.g_ret_sts_error ;
3970: WHEN fnd_api.g_exc_unexpected_error THEN
3971: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3972: END get_org_assignment_tbl;

Line 3969: x_return_status := fnd_api.g_ret_sts_error ;

3965: END IF;-- end of org assignment table count > 0
3966:
3967: EXCEPTION
3968: WHEN fnd_api.g_exc_error THEN
3969: x_return_status := fnd_api.g_ret_sts_error ;
3970: WHEN fnd_api.g_exc_unexpected_error THEN
3971: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3972: END get_org_assignment_tbl;
3973:

Line 3970: WHEN fnd_api.g_exc_unexpected_error THEN

3966:
3967: EXCEPTION
3968: WHEN fnd_api.g_exc_error THEN
3969: x_return_status := fnd_api.g_ret_sts_error ;
3970: WHEN fnd_api.g_exc_unexpected_error THEN
3971: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3972: END get_org_assignment_tbl;
3973:
3974: PROCEDURE get_ext_attribs_tbl(

Line 3971: x_return_status := fnd_api.g_ret_sts_unexp_error ;

3967: EXCEPTION
3968: WHEN fnd_api.g_exc_error THEN
3969: x_return_status := fnd_api.g_ret_sts_error ;
3970: WHEN fnd_api.g_exc_unexpected_error THEN
3971: x_return_status := fnd_api.g_ret_sts_unexp_error ;
3972: END get_org_assignment_tbl;
3973:
3974: PROCEDURE get_ext_attribs_tbl(
3975: p_txn_line_detail_rec IN csi_t_datastructures_grp.txn_line_detail_rec,

Line 3991: x_return_status := fnd_api.g_ret_sts_success;

3987: BEGIN
3988:
3989: api_log('get_ext_attribs_tbl');
3990:
3991: x_return_status := fnd_api.g_ret_sts_success;
3992:
3993: /* Build ext attribs table for create/update */
3994: IF p_txn_ext_attrib_vals_tbl.count > 0 THEN
3995: FOR j in p_txn_ext_attrib_vals_tbl.FIRST..p_txn_ext_attrib_vals_tbl.LAST LOOP

Line 3999: (p_txn_ext_attrib_vals_tbl(j).active_end_date = FND_API.G_MISS_DATE )) AND

3995: FOR j in p_txn_ext_attrib_vals_tbl.FIRST..p_txn_ext_attrib_vals_tbl.LAST LOOP
3996:
3997: IF (p_txn_ext_attrib_vals_tbl(j).txn_line_detail_id = p_txn_line_detail_rec.txn_line_detail_id ) AND
3998: ((NVL(p_txn_ext_attrib_vals_tbl(j).active_end_date,l_date) > sysdate ) OR
3999: (p_txn_ext_attrib_vals_tbl(j).active_end_date = FND_API.G_MISS_DATE )) AND
4000: (p_txn_ext_attrib_vals_tbl(j).PROCESS_FLAG = 'Y') THEN
4001:
4002: debug('attrib_source_table ='||p_txn_ext_attrib_vals_tbl(j).attrib_source_table);
4003:

Line 4009: x_cre_ext_attrib_val_tbl(l_cre_ext).active_start_date := FND_API.G_MISS_DATE ;

4005:
4006: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute_id := p_txn_ext_attrib_vals_tbl(j).attribute_source_id;
4007: x_cre_ext_attrib_val_tbl(l_cre_ext).instance_id := p_txn_line_detail_rec.instance_id;
4008: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute_value := p_txn_ext_attrib_vals_tbl(j).attribute_value;
4009: x_cre_ext_attrib_val_tbl(l_cre_ext).active_start_date := FND_API.G_MISS_DATE ;
4010: x_cre_ext_attrib_val_tbl(l_cre_ext).active_end_date := p_txn_ext_attrib_vals_tbl(j).active_end_date;
4011: x_cre_ext_attrib_val_tbl(l_cre_ext).context := p_txn_ext_attrib_vals_tbl(j).context ;
4012: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute1 := p_txn_ext_attrib_vals_tbl(j).attribute1 ;
4013: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute2 := p_txn_ext_attrib_vals_tbl(j).attribute2 ;

Line 4027: x_cre_ext_attrib_val_tbl(l_cre_ext).object_version_number := FND_API.G_MISS_NUM;

4023: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute12 := p_txn_ext_attrib_vals_tbl(j).attribute12;
4024: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute13 := p_txn_ext_attrib_vals_tbl(j).attribute13;
4025: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute14 := p_txn_ext_attrib_vals_tbl(j).attribute14;
4026: x_cre_ext_attrib_val_tbl(l_cre_ext).attribute15 := p_txn_ext_attrib_vals_tbl(j).attribute15 ;
4027: x_cre_ext_attrib_val_tbl(l_cre_ext).object_version_number := FND_API.G_MISS_NUM;
4028:
4029: l_cre_ext := l_cre_ext + 1;
4030: ELSIF (p_txn_ext_attrib_vals_tbl(j).attrib_source_table = 'CSI_IEA_VALUES') THEN
4031:

Line 4037: RAISE fnd_api.g_exc_error;

4033: p_txn_ext_attrib_vals_tbl(j).attribute_source_id);
4034:
4035: IF l_obj_ver_num = -1 THEN
4036: debug('csi_utl_pkg.get_ext_obj_ver_num failed ');
4037: RAISE fnd_api.g_exc_error;
4038: END IF;
4039:
4040: x_upd_ext_attrib_val_tbl(l_upd_ext).attribute_value_id := p_txn_ext_attrib_vals_tbl(j).attribute_source_id;
4041: x_upd_ext_attrib_val_tbl(l_upd_ext).attribute_value := p_txn_ext_attrib_vals_tbl(j).attribute_value;

Line 4071: WHEN fnd_api.g_exc_error THEN

4067: END LOOP; -- end of ext attributes table loop
4068: END IF;-- end of ext attributes count > 0
4069:
4070: EXCEPTION
4071: WHEN fnd_api.g_exc_error THEN
4072: x_return_status := fnd_api.g_ret_sts_error ;
4073: WHEN fnd_api.g_exc_unexpected_error THEN
4074: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4075: END get_ext_attribs_tbl;

Line 4072: x_return_status := fnd_api.g_ret_sts_error ;

4068: END IF;-- end of ext attributes count > 0
4069:
4070: EXCEPTION
4071: WHEN fnd_api.g_exc_error THEN
4072: x_return_status := fnd_api.g_ret_sts_error ;
4073: WHEN fnd_api.g_exc_unexpected_error THEN
4074: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4075: END get_ext_attribs_tbl;
4076:

Line 4073: WHEN fnd_api.g_exc_unexpected_error THEN

4069:
4070: EXCEPTION
4071: WHEN fnd_api.g_exc_error THEN
4072: x_return_status := fnd_api.g_ret_sts_error ;
4073: WHEN fnd_api.g_exc_unexpected_error THEN
4074: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4075: END get_ext_attribs_tbl;
4076:
4077: /* Added p_trx_rec for ER 2581101 */

Line 4074: x_return_status := fnd_api.g_ret_sts_unexp_error ;

4070: EXCEPTION
4071: WHEN fnd_api.g_exc_error THEN
4072: x_return_status := fnd_api.g_ret_sts_error ;
4073: WHEN fnd_api.g_exc_unexpected_error THEN
4074: x_return_status := fnd_api.g_ret_sts_unexp_error ;
4075: END get_ext_attribs_tbl;
4076:
4077: /* Added p_trx_rec for ER 2581101 */
4078:

Line 4086: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

4082: p_subject_instance_id in number,
4083: p_trx_rec in csi_datastructures_pub.transaction_rec,
4084: x_return_status OUT NOCOPY varchar2)
4085: IS
4086: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
4087: l_msg_count number;
4088: l_msg_data varchar2(2000);
4089:
4090: l_old_instance_id number := null;

Line 4115: x_return_status := fnd_api.g_ret_sts_success;

4111: /* End of Fix for ER 2581101 */
4112:
4113: BEGIN
4114:
4115: x_return_status := fnd_api.g_ret_sts_success;
4116: l_upd_txn_rec := p_trx_rec;
4117:
4118: api_log('amend_contracts');
4119:

Line 4185: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4181: x_return_status => l_return_status,
4182: x_msg_count => l_msg_count,
4183: x_msg_data => l_msg_data);
4184:
4185: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4186: raise fnd_api.g_exc_error;
4187: END IF;
4188: --
4189: IF px_oks_txn_inst_tbl.count > 0 THEN

Line 4186: raise fnd_api.g_exc_error;

4182: x_msg_count => l_msg_count,
4183: x_msg_data => l_msg_data);
4184:
4185: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4186: raise fnd_api.g_exc_error;
4187: END IF;
4188: --
4189: IF px_oks_txn_inst_tbl.count > 0 THEN
4190: csi_gen_utility_pvt.dump_oks_txn_inst_tbl(px_oks_txn_inst_tbl);

Line 4200: P_init_msg_list => fnd_api.g_true,

4196: --
4197: OKS_IBINT_PUB.IB_interface
4198: (
4199: P_Api_Version => 1.0,
4200: P_init_msg_list => fnd_api.g_true,
4201: P_single_txn_date_flag => 'Y',
4202: P_Batch_type => NULL,
4203: P_Batch_ID => NULL,
4204: P_OKS_Txn_Inst_tbl => px_oks_txn_inst_tbl,

Line 4210: IF NOT(l_return_status = FND_API.G_RET_STS_SUCCESS) THEN

4206: x_msg_count => l_msg_count,
4207: x_msg_data => l_msg_data
4208: );
4209: --
4210: IF NOT(l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4211: RAISE FND_API.G_EXC_ERROR;
4212: END IF;
4213: END IF;
4214:

Line 4211: RAISE FND_API.G_EXC_ERROR;

4207: x_msg_data => l_msg_data
4208: );
4209: --
4210: IF NOT(l_return_status = FND_API.G_RET_STS_SUCCESS) THEN
4211: RAISE FND_API.G_EXC_ERROR;
4212: END IF;
4213: END IF;
4214:
4215: /* Code fix for ER 2581101 */

Line 4301: p_commit => fnd_api.g_false,

4297: p_api_name => 'update_item_instance');
4298:
4299: csi_item_instance_pub.update_item_instance(
4300: p_api_version => 1.0,
4301: p_commit => fnd_api.g_false,
4302: p_init_msg_list => fnd_api.g_true,
4303: p_validation_level => fnd_api.g_valid_level_full,
4304: p_instance_rec => l_upd_instance_rec,
4305: p_ext_attrib_values_tbl => l_upd_ext_attrib_val_tbl,

Line 4302: p_init_msg_list => fnd_api.g_true,

4298:
4299: csi_item_instance_pub.update_item_instance(
4300: p_api_version => 1.0,
4301: p_commit => fnd_api.g_false,
4302: p_init_msg_list => fnd_api.g_true,
4303: p_validation_level => fnd_api.g_valid_level_full,
4304: p_instance_rec => l_upd_instance_rec,
4305: p_ext_attrib_values_tbl => l_upd_ext_attrib_val_tbl,
4306: p_party_tbl => l_upd_party_tbl,

Line 4303: p_validation_level => fnd_api.g_valid_level_full,

4299: csi_item_instance_pub.update_item_instance(
4300: p_api_version => 1.0,
4301: p_commit => fnd_api.g_false,
4302: p_init_msg_list => fnd_api.g_true,
4303: p_validation_level => fnd_api.g_valid_level_full,
4304: p_instance_rec => l_upd_instance_rec,
4305: p_ext_attrib_values_tbl => l_upd_ext_attrib_val_tbl,
4306: p_party_tbl => l_upd_party_tbl,
4307: p_account_tbl => l_upd_party_acct_tbl,

Line 4318: -- IF l_return_status <> fnd_api.g_ret_sts_success THEN

4314: x_msg_count => l_msg_count,
4315: x_msg_data => l_msg_data );
4316:
4317: -- For Bug 4057183
4318: -- IF l_return_status <> fnd_api.g_ret_sts_success THEN
4319: IF l_return_status not in (fnd_api.g_ret_sts_success,'W') THEN
4320: RAISE fnd_api.g_exc_error;
4321: END IF;
4322:

Line 4319: IF l_return_status not in (fnd_api.g_ret_sts_success,'W') THEN

4315: x_msg_data => l_msg_data );
4316:
4317: -- For Bug 4057183
4318: -- IF l_return_status <> fnd_api.g_ret_sts_success THEN
4319: IF l_return_status not in (fnd_api.g_ret_sts_success,'W') THEN
4320: RAISE fnd_api.g_exc_error;
4321: END IF;
4322:
4323: END IF;

Line 4320: RAISE fnd_api.g_exc_error;

4316:
4317: -- For Bug 4057183
4318: -- IF l_return_status <> fnd_api.g_ret_sts_success THEN
4319: IF l_return_status not in (fnd_api.g_ret_sts_success,'W') THEN
4320: RAISE fnd_api.g_exc_error;
4321: END IF;
4322:
4323: END IF;
4324:

Line 4330: WHEN fnd_api.g_exc_error THEN

4326:
4327: END IF;
4328:
4329: EXCEPTION
4330: WHEN fnd_api.g_exc_error THEN
4331: x_return_status := fnd_api.g_ret_sts_error;
4332: END amend_contracts;
4333:
4334: /* Added p_trx_rec for ER 2581101 */

Line 4331: x_return_status := fnd_api.g_ret_sts_error;

4327: END IF;
4328:
4329: EXCEPTION
4330: WHEN fnd_api.g_exc_error THEN
4331: x_return_status := fnd_api.g_ret_sts_error;
4332: END amend_contracts;
4333:
4334: /* Added p_trx_rec for ER 2581101 */
4335: PROCEDURE get_ii_relation_tbl(

Line 4351: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

4347: l_object_inst_id NUMBER;
4348: l_trx_type_id NUMBER;
4349: l_subject_inst_id NUMBER;
4350: l_obj_ver_num NUMBER;
4351: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
4352:
4353: /* Added p_trx_rec for ER 2581101 */
4354: l_nsrc_sub_type_id NUMBER;
4355: l_trx_rec csi_datastructures_pub.transaction_rec;

Line 4461: x_return_status := fnd_api.g_ret_sts_success;

4457: BEGIN
4458:
4459: api_log('get_ii_relation_tbl');
4460:
4461: x_return_status := fnd_api.g_ret_sts_success;
4462:
4463: l_trx_rec := p_trx_rec;
4464:
4465: ---Get the relations(partners only) associated with the p_txn_line_detail_tbl

Line 4476: IF x_return_status <> fnd_api.g_ret_sts_success

4472: x_txn_ii_rltns_tbl => x_tmp_txn_ii_rltns_tbl ,
4473: x_txn_line_detail_tbl => l_tmp_txn_line_detail_tbl,
4474: x_return_status => x_return_status );
4475:
4476: IF x_return_status <> fnd_api.g_ret_sts_success
4477: THEN
4478: raise fnd_api.g_exc_error;
4479: END IF;
4480:

Line 4478: raise fnd_api.g_exc_error;

4474: x_return_status => x_return_status );
4475:
4476: IF x_return_status <> fnd_api.g_ret_sts_success
4477: THEN
4478: raise fnd_api.g_exc_error;
4479: END IF;
4480:
4481: ---APpend the relations to main tbl
4482:

Line 4576: IF x_return_status <> fnd_api.g_ret_sts_success

4572:
4573: rltns_xfaced_to_IB(x_txn_ii_rltns_tbl(j),
4574: x_xface_to_IB_flag,x_return_status) ;
4575:
4576: IF x_return_status <> fnd_api.g_ret_sts_success
4577: THEN
4578: raise fnd_api.g_exc_error;
4579: END IF;
4580:

Line 4578: raise fnd_api.g_exc_error;

4574: x_xface_to_IB_flag,x_return_status) ;
4575:
4576: IF x_return_status <> fnd_api.g_ret_sts_success
4577: THEN
4578: raise fnd_api.g_exc_error;
4579: END IF;
4580:
4581:
4582: ---Added (End) for m-to-m enhancements

Line 4669: IF NVL(x_txn_ii_rltns_tbl(j).csi_inst_relationship_id,fnd_api.g_miss_num ) <>

4665: IF x_txn_ii_rltns_tbl(j).relationship_type_code IN ('COMPONENT-OF',
4666: 'CONNECTED-TO')
4667: THEN
4668:
4669: IF NVL(x_txn_ii_rltns_tbl(j).csi_inst_relationship_id,fnd_api.g_miss_num ) <>
4670: fnd_api.g_miss_num
4671: AND
4672: (NVL(x_txn_ii_rltns_tbl(j).active_end_date,l_date ) > sysdate)
4673: THEN

Line 4670: fnd_api.g_miss_num

4666: 'CONNECTED-TO')
4667: THEN
4668:
4669: IF NVL(x_txn_ii_rltns_tbl(j).csi_inst_relationship_id,fnd_api.g_miss_num ) <>
4670: fnd_api.g_miss_num
4671: AND
4672: (NVL(x_txn_ii_rltns_tbl(j).active_end_date,l_date ) > sysdate)
4673: THEN
4674:

Line 4681: RAISE fnd_api.g_exc_error;

4677: l_obj_ver_num := csi_utl_pkg.get_ii_obj_ver_num(
4678: x_txn_ii_rltns_tbl(j).csi_inst_relationship_id);
4679:
4680: IF l_obj_ver_num = -1 THEN
4681: RAISE fnd_api.g_exc_error;
4682: END IF;
4683:
4684: x_upd_ii_rltns_tbl(l_upd_ii).relationship_id := x_txn_ii_rltns_tbl(j).csi_inst_relationship_id;
4685: x_upd_ii_rltns_tbl(l_upd_ii).relationship_type_code := x_txn_ii_rltns_tbl(j).relationship_type_code;

Line 4748: x_cre_ii_rltns_tbl(l_cre_ii).object_version_number := fnd_api.g_miss_num;

4744: -- Begin fix for Bug 2972082
4745: x_cre_ii_rltns_tbl(l_cre_ii).cascade_ownership_flag := l_cascade_owner_flag;
4746: -- End fix for Bug 2972082
4747:
4748: x_cre_ii_rltns_tbl(l_cre_ii).object_version_number := fnd_api.g_miss_num;
4749:
4750: l_cre_ii := l_cre_ii + 1;
4751: END IF;
4752:

Line 4767: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4763: p_subject_instance_id => l_subject_inst_id,
4764: p_trx_rec => l_trx_rec,
4765: x_return_status => l_return_status);
4766:
4767: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4768: raise fnd_api.g_exc_error;
4769: END IF;
4770:
4771: IF x_txn_ii_rltns_tbl(j).relationship_type_code = 'REPLACED-BY' THEN

Line 4768: raise fnd_api.g_exc_error;

4764: p_trx_rec => l_trx_rec,
4765: x_return_status => l_return_status);
4766:
4767: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4768: raise fnd_api.g_exc_error;
4769: END IF;
4770:
4771: IF x_txn_ii_rltns_tbl(j).relationship_type_code = 'REPLACED-BY' THEN
4772: -- SUBJECT replaced by OBJECT

Line 4828: RAISE fnd_api.g_exc_error;

4824: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4825: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4826: fnd_msg_pub.add;
4827: debug('Item being replaced belongs to a different configuration.');
4828: RAISE fnd_api.g_exc_error;
4829: WHEN OTHERS THEN
4830: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4831: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4832: fnd_msg_pub.add;

Line 4834: RAISE fnd_api.g_exc_error;

4830: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4831: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4832: fnd_msg_pub.add;
4833: debug('Item being replaced belongs to a different configuration.');
4834: RAISE fnd_api.g_exc_error;
4835: END;
4836:
4837: /* Check item location */
4838: BEGIN

Line 4849: RAISE fnd_api.g_exc_error;

4845: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4846: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4847: fnd_msg_pub.add;
4848: debug('Item being replaced belongs to a different configuration.');
4849: RAISE fnd_api.g_exc_error;
4850: END;
4851: debug('Item location_type_code = '||l_location_type_code);
4852:
4853: IF l_location_type_code NOT IN ('HZ_PARTY_SITES','HZ_LOCATIONS') THEN

Line 4875: RAISE fnd_api.g_exc_error;

4871: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4872: fnd_message.set_token('INSTANCE_ID',l_subject_inst_id);
4873: fnd_msg_pub.add;
4874: debug('Item is in INVENTORY and relationship is Active');
4875: RAISE fnd_api.g_exc_error;
4876: ELSE
4877: /* Check if it is a repair */
4878: IF l_old_instance_id = l_new_instance_id THEN
4879: l_item_status := 'REPAIR';

Line 4947: IF l_return_status <> fnd_api.g_ret_sts_success THEN

4943: p_order_line_rec => p_order_line_rec,
4944: x_trackable_line_tbl => l_line_tbl,
4945: x_return_status => l_return_status);
4946:
4947: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4948: RAISE fnd_api.g_exc_error;
4949: END IF;
4950:
4951: debug('IB Trackable Children Count :'||l_line_tbl.COUNT);

Line 4948: RAISE fnd_api.g_exc_error;

4944: x_trackable_line_tbl => l_line_tbl,
4945: x_return_status => l_return_status);
4946:
4947: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4948: RAISE fnd_api.g_exc_error;
4949: END IF;
4950:
4951: debug('IB Trackable Children Count :'||l_line_tbl.COUNT);
4952:

Line 4972: RAISE fnd_api.g_exc_error;

4968: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4969: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
4970: fnd_msg_pub.add;
4971: debug('Check instance status - The item being replaced is no longer valid.');
4972: RAISE fnd_api.g_exc_error;
4973: ELSE
4974: close check_instance_status;
4975: END IF;
4976:

Line 5001: RAISE fnd_api.g_exc_error;

4997: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
4998: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
4999: fnd_msg_pub.add;
5000: debug('No data found - Item being replaced is no longer valid.');
5001: RAISE fnd_api.g_exc_error;
5002: WHEN OTHERS THEN
5003: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5004: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5005: fnd_msg_pub.add;

Line 5007: RAISE fnd_api.g_exc_error;

5003: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5004: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5005: fnd_msg_pub.add;
5006: debug('Others - Item being replaced is no longer valid');
5007: RAISE fnd_api.g_exc_error;
5008: END;
5009:
5010: /* Transfer the child components */
5011: IF nvl(l_transfer_components_flag,'N') = 'Y' THEN

Line 5090: RAISE fnd_api.g_exc_error;

5086: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5087: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5088: fnd_msg_pub.add;
5089: debug('No data found - Item being replaced is no longer valid.');
5090: RAISE fnd_api.g_exc_error;
5091: WHEN OTHERS THEN
5092: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5093: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5094: fnd_msg_pub.add;

Line 5096: RAISE fnd_api.g_exc_error;

5092: fnd_message.set_name('CSI','CSI_REPLACEMENT_TXN_INVALID');
5093: fnd_message.set_token('INSTANCE_ID',l_old_instance_id);
5094: fnd_msg_pub.add;
5095: debug('Others - Item being replaced is no longer valid');
5096: RAISE fnd_api.g_exc_error;
5097: END;
5098: END IF;
5099: END IF;
5100: debug('End of transfer components check');

Line 5109: WHEN fnd_api.g_exc_error THEN

5105: END LOOP; -- end of inst relationship table loop
5106: END IF;-- end of inst relationship table count > 0
5107:
5108: EXCEPTION
5109: WHEN fnd_api.g_exc_error THEN
5110: x_return_status := fnd_api.g_ret_sts_error ;
5111: WHEN fnd_api.g_exc_unexpected_error THEN
5112: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5113: END get_ii_relation_tbl;

Line 5110: x_return_status := fnd_api.g_ret_sts_error ;

5106: END IF;-- end of inst relationship table count > 0
5107:
5108: EXCEPTION
5109: WHEN fnd_api.g_exc_error THEN
5110: x_return_status := fnd_api.g_ret_sts_error ;
5111: WHEN fnd_api.g_exc_unexpected_error THEN
5112: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5113: END get_ii_relation_tbl;
5114:

Line 5111: WHEN fnd_api.g_exc_unexpected_error THEN

5107:
5108: EXCEPTION
5109: WHEN fnd_api.g_exc_error THEN
5110: x_return_status := fnd_api.g_ret_sts_error ;
5111: WHEN fnd_api.g_exc_unexpected_error THEN
5112: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5113: END get_ii_relation_tbl;
5114:
5115:

Line 5112: x_return_status := fnd_api.g_ret_sts_unexp_error ;

5108: EXCEPTION
5109: WHEN fnd_api.g_exc_error THEN
5110: x_return_status := fnd_api.g_ret_sts_error ;
5111: WHEN fnd_api.g_exc_unexpected_error THEN
5112: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5113: END get_ii_relation_tbl;
5114:
5115:
5116: PROCEDURE rebuild_tbls(

Line 5146: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

5142: l_uou_ind binary_integer := 0;
5143: l_upd_ou_tbl csi_datastructures_pub.organization_units_tbl;
5144: l_cre_ou_tbl csi_datastructures_pub.organization_units_tbl;
5145:
5146: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
5147:
5148: BEGIN
5149:
5150: api_log('rebuild_tbls');

Line 5152: x_return_status := fnd_api.g_ret_sts_success;

5148: BEGIN
5149:
5150: api_log('rebuild_tbls');
5151:
5152: x_return_status := fnd_api.g_ret_sts_success;
5153:
5154: l_instance_id := p_new_instance_id;
5155:
5156: IF x_upd_party_tbl.count > 0 THEN

Line 5181: raise fnd_api.g_exc_error;

5177: WHEN no_data_found THEN
5178: fnd_message.set_name('CSI','CSI_INT_INST_OWNER_MISSING');
5179: fnd_message.set_token('INSTANCE_ID',l_instance_id);
5180: fnd_msg_pub.add;
5181: raise fnd_api.g_exc_error;
5182: END;
5183:
5184: IF x_upd_party_acct_tbl.count > 0 THEN
5185: FOR j IN x_upd_party_acct_tbl.first..x_upd_party_acct_tbl.last

Line 5214: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN

5210: x_instance_ou_id => l_instance_ou_id,
5211: x_obj_version_number => l_ou_obj_ver_num,
5212: x_return_status => x_return_status);
5213:
5214: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
5215: RAISE fnd_api.g_exc_error;
5216: END IF;
5217:
5218: l_upd_ou_tbl(l_upd_org).instance_ou_id := l_instance_ou_id;

Line 5215: RAISE fnd_api.g_exc_error;

5211: x_obj_version_number => l_ou_obj_ver_num,
5212: x_return_status => x_return_status);
5213:
5214: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
5215: RAISE fnd_api.g_exc_error;
5216: END IF;
5217:
5218: l_upd_ou_tbl(l_upd_org).instance_ou_id := l_instance_ou_id;
5219: l_upd_ou_tbl(l_upd_org).instance_id := l_instance_id;

Line 5237: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN

5233: x_attribute_value_id => l_attrib_value_id,
5234: x_obj_version_number => l_av_obj_ver_num,
5235: x_return_status => x_return_status);
5236:
5237: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
5238: RAISE fnd_api.g_exc_error;
5239: END IF;
5240:
5241: x_upd_ext_attrib_val_tbl(l_upd_ext).attribute_value_id := l_attrib_value_id;

Line 5238: RAISE fnd_api.g_exc_error;

5234: x_obj_version_number => l_av_obj_ver_num,
5235: x_return_status => x_return_status);
5236:
5237: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
5238: RAISE fnd_api.g_exc_error;
5239: END IF;
5240:
5241: x_upd_ext_attrib_val_tbl(l_upd_ext).attribute_value_id := l_attrib_value_id;
5242: x_upd_ext_attrib_val_tbl(l_upd_ext).instance_id := l_instance_id;

Line 5314: WHEN fnd_api.g_exc_error THEN

5310: x_cre_org_units_tbl := l_cre_ou_tbl;
5311: x_upd_org_units_tbl := l_upd_ou_tbl;
5312:
5313: EXCEPTION
5314: WHEN fnd_api.g_exc_error THEN
5315: x_return_status := fnd_api.g_ret_sts_error ;
5316: WHEN fnd_api.g_exc_unexpected_error THEN
5317: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5318: END rebuild_tbls ;

Line 5315: x_return_status := fnd_api.g_ret_sts_error ;

5311: x_upd_org_units_tbl := l_upd_ou_tbl;
5312:
5313: EXCEPTION
5314: WHEN fnd_api.g_exc_error THEN
5315: x_return_status := fnd_api.g_ret_sts_error ;
5316: WHEN fnd_api.g_exc_unexpected_error THEN
5317: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5318: END rebuild_tbls ;
5319:

Line 5316: WHEN fnd_api.g_exc_unexpected_error THEN

5312:
5313: EXCEPTION
5314: WHEN fnd_api.g_exc_error THEN
5315: x_return_status := fnd_api.g_ret_sts_error ;
5316: WHEN fnd_api.g_exc_unexpected_error THEN
5317: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5318: END rebuild_tbls ;
5319:
5320: PROCEDURE cascade_txn_dtls

Line 5317: x_return_status := fnd_api.g_ret_sts_unexp_error ;

5313: EXCEPTION
5314: WHEN fnd_api.g_exc_error THEN
5315: x_return_status := fnd_api.g_ret_sts_error ;
5316: WHEN fnd_api.g_exc_unexpected_error THEN
5317: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5318: END rebuild_tbls ;
5319:
5320: PROCEDURE cascade_txn_dtls
5321: (p_source_trx_id IN NUMBER,

Line 5365: x_return_status := fnd_api.g_ret_sts_success;

5361: BEGIN
5362:
5363: api_log('cascade_txn_dtls');
5364:
5365: x_return_status := fnd_api.g_ret_sts_success;
5366:
5367: FOR C1 IN get_txn_dtls( p_source_trx_id,p_source_trx_table )LOOP
5368:
5369: l_txn_line_detail_query_rec.txn_line_detail_id := C1.txn_line_detail_id;

Line 5373: p_commit => fnd_api.g_false,

5369: l_txn_line_detail_query_rec.txn_line_detail_id := C1.txn_line_detail_id;
5370:
5371: csi_t_txn_details_grp.get_transaction_details(
5372: p_api_version => 1.0,
5373: p_commit => fnd_api.g_false,
5374: p_init_msg_list => fnd_api.g_true,
5375: p_validation_level => fnd_api.g_valid_level_full,
5376: p_txn_line_query_rec => l_txn_line_query_rec,
5377: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,

Line 5374: p_init_msg_list => fnd_api.g_true,

5370:
5371: csi_t_txn_details_grp.get_transaction_details(
5372: p_api_version => 1.0,
5373: p_commit => fnd_api.g_false,
5374: p_init_msg_list => fnd_api.g_true,
5375: p_validation_level => fnd_api.g_valid_level_full,
5376: p_txn_line_query_rec => l_txn_line_query_rec,
5377: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
5378: x_txn_line_detail_tbl => l_line_dtl_tbl,

Line 5375: p_validation_level => fnd_api.g_valid_level_full,

5371: csi_t_txn_details_grp.get_transaction_details(
5372: p_api_version => 1.0,
5373: p_commit => fnd_api.g_false,
5374: p_init_msg_list => fnd_api.g_true,
5375: p_validation_level => fnd_api.g_valid_level_full,
5376: p_txn_line_query_rec => l_txn_line_query_rec,
5377: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
5378: x_txn_line_detail_tbl => l_line_dtl_tbl,
5379: p_get_parties_flag => fnd_api.g_true,

Line 5379: p_get_parties_flag => fnd_api.g_true,

5375: p_validation_level => fnd_api.g_valid_level_full,
5376: p_txn_line_query_rec => l_txn_line_query_rec,
5377: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
5378: x_txn_line_detail_tbl => l_line_dtl_tbl,
5379: p_get_parties_flag => fnd_api.g_true,
5380: x_txn_party_detail_tbl => l_pty_dtl_tbl,
5381: p_get_pty_accts_flag => fnd_api.g_true,
5382: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
5383: p_get_ii_rltns_flag => fnd_api.g_false,

Line 5381: p_get_pty_accts_flag => fnd_api.g_true,

5377: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
5378: x_txn_line_detail_tbl => l_line_dtl_tbl,
5379: p_get_parties_flag => fnd_api.g_true,
5380: x_txn_party_detail_tbl => l_pty_dtl_tbl,
5381: p_get_pty_accts_flag => fnd_api.g_true,
5382: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
5383: p_get_ii_rltns_flag => fnd_api.g_false,
5384: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
5385: p_get_org_assgns_flag => fnd_api.g_true,

Line 5383: p_get_ii_rltns_flag => fnd_api.g_false,

5379: p_get_parties_flag => fnd_api.g_true,
5380: x_txn_party_detail_tbl => l_pty_dtl_tbl,
5381: p_get_pty_accts_flag => fnd_api.g_true,
5382: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
5383: p_get_ii_rltns_flag => fnd_api.g_false,
5384: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
5385: p_get_org_assgns_flag => fnd_api.g_true,
5386: x_txn_org_assgn_tbl => l_org_assgn_tbl,
5387: p_get_ext_attrib_vals_flag => fnd_api.g_true,

Line 5385: p_get_org_assgns_flag => fnd_api.g_true,

5381: p_get_pty_accts_flag => fnd_api.g_true,
5382: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
5383: p_get_ii_rltns_flag => fnd_api.g_false,
5384: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
5385: p_get_org_assgns_flag => fnd_api.g_true,
5386: x_txn_org_assgn_tbl => l_org_assgn_tbl,
5387: p_get_ext_attrib_vals_flag => fnd_api.g_true,
5388: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
5389: p_get_csi_attribs_flag => fnd_api.g_false,

Line 5387: p_get_ext_attrib_vals_flag => fnd_api.g_true,

5383: p_get_ii_rltns_flag => fnd_api.g_false,
5384: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
5385: p_get_org_assgns_flag => fnd_api.g_true,
5386: x_txn_org_assgn_tbl => l_org_assgn_tbl,
5387: p_get_ext_attrib_vals_flag => fnd_api.g_true,
5388: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
5389: p_get_csi_attribs_flag => fnd_api.g_false,
5390: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
5391: p_get_csi_iea_values_flag => fnd_api.g_false,

Line 5389: p_get_csi_attribs_flag => fnd_api.g_false,

5385: p_get_org_assgns_flag => fnd_api.g_true,
5386: x_txn_org_assgn_tbl => l_org_assgn_tbl,
5387: p_get_ext_attrib_vals_flag => fnd_api.g_true,
5388: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
5389: p_get_csi_attribs_flag => fnd_api.g_false,
5390: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
5391: p_get_csi_iea_values_flag => fnd_api.g_false,
5392: x_csi_iea_values_tbl => l_csi_eav_tbl,
5393: p_get_txn_systems_flag => fnd_api.g_false,

Line 5391: p_get_csi_iea_values_flag => fnd_api.g_false,

5387: p_get_ext_attrib_vals_flag => fnd_api.g_true,
5388: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
5389: p_get_csi_attribs_flag => fnd_api.g_false,
5390: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
5391: p_get_csi_iea_values_flag => fnd_api.g_false,
5392: x_csi_iea_values_tbl => l_csi_eav_tbl,
5393: p_get_txn_systems_flag => fnd_api.g_false,
5394: x_txn_systems_tbl => l_txn_systems_tbl,
5395: x_return_status => x_return_status,

Line 5393: p_get_txn_systems_flag => fnd_api.g_false,

5389: p_get_csi_attribs_flag => fnd_api.g_false,
5390: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
5391: p_get_csi_iea_values_flag => fnd_api.g_false,
5392: x_csi_iea_values_tbl => l_csi_eav_tbl,
5393: p_get_txn_systems_flag => fnd_api.g_false,
5394: x_txn_systems_tbl => l_txn_systems_tbl,
5395: x_return_status => x_return_status,
5396: x_msg_count => x_msg_count,
5397: x_msg_data => x_msg_data);

Line 5399: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5395: x_return_status => x_return_status,
5396: x_msg_count => x_msg_count,
5397: x_msg_data => x_msg_data);
5398:
5399: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5400: debug('Get_transaction_details failed ');
5401: RAISE fnd_api.g_exc_error;
5402: END IF;
5403:

Line 5401: RAISE fnd_api.g_exc_error;

5397: x_msg_data => x_msg_data);
5398:
5399: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5400: debug('Get_transaction_details failed ');
5401: RAISE fnd_api.g_exc_error;
5402: END IF;
5403:
5404: debug('After getting txn details ');
5405: debug('l_line_dtl_tbl.count = '||l_line_dtl_tbl.count);

Line 5443: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

5439:
5440: debug('l_line_dtl_rec.quantity ='||l_line_dtl_rec.quantity);
5441:
5442: l_line_dtl_rec := l_line_dtl_tbl(1);
5443: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
5444: l_line_dtl_rec.transaction_system_id := C1.transaction_system_id;
5445: l_line_dtl_rec.csi_system_id := C1.csi_system_id;
5446: l_line_dtl_rec.quantity := p_ratio ;
5447: l_line_dtl_rec.transaction_line_id := C1.transaction_line_id ;

Line 5464: p_commit => fnd_api.g_false,

5460: debug(' ext_attrib_tbl.count = '||l_ext_attrib_tbl.count);
5461:
5462: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
5463: p_api_version => 1.0,
5464: p_commit => fnd_api.g_false,
5465: p_init_msg_list => fnd_api.g_true,
5466: p_validation_level => fnd_api.g_valid_level_full,
5467: p_txn_line_dtl_index => 1,
5468: p_txn_line_dtl_rec => l_line_dtl_rec,

Line 5465: p_init_msg_list => fnd_api.g_true,

5461:
5462: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
5463: p_api_version => 1.0,
5464: p_commit => fnd_api.g_false,
5465: p_init_msg_list => fnd_api.g_true,
5466: p_validation_level => fnd_api.g_valid_level_full,
5467: p_txn_line_dtl_index => 1,
5468: p_txn_line_dtl_rec => l_line_dtl_rec,
5469: px_txn_party_dtl_tbl => l_pty_dtl_tbl,

Line 5466: p_validation_level => fnd_api.g_valid_level_full,

5462: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
5463: p_api_version => 1.0,
5464: p_commit => fnd_api.g_false,
5465: p_init_msg_list => fnd_api.g_true,
5466: p_validation_level => fnd_api.g_valid_level_full,
5467: p_txn_line_dtl_index => 1,
5468: p_txn_line_dtl_rec => l_line_dtl_rec,
5469: px_txn_party_dtl_tbl => l_pty_dtl_tbl,
5470: px_txn_pty_acct_detail_tbl => l_pty_acct_tbl,

Line 5478: IF x_return_status <> fnd_api.g_ret_sts_success THEN

5474: x_return_status => x_return_status,
5475: x_msg_count => x_msg_count,
5476: x_msg_data => x_msg_data);
5477:
5478: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5479: debug('Error Splitting txn line detail ');
5480: RAISE fnd_api.g_exc_error;
5481: END IF;
5482:

Line 5480: RAISE fnd_api.g_exc_error;

5476: x_msg_data => x_msg_data);
5477:
5478: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5479: debug('Error Splitting txn line detail ');
5480: RAISE fnd_api.g_exc_error;
5481: END IF;
5482:
5483: debug('Converting the ids to index ');
5484:

Line 5497: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;

5493: px_ext_attrib_tbl => l_ext_attrib_tbl,
5494: px_txn_systems_tbl => l_txn_systems_tbl);
5495:
5496: l_line_dtl_rec := l_line_dtl_tbl(1);
5497: l_line_dtl_rec.txn_line_detail_id := FND_API.G_MISS_NUM;
5498: l_line_dtl_rec.quantity := p_ratio;
5499: l_line_dtl_rec.transaction_system_id := C1.transaction_system_id;
5500: l_line_dtl_rec.csi_system_id := C1.csi_system_id;
5501: l_line_dtl_rec.transaction_line_id := C1.transaction_line_id ;

Line 5510: WHEN fnd_api.g_exc_error THEN

5506:
5507: END LOOP;
5508:
5509: EXCEPTION
5510: WHEN fnd_api.g_exc_error THEN
5511: x_return_status := fnd_api.g_ret_sts_error ;
5512: WHEN fnd_api.g_exc_unexpected_error THEN
5513: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5514:

Line 5511: x_return_status := fnd_api.g_ret_sts_error ;

5507: END LOOP;
5508:
5509: EXCEPTION
5510: WHEN fnd_api.g_exc_error THEN
5511: x_return_status := fnd_api.g_ret_sts_error ;
5512: WHEN fnd_api.g_exc_unexpected_error THEN
5513: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5514:
5515: END cascade_txn_dtls;

Line 5512: WHEN fnd_api.g_exc_unexpected_error THEN

5508:
5509: EXCEPTION
5510: WHEN fnd_api.g_exc_error THEN
5511: x_return_status := fnd_api.g_ret_sts_error ;
5512: WHEN fnd_api.g_exc_unexpected_error THEN
5513: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5514:
5515: END cascade_txn_dtls;
5516:

Line 5513: x_return_status := fnd_api.g_ret_sts_unexp_error ;

5509: EXCEPTION
5510: WHEN fnd_api.g_exc_error THEN
5511: x_return_status := fnd_api.g_ret_sts_error ;
5512: WHEN fnd_api.g_exc_unexpected_error THEN
5513: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5514:
5515: END cascade_txn_dtls;
5516:
5517: PROCEDURE derive_party_id(

Line 5526: x_return_status := fnd_api.g_ret_sts_success;

5522: BEGIN
5523:
5524: api_log('derive_party_id');
5525:
5526: x_return_status := fnd_api.g_ret_sts_success;
5527:
5528: SELECT ship_rel.subject_id
5529: INTO x_party_id
5530: FROM hz_relationships ship_rel,

Line 5543: x_return_status := fnd_api.g_ret_sts_error ;

5539: WHEN no_data_found THEN
5540: fnd_message.set_name('CSI','CSI_INT_CUST_ROLEID_MISSING');
5541: fnd_message.set_token('CUST_ACCOUNT_ROLE_ID',p_cust_acct_role_id);
5542: fnd_msg_pub.add;
5543: x_return_status := fnd_api.g_ret_sts_error ;
5544: END derive_party_id;
5545:
5546: PROCEDURE get_party_owner(
5547: p_txn_line_detail_rec IN csi_t_datastructures_grp.txn_line_detail_rec,

Line 5573: x_return_status := fnd_api.g_ret_sts_success;

5569: BEGIN
5570:
5571: api_log('get_party_owner');
5572:
5573: x_return_status := fnd_api.g_ret_sts_success;
5574:
5575: /* get the debug level FROM the profile */
5576: l_debug_level := csi_t_gen_utility_pvt.g_debug_level;
5577:

Line 5584: (p_txn_party_detail_tbl(j).active_end_date = FND_API.G_MISS_DATE ))

5580:
5581: IF (p_txn_line_detail_rec.txn_line_detail_id = p_txn_party_detail_tbl(j).txn_line_detail_id) AND
5582: (p_txn_party_detail_tbl(j).relationship_type_code = 'OWNER' ) AND
5583: ((NVL(p_txn_party_detail_tbl(j).active_end_date,l_date ) > sysdate) OR
5584: (p_txn_party_detail_tbl(j).active_end_date = FND_API.G_MISS_DATE ))
5585: THEN
5586:
5587: x_cre_party_tbl.delete;
5588: x_upd_party_tbl.delete;

Line 5592: IF (NVL(p_txn_party_detail_tbl(j).instance_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN

5588: x_upd_party_tbl.delete;
5589: x_cre_party_acct_tbl.delete;
5590: x_upd_party_acct_tbl.delete;
5591:
5592: IF (NVL(p_txn_party_detail_tbl(j).instance_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
5593:
5594: x_cre_party_tbl(l_cre_pty).instance_party_id := FND_API.G_MISS_NUM;
5595: x_cre_party_tbl(l_cre_pty).instance_id := FND_API.G_MISS_NUM;
5596: x_cre_party_tbl(l_cre_pty).party_id := p_txn_party_detail_tbl(j).party_source_id;

Line 5594: x_cre_party_tbl(l_cre_pty).instance_party_id := FND_API.G_MISS_NUM;

5590: x_upd_party_acct_tbl.delete;
5591:
5592: IF (NVL(p_txn_party_detail_tbl(j).instance_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
5593:
5594: x_cre_party_tbl(l_cre_pty).instance_party_id := FND_API.G_MISS_NUM;
5595: x_cre_party_tbl(l_cre_pty).instance_id := FND_API.G_MISS_NUM;
5596: x_cre_party_tbl(l_cre_pty).party_id := p_txn_party_detail_tbl(j).party_source_id;
5597: x_cre_party_tbl(l_cre_pty).party_source_table := p_txn_party_detail_tbl(j).party_source_table;
5598: x_cre_party_tbl(l_cre_pty).relationship_type_code := p_txn_party_detail_tbl(j).relationship_type_code;

Line 5595: x_cre_party_tbl(l_cre_pty).instance_id := FND_API.G_MISS_NUM;

5591:
5592: IF (NVL(p_txn_party_detail_tbl(j).instance_party_id, FND_API.G_MISS_NUM) = FND_API.G_MISS_NUM) THEN
5593:
5594: x_cre_party_tbl(l_cre_pty).instance_party_id := FND_API.G_MISS_NUM;
5595: x_cre_party_tbl(l_cre_pty).instance_id := FND_API.G_MISS_NUM;
5596: x_cre_party_tbl(l_cre_pty).party_id := p_txn_party_detail_tbl(j).party_source_id;
5597: x_cre_party_tbl(l_cre_pty).party_source_table := p_txn_party_detail_tbl(j).party_source_table;
5598: x_cre_party_tbl(l_cre_pty).relationship_type_code := p_txn_party_detail_tbl(j).relationship_type_code;
5599: x_cre_party_tbl(l_cre_pty).contact_flag := p_txn_party_detail_tbl(j).contact_flag;

Line 5618: x_cre_party_tbl(l_cre_pty).object_version_number := FND_API.G_MISS_NUM;

5614: x_cre_party_tbl(l_cre_pty).attribute12 := p_txn_party_detail_tbl(j).attribute12;
5615: x_cre_party_tbl(l_cre_pty).attribute13 := p_txn_party_detail_tbl(j).attribute13;
5616: x_cre_party_tbl(l_cre_pty).attribute14 := p_txn_party_detail_tbl(j).attribute14;
5617: x_cre_party_tbl(l_cre_pty).attribute15 := p_txn_party_detail_tbl(j).attribute15;
5618: x_cre_party_tbl(l_cre_pty).object_version_number := FND_API.G_MISS_NUM;
5619:
5620: l_cre_pty := l_cre_pty + 1;
5621:
5622: ELSE

Line 5628: RAISE fnd_api.g_exc_error;

5624: l_obj_ver_num := csi_utl_pkg.get_pty_obj_ver_num(
5625: p_txn_party_detail_tbl(j).instance_party_id);
5626:
5627: IF l_obj_ver_num = -1 THEN
5628: RAISE fnd_api.g_exc_error;
5629: END IF;
5630:
5631: x_upd_party_tbl(l_upd_pty).instance_party_id := p_txn_party_detail_tbl(j).instance_party_id;
5632: x_upd_party_tbl(l_upd_pty).instance_id := p_txn_line_detail_rec.instance_id ;

Line 5668: (p_txn_pty_acct_dtl_tbl(k).active_end_date = FND_API.G_MISS_DATE))

5664: IF (p_txn_pty_acct_dtl_tbl(k).txn_party_detail_id = p_txn_party_detail_tbl(j).txn_party_detail_id) AND
5665: -- Commenting this condition (Porting fix for Bug 3625218)
5666: -- (p_txn_pty_acct_dtl_tbl(k).relationship_type_code = 'OWNER') AND
5667: ((NVL(p_txn_pty_acct_dtl_tbl(k).active_end_date, l_date ) > sysdate ) OR
5668: (p_txn_pty_acct_dtl_tbl(k).active_end_date = FND_API.G_MISS_DATE))
5669: THEN
5670: IF NVL(p_txn_pty_acct_dtl_tbl(k).ip_account_id,FND_API.G_MISS_NUM)= FND_API.G_MISS_NUM THEN
5671: x_cre_party_acct_tbl(l_cre_pty_acct).ip_account_id := FND_API.G_MISS_NUM;
5672: x_cre_party_acct_tbl(l_cre_pty_acct).party_account_id := p_txn_pty_acct_dtl_tbl(k).account_id;

Line 5670: IF NVL(p_txn_pty_acct_dtl_tbl(k).ip_account_id,FND_API.G_MISS_NUM)= FND_API.G_MISS_NUM THEN

5666: -- (p_txn_pty_acct_dtl_tbl(k).relationship_type_code = 'OWNER') AND
5667: ((NVL(p_txn_pty_acct_dtl_tbl(k).active_end_date, l_date ) > sysdate ) OR
5668: (p_txn_pty_acct_dtl_tbl(k).active_end_date = FND_API.G_MISS_DATE))
5669: THEN
5670: IF NVL(p_txn_pty_acct_dtl_tbl(k).ip_account_id,FND_API.G_MISS_NUM)= FND_API.G_MISS_NUM THEN
5671: x_cre_party_acct_tbl(l_cre_pty_acct).ip_account_id := FND_API.G_MISS_NUM;
5672: x_cre_party_acct_tbl(l_cre_pty_acct).party_account_id := p_txn_pty_acct_dtl_tbl(k).account_id;
5673: x_cre_party_acct_tbl(l_cre_pty_acct).relationship_type_code := p_txn_pty_acct_dtl_tbl(k).relationship_type_code;
5674: x_cre_party_acct_tbl(l_cre_pty_acct).bill_to_address := p_txn_pty_acct_dtl_tbl(k).bill_to_address_id ;

Line 5671: x_cre_party_acct_tbl(l_cre_pty_acct).ip_account_id := FND_API.G_MISS_NUM;

5667: ((NVL(p_txn_pty_acct_dtl_tbl(k).active_end_date, l_date ) > sysdate ) OR
5668: (p_txn_pty_acct_dtl_tbl(k).active_end_date = FND_API.G_MISS_DATE))
5669: THEN
5670: IF NVL(p_txn_pty_acct_dtl_tbl(k).ip_account_id,FND_API.G_MISS_NUM)= FND_API.G_MISS_NUM THEN
5671: x_cre_party_acct_tbl(l_cre_pty_acct).ip_account_id := FND_API.G_MISS_NUM;
5672: x_cre_party_acct_tbl(l_cre_pty_acct).party_account_id := p_txn_pty_acct_dtl_tbl(k).account_id;
5673: x_cre_party_acct_tbl(l_cre_pty_acct).relationship_type_code := p_txn_pty_acct_dtl_tbl(k).relationship_type_code;
5674: x_cre_party_acct_tbl(l_cre_pty_acct).bill_to_address := p_txn_pty_acct_dtl_tbl(k).bill_to_address_id ;
5675: x_cre_party_acct_tbl(l_cre_pty_acct).ship_to_address := p_txn_pty_acct_dtl_tbl(k).ship_to_address_id;

Line 5677: x_cre_party_acct_tbl(l_cre_pty_acct).active_start_date := FND_API.G_MISS_DATE ;

5673: x_cre_party_acct_tbl(l_cre_pty_acct).relationship_type_code := p_txn_pty_acct_dtl_tbl(k).relationship_type_code;
5674: x_cre_party_acct_tbl(l_cre_pty_acct).bill_to_address := p_txn_pty_acct_dtl_tbl(k).bill_to_address_id ;
5675: x_cre_party_acct_tbl(l_cre_pty_acct).ship_to_address := p_txn_pty_acct_dtl_tbl(k).ship_to_address_id;
5676: x_cre_party_acct_tbl(l_cre_pty_acct).instance_party_id := p_txn_party_detail_tbl(j).instance_party_id;
5677: x_cre_party_acct_tbl(l_cre_pty_acct).active_start_date := FND_API.G_MISS_DATE ;
5678: x_cre_party_acct_tbl(l_cre_pty_acct).active_end_date := p_txn_pty_acct_dtl_tbl(k).active_end_date;
5679: x_cre_party_acct_tbl(l_cre_pty_acct).context := p_txn_pty_acct_dtl_tbl(k).context ;
5680: x_cre_party_acct_tbl(l_cre_pty_acct).attribute1 := p_txn_pty_acct_dtl_tbl(k).attribute1 ;
5681: x_cre_party_acct_tbl(l_cre_pty_acct).attribute2 := p_txn_pty_acct_dtl_tbl(k).attribute2 ;

Line 5699: x_upd_party_acct_tbl(l_upd_pty_acct).ip_account_id := FND_API.G_MISS_NUM;

5695: x_cre_party_acct_tbl(l_cre_pty_acct).object_version_number := l_obj_ver_num;
5696: x_cre_party_acct_tbl(l_cre_pty_acct).parent_tbl_index := 1;
5697: l_cre_pty_acct := l_cre_pty_acct + 1;
5698: ELSE
5699: x_upd_party_acct_tbl(l_upd_pty_acct).ip_account_id := FND_API.G_MISS_NUM;
5700: x_upd_party_acct_tbl(l_upd_pty_acct).party_account_id := p_txn_pty_acct_dtl_tbl(k).account_id;
5701: x_upd_party_acct_tbl(l_upd_pty_acct).relationship_type_code := p_txn_pty_acct_dtl_tbl(k).relationship_type_code;
5702: x_upd_party_acct_tbl(l_upd_pty_acct).bill_to_address := p_txn_pty_acct_dtl_tbl(k).bill_to_address_id ;
5703: x_upd_party_acct_tbl(l_upd_pty_acct).ship_to_address := p_txn_pty_acct_dtl_tbl(k).ship_to_address_id;

Line 5705: x_upd_party_acct_tbl(l_upd_pty_acct).active_start_date := FND_API.G_MISS_DATE ;

5701: x_upd_party_acct_tbl(l_upd_pty_acct).relationship_type_code := p_txn_pty_acct_dtl_tbl(k).relationship_type_code;
5702: x_upd_party_acct_tbl(l_upd_pty_acct).bill_to_address := p_txn_pty_acct_dtl_tbl(k).bill_to_address_id ;
5703: x_upd_party_acct_tbl(l_upd_pty_acct).ship_to_address := p_txn_pty_acct_dtl_tbl(k).ship_to_address_id;
5704: x_upd_party_acct_tbl(l_upd_pty_acct).instance_party_id := p_txn_party_detail_tbl(j).instance_party_id;
5705: x_upd_party_acct_tbl(l_upd_pty_acct).active_start_date := FND_API.G_MISS_DATE ;
5706: x_upd_party_acct_tbl(l_upd_pty_acct).active_end_date := p_txn_pty_acct_dtl_tbl(k).active_end_date;
5707: x_upd_party_acct_tbl(l_upd_pty_acct).context := p_txn_pty_acct_dtl_tbl(k).context ;
5708: x_upd_party_acct_tbl(l_upd_pty_acct).attribute1 := p_txn_pty_acct_dtl_tbl(k).attribute1 ;
5709: x_upd_party_acct_tbl(l_upd_pty_acct).attribute2 := p_txn_pty_acct_dtl_tbl(k).attribute2 ;

Line 5735: WHEN fnd_api.g_exc_error THEN

5731: END LOOP;
5732: END IF;
5733:
5734: EXCEPTION
5735: WHEN fnd_api.g_exc_error THEN
5736: x_return_status := fnd_api.g_ret_sts_error ;
5737: WHEN fnd_api.g_exc_unexpected_error THEN
5738: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5739: END get_party_owner;

Line 5736: x_return_status := fnd_api.g_ret_sts_error ;

5732: END IF;
5733:
5734: EXCEPTION
5735: WHEN fnd_api.g_exc_error THEN
5736: x_return_status := fnd_api.g_ret_sts_error ;
5737: WHEN fnd_api.g_exc_unexpected_error THEN
5738: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5739: END get_party_owner;
5740:

Line 5737: WHEN fnd_api.g_exc_unexpected_error THEN

5733:
5734: EXCEPTION
5735: WHEN fnd_api.g_exc_error THEN
5736: x_return_status := fnd_api.g_ret_sts_error ;
5737: WHEN fnd_api.g_exc_unexpected_error THEN
5738: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5739: END get_party_owner;
5740:
5741:

Line 5738: x_return_status := fnd_api.g_ret_sts_unexp_error ;

5734: EXCEPTION
5735: WHEN fnd_api.g_exc_error THEN
5736: x_return_status := fnd_api.g_ret_sts_error ;
5737: WHEN fnd_api.g_exc_unexpected_error THEN
5738: x_return_status := fnd_api.g_ret_sts_unexp_error ;
5739: END get_party_owner;
5740:
5741:
5742: /* -------------------------------------------------------------------- */

Line 5757: x_return_status := fnd_api.g_ret_sts_success;

5753: l_inst_tbl csi_datastructures_pub.instance_tbl;
5754: l_inst_hdr_tbl csi_datastructures_pub.instance_header_tbl;
5755: BEGIN
5756:
5757: x_return_status := fnd_api.g_ret_sts_success;
5758:
5759: api_log('make_non_header_tbl');
5760:
5761: l_inst_hdr_tbl := p_instance_header_tbl;

Line 5849: x_return_status := fnd_api.g_ret_sts_success;

5845: x_return_status OUT NOCOPY varchar2)
5846: IS
5847: BEGIN
5848:
5849: x_return_status := fnd_api.g_ret_sts_success;
5850: x_call_contracts := fnd_api.g_true;
5851:
5852: api_log('call_contracts_chk');
5853:

Line 5850: x_call_contracts := fnd_api.g_true;

5846: IS
5847: BEGIN
5848:
5849: x_return_status := fnd_api.g_ret_sts_success;
5850: x_call_contracts := fnd_api.g_true;
5851:
5852: api_log('call_contracts_chk');
5853:
5854: IF p_txn_ii_rltns_tbl.count > 0 THEN

Line 5865: x_call_contracts := fnd_api.g_false;

5861: AND p_txn_ii_rltns_tbl(l_ind).object_id = p_txn_line_detail_id ))
5862: THEN
5863: IF p_txn_ii_rltns_tbl(l_ind).relationship_type_code IN
5864: ('REPLACED-BY','REPLACEMENT-FOR', 'UPGRADED-FROM') THEN
5865: x_call_contracts := fnd_api.g_false;
5866: END IF;
5867: END IF;
5868: END LOOP;
5869: END IF;

Line 5874: WHEN fnd_api.g_exc_error THEN

5870:
5871: debug(' l_contracts_flag :'||x_call_contracts);
5872:
5873: EXCEPTION
5874: WHEN fnd_api.g_exc_error THEN
5875: x_return_status := fnd_api.g_ret_sts_error;
5876: END call_contracts_chk;
5877:
5878:

Line 5875: x_return_status := fnd_api.g_ret_sts_error;

5871: debug(' l_contracts_flag :'||x_call_contracts);
5872:
5873: EXCEPTION
5874: WHEN fnd_api.g_exc_error THEN
5875: x_return_status := fnd_api.g_ret_sts_error;
5876: END call_contracts_chk;
5877:
5878:
5879: /* local debug dump routines */

Line 5914: x_return_status := fnd_api.g_ret_sts_success;

5910: BEGIN
5911:
5912: api_log('get_item_control_rec');
5913:
5914: x_return_status := fnd_api.g_ret_sts_success;
5915:
5916: BEGIN
5917:
5918: SELECT inventory_item_id,

Line 5930: RAISE fnd_api.g_exc_error;

5926: WHEN no_data_found THEN
5927: fnd_message.set_name('CSI','CSI_NO_INVENTORY_RECORDS');
5928: fnd_message.set_token('MTL_TRANSACTION_ID',p_mtl_txn_id);
5929: fnd_msg_pub.add;
5930: RAISE fnd_api.g_exc_error;
5931:
5932: END;
5933:
5934: BEGIN

Line 5970: RAISE fnd_api.g_exc_error;

5966: fnd_message.set_name('CSI', 'CSI_INT_ITEM_ID_MISSING');
5967: fnd_message.set_token('INVENTORY_ITEM_ID', l_item_control_rec.inventory_item_id);
5968: fnd_message.set_token('INV_ORGANZATION_ID', l_item_control_rec.organization_id);
5969: fnd_msg_pub.add;
5970: RAISE fnd_api.g_exc_error;
5971: END;
5972:
5973: BEGIN
5974: SELECT nvl(negative_inv_receipt_code,1)

Line 5986: WHEN fnd_api.g_exc_error THEN

5982:
5983: x_item_control_rec := l_item_control_rec;
5984:
5985: EXCEPTION
5986: WHEN fnd_api.g_exc_error THEN
5987: x_return_status := fnd_api.g_ret_sts_error;
5988:
5989: END get_item_control_rec;
5990:

Line 5987: x_return_status := fnd_api.g_ret_sts_error;

5983: x_item_control_rec := l_item_control_rec;
5984:
5985: EXCEPTION
5986: WHEN fnd_api.g_exc_error THEN
5987: x_return_status := fnd_api.g_ret_sts_error;
5988:
5989: END get_item_control_rec;
5990:
5991:

Line 6048: p_commit => fnd_api.g_false,

6044: debug('l_relationship_query_rec.relationship_type_code :'|| l_relationship_query_rec.relationship_type_code);
6045:
6046: csi_ii_relationships_pub.get_relationships (
6047: p_api_version => 1.0 ,
6048: p_commit => fnd_api.g_false,
6049: p_init_msg_list => fnd_api.g_false,
6050: p_validation_level => fnd_api.g_valid_level_full,
6051: p_relationship_query_rec => l_relationship_query_rec,
6052: p_depth => NULL,

Line 6049: p_init_msg_list => fnd_api.g_false,

6045:
6046: csi_ii_relationships_pub.get_relationships (
6047: p_api_version => 1.0 ,
6048: p_commit => fnd_api.g_false,
6049: p_init_msg_list => fnd_api.g_false,
6050: p_validation_level => fnd_api.g_valid_level_full,
6051: p_relationship_query_rec => l_relationship_query_rec,
6052: p_depth => NULL,
6053: p_time_stamp => NULL ,

Line 6050: p_validation_level => fnd_api.g_valid_level_full,

6046: csi_ii_relationships_pub.get_relationships (
6047: p_api_version => 1.0 ,
6048: p_commit => fnd_api.g_false,
6049: p_init_msg_list => fnd_api.g_false,
6050: p_validation_level => fnd_api.g_valid_level_full,
6051: p_relationship_query_rec => l_relationship_query_rec,
6052: p_depth => NULL,
6053: p_time_stamp => NULL ,
6054: p_active_relationship_only => fnd_api.g_true,

Line 6054: p_active_relationship_only => fnd_api.g_true,

6050: p_validation_level => fnd_api.g_valid_level_full,
6051: p_relationship_query_rec => l_relationship_query_rec,
6052: p_depth => NULL,
6053: p_time_stamp => NULL ,
6054: p_active_relationship_only => fnd_api.g_true,
6055: x_relationship_tbl => l_ii_relationship_tbl,
6056: x_return_status => x_return_status,
6057: x_msg_count => x_msg_count ,
6058: x_msg_data => x_msg_data) ;

Line 6060: IF NOT(x_return_status = fnd_api.g_ret_sts_success)

6056: x_return_status => x_return_status,
6057: x_msg_count => x_msg_count ,
6058: x_msg_data => x_msg_data) ;
6059:
6060: IF NOT(x_return_status = fnd_api.g_ret_sts_success)
6061: THEN
6062: debug('csi_ii_relationships_pub.get_relationships call failed :'||
6063: x_msg_data);
6064: RAISE fnd_api.g_exc_error;

Line 6064: RAISE fnd_api.g_exc_error;

6060: IF NOT(x_return_status = fnd_api.g_ret_sts_success)
6061: THEN
6062: debug('csi_ii_relationships_pub.get_relationships call failed :'||
6063: x_msg_data);
6064: RAISE fnd_api.g_exc_error;
6065: END IF;
6066: IF l_ii_relationship_tbl.count > 0
6067: THEN
6068: debug('Relations are already interfaced to IB');

Line 6079: WHEN FND_API.G_EXC_ERROR THEN

6075: x_xface_to_IB_flag := 'N' ;
6076: END IF ;
6077:
6078: EXCEPTION
6079: WHEN FND_API.G_EXC_ERROR THEN
6080: x_return_status := FND_API.G_RET_STS_ERROR ;
6081: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6082: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6083: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);

Line 6080: x_return_status := FND_API.G_RET_STS_ERROR ;

6076: END IF ;
6077:
6078: EXCEPTION
6079: WHEN FND_API.G_EXC_ERROR THEN
6080: x_return_status := FND_API.G_RET_STS_ERROR ;
6081: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6082: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6083: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6084: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 6082: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

6078: EXCEPTION
6079: WHEN FND_API.G_EXC_ERROR THEN
6080: x_return_status := FND_API.G_RET_STS_ERROR ;
6081: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6082: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6083: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6084: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6085: END rltns_xfaced_to_IB ;
6086:

Line 6084: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6080: x_return_status := FND_API.G_RET_STS_ERROR ;
6081: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6082: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6083: debug ('Unexpected error in rltns_xfaced_to_IB '||SQLERRM);
6084: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6085: END rltns_xfaced_to_IB ;
6086:
6087: ---Added (End) for m-to-m enhancements
6088:

Line 6168: IF p_txn_line_detail_tbl(i).source_txn_line_detail_id = fnd_api.g_miss_num THEN

6164: ---In Case of Non-Shippable Items Txn Detail Line may NOT
6165: ---have source_txn_line_detail_id at all
6166: -- This IF is introduced for bug 2814779 . The source TLD ID was g_miss_num for Models 'cause it wasn't getting properly earlier ..
6167:
6168: IF p_txn_line_detail_tbl(i).source_txn_line_detail_id = fnd_api.g_miss_num THEN
6169: l_src_txn_line_dtl_id := NULL;
6170: ELSIF p_txn_line_detail_tbl(i).source_txn_line_detail_id <> NULL THEN
6171: l_src_txn_line_dtl_id := p_txn_line_detail_tbl(i).source_txn_line_detail_id;
6172: END IF;

Line 6189: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6185: Exception when others Then
6186: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
6187: fnd_message.set_token('MESSAGE', substr(sqlerrm, 1, 240));
6188: fnd_msg_pub.add;
6189: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6190: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
6191: End;
6192:
6193: IF l_src_txn_id <> l_orig_oe_src_txn_id THEN --added this for bug 2795136

Line 6190: raise FND_API.G_EXC_UNEXPECTED_ERROR ;

6186: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
6187: fnd_message.set_token('MESSAGE', substr(sqlerrm, 1, 240));
6188: fnd_msg_pub.add;
6189: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6190: raise FND_API.G_EXC_UNEXPECTED_ERROR ;
6191: End;
6192:
6193: IF l_src_txn_id <> l_orig_oe_src_txn_id THEN --added this for bug 2795136
6194: FOR oe_tld_relns_rec IN oe_tld_relns_cur (l_orig_oe_tld)

Line 6256: x_txn_ii_rltns_tbl(l_ii_indx).txn_relationship_id := fnd_api.g_miss_num ;

6252: ELSE
6253: x_txn_ii_rltns_tbl(l_ii_indx).object_id := wsh_partner_tld_rec.txn_line_detail_id ;
6254: x_txn_ii_rltns_tbl(l_ii_indx).subject_id := p_txn_line_detail_tbl(i).txn_line_detail_id ;
6255: END IF ; ---l_partner_tld = SUBJECT
6256: x_txn_ii_rltns_tbl(l_ii_indx).txn_relationship_id := fnd_api.g_miss_num ;
6257: x_txn_ii_rltns_tbl(l_ii_indx).object_version_number := 1;
6258: END LOOP ; --wsh_partner_tld_cur
6259:
6260: debug ('x_txn_ii_rltns_tbl.count :'|| x_txn_ii_rltns_tbl.count);

Line 6270: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

6266:
6267: debug ('End : build_txn_relations');
6268:
6269: EXCEPTION
6270: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6271: debug (' Unexpected error in build_txn_relations '||SQLERRM);
6272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6273: WHEN OTHERS
6274: THEN

Line 6272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

6268:
6269: EXCEPTION
6270: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
6271: debug (' Unexpected error in build_txn_relations '||SQLERRM);
6272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6273: WHEN OTHERS
6274: THEN
6275: debug (' build_txn_relations failed '||SQLERRM);
6276: x_return_status := FND_API.G_RET_STS_ERROR ;

Line 6276: x_return_status := FND_API.G_RET_STS_ERROR ;

6272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6273: WHEN OTHERS
6274: THEN
6275: debug (' build_txn_relations failed '||SQLERRM);
6276: x_return_status := FND_API.G_RET_STS_ERROR ;
6277: END build_txn_relations ;
6278: ---Added (End) for m-to-m enhancements
6279:
6280:

Line 6321: l_txn_line_detail_query_rec.txn_line_detail_id := fnd_api.g_miss_num ;

6317: BEGIN
6318: debug('Begin get_partner_rltns'|| p_txn_line_detail_rec.txn_line_detail_id );
6319: FOR txn_ii_relns_rec IN txn_ii_relns_cur(p_txn_line_detail_rec.txn_line_detail_id)
6320: LOOP
6321: l_txn_line_detail_query_rec.txn_line_detail_id := fnd_api.g_miss_num ;
6322: debug('Subject id : '|| txn_ii_relns_rec.subject_id);
6323: debug('object id : '|| txn_ii_relns_rec.object_id);
6324: l_index := l_index+1 ;
6325: debug('l_index :'|| l_index);

Line 6377: p_commit => fnd_api.g_false,

6373:
6374: ---get the txn line details
6375: csi_t_txn_details_grp.get_transaction_details(
6376: p_api_version => 1.0,
6377: p_commit => fnd_api.g_false,
6378: p_init_msg_list => fnd_api.g_false,
6379: p_validation_level => fnd_api.g_valid_level_full,
6380: p_txn_line_query_rec => l_txn_line_query_rec ,
6381: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,

Line 6378: p_init_msg_list => fnd_api.g_false,

6374: ---get the txn line details
6375: csi_t_txn_details_grp.get_transaction_details(
6376: p_api_version => 1.0,
6377: p_commit => fnd_api.g_false,
6378: p_init_msg_list => fnd_api.g_false,
6379: p_validation_level => fnd_api.g_valid_level_full,
6380: p_txn_line_query_rec => l_txn_line_query_rec ,
6381: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
6382: x_txn_line_detail_tbl => l_txn_line_detail_tbl ,

Line 6379: p_validation_level => fnd_api.g_valid_level_full,

6375: csi_t_txn_details_grp.get_transaction_details(
6376: p_api_version => 1.0,
6377: p_commit => fnd_api.g_false,
6378: p_init_msg_list => fnd_api.g_false,
6379: p_validation_level => fnd_api.g_valid_level_full,
6380: p_txn_line_query_rec => l_txn_line_query_rec ,
6381: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
6382: x_txn_line_detail_tbl => l_txn_line_detail_tbl ,
6383: p_get_parties_flag => fnd_api.g_false,

Line 6383: p_get_parties_flag => fnd_api.g_false,

6379: p_validation_level => fnd_api.g_valid_level_full,
6380: p_txn_line_query_rec => l_txn_line_query_rec ,
6381: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
6382: x_txn_line_detail_tbl => l_txn_line_detail_tbl ,
6383: p_get_parties_flag => fnd_api.g_false,
6384: x_txn_party_detail_tbl => x_txn_party_detail_tbl ,
6385: p_get_pty_accts_flag => fnd_api.g_false,
6386: x_txn_pty_acct_detail_tbl => x_txn_pty_acct_detail_tbl,
6387: p_get_ii_rltns_flag => fnd_api.g_false,

Line 6385: p_get_pty_accts_flag => fnd_api.g_false,

6381: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
6382: x_txn_line_detail_tbl => l_txn_line_detail_tbl ,
6383: p_get_parties_flag => fnd_api.g_false,
6384: x_txn_party_detail_tbl => x_txn_party_detail_tbl ,
6385: p_get_pty_accts_flag => fnd_api.g_false,
6386: x_txn_pty_acct_detail_tbl => x_txn_pty_acct_detail_tbl,
6387: p_get_ii_rltns_flag => fnd_api.g_false,
6388: x_txn_ii_rltns_tbl => l_temp_txn_ii_rltns_tbl,
6389: p_get_org_assgns_flag => fnd_api.g_false,

Line 6387: p_get_ii_rltns_flag => fnd_api.g_false,

6383: p_get_parties_flag => fnd_api.g_false,
6384: x_txn_party_detail_tbl => x_txn_party_detail_tbl ,
6385: p_get_pty_accts_flag => fnd_api.g_false,
6386: x_txn_pty_acct_detail_tbl => x_txn_pty_acct_detail_tbl,
6387: p_get_ii_rltns_flag => fnd_api.g_false,
6388: x_txn_ii_rltns_tbl => l_temp_txn_ii_rltns_tbl,
6389: p_get_org_assgns_flag => fnd_api.g_false,
6390: x_txn_org_assgn_tbl => x_txn_org_assgn_tbl,
6391: p_get_ext_attrib_vals_flag => fnd_api.g_false,

Line 6389: p_get_org_assgns_flag => fnd_api.g_false,

6385: p_get_pty_accts_flag => fnd_api.g_false,
6386: x_txn_pty_acct_detail_tbl => x_txn_pty_acct_detail_tbl,
6387: p_get_ii_rltns_flag => fnd_api.g_false,
6388: x_txn_ii_rltns_tbl => l_temp_txn_ii_rltns_tbl,
6389: p_get_org_assgns_flag => fnd_api.g_false,
6390: x_txn_org_assgn_tbl => x_txn_org_assgn_tbl,
6391: p_get_ext_attrib_vals_flag => fnd_api.g_false,
6392: x_txn_ext_attrib_vals_tbl => x_txn_ext_attrib_vals_tbl,
6393: p_get_csi_attribs_flag => fnd_api.g_false,

Line 6391: p_get_ext_attrib_vals_flag => fnd_api.g_false,

6387: p_get_ii_rltns_flag => fnd_api.g_false,
6388: x_txn_ii_rltns_tbl => l_temp_txn_ii_rltns_tbl,
6389: p_get_org_assgns_flag => fnd_api.g_false,
6390: x_txn_org_assgn_tbl => x_txn_org_assgn_tbl,
6391: p_get_ext_attrib_vals_flag => fnd_api.g_false,
6392: x_txn_ext_attrib_vals_tbl => x_txn_ext_attrib_vals_tbl,
6393: p_get_csi_attribs_flag => fnd_api.g_false,
6394: x_csi_ext_attribs_tbl => x_csi_ext_attribs_tbl,
6395: p_get_csi_iea_values_flag => fnd_api.g_false,

Line 6393: p_get_csi_attribs_flag => fnd_api.g_false,

6389: p_get_org_assgns_flag => fnd_api.g_false,
6390: x_txn_org_assgn_tbl => x_txn_org_assgn_tbl,
6391: p_get_ext_attrib_vals_flag => fnd_api.g_false,
6392: x_txn_ext_attrib_vals_tbl => x_txn_ext_attrib_vals_tbl,
6393: p_get_csi_attribs_flag => fnd_api.g_false,
6394: x_csi_ext_attribs_tbl => x_csi_ext_attribs_tbl,
6395: p_get_csi_iea_values_flag => fnd_api.g_false,
6396: x_csi_iea_values_tbl => x_csi_iea_values_tbl ,
6397: p_get_txn_systems_flag => fnd_api.g_false ,

Line 6395: p_get_csi_iea_values_flag => fnd_api.g_false,

6391: p_get_ext_attrib_vals_flag => fnd_api.g_false,
6392: x_txn_ext_attrib_vals_tbl => x_txn_ext_attrib_vals_tbl,
6393: p_get_csi_attribs_flag => fnd_api.g_false,
6394: x_csi_ext_attribs_tbl => x_csi_ext_attribs_tbl,
6395: p_get_csi_iea_values_flag => fnd_api.g_false,
6396: x_csi_iea_values_tbl => x_csi_iea_values_tbl ,
6397: p_get_txn_systems_flag => fnd_api.g_false ,
6398: x_txn_systems_tbl => x_txn_systems_tbl ,
6399: x_return_status => x_return_status,

Line 6397: p_get_txn_systems_flag => fnd_api.g_false ,

6393: p_get_csi_attribs_flag => fnd_api.g_false,
6394: x_csi_ext_attribs_tbl => x_csi_ext_attribs_tbl,
6395: p_get_csi_iea_values_flag => fnd_api.g_false,
6396: x_csi_iea_values_tbl => x_csi_iea_values_tbl ,
6397: p_get_txn_systems_flag => fnd_api.g_false ,
6398: x_txn_systems_tbl => x_txn_systems_tbl ,
6399: x_return_status => x_return_status,
6400: x_msg_count => x_msg_count,
6401: x_msg_data => x_msg_data);

Line 6403: IF x_return_status <> fnd_api.g_ret_sts_success

6399: x_return_status => x_return_status,
6400: x_msg_count => x_msg_count,
6401: x_msg_data => x_msg_data);
6402:
6403: IF x_return_status <> fnd_api.g_ret_sts_success
6404: THEN
6405: RAISE fnd_api.g_exc_error;
6406: END IF;
6407:

Line 6405: RAISE fnd_api.g_exc_error;

6401: x_msg_data => x_msg_data);
6402:
6403: IF x_return_status <> fnd_api.g_ret_sts_success
6404: THEN
6405: RAISE fnd_api.g_exc_error;
6406: END IF;
6407:
6408: IF l_txn_line_detail_tbl.COUNT > 0 THEN
6409: FOR i IN l_txn_line_detail_tbl.FIRST .. l_txn_line_detail_tbl.LAST

Line 6421: x_return_status := FND_API.G_RET_STS_ERROR ;

6417: debug('End get_partner_relations');
6418: EXCEPTION
6419: WHEN OTHERS
6420: THEN
6421: x_return_status := FND_API.G_RET_STS_ERROR ;
6422: debug ('Error in get_partner_relations : '|| sqlerrm);
6423: END get_partner_rltns ;
6424: ---Added (End) for m-to-m enhancements
6425:

Line 6444: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

6440: l_instance_tbl csi_datastructures_pub.instance_tbl;
6441: l_o_instance_tbl csi_datastructures_pub.instance_tbl;
6442: l_o_ind binary_integer;
6443:
6444: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
6445: l_msg_data varchar2(512);
6446: l_msg_count number;
6447:
6448: BEGIN

Line 6450: x_return_status := fnd_api.g_ret_sts_success;

6446: l_msg_count number;
6447:
6448: BEGIN
6449:
6450: x_return_status := fnd_api.g_ret_sts_success;
6451: api_log('split_instances');
6452:
6453: l_instance_tbl := px_instance_tbl;
6454: l_o_ind := 0;

Line 6467: p_commit => fnd_api.g_false,

6463: p_pkg_name => 'csi_item_instance_pvt');
6464:
6465: csi_item_instance_pvt.split_item_instance_lines(
6466: p_api_version => 1.0,
6467: p_commit => fnd_api.g_false,
6468: p_init_msg_list => fnd_api.g_true,
6469: p_validation_level => fnd_api.g_valid_level_full,
6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,

Line 6468: p_init_msg_list => fnd_api.g_true,

6464:
6465: csi_item_instance_pvt.split_item_instance_lines(
6466: p_api_version => 1.0,
6467: p_commit => fnd_api.g_false,
6468: p_init_msg_list => fnd_api.g_true,
6469: p_validation_level => fnd_api.g_valid_level_full,
6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,

Line 6469: p_validation_level => fnd_api.g_valid_level_full,

6465: csi_item_instance_pvt.split_item_instance_lines(
6466: p_api_version => 1.0,
6467: p_commit => fnd_api.g_false,
6468: p_init_msg_list => fnd_api.g_true,
6469: p_validation_level => fnd_api.g_valid_level_full,
6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,

Line 6471: p_copy_ext_attribs => fnd_api.g_true,

6467: p_commit => fnd_api.g_false,
6468: p_init_msg_list => fnd_api.g_true,
6469: p_validation_level => fnd_api.g_valid_level_full,
6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,
6474: p_copy_accounts => fnd_api.g_true,
6475: p_copy_asset_assignments => fnd_api.g_true,

Line 6472: p_copy_org_assignments => fnd_api.g_true,

6468: p_init_msg_list => fnd_api.g_true,
6469: p_validation_level => fnd_api.g_valid_level_full,
6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,
6474: p_copy_accounts => fnd_api.g_true,
6475: p_copy_asset_assignments => fnd_api.g_true,
6476: p_copy_pricing_attribs => fnd_api.g_true,

Line 6473: p_copy_parties => fnd_api.g_true,

6469: p_validation_level => fnd_api.g_valid_level_full,
6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,
6474: p_copy_accounts => fnd_api.g_true,
6475: p_copy_asset_assignments => fnd_api.g_true,
6476: p_copy_pricing_attribs => fnd_api.g_true,
6477: p_txn_rec => px_csi_txn_rec,

Line 6474: p_copy_accounts => fnd_api.g_true,

6470: p_source_instance_rec => l_instance_tbl(1),
6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,
6474: p_copy_accounts => fnd_api.g_true,
6475: p_copy_asset_assignments => fnd_api.g_true,
6476: p_copy_pricing_attribs => fnd_api.g_true,
6477: p_txn_rec => px_csi_txn_rec,
6478: x_new_instance_tbl => l_n_instance_tbl,

Line 6475: p_copy_asset_assignments => fnd_api.g_true,

6471: p_copy_ext_attribs => fnd_api.g_true,
6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,
6474: p_copy_accounts => fnd_api.g_true,
6475: p_copy_asset_assignments => fnd_api.g_true,
6476: p_copy_pricing_attribs => fnd_api.g_true,
6477: p_txn_rec => px_csi_txn_rec,
6478: x_new_instance_tbl => l_n_instance_tbl,
6479: x_return_status => l_return_status,

Line 6476: p_copy_pricing_attribs => fnd_api.g_true,

6472: p_copy_org_assignments => fnd_api.g_true,
6473: p_copy_parties => fnd_api.g_true,
6474: p_copy_accounts => fnd_api.g_true,
6475: p_copy_asset_assignments => fnd_api.g_true,
6476: p_copy_pricing_attribs => fnd_api.g_true,
6477: p_txn_rec => px_csi_txn_rec,
6478: x_new_instance_tbl => l_n_instance_tbl,
6479: x_return_status => l_return_status,
6480: x_msg_count => l_msg_count,

Line 6483: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6479: x_return_status => l_return_status,
6480: x_msg_count => l_msg_count,
6481: x_msg_data => l_msg_data);
6482:
6483: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6484: debug('Error splitting the item instances for distribution.');
6485: RAISE fnd_api.g_exc_error;
6486: END IF;
6487: ELSE

Line 6485: RAISE fnd_api.g_exc_error;

6481: x_msg_data => l_msg_data);
6482:
6483: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6484: debug('Error splitting the item instances for distribution.');
6485: RAISE fnd_api.g_exc_error;
6486: END IF;
6487: ELSE
6488: l_n_instance_tbl := l_instance_tbl;
6489: END IF;

Line 6506: WHEN fnd_api.g_exc_error THEN

6502:
6503: px_instance_tbl := l_o_instance_tbl;
6504:
6505: EXCEPTION
6506: WHEN fnd_api.g_exc_error THEN
6507: x_return_status := fnd_api.g_ret_sts_error;
6508:
6509: END split_instances;
6510:

Line 6507: x_return_status := fnd_api.g_ret_sts_error;

6503: px_instance_tbl := l_o_instance_tbl;
6504:
6505: EXCEPTION
6506: WHEN fnd_api.g_exc_error THEN
6507: x_return_status := fnd_api.g_ret_sts_error;
6508:
6509: END split_instances;
6510:
6511:

Line 6543: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

6539: l_object_id number;
6540: l_inst_ind binary_integer;
6541:
6542: l_debug_level NUMBER;
6543: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
6544: l_msg_data varchar2(512);
6545: l_msg_count number;
6546:
6547: BEGIN

Line 6549: x_return_status := fnd_api.g_ret_sts_success;

6545: l_msg_count number;
6546:
6547: BEGIN
6548:
6549: x_return_status := fnd_api.g_ret_sts_success;
6550:
6551: api_log('distribute_instances');
6552:
6553: l_instance_tbl := px_instance_tbl;

Line 6570: RAISE fnd_api.g_exc_error;

6566: debug ('The instance qty generated by the shipment interface '||
6567: l_instance_tbl(l_ind).quantity||' is greater than the MODEL/CHILD ratio '||
6568: p_quantity_ratio);
6569:
6570: RAISE fnd_api.g_exc_error;
6571: END IF;
6572:
6573: l_object_id := null;
6574:

Line 6602: l_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;

6598: END IF;
6599:
6600: IF l_object_id is not null THEN
6601:
6602: l_line_dtl_rec.txn_line_detail_id := fnd_api.g_miss_num;
6603: l_line_dtl_rec.transaction_line_id := p_model_txn_line_rec.transaction_line_id;
6604: l_line_dtl_rec.sub_type_id := csi_order_ship_pub.g_dflt_sub_type_id;
6605: l_line_dtl_rec.processing_status := 'IN_PROCESS';
6606: l_line_dtl_rec.source_transaction_flag := 'N';

Line 6628: p_commit => fnd_api.g_false,

6624: l_line_dtl_rec.object_version_number := 1.0;
6625:
6626: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
6627: p_api_version => 1.0,
6628: p_commit => fnd_api.g_false,
6629: p_init_msg_list => fnd_api.g_true,
6630: p_validation_level => fnd_api.g_valid_level_full,
6631: p_txn_line_dtl_index => 1,
6632: p_txn_line_dtl_rec => l_line_dtl_rec,

Line 6629: p_init_msg_list => fnd_api.g_true,

6625:
6626: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
6627: p_api_version => 1.0,
6628: p_commit => fnd_api.g_false,
6629: p_init_msg_list => fnd_api.g_true,
6630: p_validation_level => fnd_api.g_valid_level_full,
6631: p_txn_line_dtl_index => 1,
6632: p_txn_line_dtl_rec => l_line_dtl_rec,
6633: px_txn_party_dtl_tbl => l_pty_dtl_tbl,

Line 6630: p_validation_level => fnd_api.g_valid_level_full,

6626: csi_t_txn_line_dtls_pvt.create_txn_line_dtls(
6627: p_api_version => 1.0,
6628: p_commit => fnd_api.g_false,
6629: p_init_msg_list => fnd_api.g_true,
6630: p_validation_level => fnd_api.g_valid_level_full,
6631: p_txn_line_dtl_index => 1,
6632: p_txn_line_dtl_rec => l_line_dtl_rec,
6633: px_txn_party_dtl_tbl => l_pty_dtl_tbl,
6634: px_txn_pty_acct_detail_tbl => l_pty_acct_tbl,

Line 6642: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6638: x_return_status => l_return_status,
6639: x_msg_count => l_msg_count,
6640: x_msg_data => l_msg_data);
6641:
6642: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6643: raise fnd_api.g_exc_error;
6644: END IF;
6645:
6646: -- build ii_rltns table

Line 6643: raise fnd_api.g_exc_error;

6639: x_msg_count => l_msg_count,
6640: x_msg_data => l_msg_data);
6641:
6642: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6643: raise fnd_api.g_exc_error;
6644: END IF;
6645:
6646: -- build ii_rltns table
6647: l_ii_rltns_tbl(1).txn_relationship_id := fnd_api.g_miss_num;

Line 6647: l_ii_rltns_tbl(1).txn_relationship_id := fnd_api.g_miss_num;

6643: raise fnd_api.g_exc_error;
6644: END IF;
6645:
6646: -- build ii_rltns table
6647: l_ii_rltns_tbl(1).txn_relationship_id := fnd_api.g_miss_num;
6648: l_ii_rltns_tbl(1).transaction_line_id := p_model_txn_line_rec.transaction_line_id;
6649: l_ii_rltns_tbl(1).subject_id := l_line_dtl_rec.txn_line_detail_id;
6650: l_ii_rltns_tbl(1).object_id := l_object_id;
6651: l_ii_rltns_tbl(1).relationship_type_code := 'COMPONENT-OF';

Line 6656: p_commit => fnd_api.g_false,

6652: l_ii_rltns_tbl(1).active_start_date := sysdate;
6653:
6654: csi_t_txn_rltnshps_grp.create_txn_ii_rltns_dtls(
6655: p_api_version => 1.0,
6656: p_commit => fnd_api.g_false,
6657: p_init_msg_list => fnd_api.g_true,
6658: p_validation_level => fnd_api.g_valid_level_full,
6659: px_txn_ii_rltns_tbl => l_ii_rltns_tbl,
6660: x_return_status => l_return_status,

Line 6657: p_init_msg_list => fnd_api.g_true,

6653:
6654: csi_t_txn_rltnshps_grp.create_txn_ii_rltns_dtls(
6655: p_api_version => 1.0,
6656: p_commit => fnd_api.g_false,
6657: p_init_msg_list => fnd_api.g_true,
6658: p_validation_level => fnd_api.g_valid_level_full,
6659: px_txn_ii_rltns_tbl => l_ii_rltns_tbl,
6660: x_return_status => l_return_status,
6661: x_msg_count => l_msg_count,

Line 6658: p_validation_level => fnd_api.g_valid_level_full,

6654: csi_t_txn_rltnshps_grp.create_txn_ii_rltns_dtls(
6655: p_api_version => 1.0,
6656: p_commit => fnd_api.g_false,
6657: p_init_msg_list => fnd_api.g_true,
6658: p_validation_level => fnd_api.g_valid_level_full,
6659: px_txn_ii_rltns_tbl => l_ii_rltns_tbl,
6660: x_return_status => l_return_status,
6661: x_msg_count => l_msg_count,
6662: x_msg_data => l_msg_data);

Line 6664: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6660: x_return_status => l_return_status,
6661: x_msg_count => l_msg_count,
6662: x_msg_data => l_msg_data);
6663:
6664: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6665: debug('Error creating txn ii relation for the ATO/PTO Child');
6666: raise fnd_api.g_exc_error;
6667: END IF;
6668:

Line 6666: raise fnd_api.g_exc_error;

6662: x_msg_data => l_msg_data);
6663:
6664: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6665: debug('Error creating txn ii relation for the ATO/PTO Child');
6666: raise fnd_api.g_exc_error;
6667: END IF;
6668:
6669: END IF;
6670:

Line 6689: WHEN fnd_api.g_exc_error THEN

6685:
6686: END IF;
6687:
6688: EXCEPTION
6689: WHEN fnd_api.g_exc_error THEN
6690: x_return_status := fnd_api.g_ret_sts_error;
6691: END distribute_instances;
6692:
6693: PROCEDURE query_immediate_children (

Line 6690: x_return_status := fnd_api.g_ret_sts_error;

6686: END IF;
6687:
6688: EXCEPTION
6689: WHEN fnd_api.g_exc_error THEN
6690: x_return_status := fnd_api.g_ret_sts_error;
6691: END distribute_instances;
6692:
6693: PROCEDURE query_immediate_children (
6694: p_header_id IN number,

Line 6767: x_return_status := fnd_api.g_ret_sts_success;

6763: l_ib_trackable_flag varchar2(1);
6764:
6765: BEGIN
6766:
6767: x_return_status := fnd_api.g_ret_sts_success;
6768: api_log('get_config_children');
6769:
6770: l_final_ind := 0;
6771:

Line 6841: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

6837: x_trackable_line_tbl OUT NOCOPY oe_order_pub.line_tbl_type,
6838: x_return_status OUT NOCOPY varchar2)
6839: IS
6840: l_line_tbl oe_order_pub.line_tbl_type;
6841: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
6842: BEGIN
6843: x_return_status := fnd_api.g_ret_sts_success;
6844: api_log('get_ib_trackable_children');
6845: IF p_order_line_rec.item_type_code = 'CONFIG' THEN

Line 6843: x_return_status := fnd_api.g_ret_sts_success;

6839: IS
6840: l_line_tbl oe_order_pub.line_tbl_type;
6841: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
6842: BEGIN
6843: x_return_status := fnd_api.g_ret_sts_success;
6844: api_log('get_ib_trackable_children');
6845: IF p_order_line_rec.item_type_code = 'CONFIG' THEN
6846: get_config_children(
6847: p_header_id => p_order_line_rec.header_id,

Line 6852: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6848: p_current_line_id => p_order_line_rec.ato_line_id,
6849: p_om_vld_org_id => p_order_line_rec.om_vld_org_id,
6850: x_trackable_line_tbl => l_line_tbl,
6851: x_return_status => l_return_status);
6852: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6853: RAISE fnd_api.g_exc_error;
6854: END IF;
6855: ELSE
6856: csi_order_fulfill_pub.get_ib_trackable_children(

Line 6853: RAISE fnd_api.g_exc_error;

6849: p_om_vld_org_id => p_order_line_rec.om_vld_org_id,
6850: x_trackable_line_tbl => l_line_tbl,
6851: x_return_status => l_return_status);
6852: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6853: RAISE fnd_api.g_exc_error;
6854: END IF;
6855: ELSE
6856: csi_order_fulfill_pub.get_ib_trackable_children(
6857: p_current_line_id => p_order_line_rec.order_line_id,

Line 6862: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6858: p_om_vld_org_id => p_order_line_rec.om_vld_org_id,
6859: x_trackable_line_tbl => l_line_tbl,
6860: x_return_status => l_return_status);
6861:
6862: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6863: RAISE fnd_api.g_exc_error;
6864: END IF;
6865: END IF;
6866: x_trackable_line_tbl := l_line_tbl;

Line 6863: RAISE fnd_api.g_exc_error;

6859: x_trackable_line_tbl => l_line_tbl,
6860: x_return_status => l_return_status);
6861:
6862: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6863: RAISE fnd_api.g_exc_error;
6864: END IF;
6865: END IF;
6866: x_trackable_line_tbl := l_line_tbl;
6867: EXCEPTION

Line 6868: WHEN fnd_api.g_exc_error THEN

6864: END IF;
6865: END IF;
6866: x_trackable_line_tbl := l_line_tbl;
6867: EXCEPTION
6868: WHEN fnd_api.g_exc_error THEN
6869: x_return_status := fnd_api.g_ret_sts_error;
6870: END get_ib_trackable_children;
6871:
6872:

Line 6869: x_return_status := fnd_api.g_ret_sts_error;

6865: END IF;
6866: x_trackable_line_tbl := l_line_tbl;
6867: EXCEPTION
6868: WHEN fnd_api.g_exc_error THEN
6869: x_return_status := fnd_api.g_ret_sts_error;
6870: END get_ib_trackable_children;
6871:
6872:
6873: PROCEDURE filter_processed_instances(

Line 6904: x_return_status := fnd_api.g_ret_sts_success;

6900: --end of fix bug4607042
6901:
6902:
6903: BEGIN
6904: x_return_status := fnd_api.g_ret_sts_success;
6905: api_log('filter_processed_instances');
6906:
6907: debug(' instance_tbl count :'||px_instance_tbl.COUNT);
6908:

Line 6977: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;

6973:
6974: l_object_id number;
6975: l_debug_level number;
6976:
6977: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
6978: l_msg_data varchar2(512);
6979: l_msg_count number;
6980:
6981: l_txn_ps_tbl csi_utl_pkg.txn_ps_tbl;

Line 6994: x_return_status := fnd_api.g_ret_sts_success;

6990:
6991:
6992: BEGIN
6993:
6994: x_return_status := fnd_api.g_ret_sts_success;
6995: api_log('build_child_relation');
6996:
6997: get_ib_trackable_children(
6998: p_order_line_rec => p_order_line_rec,

Line 7002: IF l_return_status <> fnd_api.g_ret_sts_success THEN

6998: p_order_line_rec => p_order_line_rec,
6999: x_trackable_line_tbl => l_line_tbl,
7000: x_return_status => l_return_status);
7001:
7002: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7003: RAISE fnd_api.g_exc_error;
7004: END IF;
7005:
7006: debug('IB Trackable Children Count :'||l_line_tbl.COUNT);

Line 7003: RAISE fnd_api.g_exc_error;

6999: x_trackable_line_tbl => l_line_tbl,
7000: x_return_status => l_return_status);
7001:
7002: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7003: RAISE fnd_api.g_exc_error;
7004: END IF;
7005:
7006: debug('IB Trackable Children Count :'||l_line_tbl.COUNT);
7007:

Line 7042: p_commit => fnd_api.g_false,

7038: l_txn_line_detail_query_rec.processing_status := 'IN_PROCESS';
7039:
7040: csi_t_txn_details_grp.get_transaction_details(
7041: p_api_version => 1,
7042: p_commit => fnd_api.g_false,
7043: p_init_msg_list => fnd_api.g_true,
7044: p_validation_level => fnd_api.g_valid_level_full,
7045: p_txn_line_query_rec => l_txn_line_query_rec,
7046: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,

Line 7043: p_init_msg_list => fnd_api.g_true,

7039:
7040: csi_t_txn_details_grp.get_transaction_details(
7041: p_api_version => 1,
7042: p_commit => fnd_api.g_false,
7043: p_init_msg_list => fnd_api.g_true,
7044: p_validation_level => fnd_api.g_valid_level_full,
7045: p_txn_line_query_rec => l_txn_line_query_rec,
7046: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
7047: x_txn_line_detail_tbl => l_line_dtl_tbl,

Line 7044: p_validation_level => fnd_api.g_valid_level_full,

7040: csi_t_txn_details_grp.get_transaction_details(
7041: p_api_version => 1,
7042: p_commit => fnd_api.g_false,
7043: p_init_msg_list => fnd_api.g_true,
7044: p_validation_level => fnd_api.g_valid_level_full,
7045: p_txn_line_query_rec => l_txn_line_query_rec,
7046: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
7047: x_txn_line_detail_tbl => l_line_dtl_tbl,
7048: p_get_parties_flag => fnd_api.g_false,

Line 7048: p_get_parties_flag => fnd_api.g_false,

7044: p_validation_level => fnd_api.g_valid_level_full,
7045: p_txn_line_query_rec => l_txn_line_query_rec,
7046: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
7047: x_txn_line_detail_tbl => l_line_dtl_tbl,
7048: p_get_parties_flag => fnd_api.g_false,
7049: x_txn_party_detail_tbl => l_pty_dtl_tbl,
7050: p_get_pty_accts_flag => fnd_api.g_false,
7051: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
7052: p_get_ii_rltns_flag => fnd_api.g_false,

Line 7050: p_get_pty_accts_flag => fnd_api.g_false,

7046: p_txn_line_detail_query_rec => l_txn_line_detail_query_rec,
7047: x_txn_line_detail_tbl => l_line_dtl_tbl,
7048: p_get_parties_flag => fnd_api.g_false,
7049: x_txn_party_detail_tbl => l_pty_dtl_tbl,
7050: p_get_pty_accts_flag => fnd_api.g_false,
7051: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
7052: p_get_ii_rltns_flag => fnd_api.g_false,
7053: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
7054: p_get_org_assgns_flag => fnd_api.g_false,

Line 7052: p_get_ii_rltns_flag => fnd_api.g_false,

7048: p_get_parties_flag => fnd_api.g_false,
7049: x_txn_party_detail_tbl => l_pty_dtl_tbl,
7050: p_get_pty_accts_flag => fnd_api.g_false,
7051: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
7052: p_get_ii_rltns_flag => fnd_api.g_false,
7053: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
7054: p_get_org_assgns_flag => fnd_api.g_false,
7055: x_txn_org_assgn_tbl => l_org_assgn_tbl,
7056: p_get_ext_attrib_vals_flag => fnd_api.g_false,

Line 7054: p_get_org_assgns_flag => fnd_api.g_false,

7050: p_get_pty_accts_flag => fnd_api.g_false,
7051: x_txn_pty_acct_detail_tbl => l_pty_acct_tbl,
7052: p_get_ii_rltns_flag => fnd_api.g_false,
7053: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
7054: p_get_org_assgns_flag => fnd_api.g_false,
7055: x_txn_org_assgn_tbl => l_org_assgn_tbl,
7056: p_get_ext_attrib_vals_flag => fnd_api.g_false,
7057: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
7058: p_get_csi_attribs_flag => fnd_api.g_false,

Line 7056: p_get_ext_attrib_vals_flag => fnd_api.g_false,

7052: p_get_ii_rltns_flag => fnd_api.g_false,
7053: x_txn_ii_rltns_tbl => l_ii_rltns_tbl,
7054: p_get_org_assgns_flag => fnd_api.g_false,
7055: x_txn_org_assgn_tbl => l_org_assgn_tbl,
7056: p_get_ext_attrib_vals_flag => fnd_api.g_false,
7057: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
7058: p_get_csi_attribs_flag => fnd_api.g_false,
7059: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
7060: p_get_csi_iea_values_flag => fnd_api.g_false,

Line 7058: p_get_csi_attribs_flag => fnd_api.g_false,

7054: p_get_org_assgns_flag => fnd_api.g_false,
7055: x_txn_org_assgn_tbl => l_org_assgn_tbl,
7056: p_get_ext_attrib_vals_flag => fnd_api.g_false,
7057: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
7058: p_get_csi_attribs_flag => fnd_api.g_false,
7059: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
7060: p_get_csi_iea_values_flag => fnd_api.g_false,
7061: x_csi_iea_values_tbl => l_csi_eav_tbl,
7062: p_get_txn_systems_flag => fnd_api.g_false,

Line 7060: p_get_csi_iea_values_flag => fnd_api.g_false,

7056: p_get_ext_attrib_vals_flag => fnd_api.g_false,
7057: x_txn_ext_attrib_vals_tbl => l_ext_attrib_tbl,
7058: p_get_csi_attribs_flag => fnd_api.g_false,
7059: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
7060: p_get_csi_iea_values_flag => fnd_api.g_false,
7061: x_csi_iea_values_tbl => l_csi_eav_tbl,
7062: p_get_txn_systems_flag => fnd_api.g_false,
7063: x_txn_systems_tbl => l_txn_systems_tbl,
7064: x_return_status => l_return_status,

Line 7062: p_get_txn_systems_flag => fnd_api.g_false,

7058: p_get_csi_attribs_flag => fnd_api.g_false,
7059: x_csi_ext_attribs_tbl => l_csi_ea_tbl,
7060: p_get_csi_iea_values_flag => fnd_api.g_false,
7061: x_csi_iea_values_tbl => l_csi_eav_tbl,
7062: p_get_txn_systems_flag => fnd_api.g_false,
7063: x_txn_systems_tbl => l_txn_systems_tbl,
7064: x_return_status => l_return_status,
7065: x_msg_count => l_msg_count,
7066: x_msg_data => l_msg_data);

Line 7068: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7064: x_return_status => l_return_status,
7065: x_msg_count => l_msg_count,
7066: x_msg_data => l_msg_data);
7067:
7068: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7069: raise fnd_api.g_exc_error;
7070: END IF;
7071: debug(' Source Txn Line Detail COUNT :'||l_line_dtl_tbl.COUNT);
7072:

Line 7069: raise fnd_api.g_exc_error;

7065: x_msg_count => l_msg_count,
7066: x_msg_data => l_msg_data);
7067:
7068: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7069: raise fnd_api.g_exc_error;
7070: END IF;
7071: debug(' Source Txn Line Detail COUNT :'||l_line_dtl_tbl.COUNT);
7072:
7073: FOR l_ol_ind in l_line_tbl.FIRST..l_line_tbl.LAST

Line 7123: p_commit => fnd_api.g_false,

7119: p_pkg_name => 'csi_item_instance_pub');
7120:
7121: csi_item_instance_pub.get_item_instances(
7122: p_api_version => 1.0,
7123: p_commit => fnd_api.g_false,
7124: p_init_msg_list => fnd_api.g_true,
7125: p_validation_level => fnd_api.g_valid_level_full,
7126: p_instance_query_rec => l_inst_query_rec,
7127: p_party_query_rec => l_party_query_rec,

Line 7124: p_init_msg_list => fnd_api.g_true,

7120:
7121: csi_item_instance_pub.get_item_instances(
7122: p_api_version => 1.0,
7123: p_commit => fnd_api.g_false,
7124: p_init_msg_list => fnd_api.g_true,
7125: p_validation_level => fnd_api.g_valid_level_full,
7126: p_instance_query_rec => l_inst_query_rec,
7127: p_party_query_rec => l_party_query_rec,
7128: p_account_query_rec => l_pty_acct_query_rec,

Line 7125: p_validation_level => fnd_api.g_valid_level_full,

7121: csi_item_instance_pub.get_item_instances(
7122: p_api_version => 1.0,
7123: p_commit => fnd_api.g_false,
7124: p_init_msg_list => fnd_api.g_true,
7125: p_validation_level => fnd_api.g_valid_level_full,
7126: p_instance_query_rec => l_inst_query_rec,
7127: p_party_query_rec => l_party_query_rec,
7128: p_account_query_rec => l_pty_acct_query_rec,
7129: p_transaction_id => null,

Line 7130: p_resolve_id_columns => fnd_api.g_false,

7126: p_instance_query_rec => l_inst_query_rec,
7127: p_party_query_rec => l_party_query_rec,
7128: p_account_query_rec => l_pty_acct_query_rec,
7129: p_transaction_id => null,
7130: p_resolve_id_columns => fnd_api.g_false,
7131: p_active_instance_only => fnd_api.g_true,
7132: x_instance_header_tbl => l_instance_hdr_tbl,
7133: x_return_status => l_return_status,
7134: x_msg_count => l_msg_count,

Line 7131: p_active_instance_only => fnd_api.g_true,

7127: p_party_query_rec => l_party_query_rec,
7128: p_account_query_rec => l_pty_acct_query_rec,
7129: p_transaction_id => null,
7130: p_resolve_id_columns => fnd_api.g_false,
7131: p_active_instance_only => fnd_api.g_true,
7132: x_instance_header_tbl => l_instance_hdr_tbl,
7133: x_return_status => l_return_status,
7134: x_msg_count => l_msg_count,
7135: x_msg_data => l_msg_data );

Line 7137: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7133: x_return_status => l_return_status,
7134: x_msg_count => l_msg_count,
7135: x_msg_data => l_msg_data );
7136:
7137: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7138: raise fnd_api.g_exc_error;
7139: END IF;
7140: --fix for bug5096435
7141: IF l_instance_hdr_tbl.COUNT > 0 THEN

Line 7138: raise fnd_api.g_exc_error;

7134: x_msg_count => l_msg_count,
7135: x_msg_data => l_msg_data );
7136:
7137: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7138: raise fnd_api.g_exc_error;
7139: END IF;
7140: --fix for bug5096435
7141: IF l_instance_hdr_tbl.COUNT > 0 THEN
7142: debug('instances found for the child order line : '||l_instance_hdr_tbl.COUNT);

Line 7174: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7170: p_instance_header_tbl => l_temp_instance_hdr_tbl, --fix for bug5096435
7171: x_instance_tbl => l_instance_tbl,
7172: x_return_status => l_return_status);
7173:
7174: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7175: RAISE fnd_api.g_exc_error;
7176: END IF;
7177:
7178: l_temp_instance_hdr_tbl.DELETE;

Line 7175: RAISE fnd_api.g_exc_error;

7171: x_instance_tbl => l_instance_tbl,
7172: x_return_status => l_return_status);
7173:
7174: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7175: RAISE fnd_api.g_exc_error;
7176: END IF;
7177:
7178: l_temp_instance_hdr_tbl.DELETE;
7179:

Line 7185: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7181: p_order_line_id => p_order_line_rec.order_line_id,
7182: px_instance_tbl => l_instance_tbl,
7183: x_return_status => l_return_status);
7184:
7185: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7186: RAISE fnd_api.g_exc_error;
7187: END IF;
7188:
7189: IF l_instance_tbl.count > 0 THEN

Line 7186: RAISE fnd_api.g_exc_error;

7182: px_instance_tbl => l_instance_tbl,
7183: x_return_status => l_return_status);
7184:
7185: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7186: RAISE fnd_api.g_exc_error;
7187: END IF;
7188:
7189: IF l_instance_tbl.count > 0 THEN
7190:

Line 7221: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7217: px_instance_tbl => l_instance_tbl,
7218: px_txn_ps_tbl => l_txn_ps_tbl,
7219: x_return_status => l_return_status);
7220:
7221: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7222: RAISE fnd_api.g_exc_error;
7223: END IF;
7224:
7225: IF l_instance_tbl.COUNT > 0 THEN

Line 7222: RAISE fnd_api.g_exc_error;

7218: px_txn_ps_tbl => l_txn_ps_tbl,
7219: x_return_status => l_return_status);
7220:
7221: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7222: RAISE fnd_api.g_exc_error;
7223: END IF;
7224:
7225: IF l_instance_tbl.COUNT > 0 THEN
7226: debug('There exist unresolved instances. So splitting instances.');

Line 7233: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7229: px_csi_txn_rec => px_csi_txn_rec,
7230: px_instance_tbl => l_instance_tbl,
7231: x_return_status => l_return_status);
7232:
7233: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7234: RAISE fnd_api.g_exc_error;
7235: END IF;
7236:
7237: debug('Re-distributing after the split.');

Line 7234: RAISE fnd_api.g_exc_error;

7230: px_instance_tbl => l_instance_tbl,
7231: x_return_status => l_return_status);
7232:
7233: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7234: RAISE fnd_api.g_exc_error;
7235: END IF;
7236:
7237: debug('Re-distributing after the split.');
7238:

Line 7246: IF l_return_status <> fnd_api.g_ret_sts_success THEN

7242: px_instance_tbl => l_instance_tbl,
7243: px_txn_ps_tbl => l_txn_ps_tbl,
7244: x_return_status => l_return_status);
7245:
7246: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7247: RAISE fnd_api.g_exc_error;
7248: END IF;
7249: END IF; --< 0>>
7250: END IF; --< 0>>

Line 7247: RAISE fnd_api.g_exc_error;

7243: px_txn_ps_tbl => l_txn_ps_tbl,
7244: x_return_status => l_return_status);
7245:
7246: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7247: RAISE fnd_api.g_exc_error;
7248: END IF;
7249: END IF; --< 0>>
7250: END IF; --< 0>>
7251: END IF; --< 0>>

Line 7257: WHEN fnd_api.g_exc_error THEN

7253: END LOOP; -- child order lines loop
7254: END IF; --< 0>>
7255:
7256: EXCEPTION
7257: WHEN fnd_api.g_exc_error THEN
7258: x_return_status := fnd_api.g_ret_sts_error;
7259: END build_child_relation;
7260:
7261: PROCEDURE get_unit_price_in_primary_uom(

Line 7258: x_return_status := fnd_api.g_ret_sts_error;

7254: END IF; --< 0>>
7255:
7256: EXCEPTION
7257: WHEN fnd_api.g_exc_error THEN
7258: x_return_status := fnd_api.g_ret_sts_error;
7259: END build_child_relation;
7260:
7261: PROCEDURE get_unit_price_in_primary_uom(
7262: p_unit_price IN number,

Line 7273: x_return_status := fnd_api.g_ret_sts_success;

7269: BEGIN
7270:
7271: api_log('get_unit_price_in_primary_uom');
7272:
7273: x_return_status := fnd_api.g_ret_sts_success;
7274:
7275: IF nvl(px_item_control_rec.primary_uom_code, fnd_api.g_miss_char) = fnd_api.g_miss_char THEN
7276:
7277: px_item_control_rec.primary_uom_code := csi_utl_pkg.get_primay_uom(

Line 7275: IF nvl(px_item_control_rec.primary_uom_code, fnd_api.g_miss_char) = fnd_api.g_miss_char THEN

7271: api_log('get_unit_price_in_primary_uom');
7272:
7273: x_return_status := fnd_api.g_ret_sts_success;
7274:
7275: IF nvl(px_item_control_rec.primary_uom_code, fnd_api.g_miss_char) = fnd_api.g_miss_char THEN
7276:
7277: px_item_control_rec.primary_uom_code := csi_utl_pkg.get_primay_uom(
7278: p_inv_item_id => px_item_control_rec.inventory_item_id,
7279: p_inv_org_id => px_item_control_rec.organization_id);

Line 7293: RAISE fnd_api.g_exc_error;

7289: debug(' uom conv rate : '||l_uom_conv_rate);
7290:
7291: IF l_uom_conv_rate = -99999 THEN
7292: debug(' inv_convert.inv_um_conversion failed ');
7293: RAISE fnd_api.g_exc_error;
7294: END IF;
7295:
7296: x_unit_price_in_primary_uom := p_unit_price/l_uom_conv_rate;
7297:

Line 7301: WHEN fnd_api.g_exc_error THEN

7297:
7298: debug(' unit price in primary uom : '||x_unit_price_in_primary_uom);
7299:
7300: EXCEPTION
7301: WHEN fnd_api.g_exc_error THEN
7302: x_return_status := fnd_api.g_ret_sts_error;
7303: END get_unit_price_in_primary_uom;
7304:
7305: END csi_utl_pkg ;

Line 7302: x_return_status := fnd_api.g_ret_sts_error;

7298: debug(' unit price in primary uom : '||x_unit_price_in_primary_uom);
7299:
7300: EXCEPTION
7301: WHEN fnd_api.g_exc_error THEN
7302: x_return_status := fnd_api.g_ret_sts_error;
7303: END get_unit_price_in_primary_uom;
7304:
7305: END csi_utl_pkg ;