DBA Data[Home] [Help]

APPS.RMA_DIAGNOSTICS dependencies on RCV_SHIPMENT_HEADERS

Line 6: l_rma_number rcv_shipment_headers.receipt_num%TYPE := p_rma_number;

2: /* $Header: INVDRMA1B.pls 120.0.12000000.1 2007/08/09 06:51:43 ssadasiv noship $ */
3:
4: PROCEDURE rma_sql(p_operating_id IN NUMBER, p_rma_number IN NUMBER, p_sql IN OUT NOCOPY INV_DIAG_RCV_PO_COMMON.sqls_list
5: ) IS
6: l_rma_number rcv_shipment_headers.receipt_num%TYPE := p_rma_number;
7: l_operating_id rcv_shipment_headers.organization_id%TYPE := p_operating_id;
8:
9: BEGIN
10:

Line 7: l_operating_id rcv_shipment_headers.organization_id%TYPE := p_operating_id;

3:
4: PROCEDURE rma_sql(p_operating_id IN NUMBER, p_rma_number IN NUMBER, p_sql IN OUT NOCOPY INV_DIAG_RCV_PO_COMMON.sqls_list
5: ) IS
6: l_rma_number rcv_shipment_headers.receipt_num%TYPE := p_rma_number;
7: l_operating_id rcv_shipment_headers.organization_id%TYPE := p_operating_id;
8:
9: BEGIN
10:
11: p_sql(1) := ' select distinct soh.* ' ||

Line 38: ' from rcv_shipment_headers rsh , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||

34: ' and soh.org_id ='|| l_operating_id ;
35:
36:
37: p_sql(4) := ' select rsh.* ' ||
38: ' from rcv_shipment_headers rsh , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||
39: ' where soh.order_number = '||''''||l_rma_number||'''' ||
40: ' and rsl.oe_order_header_id = soh.header_id ' ||
41: ' and rsl.oe_order_line_id = sol.line_id ' ||
42: ' and sol.header_id = soh.header_id ' ||

Line 48: 'from rcv_shipment_headers rsh, oe_order_headers_all soh , rcv_transactions_interface rti '||

44: ' and rsh.shipment_header_id = rsl.shipment_header_id '||
45: ' and soh.org_id ='|| l_operating_id ||
46: ' union all' ||
47: ' select rsh.* '||
48: 'from rcv_shipment_headers rsh, oe_order_headers_all soh , rcv_transactions_interface rti '||
49: ' WHERE rsh.shipment_header_id = rti.shipment_header_id'||
50: ' AND rti.oe_order_header_id = soh.header_id' ||
51: ' and soh.order_number = '||''''||l_rma_number||'''' ||
52: ' and soh.org_id ='|| l_operating_id ;

Line 437: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;

433:
434: PROCEDURE rma_line_sql(p_operating_id IN NUMBER,p_rma_number IN VARCHAR2,
435: p_line_num IN NUMBER, p_sql IN OUT NOCOPY INV_DIAG_RCV_PO_COMMON.sqls_list) IS
436:
437: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;
438: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;
439: l_line_num oe_order_lines_all.line_number%TYPE := p_line_num ;
440:
441: BEGIN

Line 438: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;

434: PROCEDURE rma_line_sql(p_operating_id IN NUMBER,p_rma_number IN VARCHAR2,
435: p_line_num IN NUMBER, p_sql IN OUT NOCOPY INV_DIAG_RCV_PO_COMMON.sqls_list) IS
436:
437: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;
438: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;
439: l_line_num oe_order_lines_all.line_number%TYPE := p_line_num ;
440:
441: BEGIN
442:

Line 476: ' from rcv_shipment_headers rsh , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||

472:
473:
474:
475: p_sql(4) := ' select rsh.* ' ||
476: ' from rcv_shipment_headers rsh , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||
477: ' where soh.order_number = '||''''||l_rma_number||'''' ||
478: ' and rsl.oe_order_header_id = soh.header_id ' ||
479: ' and rsl.oe_order_line_id = sol.line_id ' ||
480: ' and sol.line_number = '|| l_line_num ||

Line 487: 'from rcv_shipment_headers rsh, oe_order_headers_all soh , oe_order_lines_all sol,rcv_transactions_interface rti '||

483: ' and rsh.shipment_header_id = rsl.shipment_header_id '||
484: ' and soh.org_id ='|| l_operating_id ||
485: ' union all' ||
486: ' select rsh.* '||
487: 'from rcv_shipment_headers rsh, oe_order_headers_all soh , oe_order_lines_all sol,rcv_transactions_interface rti '||
488: ' WHERE rsh.shipment_header_id = rti.shipment_header_id'||
489: ' AND rti.oe_order_header_id = soh.header_id' ||
490: ' and soh.header_id = sol.header_id'||
491: ' and rti.oe_order_line_id = sol.line_id' ||

Line 908: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;

904: PROCEDURE rma_receipt_sql(p_operating_id IN NUMBER,p_rma_number IN VARCHAR2,
905: p_receipt_number IN NUMBER, p_org_id IN NUMBER, p_sql IN OUT NOCOPY
906: INV_DIAG_RCV_PO_COMMON.sqls_list) IS
907:
908: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;
909: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;
910: l_receipt_number rcv_shipment_headers.receipt_num%TYPE := p_receipt_number;
911: l_organization_id rcv_shipment_headers.organization_id%TYPE := p_org_id;
912:

Line 909: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;

905: p_receipt_number IN NUMBER, p_org_id IN NUMBER, p_sql IN OUT NOCOPY
906: INV_DIAG_RCV_PO_COMMON.sqls_list) IS
907:
908: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;
909: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;
910: l_receipt_number rcv_shipment_headers.receipt_num%TYPE := p_receipt_number;
911: l_organization_id rcv_shipment_headers.organization_id%TYPE := p_org_id;
912:
913: BEGIN

Line 910: l_receipt_number rcv_shipment_headers.receipt_num%TYPE := p_receipt_number;

906: INV_DIAG_RCV_PO_COMMON.sqls_list) IS
907:
908: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;
909: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;
910: l_receipt_number rcv_shipment_headers.receipt_num%TYPE := p_receipt_number;
911: l_organization_id rcv_shipment_headers.organization_id%TYPE := p_org_id;
912:
913: BEGIN
914:

Line 911: l_organization_id rcv_shipment_headers.organization_id%TYPE := p_org_id;

907:
908: l_operating_id rcv_shipment_headers.receipt_num%TYPE := p_operating_id;
909: l_rma_number rcv_shipment_headers.organization_id%TYPE := p_rma_number;
910: l_receipt_number rcv_shipment_headers.receipt_num%TYPE := p_receipt_number;
911: l_organization_id rcv_shipment_headers.organization_id%TYPE := p_org_id;
912:
913: BEGIN
914:
915: p_sql(1) := 'select distinct soh.* ' ||

Line 921: ' from oe_order_lines_all sol, rcv_shipment_headers rsh, rcv_shipment_lines rsl ' ||

917: ' where soh.order_number ='||''''||l_rma_number||'''' ||
918: ' and soh.org_id = '||l_operating_id ||
919: ' and exists (' ||
920: ' select 1 ' ||
921: ' from oe_order_lines_all sol, rcv_shipment_headers rsh, rcv_shipment_lines rsl ' ||
922: ' where sol.line_category_code = ''RETURN'' ' ||
923: ' and sol.header_id = soh.header_id '||
924: ' AND sol.line_id = rsl.oe_order_line_id' ||
925: ' and rsh.shipment_header_id = rsl.shipment_header_id' ||

Line 934: ' from oe_order_lines_all sol , oe_order_headers_all soh,rcv_shipment_headers rsh,' ||

930:
931:
932:
933: p_sql(2) := ' select sol.* ' ||
934: ' from oe_order_lines_all sol , oe_order_headers_all soh,rcv_shipment_headers rsh,' ||
935: ' rcv_shipment_lines rsl ' ||
936: ' where soh.order_number ='||''''||l_rma_number||'''' ||
937: ' and soh.org_id = '||l_operating_id ||
938: ' and sol.line_category_code = ''RETURN'' ' ||

Line 958: ' from rcv_shipment_headers rsh , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||

954: ' and msi.organization_id = sol.ship_from_org_id ';
955:
956:
957: p_sql(4) := ' select rsh.* ' ||
958: ' from rcv_shipment_headers rsh , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||
959: ' where soh.order_number ='||''''||l_rma_number||'''' ||
960: ' and soh.org_id = '||l_operating_id ||
961: ' and rsl.oe_order_header_id = soh.header_id ' ||
962: ' and rsl.oe_order_line_id = sol.line_id ' ||

Line 970: ' from rcv_shipment_headers rsh, rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||

966: ' and rsh.receipt_num = '||''''||l_receipt_number||'''' ||
967: ' and rsh.organization_id = '||l_organization_id ;
968:
969: p_sql(5) := ' select rsl.* ' ||
970: ' from rcv_shipment_headers rsh, rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol ' ||
971: ' where soh.order_number ='||''''||l_rma_number||'''' ||
972: ' and soh.org_id = '||l_operating_id ||
973: ' and rsl.oe_order_header_id = soh.header_id ' ||
974: ' and rsl.oe_order_line_id = sol.line_id ' ||

Line 984: ' from rcv_transactions rt , oe_order_headers_all soh , oe_order_lines_all sol , rcv_shipment_headers rsh' ||

980:
981:
982:
983: p_sql(6) := ' select rt.* ' ||
984: ' from rcv_transactions rt , oe_order_headers_all soh , oe_order_lines_all sol , rcv_shipment_headers rsh' ||
985: ' where soh.order_number ='||''''||l_rma_number||'''' ||
986: ' and soh.org_id = '||l_operating_id ||
987: ' and rt.oe_order_header_id = soh.header_id ' ||
988: ' and rt.oe_order_line_id = sol.line_id ' ||

Line 1011: ' from rcv_transactions_interface rti , oe_order_headers_all soh , oe_order_lines_all sol, rcv_shipment_headers rsh ' ||

1007: ' and rhi.header_interface_id = rti.header_interface_id ';
1008:
1009:
1010: p_sql(8) := ' select rti.* ' ||
1011: ' from rcv_transactions_interface rti , oe_order_headers_all soh , oe_order_lines_all sol, rcv_shipment_headers rsh ' ||
1012: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1013: ' and soh.org_id = '||l_operating_id ||
1014: ' and (rti.oe_order_header_id = soh.header_id ' ||
1015: ' or rti.oe_order_line_id = sol.line_id ) ' ||

Line 1073: rcv_shipment_headers rsh' ||

1069:
1070:
1071: p_sql(12) := ' select mmt.* ' ||
1072: ' from mtl_material_transactions mmt , oe_order_lines_all sol , oe_order_headers_all soh , rcv_transactions rt ,
1073: rcv_shipment_headers rsh' ||
1074: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1075: ' and soh.org_id = '||l_operating_id ||
1076: ' and sol.header_id = soh.header_id ' ||
1077: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1090: ' rcv_transactions rt, rcv_shipment_headers rsh ' ||

1086: p_sql(13) := ' select distinct mtt.transaction_type_id , mtt.transaction_type_name , mtt.transaction_source_type_id ,'||
1087: ' mtt.transaction_action_id , mtt.user_defined_flag , mtt.disable_date ' ||
1088: ' from mtl_transaction_types mtt , mtl_material_transactions mmt , oe_order_lines_all sol , oe_order_headers_all soh ,'
1089: ||
1090: ' rcv_transactions rt, rcv_shipment_headers rsh ' ||
1091: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1092: ' and soh.org_id = '||l_operating_id ||
1093: ' and sol.header_id = soh.header_id ' ||
1094: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1107: rcv_shipment_headers rsh ' ||

1103:
1104:
1105: /*p_sql(14) := 'select distinct mtrl.* ' ||
1106: ' from mtl_txn_request_lines mtrl , rcv_transactions rt , oe_order_headers_all soh , oe_order_lines_all sol,
1107: rcv_shipment_headers rsh ' ||
1108: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1109: ' and rt.oe_order_header_id = soh.header_id ' ||
1110: ' and rt.oe_order_line_id = sol.line_id ' ||
1111: ' and sol.header_id = soh.header_id ' ||

Line 1122: rcv_shipment_headers rsh ' ||

1118: ' and soh.org_id = 2222 ';*/
1119:
1120: p_sql(14) := 'select distinct mtrl.* ' ||
1121: ' from mtl_txn_request_lines mtrl , rcv_transactions rt , oe_order_headers_all soh , oe_order_lines_all sol,
1122: rcv_shipment_headers rsh ' ||
1123: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1124: ' and rt.oe_order_header_id = soh.header_id ' ||
1125: ' and rt.oe_order_line_id = sol.line_id ' ||
1126: ' and sol.header_id = soh.header_id ' ||

Line 1140: ' from mtl_material_transactions_temp mmtt , oe_order_lines_all sol , oe_order_headers_all soh, rcv_shipment_headers rsh

1136:
1137:
1138:
1139: p_sql(15) := ' select mmtt.* ' ||
1140: ' from mtl_material_transactions_temp mmtt , oe_order_lines_all sol , oe_order_headers_all soh, rcv_shipment_headers rsh
1141: ' ||
1142: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1143: ' and soh.org_id = '||l_operating_id ||
1144: ' and sol.header_id = soh.header_id ' ||

Line 1158: ' rcv_shipment_headers rsh, rcv_shipment_lines rsl' ||

1154: ' and rt.shipment_header_id = rsh.shipment_header_id) ';
1155:
1156: p_sql(16) := ' select lsn.* ' ||
1157: ' from oe_lot_serial_numbers lsn , oe_order_lines_all sol , oe_order_headers_all soh,' ||
1158: ' rcv_shipment_headers rsh, rcv_shipment_lines rsl' ||
1159: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1160: ' and soh.org_id = '||l_operating_id ||
1161: ' and sol.line_category_code = ''RETURN'' ' ||
1162: ' and sol.header_id = soh.header_id ' ||

Line 1173: ' rcv_shipment_headers rsh, rcv_shipment_lines rsl' ||

1169:
1170:
1171: p_sql(17) := ' select distinct msn.* ' ||
1172: ' from mtl_serial_numbers msn , oe_order_lines_all sol , oe_order_headers_all soh ,' ||
1173: ' rcv_shipment_headers rsh, rcv_shipment_lines rsl' ||
1174: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1175: ' and soh.org_id = '||l_operating_id ||
1176: ' and sol.header_id = soh.header_id ' ||
1177: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1208: ' oe_order_headers_all soh , rcv_transactions rt , rcv_shipment_headers rsh' ||

1204:
1205:
1206: p_sql(18) := ' select msnt.* ' ||
1207: ' from mtl_serial_numbers_temp msnt , mtl_material_transactions_temp mmtt , oe_order_lines_all sol , ' ||
1208: ' oe_order_headers_all soh , rcv_transactions rt , rcv_shipment_headers rsh' ||
1209: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1210: ' and soh.org_id = '||l_operating_id ||
1211: ' and sol.header_id = soh.header_id ' ||
1212: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1230: ' rcv_shipment_headers rsh ' ||

1226:
1227: p_sql(19) := ' select msni.* ' ||
1228: ' from mtl_transactions_interface mti , oe_order_lines_all sol , ' ||
1229: ' oe_order_headers_all soh , mtl_serial_numbers_interface msni , rcv_transactions rt, ' ||
1230: ' rcv_shipment_headers rsh ' ||
1231: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1232: ' and soh.org_id = '||l_operating_id ||
1233: ' and sol.header_id = soh.header_id ' ||
1234: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1251: ' rcv_transactions rt , mtl_unit_transactions mut ,rcv_shipment_headers rsh' ||

1247:
1248:
1249: p_sql(20) := ' select mut.* ' ||
1250: ' from mtl_material_transactions mmt , oe_order_lines_all sol , oe_order_headers_all soh , ' ||
1251: ' rcv_transactions rt , mtl_unit_transactions mut ,rcv_shipment_headers rsh' ||
1252: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1253: ' and soh.org_id = '||l_operating_id ||
1254: ' and sol.header_id = soh.header_id ' ||
1255: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1273: ' rcv_shipment_headers rsh' ||

1269:
1270:
1271: p_sql(21) := ' select rst.* ' ||
1272: ' from rcv_serial_transactions rst , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol,' ||
1273: ' rcv_shipment_headers rsh' ||
1274: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1275: ' and soh.org_id = '||l_operating_id ||
1276: ' and rsl.oe_order_header_id = soh.header_id ' ||
1277: ' and rsl.oe_order_line_id = sol.line_id ' ||

Line 1288: ' rcv_shipment_headers rsh' ||

1284:
1285:
1286: p_sql(22) := ' select distinct rsi.* ' ||
1287: ' from rcv_serials_interface rsi , rcv_shipment_lines rsl , oe_order_headers_all soh , oe_order_lines_all sol,' ||
1288: ' rcv_shipment_headers rsh' ||
1289: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1290: ' and soh.org_id = '||l_operating_id ||
1291: ' and rsl.oe_order_header_id = soh.header_id ' ||
1292: ' and rsl.oe_order_line_id = sol.line_id ' ||

Line 1348: ' from rcv_transactions rt, rcv_shipment_headers rsh ' ||

1344: ' and sol.line_category_code = ''RETURN'' ' ||
1345: ' and mmt.transaction_id = mtln.transaction_id ' ||
1346: ' and (exists (' ||
1347: ' select 1 ' ||
1348: ' from rcv_transactions rt, rcv_shipment_headers rsh ' ||
1349: ' where rt.oe_order_line_id = sol.line_id ' ||
1350: ' and mmt.rcv_transaction_id = rt.transaction_id' ||
1351: ' and rsh.shipment_header_id = rt.shipment_header_id' ||
1352: ' and rsh.receipt_num = '||''''||l_receipt_number||'''' ||

Line 1364: ' oe_order_lines_all sol , oe_order_headers_all soh , rcv_transactions rt, rcv_shipment_headers rsh ' ||

1360:
1361:
1362: p_sql(25):= ' select mtli.* ' ||
1363: ' from mtl_transaction_lots_interface mtli , mtl_transactions_interface mti , ' ||
1364: ' oe_order_lines_all sol , oe_order_headers_all soh , rcv_transactions rt, rcv_shipment_headers rsh ' ||
1365: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1366: ' and soh.org_id = '||l_operating_id ||
1367: ' and sol.header_id = soh.header_id ' ||
1368: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1380: ' oe_order_headers_all soh , rcv_transactions rt,rcv_shipment_headers rsh ' ||

1376:
1377:
1378: p_sql(26) := ' select mtlt.* ' ||
1379: ' from mtl_transaction_lots_temp mtlt , mtl_material_transactions_temp mmtt , oe_order_lines_all sol , ' ||
1380: ' oe_order_headers_all soh , rcv_transactions rt,rcv_shipment_headers rsh ' ||
1381: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1382: ' and soh.org_id = '||l_operating_id ||
1383: ' and sol.header_id = soh.header_id ' ||
1384: ' and sol.line_category_code = ''RETURN'' ' ||

Line 1395: ' oe_order_lines_all sol , rcv_shipment_headers rsh' ||

1391: ' and mmtt.transaction_temp_id = mtlt.transaction_temp_id order by mtlt.transaction_temp_id , mtlt.lot_number ';
1392:
1393: p_sql(27) := ' select rlt.* ' ||
1394: ' from rcv_lot_transactions rlt , rcv_shipment_lines rsl , oe_order_headers_all soh , ' ||
1395: ' oe_order_lines_all sol , rcv_shipment_headers rsh' ||
1396: ' where soh.order_number ='||''''||l_rma_number||'''' ||
1397: ' and soh.org_id = '||l_operating_id ||
1398: ' and rsl.oe_order_header_id = soh.header_id ' ||
1399: ' and rsl.oe_order_line_id = sol.line_id ' ||

Line 1408: ' FROM rcv_parameters rp, rcv_shipment_headers rsh, oe_order_headers_all soh, oe_order_lines_all sol

1404: ' and sol.line_category_code = ''RETURN'' ' ||
1405: ' and rlt.shipment_line_id = rsl.shipment_line_id order by rlt.shipment_line_id , rlt.lot_num ';
1406:
1407: p_sql(28) := ' SELECT DISTINCT rp.* ' ||
1408: ' FROM rcv_parameters rp, rcv_shipment_headers rsh, oe_order_headers_all soh, oe_order_lines_all sol
1409: ' ||
1410: ' where rsh.receipt_num = '||''''||l_receipt_number||'''' ||
1411: ' and rsh.organization_id = '|| l_organization_id ||
1412: ' AND rsh.organization_id = rp.organization_id ' ;