DBA Data[Home] [Help]

APPS.CSTPPACQ dependencies on CST_RCV_ACQ_COST_DETAILS

Line 1071: -- 2.4.1.1 Insert into CST_RCV_ACQ_COST_DETAILS table

1067: NULL,
1068: NULL);
1069:
1070: ---------------------------------------------------------------
1071: -- 2.4.1.1 Insert into CST_RCV_ACQ_COST_DETAILS table
1072: ---------------------------------------------------------------
1073:
1074: l_stmt_num := 100;
1075:

Line 1099: select cst_rcv_acq_cost_details_s.nextval into l_details_nextvalue

1095: END;
1096:
1097: If l_chrg_present = 0 then /* means that this has not been allocated */
1098:
1099: select cst_rcv_acq_cost_details_s.nextval into l_details_nextvalue
1100: from dual;
1101:
1102: l_stmt_num := 105;
1103:

Line 1356: INSERT INTO cst_rcv_acq_cost_details (

1352: o_err_num => l_err_num,
1353: o_err_msg => l_err_msg );
1354:
1355: l_stmt_num := 1090;
1356: INSERT INTO cst_rcv_acq_cost_details (
1357: HEADER_ID,
1358: DETAIL_ID,
1359: SOURCE_TYPE,
1360: PO_LINE_LOCATION_ID,

Line 1384: cst_rcv_acq_cost_details_s.nextval,

1380: LAST_UPDATE_LOGIN
1381: )
1382: VALUES (
1383: l_header_id,
1384: cst_rcv_acq_cost_details_s.nextval,
1385: 'LCM',
1386: l_po_line_loc,
1387: NULL,
1388: -1,

Line 1514: Delete from cst_rcv_acq_cost_details_adj cracda

1510: and period_id = i_period
1511: and cost_type_id = i_cost_type_id
1512: );
1513: l_stmt_num := 1125;
1514: Delete from cst_rcv_acq_cost_details_adj cracda
1515: where cracda.header_id = (select header_id from cst_rcv_acq_costs_adj craca
1516: where craca.rcv_transaction_id = c_rec.rcv_transaction_id
1517: and cost_group_id = i_cost_group_id
1518: and period_id = i_period

Line 1683: INSERT INTO cst_rcv_acq_cost_details_adj (

1679: o_err_num => l_err_num,
1680: o_err_msg => l_err_msg );
1681:
1682: l_stmt_num := 1230;
1683: INSERT INTO cst_rcv_acq_cost_details_adj (
1684: HEADER_ID,
1685: DETAIL_ID,
1686: SOURCE_TYPE,
1687: PO_LINE_LOCATION_ID,

Line 1711: cst_rcv_acq_cost_details_s.nextval,

1707: LAST_UPDATE_LOGIN
1708: )
1709: VALUES (
1710: l_header_id,
1711: cst_rcv_acq_cost_details_s.nextval,
1712: 'LCM',
1713: c_rec.line_location_id,
1714: NULL,
1715: -1,

Line 2345: Delete from cst_rcv_acq_cost_details_adj cracda

2341: and craca.cost_type_id = i_cost_type_id );
2342:
2343: l_stmt_num := 81;
2344:
2345: Delete from cst_rcv_acq_cost_details_adj cracda
2346: where cracda.header_id = (select header_id from cst_rcv_acq_costs_adj craca
2347: where craca.rcv_transaction_id = c_rec.transaction_id
2348: and cost_group_id = i_cost_group_id
2349: and period_id = i_period

Line 2862: -- 2.4.1.1 Insert into CST_RCV_ACQ_COST_DETAILS table

2858: NULL,
2859: NULL);
2860:
2861: ---------------------------------------------------------------
2862: -- 2.4.1.1 Insert into CST_RCV_ACQ_COST_DETAILS table
2863: ---------------------------------------------------------------
2864:
2865: l_stmt_num := 101;
2866:

Line 2890: select cst_rcv_acq_cost_details_s.nextval into l_details_nextvalue

2886: END;
2887:
2888: If l_chrg_present = 0 then /* means that this has not been allocated */
2889:
2890: select cst_rcv_acq_cost_details_s.nextval into l_details_nextvalue
2891: from dual;
2892:
2893: l_stmt_num := 106;
2894:

Line 3340: cst_rcv_acq_cost_details ( -- cracd2

3336: charge, just examine whether the charge_applicable_to_dist_id is not null
3337: */
3338:
3339: INSERT INTO
3340: cst_rcv_acq_cost_details ( -- cracd2
3341: HEADER_ID,
3342: DETAIL_ID,
3343: SOURCE_TYPE,
3344: PO_LINE_LOCATION_ID,

Line 3368: cst_rcv_acq_cost_details_s.nextval,

3364: LAST_UPDATE_LOGIN
3365: )
3366: SELECT
3367: i_hdr,
3368: cst_rcv_acq_cost_details_s.nextval,
3369: 'INVOICE',
3370: NULL,
3371: i_item_dist,
3372: rownum + 1,

Line 3420: cst_rcv_acq_cost_details cracd3

3416: -- and update the CRACD rows just created
3417: ----------------------------------------------------------
3418:
3419: UPDATE
3420: cst_rcv_acq_cost_details cracd3
3421: SET
3422: cracd3.parent_amount = (
3423: SELECT
3424: nvl(ad7.base_amount,nvl(ad7.amount,0))

Line 3458: cst_rcv_acq_cost_details cracd4

3454:
3455: /* bug 4965847 changed query to join with parent_invoice_dist_id rather than parent_distribution_id*/
3456:
3457: UPDATE
3458: cst_rcv_acq_cost_details cracd4
3459: SET
3460: cracd4.amount = cracd4.allocated_amount -- amount in func curr
3461: WHERE
3462: cracd4.header_id = i_hdr AND

Line 3567: cst_rcv_acq_cost_details_adj ( -- cracd2

3563: charge, just examine whether the charge_applicable_to_dist_id is not null
3564: */
3565:
3566: INSERT INTO
3567: cst_rcv_acq_cost_details_adj ( -- cracd2
3568: HEADER_ID,
3569: DETAIL_ID,
3570: SOURCE_TYPE,
3571: PO_LINE_LOCATION_ID,

Line 3595: cst_rcv_acq_cost_details_s.nextval,

3591: LAST_UPDATE_LOGIN
3592: )
3593: SELECT
3594: i_hdr,
3595: cst_rcv_acq_cost_details_s.nextval,
3596: 'INVOICE',
3597: NULL,
3598: i_item_dist,
3599: rownum + 1,

Line 3646: cst_rcv_acq_cost_details_adj cracd3

3642: ----------------------------------------------------------
3643:
3644:
3645: UPDATE
3646: cst_rcv_acq_cost_details_adj cracd3
3647: SET
3648: cracd3.parent_amount = (
3649: SELECT
3650: nvl(ad7.base_amount,nvl(ad7.amount,0))

Line 3684: cst_rcv_acq_cost_details_adj cracd4

3680:
3681: /* bug 4965847 changed query to join with parent_invoice_dist_id rather than parent_distribution_id*/
3682:
3683: UPDATE
3684: cst_rcv_acq_cost_details_adj cracd4
3685: SET
3686: cracd4.amount = cracd4.allocated_amount -- amount in func curr
3687: WHERE
3688: cracd4.header_id = i_hdr AND

Line 3730: l_total_invoice_amount cst_rcv_acq_cost_details.amount%TYPE;

3726: o_err_num OUT NOCOPY NUMBER,
3727: o_err_code OUT NOCOPY VARCHAR2,
3728: o_err_msg OUT NOCOPY VARCHAR2)
3729: IS
3730: l_total_invoice_amount cst_rcv_acq_cost_details.amount%TYPE;
3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;
3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;
3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;
3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;

Line 3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;

3727: o_err_code OUT NOCOPY VARCHAR2,
3728: o_err_msg OUT NOCOPY VARCHAR2)
3729: IS
3730: l_total_invoice_amount cst_rcv_acq_cost_details.amount%TYPE;
3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;
3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;
3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;
3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;
3735: l_total_amount cst_rcv_acq_cost_details.amount%TYPE;

Line 3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;

3728: o_err_msg OUT NOCOPY VARCHAR2)
3729: IS
3730: l_total_invoice_amount cst_rcv_acq_cost_details.amount%TYPE;
3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;
3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;
3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;
3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;
3735: l_total_amount cst_rcv_acq_cost_details.amount%TYPE;
3736: l_acq_cost cst_rcv_acq_costs.acquisition_cost%TYPE;

Line 3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;

3729: IS
3730: l_total_invoice_amount cst_rcv_acq_cost_details.amount%TYPE;
3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;
3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;
3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;
3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;
3735: l_total_amount cst_rcv_acq_cost_details.amount%TYPE;
3736: l_acq_cost cst_rcv_acq_costs.acquisition_cost%TYPE;
3737: l_cracd_count NUMBER := 0;

Line 3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;

3730: l_total_invoice_amount cst_rcv_acq_cost_details.amount%TYPE;
3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;
3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;
3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;
3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;
3735: l_total_amount cst_rcv_acq_cost_details.amount%TYPE;
3736: l_acq_cost cst_rcv_acq_costs.acquisition_cost%TYPE;
3737: l_cracd_count NUMBER := 0;
3738: l_stmt_num NUMBER := 0;

Line 3735: l_total_amount cst_rcv_acq_cost_details.amount%TYPE;

3731: l_qty_invoiced cst_rcv_acq_cost_details.quantity%TYPE;
3732: l_qty_at_po cst_rcv_acq_cost_details.quantity%TYPE;
3733: l_costed_quantity cst_rcv_acq_cost_details.quantity%TYPE;
3734: l_amount_at_po cst_rcv_acq_cost_details.amount%TYPE;
3735: l_total_amount cst_rcv_acq_cost_details.amount%TYPE;
3736: l_acq_cost cst_rcv_acq_costs.acquisition_cost%TYPE;
3737: l_cracd_count NUMBER := 0;
3738: l_stmt_num NUMBER := 0;
3739: CST_NULL_ACQ_COST EXCEPTION;

Line 3762: FROM cst_rcv_acq_cost_details cracd9

3758: -----------------------------------------------------------
3759:
3760: SELECT count(header_id)
3761: INTO l_cracd_count
3762: FROM cst_rcv_acq_cost_details cracd9
3763: WHERE cracd9.header_id = i_header
3764: AND ROWNUM < 2;
3765:
3766: -------------------------------------------------------------

Line 3783: cst_rcv_acq_cost_details cracd10

3779: SUM(cracd10.amount)
3780: INTO
3781: l_total_invoice_amount
3782: FROM
3783: cst_rcv_acq_cost_details cracd10
3784: WHERE
3785: cracd10.header_id = i_header;
3786:
3787: ----------------------------------------------------------

Line 3798: cst_rcv_acq_cost_details cracd11

3794: SUM(nvl(cracd11.quantity,0))
3795: INTO
3796: l_qty_invoiced
3797: FROM
3798: cst_rcv_acq_cost_details cracd11
3799: WHERE
3800: cracd11.header_id = i_header;
3801:
3802: ELSE

Line 3876: cst_rcv_acq_cost_details ( --cracd12

3872:
3873: l_stmt_num := 40;
3874:
3875: INSERT INTO
3876: cst_rcv_acq_cost_details ( --cracd12
3877: HEADER_ID,
3878: DETAIL_ID,
3879: SOURCE_TYPE,
3880: PO_LINE_LOCATION_ID,

Line 3904: cst_rcv_acq_cost_details_s.nextval,

3900: LAST_UPDATE_LOGIN
3901: )
3902: VALUES (
3903: i_header,
3904: cst_rcv_acq_cost_details_s.nextval,
3905: 'PO',
3906: i_po_line_loc,
3907: NULL,
3908: -1,

Line 3969: l_total_invoice_amount cst_rcv_acq_cost_details_adj.amount%TYPE;

3965: o_err_num OUT NOCOPY NUMBER,
3966: o_err_code OUT NOCOPY VARCHAR2,
3967: o_err_msg OUT NOCOPY VARCHAR2)
3968: IS
3969: l_total_invoice_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;
3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;
3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;
3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;

Line 3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;

3966: o_err_code OUT NOCOPY VARCHAR2,
3967: o_err_msg OUT NOCOPY VARCHAR2)
3968: IS
3969: l_total_invoice_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;
3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;
3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;
3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;
3974: l_total_amount cst_rcv_acq_cost_details_adj.amount%TYPE;

Line 3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;

3967: o_err_msg OUT NOCOPY VARCHAR2)
3968: IS
3969: l_total_invoice_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;
3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;
3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;
3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;
3974: l_total_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3975: l_acq_cost cst_rcv_acq_costs_adj.acquisition_cost%TYPE;

Line 3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;

3968: IS
3969: l_total_invoice_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;
3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;
3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;
3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;
3974: l_total_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3975: l_acq_cost cst_rcv_acq_costs_adj.acquisition_cost%TYPE;
3976: l_cracd_count NUMBER := 0;

Line 3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;

3969: l_total_invoice_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;
3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;
3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;
3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;
3974: l_total_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3975: l_acq_cost cst_rcv_acq_costs_adj.acquisition_cost%TYPE;
3976: l_cracd_count NUMBER := 0;
3977: l_stmt_num NUMBER := 0;

Line 3974: l_total_amount cst_rcv_acq_cost_details_adj.amount%TYPE;

3970: l_qty_invoiced cst_rcv_acq_cost_details_adj.quantity%TYPE;
3971: l_qty_at_po cst_rcv_acq_cost_details_adj.quantity%TYPE;
3972: l_costed_quantity cst_rcv_acq_cost_details_adj.quantity%TYPE;
3973: l_amount_at_po cst_rcv_acq_cost_details_adj.amount%TYPE;
3974: l_total_amount cst_rcv_acq_cost_details_adj.amount%TYPE;
3975: l_acq_cost cst_rcv_acq_costs_adj.acquisition_cost%TYPE;
3976: l_cracd_count NUMBER := 0;
3977: l_stmt_num NUMBER := 0;
3978: l_acq_adjustment_amount NUMBER := 0;

Line 4030: FROM cst_rcv_acq_cost_details_adj cracd9

4026: -----------------------------------------------------------
4027:
4028: SELECT count(header_id)
4029: INTO l_cracd_count
4030: FROM cst_rcv_acq_cost_details_adj cracd9
4031: WHERE cracd9.header_id = i_header
4032: AND ROWNUM < 2;
4033:
4034: -------------------------------------------------------------

Line 4050: cst_rcv_acq_cost_details_adj cracd10

4046: SUM(cracd10.amount)
4047: INTO
4048: l_total_invoice_amount
4049: FROM
4050: cst_rcv_acq_cost_details_adj cracd10
4051: WHERE
4052: cracd10.header_id = i_header;
4053:
4054: ----------------------------------------------------------

Line 4065: cst_rcv_acq_cost_details_adj cracd11

4061: SUM(nvl(cracd11.quantity,0))
4062: INTO
4063: l_qty_invoiced
4064: FROM
4065: cst_rcv_acq_cost_details_adj cracd11
4066: WHERE
4067: cracd11.header_id = i_header;
4068:
4069: ELSE

Line 4140: cst_rcv_acq_cost_details_adj ( --cracd12

4136:
4137: l_stmt_num := 40;
4138:
4139: INSERT INTO
4140: cst_rcv_acq_cost_details_adj ( --cracd12
4141: HEADER_ID,
4142: DETAIL_ID,
4143: SOURCE_TYPE,
4144: PO_LINE_LOCATION_ID,

Line 4168: cst_rcv_acq_cost_details_s.nextval,

4164: LAST_UPDATE_LOGIN
4165: )
4166: VALUES (
4167: i_header,
4168: cst_rcv_acq_cost_details_s.nextval,
4169: 'PO',
4170: i_po_line_loc,
4171: NULL,
4172: -1,

Line 5225: Insert into cst_rcv_acq_cost_details(

5221: BEGIN
5222:
5223: IF i_source_flag = 1 then
5224:
5225: Insert into cst_rcv_acq_cost_details(
5226: HEADER_ID,
5227: DETAIL_ID,
5228: SOURCE_TYPE,
5229: PO_LINE_LOCATION_ID,

Line 5282: Insert into cst_rcv_acq_cost_details_adj(

5278: ELSIF i_source_flag = 2 then
5279:
5280: l_stmt_no := 20;
5281:
5282: Insert into cst_rcv_acq_cost_details_adj(
5283: HEADER_ID,
5284: DETAIL_ID,
5285: SOURCE_TYPE,
5286: PO_LINE_LOCATION_ID,