DBA Data[Home] [Help]

APPS.AMW_FINSTMT_CERT_MIG_PKG dependencies on AMW_FIN_CERT_SCOPE

Line 236: SELECT COUNT(1) INTO L_COUNT FROM AMW_FIN_CERT_SCOPE

232:
233: -- Initialize API return status to SUCCESS
234: x_return_status := FND_API.G_RET_STS_SUCCESS;
235:
236: SELECT COUNT(1) INTO L_COUNT FROM AMW_FIN_CERT_SCOPE
237: WHERE FIN_CERTIFICATION_ID = P_CERTIFICATION_ID;
238:
239: /** even if there is no process attached to an account. if the account belongs to the financial
240: ** certification, we should add it to the amw_fin_cert_scope table

Line 240: ** certification, we should add it to the amw_fin_cert_scope table

236: SELECT COUNT(1) INTO L_COUNT FROM AMW_FIN_CERT_SCOPE
237: WHERE FIN_CERTIFICATION_ID = P_CERTIFICATION_ID;
238:
239: /** even if there is no process attached to an account. if the account belongs to the financial
240: ** certification, we should add it to the amw_fin_cert_scope table
241: SELECT COUNT(1) INTO L_COUNT2 FROM AMW_FIN_PROCESS_EVAL_SUM
242: WHERE FIN_CERTIFICATION_ID = P_CERTIFICATION_ID;
243:
244:

Line 252: insert into amw_fin_cert_scope(

248: ****/
249:
250: IF (L_COUNT = 0 OR L_COUNT IS NULL) THEN
251: ----add those accounts that have one or more children linking to a process
252: insert into amw_fin_cert_scope(
253: FIN_CERT_SCOPE_ID ,
254: FIN_CERTIFICATION_ID ,
255: STATEMENT_GROUP_ID ,
256: FINANCIAL_STATEMENT_ID,

Line 269: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, itemaccmerge.statement_group_id, itemaccmerge.financial_statement_id, itemaccmerge.financial_item_id,

265: LAST_UPDATE_DATE ,
266: LAST_UPDATE_LOGIN ,
267: SECURITY_GROUP_ID ,
268: OBJECT_VERSION_NUMBER )
269: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, itemaccmerge.statement_group_id, itemaccmerge.financial_statement_id, itemaccmerge.financial_item_id,
270: itemaccmerge.account_group_id, itemaccmerge.natural_account_id,itemaccmerge.organization_id, case when proc.child_process_id = -2 then itemaccmerge.process_id else proc.child_process_id end process_id,
271: 1, sysdate, 1, sysdate, 1, null, 1
272: FROM
273: AMW_FIN_PROCESS_FLAT proc,

Line 327: insert into amw_fin_cert_scope(

323: and proc.parent_process_id (+) = itemaccmerge.process_id
324: and proc.fin_certification_id (+) = p_certification_id;
325:
326: -- add account which has link to a item and also directly assocates with a process
327: insert into amw_fin_cert_scope(
328: FIN_CERT_SCOPE_ID ,
329: FIN_CERTIFICATION_ID ,
330: STATEMENT_GROUP_ID,
331: FINANCIAL_STATEMENT_ID ,

Line 344: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, itemaccmerge.statement_group_id, itemaccmerge.financial_statement_id, itemaccmerge.financial_item_id,

340: LAST_UPDATE_DATE ,
341: LAST_UPDATE_LOGIN ,
342: SECURITY_GROUP_ID ,
343: OBJECT_VERSION_NUMBER )
344: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, itemaccmerge.statement_group_id, itemaccmerge.financial_statement_id, itemaccmerge.financial_item_id,
345: itemaccmerge.account_group_id, itemaccmerge.natural_account_id,itemaccmerge.organization_id, case when proc.child_process_id = -2 then itemaccmerge.process_id else proc.child_process_id end process_id,
346: 1, sysdate, 1, sysdate, 1, null, 1
347: FROM
348: AMW_FIN_PROCESS_FLAT proc,

Line 395: insert into amw_fin_cert_scope(

391:
392: --- add all of childen accounts which associate with the top account which directly links to an item
393: --- e.g A2 is a child of A1. A1 links to an financial item which relates to fin certification
394: -- and P1 is associated with A2. so we want to add one record which contains A2, P1 info. in scope table
395: insert into amw_fin_cert_scope(
396: FIN_CERT_SCOPE_ID ,
397: FIN_CERTIFICATION_ID ,
398: STATEMENT_GROUP_ID ,
399: FINANCIAL_STATEMENT_ID ,

Line 412: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, itemaccmerge.statement_group_id, itemaccmerge.financial_statement_id, itemaccmerge.financial_item_id,

408: LAST_UPDATE_DATE ,
409: LAST_UPDATE_LOGIN ,
410: SECURITY_GROUP_ID ,
411: OBJECT_VERSION_NUMBER )
412: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, itemaccmerge.statement_group_id, itemaccmerge.financial_statement_id, itemaccmerge.financial_item_id,
413: itemaccmerge.account_group_id, itemaccmerge.natural_account_id,itemaccmerge.organization_id, case when proc.child_process_id = -2 then itemaccmerge.process_id else proc.child_process_id end process_id,
414: 1, sysdate, 1, sysdate, 1, null, 1
415: FROM
416: AMW_FIN_PROCESS_FLAT proc,

Line 471: insert into amw_fin_cert_scope(

467:
468:
469: -- account has sub-account, but account itself doesn't associate with any item. His parent/parent's parent links to -- -- item.
470: --- and its sub-account links to a process. e.g A1-A2-A3, A3-P1. so this query make A2-P
471: insert into amw_fin_cert_scope(
472: FIN_CERT_SCOPE_ID ,
473: FIN_CERTIFICATION_ID ,
474: STATEMENT_GROUP_ID ,
475: FINANCIAL_STATEMENT_ID ,

Line 488: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, null statement_group_id, null financial_statement_id,

484: LAST_UPDATE_DATE ,
485: LAST_UPDATE_LOGIN ,
486: SECURITY_GROUP_ID ,
487: OBJECT_VERSION_NUMBER )
488: SELECT AMW_FIN_CERT_SCOPE_S.NEXTVAL, P_CERTIFICATION_ID, null statement_group_id, null financial_statement_id,
489: null financial_item_id,
490: itemaccmerge.account_group_id, itemaccmerge.natural_account_id,itemaccmerge.organization_id,
491: case when proc.child_process_id = -2 then itemaccmerge.process_id else proc.child_process_id end process_id,
492: 1, sysdate, 1, sysdate, 1, null, 1

Line 512: from amw_fin_cert_scope

508: (select flat.account_group_id, flat.parent_natural_account_id, flat.child_natural_account_id
509: from AMW_FIN_KEY_ACCT_FLAT flat
510: start with (account_group_id, parent_natural_account_id) in
511: (select account_group_id, natural_account_id
512: from amw_fin_cert_scope
513: where fin_certification_id = P_CERTIFICATION_ID)
514: connect by parent_natural_account_id = prior child_natural_account_id
515: and account_group_id = prior account_group_id) flat
516: where not exists (

Line 518: from AMW_FIN_CERT_SCOPE temp2

514: connect by parent_natural_account_id = prior child_natural_account_id
515: and account_group_id = prior account_group_id) flat
516: where not exists (
517: select 'Y'
518: from AMW_FIN_CERT_SCOPE temp2
519: where flat.account_group_id = temp2.account_group_id
520: and flat.parent_natural_account_id = temp2.natural_account_id
521: and temp2.fin_certification_id = P_CERTIFICATION_ID) ) temp
522: WHERE

Line 1200: amw_fin_cert_scope fin

1196: l_stmt := 'SELECT COUNT(1) FROM
1197: (Select distinct fin.PROCESS_ID, fin.ORGANIZATION_ID
1198: FROM
1199: AMW_OPINION_M_V aov,
1200: amw_fin_cert_scope fin
1201: WHERE aov.OPINION_TYPE_CODE = ''EVALUATION''
1202: and aov.object_name = ''AMW_ORG_PROCESS''
1203: and aov.opinion_component_code = ''OVERALL''
1204: and aov.PK3_VALUE = fin.ORGANIZATION_ID

Line 1260: amw_fin_cert_scope fin

1256: l_stmt := 'select count(1) from (
1257: select distinct fin.ORGANIZATION_ID
1258: FROM
1259: AMW_OPINION_M_V aov,
1260: amw_fin_cert_scope fin
1261: WHERE aov.OPINION_TYPE_CODE = ''EVALUATION''
1262: and aov.object_name = ''AMW_ORGANIZATION''
1263: and aov.opinion_component_code = ''OVERALL''
1264: and aov.pk1_value = fin.organization_id

Line 1506: from amw_fin_cert_scope scp,

1502: SECURITY_GROUP_ID ,
1503: OBJECT_VERSION_NUMBER )
1504: SELECT distinct 'ACCOUNT' OBJECT_TYPE , fin_certification_id, statement_group_id, financial_statement_id, null financial_item_id,
1505: account_group_id, natural_account_id, organization_id, process_id, risk_id, risk_rev_id, pk4 opinion_log_id, 1, sysdate, 1, sysdate, 1, null, 1
1506: from amw_fin_cert_scope scp,
1507: amw_risk_associations risk
1508: where risk.pk1 = scp.fin_certification_id
1509: and risk.object_type = 'PROCESS_FINCERT'
1510: and scp.natural_account_id is not null

Line 1517: from amw_fin_cert_scope scp,

1513: and risk.pk1 = p_certification_id
1514: union all
1515: select distinct 'FINANCIAL ITEM' OBJECT_TYPE, fin_certification_id, statement_group_id, financial_statement_id, financial_item_id,
1516: null account_group_id, null natural_account_id, organization_id, process_id, risk_id, risk_rev_id, pk4 opinion_log_id, 1, sysdate, 1, sysdate, 1, null, 1
1517: from amw_fin_cert_scope scp,
1518: amw_risk_associations risk
1519: where risk.pk1 = scp.fin_certification_id
1520: and risk.object_type = 'PROCESS_FINCERT'
1521: and scp.organization_id = risk.pk2

Line 1527: from amw_fin_cert_scope scp,

1523: and risk.pk1 = p_certification_id
1524: union all
1525: select distinct 'FINANCIAL STATEMENT' OBJECT_TYPE, fin_certification_id, statement_group_id, financial_statement_id, null financial_item_id,
1526: null account_group_id, null natural_account_id, organization_id, process_id, risk_id, risk_rev_id, pk4 opinion_log_id, 1, sysdate, 1, sysdate, 1, null, 1
1527: from amw_fin_cert_scope scp,
1528: amw_risk_associations risk
1529: where risk.pk1 = scp.fin_certification_id
1530: and risk.object_type = 'PROCESS_FINCERT'
1531: and scp.organization_id = risk.pk2

Line 1631: from amw_fin_cert_scope scp,

1627: SECURITY_GROUP_ID ,
1628: OBJECT_VERSION_NUMBER )
1629: SELECT distinct 'ACCOUNT' OBJECT_TYPE , fin_certification_id, statement_group_id, financial_statement_id, null financial_item_id,
1630: account_group_id, natural_account_id, organization_id, control_id, control_rev_id, pk5 opinion_log_id, 1, sysdate, 1, sysdate, 1, null, 1
1631: from amw_fin_cert_scope scp,
1632: amw_control_associations ctrl
1633: where ctrl.pk1 = scp.fin_certification_id
1634: and ctrl.object_type = 'RISK_FINCERT'
1635: and scp.natural_account_id is not null

Line 1642: from amw_fin_cert_scope scp,

1638: and ctrl.pk1 = p_certification_id
1639: union all
1640: select distinct 'FINANCIAL ITEM' OBJECT_TYPE, fin_certification_id, statement_group_id, financial_statement_id, financial_item_id,
1641: null account_group_id, null natural_account_id, organization_id, control_id, control_rev_id, pk5 opinion_log_id, 1, sysdate, 1, sysdate, 1, null, 1
1642: from amw_fin_cert_scope scp,
1643: amw_control_associations ctrl
1644: where ctrl.pk1 = scp.fin_certification_id
1645: and ctrl.object_type = 'RISK_FINCERT'
1646: and scp.organization_id = ctrl.pk2

Line 1652: from amw_fin_cert_scope scp,

1648: and ctrl.pk1 = p_certification_id
1649: union all
1650: select distinct 'FINANCIAL STATEMENT' OBJECT_TYPE, fin_certification_id, statement_group_id, financial_statement_id, null financial_item_id,
1651: null account_group_id, null natural_account_id, organization_id, control_id, control_rev_id, pk5 opinion_log_id, 1, sysdate, 1, sysdate, 1, null, 1
1652: from amw_fin_cert_scope scp,
1653: amw_control_associations ctrl
1654: where ctrl.pk1 = scp.fin_certification_id
1655: and ctrl.object_type = 'RISK_FINCERT'
1656: and scp.organization_id = ctrl.pk2