-- Opening the issue when the accounting period is closed:
-- It was shut down by me in December 30 and cannot be opened later. Later, the SR was opened. Here is the solution provided.
SelectAcct_period_id period,
Open_flag,
Period_name name,
Period_start_date,
Schedule_close_date,
Period_close_date
FromOrg_acct_periods
WhereOrganization_id= &Org_id
Order By 1,
2;
UpdateOrg_acct_periods
set open_flag = ' Y ' ,
period_close_date = null ,
summarized_flag = ' n '
WhereOrganization_id= &&Org_id
AndAcct_period_id> = &&Acct_period_id;
DeleteMtl_period_summary
WhereOrganization_id= &Org_id
AndAcct_period_id> = &Acct_period_id;
DeleteMtl_period_cg_summary
WhereOrganization_id= &Org_id
AndAcct_period_id> = &Acct_period_id;
DeleteMtl_per_close_dtls
WhereOrganization_id= &Org_id
AndAcct_period_id> = &Acct_period_id;
DeleteCst_period_close_summary
WhereOrganization_id= &Org_id
AndAcct_period_id> = &Acct_period_id;