DBA Data[Home] [Help]

APPS.PO_REQCHANGEREQUESTWF_PVT dependencies on PO_REQUISITION_LINES_ALL

Line 305: from po_requisition_lines_all prl,

301: begin
302:
303: SELECT ooh.ORG_ID
304: INTO l_org_id
305: from po_requisition_lines_all prl,
306: po_requisition_headers_all prh,
307: oe_order_headers_all ooh,
308: po_system_parameters_all psp
309: WHERE prl.requisition_header_id = nvl(p_req_hdr_id,prh.requisition_header_id)

Line 334: from po_requisition_lines_all prl,

330: begin
331:
332: SELECT prh.org_id
333: INTO l_org_id
334: from po_requisition_lines_all prl,
335: po_requisition_headers_all prh
336: WHERE prl.requisition_header_id = nvl(p_req_hdr_id,prh.requisition_header_id)
337: AND prh.requisition_header_id = nvl(p_req_hdr_id,prh.requisition_header_id)
338: AND prl.requisition_line_id = nvl(p_req_line_id,prl.requisition_line_id)

Line 749: update po_requisition_lines_all

745: nonrecoverable_tax=l_nonrecoverable_tax
746: where distribution_id=p_req_distribution_id;
747:
748: x_progress :='001';
749: update po_requisition_lines_all
750: set
751: quantity = quantity + decode(p_new_quantity,null,0,(p_new_quantity-p_old_quantity)),
752: amount = amount + decode(p_new_dist_amount,null,0,(p_new_dist_amount - p_old_dist_amount)),
753: currency_amount = currency_amount + decode(p_new_currency_dist_amount,null,0,

Line 824: update po_requisition_lines_all

820: close l_distributions_csr;
821: end if;
822: x_progress :='0042-';
823:
824: update po_requisition_lines_all
825: set need_by_date=nvl(p_new_need_by_date, need_by_date),
826: unit_price=nvl(p_new_unit_price, unit_price),
827: currency_unit_price=nvl(p_new_currency_unit_price, currency_unit_price), assignment_start_date = nvl(p_new_start_date, assignment_start_date),
828: assignment_end_date = nvl(p_new_end_date, assignment_end_date)

Line 890: update po_requisition_lines_all

886: set cancel_flag='Y'
887: where requisition_header_id=l_header_id;
888: else
889: -- it is line level
890: update po_requisition_lines_all
891: set cancel_flag='Y'
892: where requisition_line_id=l_line_id;
893: end if;
894: else

Line 1820: po_requisition_lines_all por

1816: from
1817: po_change_requests pcr,
1818: po_change_requests pcr4,
1819: po_change_requests pcr5,
1820: po_requisition_lines_all por
1821: where
1822: pcr.change_request_group_id=p_change_request_group_id
1823: and pcr.parent_change_request_id=pcr4.change_request_id
1824: and pcr4.change_request_group_id=pcr5.change_request_group_id

Line 2894: l_req_uom po_requisition_lines_all.UNIT_MEAS_LOOKUP_CODE%TYPE;

2890: l_dist_quantity number;
2891: l_new_ship_quantity number;
2892: l_old_ship_quantity number;
2893: l_item_id number;
2894: l_req_uom po_requisition_lines_all.UNIT_MEAS_LOOKUP_CODE%TYPE;
2895: l_po_uom po_line_locations_all.UNIT_MEAS_LOOKUP_CODE%TYPE;
2896: l_old_amount number;
2897: l_new_amount number;
2898: l_old_start_date date;

Line 2969: po_requisition_lines_all prl,

2965: max(prl.matching_basis),
2966: max(pcr.requester_id) requester_id -- Bug # 3862383
2967: from po_change_requests pcr,
2968: po_line_locations_all pll,
2969: po_requisition_lines_all prl,
2970: po_headers_all poh,
2971: po_releases_all por,
2972: po_lines_all pol
2973: where pcr.change_request_group_id=l_change_request_group_id

Line 3024: po_requisition_lines_all prl,

3020: prl.matching_basis,
3021: pcr.requester_id requester_id -- Bug # 3862383
3022: from po_change_requests pcr,
3023: po_line_locations_all pll,
3024: po_requisition_lines_all prl,
3025: po_headers_all poh,
3026: po_releases_all por,
3027: po_lines_all pol
3028: where pcr.change_request_group_id=l_change_request_group_id

Line 3079: po_requisition_lines_all prl,

3075: prl.matching_basis,
3076: pcr.requester_id requester_id -- Bug # 3862383
3077: from po_change_requests pcr,
3078: po_line_locations_all pll,
3079: po_requisition_lines_all prl,
3080: po_headers_all poh,
3081: po_releases_all por,
3082: po_distributions_all pod,
3083: po_req_distributions_all prd,

Line 4520: FROM po_requisition_lines_all

4516:
4517: -- get old req amount and amount dsp
4518: SELECT nvl(SUM(nvl(decode(matching_basis, 'AMOUNT', amount, quantity * unit_price), 0)), 0)
4519: into l_req_amount
4520: FROM po_requisition_lines_all
4521: WHERE requisition_header_id = l_req_header_id
4522: AND NVL(cancel_flag,'N') = 'N'
4523: AND NVL(modified_by_agent_flag, 'N') = 'N';
4524:

Line 4531: FROM po_requisition_lines_all rl,

4527:
4528: -- get old tax and tax dsp
4529: SELECT nvl(sum(nonrecoverable_tax), 0)
4530: into l_tax_amount
4531: FROM po_requisition_lines_all rl,
4532: po_req_distributions_all rd
4533: WHERE rl.requisition_header_id = l_req_header_id
4534: AND rd.requisition_line_id = rl.requisition_line_id
4535: AND NVL(rl.cancel_flag,'N') = 'N'

Line 6270: from po_requisition_lines_all prl,

6266: nvl(sum(decode(pcr4.action_type, 'CANCELLATION', 0, decode(prl.matching_basis, 'AMOUNT', nvl(pcr3.new_amount, prl.amount),
6267: nvl(pcr1.new_price, prl.unit_price)*
6268: nvl(pcr2.new_quantity, prl.quantity)))), 0)
6269: into l_new_tax_amount, l_new_req_amount
6270: from po_requisition_lines_all prl,
6271: po_change_requests pcr1,
6272: po_change_requests pcr2,
6273: po_change_requests pcr3,
6274: po_change_requests pcr4

Line 6308: from po_requisition_lines_all prl,

6304: nvl(sum(decode(pcr1.action_type, 'CANCELLATION', 0,
6305: nvl(pcr1.new_price, prl.unit_price)*
6306: nvl(pcr2.new_quantity,prd.req_line_quantity))), 0)
6307: into l_new_tax_amount, l_new_req_amount
6308: from po_requisition_lines_all prl,
6309: po_req_distributions_all prd,
6310: po_change_requests pcr1,
6311: po_change_requests pcr2
6312: where prl.requisition_line_id=pcr1.document_line_id(+)

Line 7817: FROM po_requisition_lines_all rl,

7813: aname => 'TAX_AMOUNT_CURRENCY_DSP');
7814:
7815: SELECT nvl(sum(nvl(nonrecoverable_tax, 0)), 0)
7816: INTO l_new_tax_currency
7817: FROM po_requisition_lines_all rl,
7818: po_req_distributions_all rd
7819: WHERE rl.requisition_header_id = l_document_id
7820: AND rd.requisition_line_id = rl.requisition_line_id
7821: AND NVL(rl.modified_by_agent_flag, 'N') = 'N'

Line 7826: FROM po_requisition_lines_all

7822: and NVL(rl.cancel_flag, 'N')='N';
7823:
7824: SELECT nvl(SUM(nvl(decode(matching_basis, 'AMOUNT', amount, quantity * unit_price), 0)), 0)
7825: into l_new_amount_currency
7826: FROM po_requisition_lines_all
7827: WHERE requisition_header_id = l_document_id
7828: AND NVL(cancel_flag,'N') = 'N'
7829: AND NVL(modified_by_agent_flag, 'N') = 'N';
7830:

Line 7939: FROM po_requisition_lines_all

7935:
7936: -- get new req amount and req amount disp (at this moment, req has already been updated)
7937: SELECT nvl(SUM(nvl(decode(matching_basis, 'AMOUNT', amount, quantity * unit_price), 0)), 0)
7938: into l_req_amount
7939: FROM po_requisition_lines_all
7940: WHERE requisition_header_id = l_document_id
7941: AND NVL(cancel_flag,'N') = 'N'
7942: AND NVL(modified_by_agent_flag, 'N') = 'N';
7943:

Line 7950: FROM po_requisition_lines_all rl,

7946:
7947: -- get new tax and tax disp
7948: SELECT nvl(sum(nonrecoverable_tax), 0)
7949: into l_tax_amount
7950: FROM po_requisition_lines_all rl,
7951: po_req_distributions_all rd
7952: WHERE rl.requisition_header_id = l_document_id
7953: AND rd.requisition_line_id = rl.requisition_line_id
7954: AND NVL(rl.cancel_flag,'N') = 'N'

Line 8728: update po_requisition_lines_all

8724:
8725: if(l_change_request_id is not null) then
8726: if(l_action_type='CANCELLATION') then
8727: -- accept the cancellation request
8728: update po_requisition_lines_all
8729: set cancel_flag='Y'
8730: where requisition_line_id=p_CanceledReqLineIDs_tbl(l_index);
8731: update po_change_requests
8732: set request_status='ACCEPTED',

Line 8745: FROM po_requisition_lines_all prl

8741: SET h.AUTHORIZATION_STATUS = 'CANCELLED'
8742: WHERE h.REQUISITION_HEADER_ID = l_document_id
8743: AND NOT EXISTS
8744: (SELECT 'UNCANCELLED LINE EXISTS'
8745: FROM po_requisition_lines_all prl
8746: WHERE prl.requisition_header_id = l_document_id
8747: AND NVL(prl.cancel_flag,'N') = 'N'
8748: );
8749:

Line 11578: po_requisition_lines_all prl

11574: pcr.old_need_by_date,
11575: pcr.new_need_by_date,
11576: pcr.action_type
11577: FROM po_change_requests pcr,
11578: po_requisition_lines_all prl
11579: WHERE pcr.change_request_group_id = l_change_request_group_id
11580: AND pcr.request_status = 'MGR_APP'
11581: AND pcr.document_line_id = prl.requisition_line_id
11582: ORDER BY prl.line_num;

Line 11591: po_requisition_lines_all prl

11587: CURSOR iso_change_csr_rejected(l_change_request_group_id IN NUMBER) IS
11588: SELECT prl.requisition_header_id,
11589: prl.requisition_line_id
11590: FROM po_change_requests pcr,
11591: po_requisition_lines_all prl
11592: WHERE pcr.change_request_group_id = l_change_request_group_id
11593: AND pcr.request_status = 'REJECTED'
11594: AND pcr.document_line_id = prl.requisition_line_id
11595: ORDER BY prl.line_num;

Line 11801: from po_requisition_lines_all

11797: l_progress := '002';
11798:
11799: select requisition_header_id
11800: into l_document_header_id
11801: from po_requisition_lines_all
11802: where requisition_line_id = p_document_line_id;
11803:
11804: --call OM API
11805: END IF;

Line 12068: po_requisition_lines_all prla

12064: prla.unit_price,
12065: prla.quantity
12066: FROM
12067: po_req_distributions_all prda,
12068: po_requisition_lines_all prla
12069: WHERE
12070: prla.requisition_line_id = req_line_id AND
12071: prla.requisition_line_id = prda.requisition_line_id;
12072:

Line 12103: po_requisition_lines_all prl

12099:
12100:
12101: select prh.preparer_id into l_preparer_id
12102: from po_requisition_headers_all prh,
12103: po_requisition_lines_all prl
12104: where prl.requisition_line_id = p_req_line_id
12105: and prl.requisition_header_id = prh.requisition_header_id;
12106:
12107: IF g_debug_stmt THEN

Line 12260: UPDATE po_requisition_lines_all

12256: IF g_debug_stmt THEN
12257: po_debug.debug_STmt(l_log_head, l_progress, 'Updating the req line and dist with the quantity changes');
12258: END IF;
12259:
12260: UPDATE po_requisition_lines_all
12261: SET quantity = quantity + p_delta_quantity
12262: WHERE requisition_line_id = p_req_line_id ;
12263:
12264: l_progress := '013';

Line 12340: UPDATE po_requisition_lines_all

12336: po_debug.debug_var(l_log_head,x_progress,'p_need_by_date', p_need_by_date );
12337: po_debug.debug_var(l_log_head,x_progress,'p_req_line_id', p_req_line_id );
12338: END IF;
12339:
12340: UPDATE po_requisition_lines_all
12341: SET need_by_date = p_need_by_date
12342: WHERE requisition_line_id = p_req_line_id ;
12343:
12344:

Line 12385: po_debug.debug_stmt(l_log_head, x_progress,'Updating po_requisition_lines_all');

12381: BEGIN
12382: x_progress := '001';
12383: IF g_debug_stmt THEN
12384: po_debug.debug_var(l_log_head,x_progress,'p_req_line_id', p_req_line_id );
12385: po_debug.debug_stmt(l_log_head, x_progress,'Updating po_requisition_lines_all');
12386: END IF;
12387:
12388: --update po req lines as cancel flag y
12389: UPDATE po_requisition_lines_all

Line 12389: UPDATE po_requisition_lines_all

12385: po_debug.debug_stmt(l_log_head, x_progress,'Updating po_requisition_lines_all');
12386: END IF;
12387:
12388: --update po req lines as cancel flag y
12389: UPDATE po_requisition_lines_all
12390: SET cancel_flag = 'Y',
12391: -- quantity_cancelled = p_old_quantity,
12392: cancel_date = SYSDATE
12393: WHERE requisition_line_id = p_req_line_id ;

Line 12399: from po_requisition_lines_all

12395: x_progress := '012';
12396:
12397: --bug 7664476 -- roll up the authorization status if all lines of requisiton is cancelled
12398: Select REQUISITION_HEADER_ID into l_document_id
12399: from po_requisition_lines_all
12400: where requisition_line_id = p_req_line_id ;
12401:
12402: x_progress := '013';
12403:

Line 12409: FROM po_requisition_lines_all prl

12405: SET h.AUTHORIZATION_STATUS = 'CANCELLED'
12406: WHERE h.REQUISITION_HEADER_ID = l_document_id
12407: AND NOT EXISTS
12408: (SELECT 'UNCANCELLED LINE EXISTS'
12409: FROM po_requisition_lines_all prl
12410: WHERE prl.requisition_header_id = l_document_id
12411: AND NVL(prl.cancel_flag,'N') = 'N'
12412: );
12413:

Line 12521: po_requisition_lines_all prl,

12517:
12518: SELECT mp.EMPLOYEE_ID
12519: into l_planner_id
12520: FROM po_change_requests pcr,
12521: po_requisition_lines_all prl,
12522: mtl_system_items_b mi,
12523: financials_system_params_all fsp,
12524: mtl_planners mp
12525: WHERE pcr.change_request_group_id =l_change_request_group_id

Line 12547: po_requisition_lines_all prl,

12543:
12544: l_sql := '
12545: SELECT mp.EMPLOYEE_ID
12546: FROM po_change_requests pcr,
12547: po_requisition_lines_all prl,
12548: mtl_system_items_b mi,
12549: financials_system_params_all fsp,
12550: mtl_planners mp
12551: WHERE pcr.change_request_group_id =:1