185: INSERT ALL /*+ rowid(dr) leading(dr) */
186: WHEN (unbilled_receivable_dr <> 0
187: and unbilled_code_combination_id is not null
188: and currency_code is not null)THEN /*5455002*/
189: INTO PA_XLA_LINES_TMP
190: ( project_id,
191: draft_revenue_num,
192: ae_header_id,
193: xla_event_id,
221: )
222: WHEN (unearned_revenue_cr <> 0
223: and unearned_code_combination_id is not null
224: and currency_code is not null) THEN /*5455002*/
225: INTO PA_XLA_LINES_TMP
226: ( project_id,
227: draft_revenue_num,
228: ae_header_id,
229: xla_event_id,
257: )
258: WHEN (realized_gains_amount <> 0
259: and realized_gains_ccid is not null
260: and currency_code is not null) THEN /*5455002*/
261: INTO PA_XLA_LINES_TMP
262: ( project_id,
263: draft_revenue_num,
264: ae_header_id,
265: xla_event_id,
293: )
294: WHEN (realized_losses_amount <> 0
295: and realized_losses_ccid is not null
296: and currency_code is not null) THEN/*5455002*/
297: INTO PA_XLA_LINES_TMP
298: ( project_id,
299: draft_revenue_num,
300: ae_header_id,
301: xla_event_id,
789: gl_category,
790: rownum row_num,
791: accounting_date,
792: ledger_id
793: FROM PA_XLA_LINES_TMP DR);
794:
795:
796: UPDATE PA_DRAFT_REVENUES_ALL dr
797: SET dr.event_id = ( select tmp.xla_event_id
923: INSERT ALL /*+ rowid(mc) leading(mc) */
924: WHEN (mc_unbilled_receivable_dr <> 0
925: and unbilled_code_combination_id is not null
926: and currency_code is not null)THEN /*5455002*/
927: INTO PA_XLA_LINES_TMP
928: ( project_id,
929: draft_revenue_num,
930: ae_header_id,
931: xla_event_id,
967: )
968: WHEN (mc_unearned_revenue_cr <> 0
969: and unearned_code_combination_id is not null
970: and currency_code is not null) THEN /*5455002*/
971: INTO PA_XLA_LINES_TMP
972: ( project_id,
973: draft_revenue_num,
974: ae_header_id,
975: xla_event_id,
1011: )
1012: WHEN (mc_realized_gains_amount <> 0
1013: and realized_gains_ccid is not null
1014: and currency_code is not null) THEN /*5455002*/
1015: INTO PA_XLA_LINES_TMP
1016: ( project_id,
1017: draft_revenue_num,
1018: ae_header_id,
1019: xla_event_id,
1055: )
1056: WHEN (mc_realized_losses_amount <> 0
1057: and realized_losses_ccid is not null
1058: and currency_code is not null)THEN /*5455002*/
1059: INTO PA_XLA_LINES_TMP
1060: ( project_id,
1061: draft_revenue_num,
1062: ae_header_id,
1063: xla_event_id,
1526: gl_category,
1527: rownum row_num,
1528: accounting_date,
1529: ledger_id
1530: FROM PA_XLA_LINES_TMP MC );
1531:
1532: UPDATE PA_MC_DRAFT_REVS_ALL mc
1533: SET mc.xla_migrated_flag = 'Y'
1534: WHERE mc.rowid >= p_start_rowid