DBA Data[Home] [Help]

APPS.CSP_SCH_INT_PVT dependencies on CSP_REQUIREMENT_HEADERS

Line 252: from csp_requirement_lines crl,csp_requirement_headers crh

248: l_search_method varchar2(30) := fnd_profile.value('CSP_PART_SEARCH_METHOD_SCHEDULER');
249:
250: cursor get_line_id is
251: select distinct(crl.requirement_line_id) req_line_id
252: from csp_requirement_lines crl,csp_requirement_headers crh
253: where crh.task_id = p_task_id
254: and crl.requirement_header_id = crh.requirement_header_id;
255:
256: cursor get_asgn_id is

Line 344: FROM csp_requirement_headers h,

340: -- first check for the partial received order line status
341: l_partial_line := 0;
342: SELECT count(l.requirement_line_id)
343: into l_partial_line
344: FROM csp_requirement_headers h,
345: csp_requirement_lines l,
346: csp_req_line_details d,
347: oe_order_lines_all oola
348: WHERE h.task_id = p_task_id

Line 378: FROM csp_requirement_headers h,

374: -- ship to address type
375: l_fl_rcvd_lines := 0;
376: SELECT COUNT(l.requirement_line_id)
377: into l_fl_rcvd_lines
378: FROM csp_requirement_headers h,
379: csp_requirement_lines l,
380: csp_req_line_details dio,
381: csp_req_line_details dres,
382: oe_order_lines_all oola,

Line 407: FROM csp_requirement_headers h,

403:
404: if l_fl_rcvd_lines > 0 then
405: SELECT ooha.order_number
406: into l_order_number
407: FROM csp_requirement_headers h,
408: csp_requirement_lines l,
409: csp_req_line_details dio,
410: oe_order_lines_all oola,
411: oe_order_headers_all ooha

Line 436: FROM csp_requirement_headers h,

432: -- for fully rcvd case
433: l_fl_rcvd_lines := 0;
434: SELECT COUNT(l.requirement_line_id)
435: into l_fl_rcvd_lines
436: FROM csp_requirement_headers h,
437: csp_requirement_lines l,
438: csp_req_line_details dio,
439: csp_req_line_details dres,
440: oe_order_lines_all oola,

Line 468: FROM csp_requirement_headers h,

464: -- get fully received lines for task and customer ship to case
465: l_fl_rcvd_multi_source := 0;
466: SELECT COUNT(l.requirement_line_id)
467: into l_fl_rcvd_multi_source
468: FROM csp_requirement_headers h,
469: csp_requirement_lines l,
470: csp_req_line_details dio,
471: csp_req_line_details dres,
472: csp_req_line_details dother,

Line 514: FROM csp_requirement_headers h,

510: SELECT COUNT(requirement_line_id)
511: into l_oth_req_line
512: FROM
513: (SELECT l.requirement_line_id
514: FROM csp_requirement_headers h,
515: csp_requirement_lines l,
516: csp_req_line_details d
517: WHERE h.task_id = p_task_id
518: AND h.task_assignment_id = r_asgn.task_assignment_id

Line 524: FROM csp_requirement_headers h,

520: AND h.address_type IN ('T', 'C', 'P')
521: AND l.requirement_line_id = d.requirement_line_id
522: MINUS
523: SELECT l.requirement_line_id
524: FROM csp_requirement_headers h,
525: csp_requirement_lines l,
526: csp_req_line_details dio,
527: csp_req_line_details dres,
528: oe_order_lines_all oola,

Line 567: FROM csp_requirement_headers h,

563: SELECT COUNT(requirement_line_id)
564: into l_non_src_line
565: FROM
566: (SELECT l.requirement_line_id
567: FROM csp_requirement_headers h,
568: csp_requirement_lines l
569: WHERE h.task_id = p_task_id
570: AND h.task_assignment_id = r_asgn.task_assignment_id
571: AND h.requirement_header_id = l.requirement_header_id

Line 578: FROM csp_requirement_headers h,

574: FROM csp_req_line_details d
575: WHERE d.requirement_line_id = l.requirement_line_id) = 0
576: MINUS
577: SELECT l.requirement_line_id
578: FROM csp_requirement_headers h,
579: csp_requirement_lines l,
580: csp_req_line_details dio,
581: csp_req_line_details dres,
582: oe_order_lines_all oola,

Line 630: FROM csp_requirement_headers h,

626: -- now check for shipped lines
627: l_shpd_lines := 0;
628: SELECT COUNT(l.requirement_line_id)
629: into l_shpd_lines
630: FROM csp_requirement_headers h,
631: csp_requirement_lines l,
632: csp_req_line_details d,
633: oe_order_lines_all oola
634: WHERE h.task_id = p_task_id

Line 652: FROM csp_requirement_headers h

648: if l_shpd_lines > 0 then
649: l_tech_spec_pr := 0;
650: SELECT count(h.address_type)
651: into l_tech_spec_pr
652: FROM csp_requirement_headers h
653: WHERE h.task_id = p_task_id
654: AND h.task_assignment_id = r_asgn.task_assignment_id
655: AND h.address_type IN ('R', 'S');
656:

Line 666: FROM csp_requirement_headers h,

662:
663: if l_tech_spec_pr > 0 then
664: SELECT ooha.order_number
665: INTO l_order_number
666: FROM csp_requirement_headers h,
667: csp_requirement_lines l,
668: csp_req_line_details d,
669: oe_order_lines_all oola,
670: oe_order_headers_all ooha

Line 694: FROM csp_requirement_headers h,

690: -- now check for same line multiple IO case
691: l_ship_multi_src := 0;
692: SELECT COUNT(l.requirement_line_id)
693: into l_ship_multi_src
694: FROM csp_requirement_headers h,
695: csp_requirement_lines l,
696: csp_req_line_details d,
697: csp_req_line_details dother,
698: oe_order_lines_all oola

Line 732: FROM csp_requirement_headers h,

728: SELECT COUNT(requirement_line_id)
729: into l_oth_req_line
730: FROM
731: (SELECT l.requirement_line_id
732: FROM csp_requirement_headers h,
733: csp_requirement_lines l,
734: csp_req_line_details d
735: WHERE h.task_id = p_task_id
736: AND h.task_assignment_id = r_asgn.task_assignment_id

Line 741: FROM csp_requirement_headers h,

737: AND h.requirement_header_id = l.requirement_header_id
738: AND l.requirement_line_id = d.requirement_line_id
739: MINUS
740: SELECT l.requirement_line_id
741: FROM csp_requirement_headers h,
742: csp_requirement_lines l,
743: csp_req_line_details d,
744: oe_order_lines_all oola
745: WHERE h.task_id = p_task_id

Line 776: FROM csp_requirement_headers h,

772: SELECT COUNT(requirement_line_id)
773: into l_non_src_line
774: FROM
775: (SELECT l.requirement_line_id
776: FROM csp_requirement_headers h,
777: csp_requirement_lines l
778: WHERE h.task_id = p_task_id
779: AND h.task_assignment_id = r_asgn.task_assignment_id
780: AND h.requirement_header_id = l.requirement_header_id

Line 786: FROM csp_requirement_headers h,

782: FROM csp_req_line_details d
783: WHERE d.requirement_line_id = l.requirement_line_id) = 0
784: MINUS
785: SELECT l.requirement_line_id
786: FROM csp_requirement_headers h,
787: csp_requirement_lines l,
788: csp_req_line_details d,
789: oe_order_lines_all oola
790: WHERE h.task_id = p_task_id

Line 809: FROM csp_requirement_headers h,

805: if l_non_src_line = 0 then
806: l_old_arrival_date := null;
807: SELECT MAX(oel.request_date)
808: into l_old_arrival_date
809: FROM csp_requirement_headers h,
810: csp_requirement_lines l,
811: csp_req_line_details d,
812: oe_order_lines_all oel
813: WHERE h.task_id = p_task_id

Line 830: FROM csp_requirement_headers ch

826:
827: l_dest_ou := -999;
828: SELECT ch.destination_organization_id
829: into l_dest_ou
830: FROM csp_requirement_headers ch
831: WHERE ch.task_id = p_task_id
832: AND ch.task_assignment_id = r_asgn.task_assignment_id
833: AND rownum = 1;
834:

Line 895: FROM csp_requirement_headers h,

891:
892: l_old_arrival_date := null;
893: SELECT MAX(oel.request_date)
894: into l_old_arrival_date
895: FROM csp_requirement_headers h,
896: csp_requirement_lines l,
897: csp_req_line_details d,
898: oe_order_lines_all oel
899: WHERE h.task_id = p_task_id

Line 916: FROM csp_requirement_headers ch

912:
913: l_dest_ou := -999;
914: SELECT ch.destination_organization_id
915: into l_dest_ou
916: FROM csp_requirement_headers ch
917: WHERE ch.task_id = p_task_id
918: AND ch.task_assignment_id = r_asgn.task_assignment_id
919: AND rownum = 1;
920:

Line 1225: FROM CSP_REQUIREMENT_HEADERS crh

1221: ,x_msg_count OUT NOCOPY NUMBER) IS
1222:
1223: CURSOR C2 IS
1224: SELECT crh.REQUIREMENT_HEADER_ID,crh.address_type
1225: FROM CSP_REQUIREMENT_HEADERS crh
1226: WHERE crh.TASK_ID = p_task_id;
1227:
1228: cursor c_accepted_flag is
1229: select nvl(jtsv.accepted_flag,'N')

Line 1273: csp_requirement_headers crh,

1269: crh.ship_to_location_id
1270: from csp_available_parts_temp capt,
1271: org_organization_definitions ood,
1272: csp_requirement_lines crl,
1273: csp_requirement_headers crh,
1274: mtl_system_items_b msib
1275: where ood.organization_id = capt.organization_id
1276: and crl.requirement_header_id = crh.requirement_header_id
1277: and crl.inventory_item_id = capt.required_item_id

Line 1301: l_requirement_header CSP_Requirement_Headers_PVT.REQUIREMENT_HEADER_Rec_Type;

1297: l_reservation_parts CSP_SCH_INT_PVT.RESERVATION_REC_TYP;
1298: l_org_ship_methode org_ship_methodes_tbl_type ;
1299: -- l_Requirement_Line_Tbl CSP_Requirement_Lines_PVT.Requirement_Line_Tbl_Type;
1300: l_res_ship_parameters CSP_SCH_INT_PVT.CSP_ORGS_SHIP_PARAM_TBL_TYPE;
1301: l_requirement_header CSP_Requirement_Headers_PVT.REQUIREMENT_HEADER_Rec_Type;
1302: l_parts_header csp_parts_requirement.Header_rec_type;
1303: l_parts_lines csp_parts_requirement.Line_Tbl_type;
1304: l_revision varchar2(3);
1305: l_ship_set varchar2(3);

Line 1344: from csp_requirement_headers

1340: l_shpd_lines number;
1341:
1342: cursor c_parts_req (v_task_id number, v_task_assignment_id number) is
1343: select requirement_header_id
1344: from csp_requirement_headers
1345: where task_id = v_task_id
1346: and task_assignment_id = v_task_assignment_id;
1347:
1348: l_resource_name varchar2(200);

Line 1392: FROM csp_requirement_headers h,

1388:
1389: l_fl_rcvd_lines := 0;
1390: SELECT COUNT(l.requirement_line_id)
1391: into l_fl_rcvd_lines
1392: FROM csp_requirement_headers h,
1393: csp_requirement_lines l,
1394: csp_req_line_details dio,
1395: csp_req_line_details dres,
1396: oe_order_lines_all oola,

Line 1445: FROM csp_requirement_headers h,

1441: -- inventory org and let second resource receive it
1442: l_shpd_lines := 0;
1443: SELECT COUNT(l.requirement_line_id)
1444: into l_shpd_lines
1445: FROM csp_requirement_headers h,
1446: csp_requirement_lines l,
1447: csp_req_line_details d,
1448: oe_order_lines_all oola
1449: WHERE h.task_id = p_task_id

Line 1463: l_requirement_header := CSP_Requirement_headers_PVT.G_MISS_REQUIREMENT_HEADER_REC;

1459:
1460: if l_shpd_lines > 0 then
1461: for cr in c_parts_req(p_task_id, r_asgn.task_assignment_id)
1462: loop
1463: l_requirement_header := CSP_Requirement_headers_PVT.G_MISS_REQUIREMENT_HEADER_REC;
1464: l_requirement_header.requirement_header_id := cr.requirement_header_id;
1465: l_requirement_header.need_by_date := p_options.start_time;
1466: l_requirement_header.task_assignment_id := p_task_assignment_id ;
1467: l_requirement_header.last_update_date := sysdate;

Line 1481: CSP_Requirement_Headers_PVT.Update_requirement_headers(

1477: log('choose_option','resource_id:'||l_requirement_header.resource_id);
1478: log('choose_option','start_time:'||to_char(l_requirement_header.need_by_date,'dd-mon-yyyy hh24:mi:ss'));
1479:
1480: log('choose_option', 'before calling Update_requirement_headers...');
1481: CSP_Requirement_Headers_PVT.Update_requirement_headers(
1482: P_Api_Version_Number => 1.0,
1483: P_Init_Msg_List => FND_API.G_FALSE,
1484: P_Commit => FND_API.G_FALSE,
1485: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 1524: l_requirement_header := CSP_Requirement_headers_PVT.G_MISS_REQUIREMENT_HEADER_REC;

1520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1521: if x_return_status = 'C' then
1522: for cr in c_parts_req(p_task_id, r_asgn.task_assignment_id)
1523: loop
1524: l_requirement_header := CSP_Requirement_headers_PVT.G_MISS_REQUIREMENT_HEADER_REC;
1525: l_requirement_header.requirement_header_id := cr.requirement_header_id;
1526: l_requirement_header.need_by_date := p_options.start_time;
1527: l_requirement_header.task_assignment_id := p_task_assignment_id ;
1528: l_requirement_header.last_update_date := sysdate;

Line 1542: CSP_Requirement_Headers_PVT.Update_requirement_headers(

1538: log('choose_option','resource_id:'||l_requirement_header.resource_id);
1539: log('choose_option','start_time:'||to_char(l_requirement_header.need_by_date,'dd-mon-yyyy hh24:mi:ss'));
1540:
1541: log('choose_option', 'before calling Update_requirement_headers...');
1542: CSP_Requirement_Headers_PVT.Update_requirement_headers(
1543: P_Api_Version_Number => 1.0,
1544: P_Init_Msg_List => FND_API.G_FALSE,
1545: P_Commit => FND_API.G_FALSE,
1546: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 1841: CSP_Requirement_Headers_PVT.Update_requirement_headers(

1837: l_requirement_header.ship_to_location_id := l_ship_to_location_id;
1838: l_requirement_header.SHIP_TO_CONTACT_ID := null;
1839: end if;
1840: end if;
1841: CSP_Requirement_Headers_PVT.Update_requirement_headers(
1842: P_Api_Version_Number => 1.0,
1843: P_Init_Msg_List => FND_API.G_FALSE,
1844: P_Commit => FND_API.G_FALSE,
1845: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 2192: CSP_Requirement_Headers_PVT.Update_requirement_headers(

2188: l_requirement_header.address_type := 'R';
2189: l_requirement_header.ship_to_location_id := l_ship_to_location_id;
2190: END IF;
2191: l_requirement_header.ORDER_TYPE_ID := FND_PROFILE.value(name => 'CSP_ORDER_TYPE');
2192: CSP_Requirement_Headers_PVT.Update_requirement_headers(
2193: P_Api_Version_Number => 1.0,
2194: P_Init_Msg_List => FND_API.G_FALSE,
2195: P_Commit => FND_API.G_FALSE,
2196: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 2229: FROM CSP_REQUIREMENT_LINES crl, csp_requirement_headers crh

2225: ,x_msg_count OUT NOCOPY NUMBER) IS
2226:
2227: CURSOR cancel_reserv IS
2228: SELECT crl.RESERVATION_ID,crl.LOCAL_RESERVATION_ID,crl.REQUIREMENT_LINE_ID
2229: FROM CSP_REQUIREMENT_LINES crl, csp_requirement_headers crh
2230: WHERE crh.task_assignment_id = p_task_assignment_id
2231: and crl.REQUIREMENT_HEADER_ID = crh.requirement_header_id
2232: AND crl.local_RESERVATION_ID IS NOT NULL;
2233:

Line 2236: from oe_order_lines_all oel, oe_order_headers_all oeh, csp_requirement_headers crh, csp_requirement_lines crl

2232: AND crl.local_RESERVATION_ID IS NOT NULL;
2233:
2234: cursor cancel_order IS
2235: select distinct oeh.header_id,crl.requirement_line_id
2236: from oe_order_lines_all oel, oe_order_headers_all oeh, csp_requirement_headers crh, csp_requirement_lines crl
2237: where crh.task_assignment_id = p_task_assignment_id
2238: and crl.REQUIREMENT_HEADER_ID = crh.REQUIREMENT_HEADER_ID
2239: and oel.line_id = crl.order_line_id
2240: and oeh.header_id = oel.header_id

Line 2438: ,csp_requirement_headers crh

2434: CURSOR get_reservations is
2435: select crld.source_id , crld.req_line_detail_id
2436: from csp_req_line_details crld
2437: ,csp_requirement_lines crl
2438: ,csp_requirement_headers crh
2439: where crh.task_assignment_id = p_task_assignment_id
2440: and crl.requirement_header_id = crh.requirement_header_id
2441: and crld.requirement_line_id = crl.requirement_line_id
2442: and crld.source_type = 'RES' ;

Line 2448: ,csp_requirement_headers crh

2444: CURSOR get_orders is
2445: select oeh.header_id, crld.req_line_detail_id, crh.address_type
2446: from csp_req_line_details crld
2447: ,csp_requirement_lines crl
2448: ,csp_requirement_headers crh
2449: ,oe_order_lines_all oel
2450: ,oe_order_headers_all oeh
2451: where crh.task_assignment_id = p_task_assignment_id
2452: and crl.requirement_header_id = crh.requirement_header_id

Line 2473: from csp_requirement_headers

2469: and oel.header_id = c_order_header_id;
2470:
2471: cursor get_requirement_header_id is
2472: select requirement_header_id,address_type
2473: from csp_requirement_headers
2474: where task_assignment_id = p_task_assignment_id;
2475:
2476: l_requirement_header CSP_Requirement_Headers_PVT.REQUIREMENT_HEADER_Rec_Type;
2477: l_requirement_header_id NUMBER;

Line 2476: l_requirement_header CSP_Requirement_Headers_PVT.REQUIREMENT_HEADER_Rec_Type;

2472: select requirement_header_id,address_type
2473: from csp_requirement_headers
2474: where task_assignment_id = p_task_assignment_id;
2475:
2476: l_requirement_header CSP_Requirement_Headers_PVT.REQUIREMENT_HEADER_Rec_Type;
2477: l_requirement_header_id NUMBER;
2478: l_address_type varchar2(3);
2479: l_line_to_cancel number;
2480: l_fl_rcvd_lines number;

Line 2498: FROM csp_requirement_headers h,

2494: -- choose option will take care of it
2495: l_fl_rcvd_lines := 0;
2496: SELECT COUNT(l.requirement_line_id)
2497: into l_fl_rcvd_lines
2498: FROM csp_requirement_headers h,
2499: csp_requirement_lines l,
2500: csp_req_line_details dio,
2501: csp_req_line_details dres,
2502: oe_order_lines_all oola,

Line 2530: FROM csp_requirement_headers h,

2526: -- another check for already shipped order lines
2527: l_shpd_lines := 0;
2528: SELECT COUNT(l.requirement_line_id)
2529: into l_shpd_lines
2530: FROM csp_requirement_headers h,
2531: csp_requirement_lines l,
2532: csp_req_line_details d,
2533: oe_order_lines_all oola
2534: WHERE h.task_assignment_id = p_task_assignment_id

Line 2710: CSP_Requirement_Headers_PVT.Update_requirement_headers(

2706: fnd_log.string(fnd_log.level_statement, l_module_name,
2707: 'before updating req header... ');
2708: end if;
2709:
2710: CSP_Requirement_Headers_PVT.Update_requirement_headers(
2711: P_Api_Version_Number => 1.0,
2712: P_Init_Msg_List => FND_API.G_FALSE,
2713: P_Commit => FND_API.G_FALSE,
2714: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

Line 2817: ,csp_requirement_headers crh

2813: CURSOR get_orders is
2814: select distinct oeh.header_id, oel.line_id
2815: from csp_req_line_details crld
2816: ,csp_requirement_lines crl
2817: ,csp_requirement_headers crh
2818: ,oe_order_lines_all oel
2819: ,oe_order_headers_all oeh
2820: where crh.task_assignment_id = p_task_assignment_id
2821: and crl.requirement_header_id = crh.requirement_header_id

Line 2891: FROM CSP_REQUIREMENT_HEADERS HR,CSP_REQUIREMENT_LINES LN

2887: /* CURSOR get_parts(c_task_assignment NUMBER) IS
2888: SELECT INVENTORY_ITEM_ID, UOM_CODE,REVISION
2889: ,SHIP_COMPLETE_FLAG,SOURCE_ORGANIZATION_ID
2890: ,ORDERED_QUANTITY,REQUIREMENT_LINE_ID,RESERVATION_ID
2891: FROM CSP_REQUIREMENT_HEADERS HR,CSP_REQUIREMENT_LINES LN
2892: WHERE HR.TASK_ASSIGNMENT_ID = c_task_assignment
2893: AND LN.REQUIREMENT_HEADER_ID = HR.REQUIREMENT_HEADER_ID;
2894:
2895:

Line 2903: from CSP_REQUIREMENT_HEADERS

2899:
2900: */
2901: /*CURSOR C1(c_task_assignment number) is
2902: select REQUIREMENT_HEADER_ID
2903: from CSP_REQUIREMENT_HEADERS
2904: where TASK_ASSIGNMENT_ID = c_task_assignment;
2905: CURSOR C2(c_header_id number) is
2906: SELECT INVENTORY_ITEM_ID, UOM_CODE,REVISION
2907: ,SHIP_COMPLETE_FLAG,SOURCE_ORGANIZATION_ID

Line 3193: FROM CSP_REQUIREMENT_LINES crl, CSP_REQUIREMENT_HEADERS crh

3189: ,x_msg_count OUT NOCOPY NUMBER) IS
3190:
3191: CURSOR parts_list(product_task NUMBER, parts_category NUMBER) IS
3192: SELECT INVENTORY_ITEM_ID,REQUIRED_QUANTITY , UOM_CODE,SHIP_COMPLETE_FLAG,REVISION,REQUIREMENT_LINE_ID
3193: FROM CSP_REQUIREMENT_LINES crl, CSP_REQUIREMENT_HEADERS crh
3194: WHERE crh.TASK_ID = product_task
3195: AND crl.requirement_header_id = crh.requirement_header_id
3196: AND nvl(crl.LIKELIHOOD,0) >= nvl(parts_category,0) ;
3197:

Line 3254: FROM CSP_REQUIREMENT_HEADERS

3250: IS
3251: SELECT NVL((REQUIRED_QUANTITY-ORDERED_QUANTITY),0)
3252: FROM CSP_REQUIREMENT_LINES
3253: WHERE REQUIREMENT_HEADER_ID = (SELECT REQUIREMENT_HEADER_ID
3254: FROM CSP_REQUIREMENT_HEADERS
3255: WHERE OPEN_REQUIREMENT = 'Yes'
3256: AND DESTINATION_ORGANIZATION_ID = org_id)
3257: AND SOURCE_SUBINVENTORY = sub_inv_code
3258: AND INVENTORY_ITEM_ID = item_id

Line 3769: from csp_requirement_headers crh,

3765: cursor c_requirement_header is
3766: select crh.requirement_header_id,
3767: decode(crh.address_type,'R',null,'S',null,crh.ship_to_location_id),
3768: decode(crh.address_type,'R',null,'S',null,hps.location_id)
3769: from csp_requirement_headers crh,
3770: hz_cust_site_uses_all hcsua,
3771: po_location_associations_all plaa,
3772: hz_cust_acct_sites_all hcasa,
3773: hz_party_sites hps

Line 3784: from csp_requirement_headers crh

3780: and hps.party_site_id = hcasa.party_site_id;
3781:
3782: cursor c_requirement_header_id is
3783: select crh.requirement_header_id
3784: from csp_requirement_headers crh
3785: where crh.task_id = p_task_id;
3786:
3787: cursor c_parts is
3788: select inventory_item_id,

Line 7002: FROM CSP_REQUIREMENT_HEADERS

6998: IS
6999: SELECT (REQUIRED_QUANTITY-ORDERED_QUANTITY)
7000: FROM CSP_REQUIREMENT_LINES
7001: WHERE REQUIREMENT_HEADER_ID = (SELECT REQUIREMENT_HEADER_ID
7002: FROM CSP_REQUIREMENT_HEADERS
7003: WHERE OPEN_REQUIREMENT = 'Yes'
7004: AND DESTINATION_ORGANIZATION_ID = org_id)
7005: AND SOURCE_SUBINVENTORY = sub_inv_code
7006: AND INVENTORY_ITEM_ID = item_id

Line 8053: ,csp_requirement_headers crh

8049: CURSOR get_reservations is
8050: select crld.source_id , crld.req_line_detail_id
8051: from csp_req_line_details crld
8052: ,csp_requirement_lines crl
8053: ,csp_requirement_headers crh
8054: where crh.task_id = l_task_id
8055: and crl.requirement_header_id = crh.requirement_header_id
8056: and crld.requirement_line_id = crl.requirement_line_id
8057: and crld.source_type = 'RES' ;

Line 8063: ,csp_requirement_headers crh

8059: CURSOR get_orders is
8060: select oeh.header_id, crld.req_line_detail_id
8061: from csp_req_line_details crld
8062: ,csp_requirement_lines crl
8063: ,csp_requirement_headers crh
8064: ,oe_order_lines_all oel
8065: ,oe_order_headers_all oeh
8066: where crh.task_id = l_task_id
8067: and crl.requirement_header_id = crh.requirement_header_id

Line 8152: csp_requirement_headers crh

8148: from mtl_material_transactions mmt,RCV_SHIPMENT_headers rsh,
8149: rcv_shipment_lines rcl,
8150: oe_order_lines_all oola,csp_req_line_details crld,
8151: csp_requirement_lines crl,
8152: csp_requirement_headers crh
8153: where mmt.transaction_id = p_transaction_id
8154: and mmt.shipment_number = rsh.shipment_num
8155: and rsh.shipment_header_id = rcl.shipment_header_id
8156: and oola.source_document_line_id = rcl.requisition_line_id

Line 8171: csp_requirement_lines crl,csp_requirement_headers crh

8167: crld.requirement_line_id requirement_line_id, mmt.transaction_quantity quantity_shipped,
8168: mmt.transaction_quantity quantity_received,crld.req_line_detail_id req_line_detail_id
8169: from mtl_material_transactions mmt,
8170: oe_order_lines_all oola,csp_req_line_details crld,
8171: csp_requirement_lines crl,csp_requirement_headers crh
8172: where mmt.transaction_id = p_transaction_id
8173: and oola.source_document_id = mmt.transaction_source_id
8174: and crld.source_id = oola.line_id
8175: and (mmt.source_code = 'ORDER ENTRY')

Line 8366: FROM csp_requirement_headers h,

8362: mr.subinventory_code,
8363: dres.requirement_line_id,
8364: dres.req_line_detail_id,
8365: h.requirement_header_id
8366: FROM csp_requirement_headers h,
8367: csp_requirement_lines l,
8368: csp_req_line_details dio,
8369: csp_req_line_details dres,
8370: oe_order_lines_all oola,

Line 8389: l_requirement_header csp_requirement_headers_pvt.requirement_header_rec_type;

8385:
8386: l_trans_record csp_transactions_pub.trans_items_rec_type;
8387: l_trans_tbl csp_transactions_pub.trans_items_tbl_type;
8388: l_reservation_rec csp_sch_int_pvt.reservation_rec_typ;
8389: l_requirement_header csp_requirement_headers_pvt.requirement_header_rec_type;
8390: l_new_reservation_id number;
8391: l_req_line_detail_id number;
8392: l_new_dest_org number := -999;
8393: l_new_dest_subinv varchar2(30) := null;

Line 8586: CSP_Requirement_Headers_PVT.Update_requirement_headers(

8582: log('move_parts_on_reassign','resource_id:'||l_requirement_header.resource_id);
8583: log('move_parts_on_reassign','start_time:'||to_char(l_requirement_header.need_by_date,'dd-mon-yyyy hh24:mi:ss'));
8584:
8585: log('move_parts_on_reassign', 'before calling Update_requirement_headers...');
8586: CSP_Requirement_Headers_PVT.Update_requirement_headers(
8587: P_Api_Version_Number => 1.0,
8588: P_Init_Msg_List => FND_API.G_FALSE,
8589: P_Commit => FND_API.G_FALSE,
8590: p_validation_level => FND_API.G_VALID_LEVEL_FULL,