1 PACKAGE BODY pos_security_profile_utl_pkg AS
2 /*$Header: POSSPUTB.pls 120.4.12010000.2 2009/03/11 09:11:30 vchiranj ship $ */
3
4 PROCEDURE get_current_ous
5 (x_ou_ids OUT nocopy number_table,
6 x_count OUT nocopy NUMBER
7 )
8 IS
9 -- Bug 8257278. Modified the cursor to fetch only active Operating Units.
10 CURSOR l_cur IS
11 SELECT organization_id
12 FROM hr_operating_units
13 WHERE mo_global.check_access(organization_id) = 'Y'
14 AND Nvl(DATE_TO,SYSDATE) >= SYSDATE;
15
16 -- note: we are not checking financial options, payable options, purchasing options here.
17 -- need to think about whether we should
18
19 l_numbers number_table;
20 l_index NUMBER;
21 BEGIN
22 l_index := 0;
23 FOR l_rec IN l_cur LOOP
24 l_index := l_index + 1;
25 l_numbers(l_index) := l_rec.organization_id;
26 END LOOP;
27
28 x_ou_ids := l_numbers;
29 x_count := l_index;
30
31 END get_current_ous;
32
33 END pos_security_profile_utl_pkg;