DBA Data[Home] [Help]

APPS.PO_REQCHANGEREQUESTNOTIF_PVT dependencies on PO_CHANGE_REQUESTS

Line 367: po_change_requests pcr1,

363: /(prl.unit_price*prd.req_line_quantity))), FND_CURRENCY.GET_FORMAT_MASK(l_currency_code,30))
364: into l_new_tax_amount
365: from po_requisition_lines_all prl,
366: po_req_distributions_all prd,
367: po_change_requests pcr1,
368: po_change_requests pcr2
369: where prl.requisition_line_id=pcr1.document_line_id(+)
370: and pcr1.change_request_group_id(+)=l_change_request_group_id
371: and pcr1.request_level(+)='LINE'

Line 368: po_change_requests pcr2

364: into l_new_tax_amount
365: from po_requisition_lines_all prl,
366: po_req_distributions_all prd,
367: po_change_requests pcr1,
368: po_change_requests pcr2
369: where prl.requisition_line_id=pcr1.document_line_id(+)
370: and pcr1.change_request_group_id(+)=l_change_request_group_id
371: and pcr1.request_level(+)='LINE'
372: and prl.requisition_line_id=prd.requisition_line_id

Line 386: po_change_requests pcr1,

382: FND_CURRENCY.GET_FORMAT_MASK(l_currency_code,30))
383: into l_new_req_amount
384: from po_requisition_lines_all prl,
385: po_req_distributions_all prd,
386: po_change_requests pcr1,
387: po_change_requests pcr2
388: where prl.requisition_line_id=pcr1.document_line_id(+)
389: and pcr1.change_request_group_id(+)=l_change_request_group_id
390: and pcr1.request_level(+)='LINE'

Line 387: po_change_requests pcr2

383: into l_new_req_amount
384: from po_requisition_lines_all prl,
385: po_req_distributions_all prd,
386: po_change_requests pcr1,
387: po_change_requests pcr2
388: where prl.requisition_line_id=pcr1.document_line_id(+)
389: and pcr1.change_request_group_id(+)=l_change_request_group_id
390: and pcr1.request_level(+)='LINE'
391: and prl.requisition_line_id=prd.requisition_line_id

Line 475: from po_change_requests

471: l_base_href VARCHAR(2000) := fnd_profile.value('APPS_FRAMEWORK_AGENT');
472:
473: cursor l_get_wf_keys_csr is
474: select wf_item_type, wf_item_key
475: from po_change_requests
476: where change_request_group_id=l_change_request_group_id;
477:
478:
479: BEGIN

Line 641: l_change_reason po_change_requests.request_reason%type;

637: l_cancel boolean;
638: l_display_currency_price_cell boolean;
639: l_new_line_amount number;
640: l_order_num varchar2(40);
641: l_change_reason po_change_requests.request_reason%type;
642: l_cancel_display FND_LOOKUPS.MEANING%type;
643:
644: l_old_quantity number;
645: l_old_price number;

Line 649: l_request_status po_change_requests.request_status%type;

645: l_old_price number;
646: l_old_currency_price number;
647: l_old_need_by_date date;
648: l_old_line_amount number;
649: l_request_status po_change_requests.request_status%type;
650:
651: display_txn_curr VARCHAR2(30);
652: l_base_href VARCHAR(2000) := fnd_profile.value('APPS_FRAMEWORK_AGENT');
653:

Line 1153: l_change_reason po_change_requests.request_reason%type;

1149: l_cancel boolean;
1150: l_display_currency_price_cell boolean;
1151: l_new_line_amount number;
1152: l_order_num varchar2(40);
1153: l_change_reason po_change_requests.request_reason%type;
1154:
1155: l_old_quantity number;
1156: l_old_price number;
1157: l_old_currency_price number;

Line 1160: l_request_status po_change_requests.request_status%type;

1156: l_old_price number;
1157: l_old_currency_price number;
1158: l_old_need_by_date date;
1159: l_old_line_amount number;
1160: l_request_status po_change_requests.request_status%type;
1161:
1162: display_txn_curr VARCHAR2(30);
1163: l_base_href VARCHAR(2000) := fnd_profile.value('APPS_FRAMEWORK_AGENT');
1164:

Line 1218: from po_change_requests

1214: WHERE REQUISITION_LINE_ID = req_line_id;
1215:
1216: cursor l_get_wf_keys_csr is
1217: select wf_item_type, wf_item_key
1218: from po_change_requests
1219: where change_request_group_id=l_group_id;
1220:
1221: l_cancel_display FND_LOOKUPS.MEANING%type;
1222:

Line 2006: po_change_requests pcr1,

2002: FND_CURRENCY.GET_FORMAT_MASK(l_currency_code,30))
2003: ||' '|| l_currency_code
2004: into l_new_tax_amount, l_new_req_amount
2005: from po_requisition_lines_all prl,
2006: po_change_requests pcr1,
2007: po_change_requests pcr2,
2008: po_change_requests pcr3
2009: where prl.requisition_line_id=pcr1.document_line_id(+)
2010: and pcr1.change_request_group_id(+)=l_change_request_group_id

Line 2007: po_change_requests pcr2,

2003: ||' '|| l_currency_code
2004: into l_new_tax_amount, l_new_req_amount
2005: from po_requisition_lines_all prl,
2006: po_change_requests pcr1,
2007: po_change_requests pcr2,
2008: po_change_requests pcr3
2009: where prl.requisition_line_id=pcr1.document_line_id(+)
2010: and pcr1.change_request_group_id(+)=l_change_request_group_id
2011: and pcr1.request_level(+)='LINE'

Line 2008: po_change_requests pcr3

2004: into l_new_tax_amount, l_new_req_amount
2005: from po_requisition_lines_all prl,
2006: po_change_requests pcr1,
2007: po_change_requests pcr2,
2008: po_change_requests pcr3
2009: where prl.requisition_line_id=pcr1.document_line_id(+)
2010: and pcr1.change_request_group_id(+)=l_change_request_group_id
2011: and pcr1.request_level(+)='LINE'
2012: and pcr1.change_active_flag(+)='Y'

Line 2271: from po_change_requests

2267: request_reason,
2268: request_status,
2269: new_quantity,
2270: old_quantity
2271: from po_change_requests
2272: where change_request_group_id=p_group_id
2273: and document_line_id=p_req_line_id
2274: and request_level='LINE';
2275: cursor l_request_status_csr is

Line 2277: from po_change_requests

2273: and document_line_id=p_req_line_id
2274: and request_level='LINE';
2275: cursor l_request_status_csr is
2276: select distinct request_status
2277: from po_change_requests
2278: where change_request_group_id=p_group_id
2279: and document_line_id=p_req_line_id
2280: and action_type<>'DERIVED';
2281:

Line 2284: from po_change_requests

2280: and action_type<>'DERIVED';
2281:
2282: cursor l_get_reason_csr is
2283: select request_reason
2284: from po_change_requests
2285: where change_request_group_id=p_group_id
2286: and document_line_id=p_req_line_id
2287: and request_reason is not null;
2288:

Line 2291: from po_change_requests

2287: and request_reason is not null;
2288:
2289: cursor l_get_app_qty_change_csr is
2290: select change_request_id
2291: from po_change_requests
2292: where change_request_group_id=p_group_id
2293: and document_line_id=p_req_line_id
2294: and request_level='DISTRIBUTION'
2295: and request_status<>'REJECTED';

Line 2299: from po_change_requests

2295: and request_status<>'REJECTED';
2296:
2297: cursor l_get_res_qty_change_csr is
2298: select change_request_id
2299: from po_change_requests
2300: where change_request_group_id=p_group_id
2301: and document_line_id=p_req_line_id
2302: and request_level='DISTRIBUTION';
2303:

Line 2312: l_action_type po_change_requests.action_type%type;

2308: l_old_currency_unit_price number;
2309: l_new_currency_unit_price number;
2310: l_old_need_by_date DATE;
2311: l_new_need_by_date DATE;
2312: l_action_type po_change_requests.action_type%type;
2313: l_request_level po_change_requests.request_level%type;
2314: l_request_status po_change_requests.request_status%type;
2315: l_change_request_id number;
2316: begin

Line 2313: l_request_level po_change_requests.request_level%type;

2309: l_new_currency_unit_price number;
2310: l_old_need_by_date DATE;
2311: l_new_need_by_date DATE;
2312: l_action_type po_change_requests.action_type%type;
2313: l_request_level po_change_requests.request_level%type;
2314: l_request_status po_change_requests.request_status%type;
2315: l_change_request_id number;
2316: begin
2317:

Line 2314: l_request_status po_change_requests.request_status%type;

2310: l_old_need_by_date DATE;
2311: l_new_need_by_date DATE;
2312: l_action_type po_change_requests.action_type%type;
2313: l_request_level po_change_requests.request_level%type;
2314: l_request_status po_change_requests.request_status%type;
2315: l_change_request_id number;
2316: begin
2317:
2318: p_request_status:=null;

Line 2736: l_new_price po_change_requests.new_price%TYPE := null;

2732: p_old_quantity IN NUMBER
2733: )
2734: RETURN NUMBER IS
2735:
2736: l_new_price po_change_requests.new_price%TYPE := null;
2737: l_new_quantity po_change_requests.new_quantity%TYPE := null;
2738:
2739: BEGIN
2740: begin

Line 2737: l_new_quantity po_change_requests.new_quantity%TYPE := null;

2733: )
2734: RETURN NUMBER IS
2735:
2736: l_new_price po_change_requests.new_price%TYPE := null;
2737: l_new_quantity po_change_requests.new_quantity%TYPE := null;
2738:
2739: BEGIN
2740: begin
2741: select new_price

Line 2743: from po_change_requests pcr

2739: BEGIN
2740: begin
2741: select new_price
2742: into l_new_price
2743: from po_change_requests pcr
2744: where pcr.change_request_group_id=p_group_id
2745: and pcr.document_line_id= p_po_line_id
2746: and pcr.request_level = 'LINE'
2747: and new_price is not null;

Line 2756: from po_change_requests pcr

2752:
2753: begin
2754: select new_quantity
2755: into l_new_quantity
2756: from po_change_requests pcr
2757: where pcr.change_request_group_id=p_group_id
2758: and pcr.document_line_id= p_po_line_id
2759: and pcr.document_line_location_id =p_po_shipment_id
2760: and pcr.request_level = 'SHIPMENT'

Line 2806: l_new_price po_change_requests.new_price%TYPE := null;

2802: p_line_location_id in number)
2803:
2804: RETURN number IS
2805:
2806: l_new_price po_change_requests.new_price%TYPE := null;
2807: l_new_quantity po_change_requests.new_quantity%TYPE := null;
2808: l_blanket_header_id number;
2809:
2810: l_old_quantity number;

Line 2807: l_new_quantity po_change_requests.new_quantity%TYPE := null;

2803:
2804: RETURN number IS
2805:
2806: l_new_price po_change_requests.new_price%TYPE := null;
2807: l_new_quantity po_change_requests.new_quantity%TYPE := null;
2808: l_blanket_header_id number;
2809:
2810: l_old_quantity number;
2811: l_new_amount number;

Line 2849: -- first check if we can get the new amount from po_change_requests table.

2845:
2846: -- below we get new amount for shipment level rows
2847: ELSE
2848:
2849: -- first check if we can get the new amount from po_change_requests table.
2850: -- notice: p_line_id and p_line_location_id uniquely identify a row.
2851: SELECT pcr.new_amount,(nvl(pll.quantity,0)-nvl(pll.quantity_cancelled,0)),pol.matching_basis
2852: into l_tmp_new_amount, l_old_quantity,l_matching_basis
2853: FROM po_change_requests pcr,

Line 2853: FROM po_change_requests pcr,

2849: -- first check if we can get the new amount from po_change_requests table.
2850: -- notice: p_line_id and p_line_location_id uniquely identify a row.
2851: SELECT pcr.new_amount,(nvl(pll.quantity,0)-nvl(pll.quantity_cancelled,0)),pol.matching_basis
2852: into l_tmp_new_amount, l_old_quantity,l_matching_basis
2853: FROM po_change_requests pcr,
2854: po_lines_all pol,
2855: po_line_locations_all pll,
2856: po_headers_all poh
2857: WHERE pcr.change_request_group_id= p_group_id

Line 2901: from po_change_requests pcr

2897:
2898: begin
2899: select new_quantity
2900: into l_new_quantity
2901: from po_change_requests pcr
2902: where pcr.change_request_group_id=p_group_id
2903: and pcr.document_line_id= p_line_id
2904: and pcr.document_line_location_id =p_line_location_id
2905: and pcr.request_level = 'SHIPMENT'

Line 2926: from po_change_requests pcr

2922:
2923: begin
2924: select distinct pcr.document_type
2925: into l_document_type
2926: from po_change_requests pcr
2927: where pcr.change_request_group_id=p_group_id
2928: and pcr.document_line_id= p_line_id
2929: and pcr.document_line_location_id = p_line_location_id;
2930:

Line 2968: -- for PO without source document, get new price from po_change_requests

2964: FND_LOG.string(FND_LOG.level_statement, g_module_prefix || l_api_name, l_progress);
2965: END IF;
2966: end if;
2967:
2968: -- for PO without source document, get new price from po_change_requests
2969: IF (l_document_type = 'PO' and l_blanket_header_id is NULL) THEN
2970:
2971: begin
2972: select new_price

Line 2974: from po_change_requests pcr

2970:
2971: begin
2972: select new_price
2973: into l_new_price
2974: from po_change_requests pcr
2975: where pcr.change_request_group_id=p_group_id
2976: and pcr.document_line_id= p_line_id
2977: and pcr.request_level = 'LINE'
2978: and new_price is not null;

Line 3027: in PO_CHANGE_REQUESTs */

3023: from po_lines_all pol
3024: where pol.po_line_id = p_line_id;
3025:
3026: /* Removed code for dividing result by rate because now we have txn amt and txn price
3027: in PO_CHANGE_REQUESTs */
3028: return l_result;
3029:
3030: END IF; -- for p_line_location_id is null
3031:

Line 3107: l_action_type po_change_requests.action_type%TYPE;

3103: l_change_old_qty number;
3104: l_change_new_qty number;
3105: l_old_price number;
3106: l_new_price number;
3107: l_action_type po_change_requests.action_type%TYPE;
3108: l_item_desc po_lines_all.item_description%TYPE;
3109: l_uom po_line_locations_all.unit_meas_lookup_code%TYPE;
3110: l_line_quantity number;
3111: l_line_uom po_lines_all.unit_meas_lookup_code%TYPE;

Line 3113: l_request_reason po_change_requests.request_reason%type;

3109: l_uom po_line_locations_all.unit_meas_lookup_code%TYPE;
3110: l_line_quantity number;
3111: l_line_uom po_lines_all.unit_meas_lookup_code%TYPE;
3112: l_ship_to_location hr_locations_all.location_code%type;
3113: l_request_reason po_change_requests.request_reason%type;
3114:
3115: l_old_quantity number;
3116: l_new_quantity number;
3117: l_gen_flag boolean :=false;

Line 3187: from po_change_requests pcr,

3183: PO_ReqChangeRequestNotif_PVT.get_goods_shipment_new_amount(grp_id,
3184: pol.po_line_id, pcr.document_line_location_id,
3185: nvl(pcr.old_price, nvl(pll.price_override, pol.unit_price)),
3186: (nvl(pll.quantity,0)-nvl(pll.quantity_cancelled,0)))))
3187: from po_change_requests pcr,
3188: po_lines_all pol,
3189: po_line_locations_all pll,
3190: hr_locations_all hla
3191: where pcr.change_request_group_id=grp_id

Line 3201: from po_change_requests

3197: and pcr.request_level<>'DISTRIBUTION'
3198: order by line_num, nvl(shipment_num, 0);
3199: cursor l_get_document_id_csr(p_group_id in number) is
3200: select document_header_id, po_release_id
3201: from po_change_requests
3202: where change_request_group_id=p_group_id;
3203:
3204: cursor l_get_line_qty(grp_id number, line_id number) is
3205: select sum(decode(pcr.action_type, 'CANCELLATION', 0,

Line 3207: from po_change_requests pcr,

3203:
3204: cursor l_get_line_qty(grp_id number, line_id number) is
3205: select sum(decode(pcr.action_type, 'CANCELLATION', 0,
3206: nvl(pcr.new_quantity, pll.quantity)))
3207: from po_change_requests pcr,
3208: po_line_locations_all pll
3209: where pcr.change_request_group_id(+)=grp_id
3210: and pcr.document_line_id(+)=line_id
3211: and pcr.document_line_location_id(+)=pll.line_location_id

Line 3239: po_change_requests pcr

3235: nvl(pll.quantity_billed,0)
3236: from po_lines_all pol,
3237: po_headers_all poh,
3238: po_line_locations_all pll,
3239: po_change_requests pcr
3240: where pol.po_line_id=line_id
3241: and pol.po_header_id=poh.po_header_id
3242: and pll.po_line_id=line_id
3243: and pll.line_location_id=pcr.document_line_location_id(+)

Line 3295: from po_change_requests

3291: if(l_grp_id is not null) then
3292: select count(1)
3293: into l_num_of_changes
3294: from (select distinct document_line_id, document_line_location_id
3295: from po_change_requests
3296: where change_request_group_id = l_grp_id
3297: and action_type = 'MODIFICATION'
3298: and request_status='PENDING');
3299:

Line 3301: from po_change_requests

3297: and action_type = 'MODIFICATION'
3298: and request_status='PENDING');
3299:
3300: select count(1) into l_num_of_cancels
3301: from po_change_requests
3302: where change_request_group_id = l_grp_id
3303: and action_type = 'CANCELLATION'
3304: and request_status='PENDING';
3305: end if;

Line 3491: from po_change_requests pcr,

3487:
3488: begin
3489: select count(1)
3490: into l_num_temp_labors
3491: from po_change_requests pcr,
3492: po_lines_all pol
3493: where pcr.change_request_group_id=l_grp_id
3494: and pcr.request_status = 'PENDING'
3495: and pcr.document_header_id=pol.po_header_id

Line 3935: from po_change_requests pcr,

3931: -- This cursor is used for getting quantity for a SPO line
3932: cursor l_get_line_qty(grp_id number, line_id number) is
3933: select sum(decode(pcr.action_type, 'CANCELLATION', 0,
3934: nvl(pcr.new_quantity, pll.quantity)))
3935: from po_change_requests pcr,
3936: po_line_locations_all pll
3937: where pcr.change_request_group_id = grp_id
3938: and pcr.document_line_id = line_id
3939: and pcr.document_line_location_id = pll.line_location_id

Line 3970: po_change_requests pcr

3966: pol.contract_id
3967: from po_lines_all pol,
3968: po_headers_all poh,
3969: po_line_locations_all pll,
3970: po_change_requests pcr
3971: where pol.po_line_id=line_id
3972: and pol.po_header_id=poh.po_header_id
3973: and pll.po_line_id=line_id
3974: and pll.line_location_id=pcr.document_line_location_id

Line 4018: from po_change_requests pcr

4014:
4015: begin
4016: select distinct pcr.document_type
4017: into l_document_type
4018: from po_change_requests pcr
4019: where pcr.change_request_group_id=p_group_id
4020: and pcr.document_line_id= p_line_id
4021: and pcr.document_line_location_id = p_line_location_id;
4022:

Line 4185: po_change_requests pcr

4181: l_accrue_on_receipt_flag,
4182: l_quantity_billed
4183: FROM po_lines_all pol,
4184: po_line_locations_all pll,
4185: po_change_requests pcr
4186: WHERE pcr.change_request_group_id = p_group_id
4187: and pll.line_location_id = p_line_location_id
4188: and pcr.document_line_location_id = pll.line_location_id
4189: and pll.po_line_id = pol.po_line_id

Line 4341: FROM po_change_requests pcr,

4337: if ( p_line_location_id is null ) then
4338:
4339: select pcr.old_price, nvl(pcr.old_price,nvl(pll.price_override, pol.unit_price))
4340: into l_pcr_old_price, l_price
4341: FROM po_change_requests pcr,
4342: po_lines_all pol,
4343: po_line_locations_all pll,
4344: po_headers_all poh
4345: WHERE pcr.change_request_group_id= p_group_id

Line 4358: FROM po_change_requests pcr,

4354:
4355: else
4356: select pcr.old_price, pol.unit_price,nvl(pcr.old_price,nvl(pll.price_override, pol.unit_price))
4357: into l_pcr_old_price,l_pol_unit_price,l_price
4358: FROM po_change_requests pcr,
4359: po_lines_all pol,
4360: po_line_locations_all pll,
4361: po_headers_all poh
4362: WHERE pcr.change_request_group_id= p_group_id

Line 4391: in PO_CHANGE_REQUESTs */

4387: from po_lines_all pol
4388: where pol.po_line_id = p_line_id;
4389:
4390: /* Removed code for dividing result by rate because now we have txn amt and txn price
4391: in PO_CHANGE_REQUESTs */
4392:
4393: l_progress:='003';
4394: if g_fnd_debug = 'Y' then
4395: IF (FND_LOG.G_CURRENT_RUNTIME_LEVEL <= FND_LOG.LEVEL_STATEMENT) THEN