DBA Data[Home] [Help]

APPS.OEXPURGE dependencies on MTL_SO_RMA_RECEIPTS

Line 898: return_status := so_purge_mtl_so_rma_receipts( v_rma_interface_id,

894: FETCH purge_mtl_so_rma_interface into v_rma_interface_id;
895: EXIT WHEN purge_mtl_so_rma_interface%NOTFOUND -- end of fetch
896: OR purge_mtl_so_rma_interface%NOTFOUND IS NULL; -- empty cursor
897:
898: return_status := so_purge_mtl_so_rma_receipts( v_rma_interface_id,
899: p_request_id );
900: IF return_status > -1 THEN
901: DELETE FROM mtl_so_rma_interface
902: WHERE rma_interface_id = v_rma_interface_id;

Line 926: * The mtl_so_rma_receipts needs to be cleaned when the *

922:
923: END so_purge_mtl_so_rma_interface;
924:
925: /*************************************************************
926: * The mtl_so_rma_receipts needs to be cleaned when the *
927: * corresponding rma_interface line is purged for the *
928: * following reasons: *
929: * 1. the reference to rma_interface_id becomes dangling *
930: * 2. when a return line is purged, corresponding interfaced *

Line 937: FUNCTION so_purge_mtl_so_rma_receipts

933: * RMA's exist for this item in the interface table *
934: * (MTL_SO_RMA_INTERFACE) *
935: *************************************************************/
936:
937: FUNCTION so_purge_mtl_so_rma_receipts
938: ( p_rma_interface_id NUMBER,
939: p_request_id NUMBER ) RETURN NUMBER IS
940:
941: return_status NUMBER := 0;

Line 944: CURSOR purge_mtl_so_rma_receipts IS

940:
941: return_status NUMBER := 0;
942: v_rma_receipt_id NUMBER := 0;
943:
944: CURSOR purge_mtl_so_rma_receipts IS
945: SELECT rma_receipt_id -- Lock rows to be purged
946: FROM mtl_so_rma_receipts
947: WHERE rma_interface_id = p_rma_interface_id;
948: BEGIN

Line 946: FROM mtl_so_rma_receipts

942: v_rma_receipt_id NUMBER := 0;
943:
944: CURSOR purge_mtl_so_rma_receipts IS
945: SELECT rma_receipt_id -- Lock rows to be purged
946: FROM mtl_so_rma_receipts
947: WHERE rma_interface_id = p_rma_interface_id;
948: BEGIN
949: OPEN purge_mtl_so_rma_receipts;
950: LOOP

Line 949: OPEN purge_mtl_so_rma_receipts;

945: SELECT rma_receipt_id -- Lock rows to be purged
946: FROM mtl_so_rma_receipts
947: WHERE rma_interface_id = p_rma_interface_id;
948: BEGIN
949: OPEN purge_mtl_so_rma_receipts;
950: LOOP
951: FETCH purge_mtl_so_rma_receipts into v_rma_receipt_id;
952: EXIT WHEN purge_mtl_so_rma_receipts%NOTFOUND -- end of fetch
953: OR purge_mtl_so_rma_receipts%NOTFOUND IS NULL; -- empty cursor

Line 951: FETCH purge_mtl_so_rma_receipts into v_rma_receipt_id;

947: WHERE rma_interface_id = p_rma_interface_id;
948: BEGIN
949: OPEN purge_mtl_so_rma_receipts;
950: LOOP
951: FETCH purge_mtl_so_rma_receipts into v_rma_receipt_id;
952: EXIT WHEN purge_mtl_so_rma_receipts%NOTFOUND -- end of fetch
953: OR purge_mtl_so_rma_receipts%NOTFOUND IS NULL; -- empty cursor
954:
955: DELETE FROM mtl_so_rma_receipts

Line 952: EXIT WHEN purge_mtl_so_rma_receipts%NOTFOUND -- end of fetch

948: BEGIN
949: OPEN purge_mtl_so_rma_receipts;
950: LOOP
951: FETCH purge_mtl_so_rma_receipts into v_rma_receipt_id;
952: EXIT WHEN purge_mtl_so_rma_receipts%NOTFOUND -- end of fetch
953: OR purge_mtl_so_rma_receipts%NOTFOUND IS NULL; -- empty cursor
954:
955: DELETE FROM mtl_so_rma_receipts
956: WHERE rma_receipt_id = v_rma_receipt_id;

Line 953: OR purge_mtl_so_rma_receipts%NOTFOUND IS NULL; -- empty cursor

949: OPEN purge_mtl_so_rma_receipts;
950: LOOP
951: FETCH purge_mtl_so_rma_receipts into v_rma_receipt_id;
952: EXIT WHEN purge_mtl_so_rma_receipts%NOTFOUND -- end of fetch
953: OR purge_mtl_so_rma_receipts%NOTFOUND IS NULL; -- empty cursor
954:
955: DELETE FROM mtl_so_rma_receipts
956: WHERE rma_receipt_id = v_rma_receipt_id;
957:

Line 955: DELETE FROM mtl_so_rma_receipts

951: FETCH purge_mtl_so_rma_receipts into v_rma_receipt_id;
952: EXIT WHEN purge_mtl_so_rma_receipts%NOTFOUND -- end of fetch
953: OR purge_mtl_so_rma_receipts%NOTFOUND IS NULL; -- empty cursor
954:
955: DELETE FROM mtl_so_rma_receipts
956: WHERE rma_receipt_id = v_rma_receipt_id;
957:
958: END LOOP;
959: CLOSE purge_mtl_so_rma_receipts;

Line 959: CLOSE purge_mtl_so_rma_receipts;

955: DELETE FROM mtl_so_rma_receipts
956: WHERE rma_receipt_id = v_rma_receipt_id;
957:
958: END LOOP;
959: CLOSE purge_mtl_so_rma_receipts;
960: RETURN SQLCODE;
961:
962: EXCEPTION -- Exception handler to record error
963: WHEN OTHERS THEN

Line 969: 'OEPUR: MTL_SO_RMA_RECEIPTS',

965: ROLLBACK;
966: so_record_errors( return_status,
967: p_request_id,
968: p_rma_interface_id,
969: 'OEPUR: MTL_SO_RMA_RECEIPTS',
970: NULL );
971: CLOSE purge_mtl_so_rma_receipts;
972: RETURN return_status;
973:

Line 971: CLOSE purge_mtl_so_rma_receipts;

967: p_request_id,
968: p_rma_interface_id,
969: 'OEPUR: MTL_SO_RMA_RECEIPTS',
970: NULL );
971: CLOSE purge_mtl_so_rma_receipts;
972: RETURN return_status;
973:
974: END so_purge_mtl_so_rma_receipts;
975:

Line 974: END so_purge_mtl_so_rma_receipts;

970: NULL );
971: CLOSE purge_mtl_so_rma_receipts;
972: RETURN return_status;
973:
974: END so_purge_mtl_so_rma_receipts;
975:
976: FUNCTION so_purge_order_cancellations
977: ( p_header_id NUMBER,
978: p_request_id NUMBER ) RETURN NUMBER IS