DBA Data[Home] [Help]

APPS.ZX_TRD_SERVICES_PUB_PKG dependencies on ZX_REC_NREC_DIST_GT

Line 1016: INSERT INTO zx_rec_nrec_dist_gt VALUES l_rec_nrec_dist_tbl(ctr);

1012: RETURN;
1013: END IF;
1014:
1015: FORALL ctr IN NVL(l_rec_nrec_dist_tbl.FIRST,0) .. NVL(l_rec_nrec_dist_tbl.LAST,-1)
1016: INSERT INTO zx_rec_nrec_dist_gt VALUES l_rec_nrec_dist_tbl(ctr);
1017:
1018: -- when is tax_variance_calc_flag is 'Y', calculate variance factors for all
1019: -- the tax distributions in global table zx_rec_nrec_dist_gt
1020:

Line 1019: -- the tax distributions in global table zx_rec_nrec_dist_gt

1015: FORALL ctr IN NVL(l_rec_nrec_dist_tbl.FIRST,0) .. NVL(l_rec_nrec_dist_tbl.LAST,-1)
1016: INSERT INTO zx_rec_nrec_dist_gt VALUES l_rec_nrec_dist_tbl(ctr);
1017:
1018: -- when is tax_variance_calc_flag is 'Y', calculate variance factors for all
1019: -- the tax distributions in global table zx_rec_nrec_dist_gt
1020:
1021: IF l_exist_frozen_tax_dist_flag = 'Y' THEN
1022:
1023: delete_unnecessary_tax_dists(p_event_class_rec => p_event_class_rec,

Line 1307: INSERT INTO zx_rec_nrec_dist_gt VALUES l_rec_nrec_dist_tbl(ctr);

1303:
1304: END IF;
1305:
1306: FORALL ctr IN NVL(l_rec_nrec_dist_tbl.FIRST,0) .. NVL(l_rec_nrec_dist_tbl.LAST,-1)
1307: INSERT INTO zx_rec_nrec_dist_gt VALUES l_rec_nrec_dist_tbl(ctr);
1308:
1309: -- bug fix 3313938: add tax_variance_calc_flag check.
1310: IF g_variance_calc_flag = 'Y' THEN
1311: -- when is tax_variance_calc_flag is 'Y', calculate variance factors for

Line 1312: -- all the tax distributions in global table zx_rec_nrec_dist_gt

1308:
1309: -- bug fix 3313938: add tax_variance_calc_flag check.
1310: IF g_variance_calc_flag = 'Y' THEN
1311: -- when is tax_variance_calc_flag is 'Y', calculate variance factors for
1312: -- all the tax distributions in global table zx_rec_nrec_dist_gt
1313:
1314: ZX_TRD_INTERNAL_SERVICES_PVT.calc_variance_factors(
1315: x_return_status,
1316: p_error_buffer

Line 4423: | PL/SQL table to the global tempoarary table zx_rec_nrec_dist_gt when there |

4419: | PRIVATE PROCEDURE insert_global_table |
4420: | |
4421: | DESCRIPTION |
4422: | This procedure is used to insert rec/non-rec tax distributions from the |
4423: | PL/SQL table to the global tempoarary table zx_rec_nrec_dist_gt when there |
4424: | are more than 1000 records in the PL/SQL table |
4425: | |
4426: * ============================================================================*/
4427:

Line 4469: INSERT INTO zx_rec_nrec_dist_gt VALUES p_rec_nrec_dist_tbl(ctr);

4465: END IF;
4466:
4467:
4468: FORALL ctr IN NVL(p_rec_nrec_dist_tbl.FIRST,0) .. NVL(p_rec_nrec_dist_tbl.LAST,-1)
4469: INSERT INTO zx_rec_nrec_dist_gt VALUES p_rec_nrec_dist_tbl(ctr);
4470:
4471: -- reinitialize the PL/SQL table.
4472: p_rec_nrec_dist_tbl.delete;
4473: p_rec_nrec_dist_end_index := 0;

Line 6096: | lines is 'Y' after tax dists are inserted into zx_rec_nrec_dist_gt. |

6092: | PUBLIC PROCEDURE delete_unnecessary_tax_dists |
6093: | |
6094: | DESCRIPTION: |
6095: | This procedure is called if associate_child_frozen_flag on detail tax |
6096: | lines is 'Y' after tax dists are inserted into zx_rec_nrec_dist_gt. |
6097: | If there is no change on tax_line and item distribution, the reversed |
6098: | tax_distributions and the new created tax distributions, which are |
6099: | created for the frozen taxdistributions, will be deleted. |
6100: | |

Line 6190: FROM ZX_REC_NREC_DIST_GT gt

6186: -- are not created for Historical Invoices on re-validation.
6187:
6188: SELECT REC_NREC_TAX_DIST_ID, REVERSED_TAX_DIST_ID
6189: BULK COLLECT INTO l_rec_nrec_tax_Dist_id_tbl1, l_reversed_tax_dist_id_tbl
6190: FROM ZX_REC_NREC_DIST_GT gt
6191: WHERE reversed_tax_dist_id IS NOT NULL
6192: AND EXISTS
6193: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1
6194: FROM ZX_REC_NREC_DIST_GT gt1

Line 6193: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1

6189: BULK COLLECT INTO l_rec_nrec_tax_Dist_id_tbl1, l_reversed_tax_dist_id_tbl
6190: FROM ZX_REC_NREC_DIST_GT gt
6191: WHERE reversed_tax_dist_id IS NOT NULL
6192: AND EXISTS
6193: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1
6194: FROM ZX_REC_NREC_DIST_GT gt1
6195: WHERE gt1.tax_line_id = gt.tax_line_id
6196: AND gt1.trx_line_dist_id = gt.trx_line_dist_id
6197: AND gt1.tax_status_id = gt.tax_status_id

Line 6194: FROM ZX_REC_NREC_DIST_GT gt1

6190: FROM ZX_REC_NREC_DIST_GT gt
6191: WHERE reversed_tax_dist_id IS NOT NULL
6192: AND EXISTS
6193: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1
6194: FROM ZX_REC_NREC_DIST_GT gt1
6195: WHERE gt1.tax_line_id = gt.tax_line_id
6196: AND gt1.trx_line_dist_id = gt.trx_line_dist_id
6197: AND gt1.tax_status_id = gt.tax_status_id
6198: AND gt1.tax_rate_id = gt.tax_rate_id

Line 6249: FROM ZX_REC_NREC_DIST_GT gt

6245: IF l_rec_nrec_tax_Dist_id_tbl1.count > 0 THEN
6246:
6247: SELECT rec_nrec_tax_dist_id
6248: BULK COLLECT INTO l_rec_nrec_tax_Dist_id_tbl2
6249: FROM ZX_REC_NREC_DIST_GT gt
6250: WHERE gt.freeze_flag = 'N'
6251: AND gt.reverse_flag = 'N'
6252: AND EXISTS
6253: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1

Line 6253: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1

6249: FROM ZX_REC_NREC_DIST_GT gt
6250: WHERE gt.freeze_flag = 'N'
6251: AND gt.reverse_flag = 'N'
6252: AND EXISTS
6253: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1
6254: FROM ZX_REC_NREC_DIST_GT gt1
6255: WHERE gt1.tax_line_id = gt.tax_line_id
6256: AND gt1.trx_line_dist_id = gt.trx_line_dist_id
6257: AND gt1.tax_status_id = gt.tax_status_id

Line 6254: FROM ZX_REC_NREC_DIST_GT gt1

6250: WHERE gt.freeze_flag = 'N'
6251: AND gt.reverse_flag = 'N'
6252: AND EXISTS
6253: (SELECT /*+ first_rows (1) index (gt1, ZX_REC_NREC_DIST_GT_N1) */ 1
6254: FROM ZX_REC_NREC_DIST_GT gt1
6255: WHERE gt1.tax_line_id = gt.tax_line_id
6256: AND gt1.trx_line_dist_id = gt.trx_line_dist_id
6257: AND gt1.tax_status_id = gt.tax_status_id
6258: AND gt1.tax_rate_id = gt.tax_rate_id

Line 6312: DELETE FROM zx_rec_nrec_dist_gt

6308:
6309: IF l_rec_nrec_tax_Dist_id_tbl1.COUNT > 0 AND l_rec_nrec_tax_Dist_id_tbl2.COUNT > 0 THEN
6310:
6311: FORALL j in l_rec_nrec_tax_Dist_id_tbl1.FIRST .. l_rec_nrec_tax_Dist_id_tbl1.LAST
6312: DELETE FROM zx_rec_nrec_dist_gt
6313: WHERE rec_nrec_tax_dist_id IN l_rec_nrec_tax_Dist_id_tbl1(j);
6314:
6315: FORALL j in l_rec_nrec_tax_Dist_id_tbl2.FIRST .. l_rec_nrec_tax_Dist_id_tbl2.LAST
6316: DELETE FROM zx_rec_nrec_dist_gt

Line 6316: DELETE FROM zx_rec_nrec_dist_gt

6312: DELETE FROM zx_rec_nrec_dist_gt
6313: WHERE rec_nrec_tax_dist_id IN l_rec_nrec_tax_Dist_id_tbl1(j);
6314:
6315: FORALL j in l_rec_nrec_tax_Dist_id_tbl2.FIRST .. l_rec_nrec_tax_Dist_id_tbl2.LAST
6316: DELETE FROM zx_rec_nrec_dist_gt
6317: WHERE rec_nrec_tax_dist_id IN l_rec_nrec_tax_Dist_id_tbl2(j);
6318:
6319: END IF;
6320:

Line 6325: UPDATE zx_rec_nrec_dist_gt gt

6321: IF l_reversed_tax_dist_id_tbl.COUNT > 0 AND l_rec_nrec_tax_Dist_id_tbl1.count > 0
6322: AND l_rec_nrec_tax_Dist_id_tbl2.COUNT > 0 THEN
6323:
6324: FORALL i IN l_reversed_tax_dist_id_tbl.FIRST .. l_reversed_tax_dist_id_tbl.LAST
6325: UPDATE zx_rec_nrec_dist_gt gt
6326: SET reverse_flag = 'N'
6327: WHERE rec_nrec_tax_dist_id = l_reversed_tax_dist_id_tbl(i);
6328:
6329: END IF;