DBA Data[Home] [Help]

APPS.INV_TURNS dependencies on ORG_ACCT_PERIODS

Line 18: FROM ORG_ACCT_PERIODS

14: SELECT period_start_date,
15: schedule_close_date
16: INTO l_period_start_date,
17: l_schedule_close_date
18: FROM ORG_ACCT_PERIODS
19: WHERE acct_period_id = p_acct_period_id;
20:
21: SELECT ROUND(SUM(NVL(MTA.BASE_TRANSACTION_VALUE, 0)),2) txn_val
22: INTO p_prev_onhand

Line 440: FROM ORG_ACCT_PERIODS

436: AND acct_period_id = p_period_id;
437: -- Begin changes 2856158
438: SELECT period_start_date,schedule_close_date + 1 - (1/(24*3600))
439: INTO l_period_start_date,l_schedule_close_date
440: FROM ORG_ACCT_PERIODS
441: WHERE organization_id = p_organization_id
442: AND acct_period_id = p_period_id;
443:
444: /* INSERT INTO MTL_BIS_INV_BY_PERIOD

Line 456: ORG_ACCT_PERIODS OAP, MTL_BIS_INV_BY_PERIOD MBI

452: SUM(NVL(MTA.base_transaction_value,0)) + NVL(MBI.onhand,0),
453: NULL, 0, NULL, SYSDATE, l_user_id, SYSDATE, l_user_id,
454: NULL,NULL,NULL,NULL,NULL
455: FROM MTL_TRANSACTION_ACCOUNTS MTA, MTL_MATERIAL_TRANSACTIONS MMT,
456: ORG_ACCT_PERIODS OAP, MTL_BIS_INV_BY_PERIOD MBI
457: WHERE (MTA.accounting_line_type = 1
458: OR MTA.accounting_line_type =
459: decode(MMT.transaction_action_id, 2, 99, 3, 99, 1))
460: AND sign(MTA.primary_quantity) =

Line 658: FROM org_acct_periods

654: l_last_period_id := NULL;
655:
656: SELECT MAX(acct_period_id)
657: INTO l_last_period_id
658: FROM org_acct_periods
659: WHERE organization_id = p_organization_id
660: AND acct_period_id < p_period_id;
661:
662: FOR GET_CLOSED_WIPS_REC IN GET_CLOSED_WIPS LOOP

Line 668: FROM org_acct_periods

664: l_last_wip := NULL;
665:
666: SELECT MAX(acct_period_id)
667: INTO l_last_period_id
668: FROM org_acct_periods
669: WHERE organization_id = GET_CLOSED_WIPS_REC.org_id
670: AND acct_period_id < GET_CLOSED_WIPS_REC.per_id;
671:
672: IF l_last_period_id IS NOT NULL THEN

Line 786: FROM org_acct_periods

782: l_user_id := FND_GLOBAL.USER_ID;
783:
784: SELECT period_start_date,schedule_close_date
785: INTO l_period_start_date, l_period_close_date
786: FROM org_acct_periods
787: WHERE organization_id = p_organization_id
788: AND acct_period_id = p_period_id;
789:
790: FOR CLOSED_COGS_REC IN CLOSED_COGS LOOP

Line 846: FROM org_acct_periods oap,

842: mbibp.bop_wip,
843: mbibp.wip,
844: mbibp.bop_intransit,
845: mbibp.intransit
846: FROM org_acct_periods oap,
847: mtl_bis_inv_by_period mbibp
848: WHERE oap.open_flag = 'Y'
849: AND mbibp.acct_period_id = oap.acct_period_id
850: AND mbibp.organization_id = oap.organization_id

Line 991: l_last_period_id org_acct_periods.acct_period_id%TYPE := 0;

987:
988: PROCEDURE process_closed_periods
989: (p_return_status OUT NOCOPY VARCHAR2) IS
990: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
991: l_last_period_id org_acct_periods.acct_period_id%TYPE := 0;
992:
993: /* performance bug 4951748, sql 14818892
994: sql is rewritten to combine two selects from org_acct_periods
995:

Line 994: sql is rewritten to combine two selects from org_acct_periods

990: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
991: l_last_period_id org_acct_periods.acct_period_id%TYPE := 0;
992:
993: /* performance bug 4951748, sql 14818892
994: sql is rewritten to combine two selects from org_acct_periods
995:
996: CURSOR closed_periods IS
997: SELECT oap.organization_id,
998: oap.acct_period_id,

Line 1002: FROM org_acct_periods oap,

998: oap.acct_period_id,
999: oap.period_start_date,
1000: oap.schedule_close_date,
1001: mp.primary_cost_method
1002: FROM org_acct_periods oap,
1003: mtl_parameters mp
1004: WHERE oap.organization_id = mp.organization_id
1005: AND ( oap.organization_id, oap.acct_period_id)
1006: IN

Line 1008: FROM org_acct_periods oap

1004: WHERE oap.organization_id = mp.organization_id
1005: AND ( oap.organization_id, oap.acct_period_id)
1006: IN
1007: (SELECT oap.organization_id, oap.acct_period_id
1008: FROM org_acct_periods oap
1009: WHERE oap.open_flag = 'N'
1010: AND oap.schedule_close_date <= INV_LE_TIMEZONE_PUB.get_le_day_for_inv_org(Sysdate,oap.organization_id)
1011: MINUS
1012: SELECT organization_id, acct_period_id

Line 1025: FROM org_acct_periods oap,

1021: oap.acct_period_id,
1022: oap.period_start_date,
1023: oap.schedule_close_date,
1024: mp.primary_cost_method
1025: FROM org_acct_periods oap,
1026: mtl_parameters mp
1027: WHERE oap.organization_id = mp.organization_id
1028: AND oap.open_flag = 'N'
1029: AND oap.schedule_close_date <= INV_LE_TIMEZONE_PUB.get_le_day_for_inv_org(Sysdate,oap.organization_id)

Line 1100: FROM ORG_ACCT_PERIODS oap, mtl_parameters mp

1096:
1097: CURSOR OPEN_PERS IS
1098: SELECT oap.organization_id, oap.acct_period_id, oap.period_start_date,
1099: oap.schedule_close_date
1100: FROM ORG_ACCT_PERIODS oap, mtl_parameters mp
1101: WHERE oap.open_flag = 'Y'
1102: AND oap.organization_id = mp.organization_id
1103: AND mp.process_enabled_flag <> 'Y' -- Added for R12 uptake. Ignore all data in process orgs.
1104: AND INV_LE_TIMEZONE_PUB.get_le_day_for_inv_org(Sysdate,oap.organization_id) >= period_start_date