6356: l_progress := '990';
6357:
6358: -- Also need to clean up the TM variables. This is needed because
6359: -- in an online transactions, the variables will not be reset
6360: inv_rcv_common_apis.rcv_clear_global;
6361:
6362: EXCEPTION
6363: WHEN fnd_api.g_exc_error THEN
6364: x_return_status := fnd_api.g_ret_sts_error;
7890: END LOOP;
7891:
7892: --End of BUG FIX 3359835
7893:
7894: l_old_txn_mode_code := inv_rcv_common_apis.g_po_startup_value.transaction_mode;
7895: inv_rcv_common_apis.g_po_startup_value.transaction_mode := 'ONLINE';
7896:
7897: l_progress := 100;
7898:
7891:
7892: --End of BUG FIX 3359835
7893:
7894: l_old_txn_mode_code := inv_rcv_common_apis.g_po_startup_value.transaction_mode;
7895: inv_rcv_common_apis.g_po_startup_value.transaction_mode := 'ONLINE';
7896:
7897: l_progress := 100;
7898:
7899: BEGIN
7902: ,x_msg_data => x_msg_data
7903: );
7904: EXCEPTION
7905: WHEN OTHERS THEN
7906: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
7907: IF (l_debug = 1) THEN
7908: DEBUG('xxx: Error - Rcv TM Failed','load_lpn',9);
7909: END IF;
7910: RAISE fnd_api.g_exc_error;
7913: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
7914: IF (l_debug = 1) THEN
7915: DEBUG('xxx: Error - Rcv TM Failed','load_lpn',9);
7916: END IF;
7917: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
7918: RAISE fnd_api.g_exc_error;
7919: END IF;
7920:
7921: l_progress := 150;
7919: END IF;
7920:
7921: l_progress := 150;
7922:
7923: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
7924: inv_rcv_common_apis.rcv_clear_global;
7925: END IF;
7926:
7927: -- RCV TM would call complete_operation_instance
7920:
7921: l_progress := 150;
7922:
7923: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
7924: inv_rcv_common_apis.rcv_clear_global;
7925: END IF;
7926:
7927: -- RCV TM would call complete_operation_instance
7928: IF (l_is_rcv_tm_call_needed <> TRUE) THEN
8064: debug(' p_org_id => '||l_from_org, 'insert_rti',9);
8065: END IF;
8066:
8067: BEGIN
8068: inv_rcv_common_apis.init_startup_values(l_from_org);
8069: EXCEPTION
8070: WHEN NO_DATA_FOUND THEN
8071: fnd_message.set_name('INV', 'INV_RCV_PARAM');
8072: fnd_msg_pub.ADD;
8074: END;
8075:
8076: l_progress := '2';
8077:
8078: IF inv_rcv_common_apis.g_po_startup_value.sob_id IS NULL THEN
8079: --BUG 3435079: For performance reason, do not go against the view
8080: --org_organization_definitions. instead, use
8081: --the query below
8082: SELECT TO_NUMBER(hoi.org_information1)
8079: --BUG 3435079: For performance reason, do not go against the view
8080: --org_organization_definitions. instead, use
8081: --the query below
8082: SELECT TO_NUMBER(hoi.org_information1)
8083: INTO inv_rcv_common_apis.g_po_startup_value.sob_id
8084: FROM hr_organization_information hoi
8085: WHERE hoi.organization_id = l_from_org
8086: AND (hoi.org_information_context || '') = 'Accounting Information';
8087:
8093: debug('init_startup_value exited. Calling validate_trx_date'
8094: ,'insert_rti', 9);
8095: END IF;
8096:
8097: inv_rcv_common_apis.validate_trx_date
8098: (
8099: p_trx_date => SYSDATE
8100: , p_organization_id => l_from_org
8101: , p_sob_id => inv_rcv_common_apis.g_po_startup_value.sob_id
8097: inv_rcv_common_apis.validate_trx_date
8098: (
8099: p_trx_date => SYSDATE
8100: , p_organization_id => l_from_org
8101: , p_sob_id => inv_rcv_common_apis.g_po_startup_value.sob_id
8102: , x_return_status => x_return_status
8103: , x_error_code => l_error_code
8104: );
8105:
8118: INTO l_interface_transaction_id
8119: FROM dual;
8120:
8121: -- init_start_values should have called gen_txn_group_id
8122: l_group_id := inv_rcv_common_apis.g_rcv_global_var.interface_group_id;
8123:
8124: IF (l_debug = 1) THEN
8125: DEBUG('Calling rcv_trx_interface_insert_pkg.insert_row',
8126: 'insert_rti', 9);
8399: END;
8400:
8401: -- Get LPN group Id
8402: IF p_lpn_context = 3 THEN
8403: IF inv_rcv_common_apis.g_rcv_global_var.interface_group_id IS NULL THEN
8404: SELECT rcv_interface_groups_s.NEXTVAL
8405: INTO l_group_id
8406: FROM DUAL;
8407: inv_rcv_common_apis.g_rcv_global_var.interface_group_id := l_group_id;
8403: IF inv_rcv_common_apis.g_rcv_global_var.interface_group_id IS NULL THEN
8404: SELECT rcv_interface_groups_s.NEXTVAL
8405: INTO l_group_id
8406: FROM DUAL;
8407: inv_rcv_common_apis.g_rcv_global_var.interface_group_id := l_group_id;
8408: ELSE
8409: l_group_id := inv_rcv_common_apis.g_rcv_global_var.interface_group_id;
8410: END IF;
8411: END IF;
8405: INTO l_group_id
8406: FROM DUAL;
8407: inv_rcv_common_apis.g_rcv_global_var.interface_group_id := l_group_id;
8408: ELSE
8409: l_group_id := inv_rcv_common_apis.g_rcv_global_var.interface_group_id;
8410: END IF;
8411: END IF;
8412:
8413: -- Drop Entire LPN,
9285: IF (l_debug = 1) THEN
9286: DEBUG('xxx: Calling rcv_process_receive_txn','transfer_contents',9);
9287: END IF;
9288:
9289: l_old_txn_mode_code := inv_rcv_common_apis.g_po_startup_value.transaction_mode;
9290: inv_rcv_common_apis.g_po_startup_value.transaction_mode := 'ONLINE';
9291:
9292: l_progress := '135';
9293:
9286: DEBUG('xxx: Calling rcv_process_receive_txn','transfer_contents',9);
9287: END IF;
9288:
9289: l_old_txn_mode_code := inv_rcv_common_apis.g_po_startup_value.transaction_mode;
9290: inv_rcv_common_apis.g_po_startup_value.transaction_mode := 'ONLINE';
9291:
9292: l_progress := '135';
9293:
9294: BEGIN
9297: ,x_msg_data => x_msg_data
9298: );
9299: EXCEPTION
9300: WHEN OTHERS THEN
9301: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
9302: IF (l_debug = 1) THEN
9303: DEBUG('xxx: Error - Rcv TM Failed','transfer_contents',9);
9304: END IF;
9305: RAISE fnd_api.g_exc_error;
9308: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
9309: IF (l_debug = 1) THEN
9310: DEBUG('xxx: Error - Rcv TM Failed','transfer_contents',9);
9311: END IF;
9312: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
9313: RAISE fnd_api.g_exc_error;
9314: END IF;
9315:
9316: l_progress := '140';
9314: END IF;
9315:
9316: l_progress := '140';
9317:
9318: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
9319: inv_rcv_common_apis.rcv_clear_global;
9320:
9321: ELSE -- No loose items and no sub/loc change
9322: IF (l_debug = 1) THEN
9315:
9316: l_progress := '140';
9317:
9318: inv_rcv_common_apis.g_po_startup_value.transaction_mode := l_old_txn_mode_code;
9319: inv_rcv_common_apis.rcv_clear_global;
9320:
9321: ELSE -- No loose items and no sub/loc change
9322: IF (l_debug = 1) THEN
9323: DEBUG('xxx: No loose items exist','transfer_contents',9);
12133:
12134: END IF; --END IF call the managers based on lpn_context
12135:
12136: -- Call the API to clear the receiving global variables
12137: inv_rcv_common_apis.rcv_clear_global;
12138:
12139: --At last, I'm done for the current group. Can go ahead and commit my work!
12140: COMMIT;
12141: