DBA Data[Home] [Help]

APPS.JL_BR_AR_BANK_ACCT_PKG dependencies on JL_BR_AR_DISTRIBUTNS

Line 246: | Procedure to insert distribution in table JL_BR_AR_DISTRIBUTNS

242: /*========================================================================
243: | PRIVATE PROCEDURE Create_Distribution
244: |
245: | DESCRIPTION
246: | Procedure to insert distribution in table JL_BR_AR_DISTRIBUTNS
247: |
248: | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
249: | a) Create_Event_Dists
250: | b) Cancel_Reject_Distributions

Line 292: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','Insertion into jl_br_ar_distributns table');

288: BEGIN
289: l_count :=0;
290: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
291: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','Start of create distribution function');
292: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','Insertion into jl_br_ar_distributns table');
293: END IF;
294: Select count(*)
295: into l_count
296: from jl_br_ar_distributns

Line 296: from jl_br_ar_distributns

292: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','Insertion into jl_br_ar_distributns table');
293: END IF;
294: Select count(*)
295: into l_count
296: from jl_br_ar_distributns
297: where DOCUMENT_ID = p_document_id
298: and DISTRIBUTION_TYPE = p_distr_type
299: and STD_OCCURRENCE_CODE = p_std_occurrence_code
300: and BORDERO_TYPE = p_bordero_type

Line 311: insert into jl_br_ar_distributns

307: IF l_count > 0 then
308: fnd_file.put_line(fnd_file.log,'Record already exists');
309: return;
310: ELSE
311: insert into jl_br_ar_distributns
312: (ORG_ID,
313: DISTRIBUTION_ID,
314: DOCUMENT_ID,
315: DISTRIBUTION_TYPE,

Line 339: jl_br_ar_distributns_s.NEXTVAL, -- DISTRIBUTION_ID

335: BORDERO_TYPE,
336: DIST_LINE_NUMBER
337: )
338: values (p_org_id, -- ORG_ID
339: jl_br_ar_distributns_s.NEXTVAL, -- DISTRIBUTION_ID
340: p_document_id, -- DOCUMENT_ID
341: p_distr_type, -- DISTRIBUTION_TYPE
342: p_gl_date, -- GL_DATE
343: p_entered_amt, -- ENTERED_AMT

Line 366: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','Just after the Insertion into jl_br_ar_distributns table');

362: p_dist_line_number -- DIST_LINE_NUMBER
363: );
364: END IF;
365: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
366: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','Just after the Insertion into jl_br_ar_distributns table');
367: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Distribution','End of function');
368: END IF;
369:
370: END Create_Distribution;

Line 431: FROM jl_br_ar_distributns

427: BANK_OCCURRENCE_CODE,
428: STD_OCCURRENCE_CODE,
429: BORDERO_TYPE,
430: DIST_LINE_NUMBER
431: FROM jl_br_ar_distributns
432: WHERE document_id = p_document_id
433: AND std_occurrence_code = 'REMITTANCE'
434: AND accounting_reversal_option = 'N'
435: AND distribution_type = NVL(p_distribution_type,distribution_type);

Line 631: from jl_br_ar_distributns

627: /*-----------------------*/
628: --
629: select NVL(max(dist_line_number),0)
630: into l_dist_line_number
631: from jl_br_ar_distributns
632: where document_id = p_document_id;
633: --
634: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL ) THEN
635: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.Create_Event_Dists','l_dist_line_number = '||l_dist_line_number);

Line 877: from jl_br_ar_distributns

873: select distribution_id,
874: distribution_link_type
875: into l_prior_dist_id,
876: l_prior_dist_link_type
877: from jl_br_ar_distributns
878: where std_occurrence_code = 'REMITTANCE'
879: and document_id = p_document_id
880: and occurrence_id = x_occurrence_id -- bug 10339838
881: and accounting_reversal_option = 'N'

Line 1050: jl_br_ar_distributns_all dist

1046: order by occurrence_id) lagdist,
1047: lag(distribution_id,1,to_number(NULL)) over (partition by document_id, occurrence_id, distribution_type
1048: order by accounting_reversal_option) cancellagdist
1049: from jl_rev_tmp) tmp,
1050: jl_br_ar_distributns_all dist
1051: where tmp.distribution_id = dist.distribution_id
1052: and (tmp.ACCOUNTING_REVERSAL_OPTION = 'Y'
1053: or dist.std_occurrence_code in ('FULL_SETTLEMENT', 'PARTIAL_SETTLEMENT')
1054: and dist.distribution_type = 'JLBR_AR_ENDORSEMENT');

Line 1071: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPGRADE_DISTRIBUTIONS','Insert into jl_br_ar_distributns_all ');

1067:
1068: BEGIN
1069: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL ) THEN
1070: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPGRADE_DISTRIBUTIONS','Start procedure UPGRADE_DISTRIBUTIONS');
1071: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPGRADE_DISTRIBUTIONS','Insert into jl_br_ar_distributns_all ');
1072: END IF;
1073:
1074: INSERT all
1075: WHEN 1=1 THEN

Line 1076: INTO jl_br_ar_distributns_all

1072: END IF;
1073:
1074: INSERT all
1075: WHEN 1=1 THEN
1076: INTO jl_br_ar_distributns_all
1077: (
1078: ORG_ID ,
1079: DISTRIBUTION_ID,
1080: DOCUMENT_ID ,

Line 1103: jl_br_ar_distributns_s.NEXTVAL,

1099: DIST_LINE_NUMBER
1100: )
1101: values (
1102: ORG_ID ,
1103: jl_br_ar_distributns_s.NEXTVAL,
1104: DOCUMENT_ID ,
1105: 'JLBR_AR_DIST',
1106: DISTRIBUTION_TYPE,
1107: GL_DATE,

Line 1132: jl_br_ar_distributns_s.NEXTVAL, document_id, occurrence_id, distribution_type, ACCOUNTING_REVERSAL_OPTION

1128: into jl_rev_tmp (
1129: distribution_id, document_id, occurrence_id, distribution_type, ACCOUNTING_REVERSAL_OPTION
1130: )
1131: values (
1132: jl_br_ar_distributns_s.NEXTVAL, document_id, occurrence_id, distribution_type, ACCOUNTING_REVERSAL_OPTION
1133: )
1134: select
1135: X.ORG_ID ,
1136: X.DOCUMENT_ID ,

Line 1233: select /*+ use_nl_with_index(rerun, JL_BR_AR_DISTRIBUTNS_U2) */ null

1229: ar_payment_schedules_all ps
1230: where grm.multiplier < 7
1231: and ps.payment_schedule_id = x.payment_schedule_id
1232: and not exists (
1233: select /*+ use_nl_with_index(rerun, JL_BR_AR_DISTRIBUTNS_U2) */ null
1234: from jl_br_ar_distributns_all rerun
1235: where rerun.occurrence_id = x.occurrence_id
1236: and rerun.distribution_type = decode (grm.multiplier, 1,
1237: 'JLBR_AR_ENDORSEMENT', 2, 'JLBR_AR_ENDORSEMENT', 3,

Line 1234: from jl_br_ar_distributns_all rerun

1230: where grm.multiplier < 7
1231: and ps.payment_schedule_id = x.payment_schedule_id
1232: and not exists (
1233: select /*+ use_nl_with_index(rerun, JL_BR_AR_DISTRIBUTNS_U2) */ null
1234: from jl_br_ar_distributns_all rerun
1235: where rerun.occurrence_id = x.occurrence_id
1236: and rerun.distribution_type = decode (grm.multiplier, 1,
1237: 'JLBR_AR_ENDORSEMENT', 2, 'JLBR_AR_ENDORSEMENT', 3,
1238: 'JLBR_AR_BANK_CHARGES', 4, 'JLBR_AR_BANK_CHARGES', 5,

Line 1276: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPGRADE_DISTRIBUTIONS',' After Insert into jl_br_ar_distributns_all. Opening cursor c_dist ');

1272: or std_occurrence_code = 'REJECTED_ENTRY'))
1273: ;
1274:
1275: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL ) THEN
1276: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPGRADE_DISTRIBUTIONS',' After Insert into jl_br_ar_distributns_all. Opening cursor c_dist ');
1277: END IF;
1278: open c_dist;
1279: LOOP
1280: FETCH c_dist BULK COLLECT INTO

Line 1309: update /*+ index(d, jl_br_ar_distributns_u1) */ jl_br_ar_distributns_all d

1305: END LOOP;
1306:
1307: FORALL i in 1..nvl(pr_dist.dist_id.LAST,-99)
1308:
1309: update /*+ index(d, jl_br_ar_distributns_u1) */ jl_br_ar_distributns_all d
1310: set reversed_dist_id = pr_dist.rev_dist_id(i),
1311: prior_dist_id = pr_dist.prior_dist_id(i)
1312: where distribution_id = pr_dist.dist_id(i);
1313:

Line 1349: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_DISTRIBUTIONS','Updating table jl_br_ar_distributns_all');

1345: /* Updating the prior and reversed distribution Ids */
1346: ------------------------------------------------------------------
1347: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL ) THEN
1348: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_DISTRIBUTIONS','Start procedure UPDATE_DISTRIBUTIONS');
1349: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_DISTRIBUTIONS','Updating table jl_br_ar_distributns_all');
1350: END IF;
1351: UPDATE jl_br_ar_distributns_all d
1352: SET (prior_dist_id, reversed_dist_id) =
1353: ( SELECT decode(d.accounting_reversal_option, 'Y', NULL, d1.distribution_id),

Line 1351: UPDATE jl_br_ar_distributns_all d

1347: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL ) THEN
1348: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_DISTRIBUTIONS','Start procedure UPDATE_DISTRIBUTIONS');
1349: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_DISTRIBUTIONS','Updating table jl_br_ar_distributns_all');
1350: END IF;
1351: UPDATE jl_br_ar_distributns_all d
1352: SET (prior_dist_id, reversed_dist_id) =
1353: ( SELECT decode(d.accounting_reversal_option, 'Y', NULL, d1.distribution_id),
1354: decode(d.accounting_reversal_option, 'Y', d1.distribution_id, NULL)
1355: FROM jl_br_ar_distributns_all d1,

Line 1355: FROM jl_br_ar_distributns_all d1,

1351: UPDATE jl_br_ar_distributns_all d
1352: SET (prior_dist_id, reversed_dist_id) =
1353: ( SELECT decode(d.accounting_reversal_option, 'Y', NULL, d1.distribution_id),
1354: decode(d.accounting_reversal_option, 'Y', d1.distribution_id, NULL)
1355: FROM jl_br_ar_distributns_all d1,
1356: jl_br_ar_occurrence_docs_all occ1
1357: WHERE d1.distribution_type = d.distribution_type
1358: AND d1.std_occurrence_code = 'REMITTANCE'
1359: AND d1.document_id = d.document_id

Line 2441: jl_br_ar_distributns_all dist,

2437: grm.multiplier MULTIPLIER
2438: FROM
2439: jl_remit1_gt TR2,
2440: jl_remit1_gt refTR2,
2441: jl_br_ar_distributns_all dist,
2442: gl_row_multipliers grm
2443: WHERE
2444: dist.occurrence_id = TR2.occurrence_id
2445: And dist.document_id = TR2.document_id

Line 2452: AND EXISTS(SELECT 'Y' FROM jl_br_ar_distributns_all dist2

2448: And (refTR2.event_type_code IN('REMIT_COLL_DOC' ,'REMIT_FACT_DOC')
2449: AND refTR2.occurrence_status = 'CONFIRMED'
2450: AND TR2.std_occurrence_code IN ('WRITE_OFF_REQUISITION','REJECTED_ENTRY',
2451: 'FULL_SETTLEMENT','PARTIAL_SETTLEMENT','AUTOMATIC_WRITE_OFF')
2452: AND EXISTS(SELECT 'Y' FROM jl_br_ar_distributns_all dist2
2453: WHERE dist2.occurrence_id = refTR2.occurrence_id
2454: AND (dist2.distribution_id = dist.prior_dist_id and dist.prior_dist_id is not null
2455: or dist2.distribution_id = dist.reversed_dist_id and dist.reversed_dist_id is not null))
2456: OR refTR2.occurrence_id = TR2.occurrence_id

Line 2617: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','Update table jl_br_ar_distributns_all');

2613:
2614: */
2615:
2616: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL ) THEN
2617: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','Update table jl_br_ar_distributns_all');
2618: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','Update event_id for unposted occurrences and distributions');
2619: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','This will be used by Extract objects when Create Accounting program of SLA is run for the non posted data');
2620: END IF;
2621: UPDATE /*+ rowid(jlbr) */ jl_br_ar_distributns_all jlbr

Line 2621: UPDATE /*+ rowid(jlbr) */ jl_br_ar_distributns_all jlbr

2617: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','Update table jl_br_ar_distributns_all');
2618: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','Update event_id for unposted occurrences and distributions');
2619: FND_LOG.STRING(G_LEVEL_STATEMENT, 'JL.plsql.JL_BR_AR_BANK_ACCT_PKG.UPDATE_OCCURRENCES','This will be used by Extract objects when Create Accounting program of SLA is run for the non posted data');
2620: END IF;
2621: UPDATE /*+ rowid(jlbr) */ jl_br_ar_distributns_all jlbr
2622: SET event_id = decode(jlbr.accounting_reversal_option, 'Y',
2623: (SELECT a1.event_id
2624: FROM xla_events a1, xla_transaction_entities_upg c1, ar_system_parameters_all sys1,
2625: jl_br_ar_occurrence_docs_all oc1

Line 3162: jl_br_ar_distributns_all dist,

3158: ra_customer_trx_all ct,
3159: gl_ledgers lgr,
3160: gl_date_period_map map,
3161: gl_period_statuses gps,
3162: jl_br_ar_distributns_all dist,
3163: ar_mc_payment_schedules ps,
3164: xla_distribution_links dl,
3165: xla_ae_headers hdr
3166: --

Line 3515: jl_br_ar_distributns_all dist,

3511: ra_customer_trx_all ct,
3512: gl_ledgers lgr,
3513: gl_date_period_map map,
3514: gl_period_statuses gps,
3515: jl_br_ar_distributns_all dist,
3516: ar_mc_payment_schedules ps,
3517: xla_distribution_links dl,
3518: xla_ae_lines lin,
3519: xla_ae_headers hdr,