[Home] [Help]
730: and b.budget_revision_acct_line_id = a.budget_revision_acct_line_id);
731:
732: cursor c_position_dates_br is
733: select min(effective_start_date) start_date, max(effective_end_date) end_date
734: from PSB_BUDGET_REVISION_POSITIONS a, PSB_BUDGET_REVISION_POS_LINES b
735: where b.budget_revision_id = p_budget_revision_id
736: and a.budget_revision_pos_line_id = b.budget_revision_pos_line_id;
737:
738: cursor c_position_exists is
3209: select pbrp.position_id, pbrp.effective_start_date, pbrp.effective_end_date,
3210: /* Bug No 1808330 Start */
3211: pbrp.budget_revision_pos_line_id
3212: /* Bug No 1808330 End */
3213: from PSB_BUDGET_REVISION_POS_LINES pbrpl, PSB_BUDGET_REVISION_POSITIONS pbrp
3214: where pbrpl.budget_revision_id = p_budget_revision_id
3215: and pbrp.budget_revision_pos_line_id = pbrpl.budget_revision_pos_line_id;
3216:
3217: cursor c_period_list is
3747: -- this is used to propagate new budget revision entries created at any level to all the distributed levels
3748:
3749: for c_Distribute_Rev_Rec in c_Distribute_Rev (l_global_revision_id, p_budget_group_id) loop
3750:
3751: INSERT INTO PSB_BUDGET_REVISION_POS_LINES (budget_revision_pos_line_id, budget_revision_id,
3752: freeze_flag, view_line_flag, last_update_date, last_updated_by, last_update_login,
3753: created_by, creation_date)
3754: VALUES (l_budget_revision_pos_line_id, c_Distribute_Rev_Rec.budget_revision_id,
3755: p_freeze_flag, p_view_line_flag, sysdate, FND_GLOBAL.USER_ID, FND_GLOBAL.LOGIN_ID,
3886:
3887: cursor c_Overlap is
3888: select pbrp.*
3889: from psb_budget_revision_positions pbrp,
3890: psb_budget_revision_pos_lines pbrl
3891: where pbrp.position_id = p_position_id
3892: and ((((p_effective_end_date is not null)
3893: and ((pbrp.effective_start_date <= p_effective_end_date)
3894: and (pbrp.effective_end_date is null))
3933: and effective_start_date = p_effective_start_date
3934: and nvl(effective_end_date, FND_API.G_MISS_DATE) = nvl(p_effective_end_date, FND_API.G_MISS_DATE)
3935: and exists
3936: (select 1
3937: from PSB_BUDGET_REVISION_POS_LINES brpl
3938: where brpl.budget_revision_id = p_budget_revision_id
3939: and brpl.budget_revision_pos_line_id = brp.budget_revision_pos_line_id);
3940:
3941: if SQL%NOTFOUND then
7000: FND_NUMBER.canonical_to_number(attribute_value) desc; -- Fixed bug # 3683644
7001:
7002: cursor c_fte is
7003: select brp.revision_type, brp.revision_value_type, brp.revision_value, brp.effective_start_date, brp.effective_end_date
7004: from PSB_BUDGET_REVISION_POSITIONS brp, PSB_BUDGET_REVISION_POS_LINES brpl
7005: where brp.position_id = p_position_id
7006: and ((effective_start_date between p_revision_start_date and p_revision_end_date)
7007: or (effective_end_date between p_revision_start_date and p_revision_end_date)
7008: or ((effective_start_date < p_revision_start_date)
8350: from PSB_POSITION_COSTS a
8351: where exists
8352: (select 1
8353: from PSB_BUDGET_REVISION_POSITIONS c,
8354: PSB_BUDGET_REVISION_POS_LINES d,
8355: PSB_BUDGET_POSITIONS e,
8356: PSB_SET_RELATIONS f
8357: where d.budget_revision_id = a.budget_revision_id
8358: and c.budget_revision_pos_line_id = d.budget_revision_pos_line_id
8371: PSB_PAY_ELEMENTS c
8372: where exists
8373: (select 1
8374: from PSB_BUDGET_REVISION_POSITIONS d,
8375: PSB_BUDGET_REVISION_POS_LINES e,
8376: PSB_BUDGET_POSITIONS f,
8377: PSB_SET_RELATIONS g
8378: where e.budget_revision_id = a.budget_revision_id
8379: and d.budget_revision_pos_line_id = e.budget_revision_pos_line_id
8831: from PSB_POSITION_FTE a
8832: where exists
8833: (select 1
8834: from PSB_BUDGET_REVISION_POSITIONS c,
8835: PSB_BUDGET_REVISION_POS_LINES d,
8836: PSB_BUDGET_POSITIONS e,
8837: PSB_SET_RELATIONS f
8838: where c.budget_revision_pos_line_id = d.budget_revision_pos_line_id
8839: and d.budget_revision_id = p_budget_revision_id
9010: cursor c_Positions is
9011: select d.position_id,
9012: c.name
9013: from PSB_BUDGET_REVISION_POSITIONS a,
9014: PSB_BUDGET_REVISION_POS_LINES b,
9015: PSB_POSITIONS c,
9016: PSB_BUDGET_POSITIONS d,
9017: PSB_SET_RELATIONS e
9018: where a.budget_revision_pos_line_id = b.budget_revision_pos_line_id
9452:
9453: DELETE PSB_BUDGET_REVISION_POSITIONS
9454: WHERE budget_revision_pos_line_id = p_budget_revision_pos_line_id;
9455:
9456: DELETE PSB_BUDGET_REVISION_POS_LINES
9457: WHERE budget_revision_pos_line_id = p_budget_revision_pos_line_id;
9458:
9459: Else
9460:
9457: WHERE budget_revision_pos_line_id = p_budget_revision_pos_line_id;
9458:
9459: Else
9460:
9461: DELETE PSB_BUDGET_REVISION_POS_LINES
9462: WHERE budget_revision_pos_line_id = p_budget_revision_pos_line_id
9463: AND budget_revision_id = p_budget_revision_id;
9464:
9465: End If;
9634: +===========================================================================*/
9635: --
9636: -- This API deletes an official budget_revision by performing deletes on
9637: -- psb_budget_revisions and matrix tables (psb_budget_revision_lines and
9638: -- psb_budget_revision_pos_lines).
9639: -- It also deletes budget_revision related data from other tables.
9640: --
9641: PROCEDURE Delete_Budget_Revision_Pvt
9642: (
9666:
9667: CURSOR l_br_position_lines_csr
9668: IS
9669: SELECT budget_revision_pos_line_id
9670: FROM psb_budget_revision_pos_lines
9671: WHERE budget_revision_id = p_budget_revision_id;
9672:
9673: CURSOR l_br_distribution_csr
9674: IS
9693: WHERE pp.data_extract_id = l_data_extract_id
9694: AND nvl(pp.new_position_flag, 'N') = 'Y'
9695: AND EXISTS (SELECT 1
9696: FROM psb_budget_revision_positions brp,
9697: psb_budget_revision_pos_lines brpl,
9698: psb_budget_revisions br
9699: WHERE br.budget_revision_id = p_budget_revision_id
9700: AND br.budget_revision_id = brpl.budget_revision_id
9701: AND brpl.budget_revision_pos_line_id = brp.budget_revision_pos_line_id