281: , p_curr_precision IN OUT NOCOPY NUMBER
282: , p_num_enabled_segments IN OUT NOCOPY INTEGER)
283: RETURN BOOLEAN IS
284:
285: acct_flexfield fnd_flex_key_api.flexfield_type;
286: acct_structure fnd_flex_key_api.structure_type;
287: acct_segments fnd_flex_key_api.segment_list;
288: statement VARCHAR2 (20);
289:
282: , p_num_enabled_segments IN OUT NOCOPY INTEGER)
283: RETURN BOOLEAN IS
284:
285: acct_flexfield fnd_flex_key_api.flexfield_type;
286: acct_structure fnd_flex_key_api.structure_type;
287: acct_segments fnd_flex_key_api.segment_list;
288: statement VARCHAR2 (20);
289:
290: cannot_find_balancing_segment EXCEPTION;
283: RETURN BOOLEAN IS
284:
285: acct_flexfield fnd_flex_key_api.flexfield_type;
286: acct_structure fnd_flex_key_api.structure_type;
287: acct_segments fnd_flex_key_api.segment_list;
288: statement VARCHAR2 (20);
289:
290: cannot_find_balancing_segment EXCEPTION;
291:
314: ------------------------------------------------------------
315: -- Get flexfield information --
316: ------------------------------------------------------------
317: statement := 'FND FLEX';
318: fnd_flex_key_api.set_session_mode('customer_data');
319:
320: acct_flexfield := fnd_flex_key_api.find_flexfield
321: (appl_short_name => 'SQLGL'
322: , flex_code =>'GL#');
316: ------------------------------------------------------------
317: statement := 'FND FLEX';
318: fnd_flex_key_api.set_session_mode('customer_data');
319:
320: acct_flexfield := fnd_flex_key_api.find_flexfield
321: (appl_short_name => 'SQLGL'
322: , flex_code =>'GL#');
323:
324: acct_structure := fnd_flex_key_api.find_structure
320: acct_flexfield := fnd_flex_key_api.find_flexfield
321: (appl_short_name => 'SQLGL'
322: , flex_code =>'GL#');
323:
324: acct_structure := fnd_flex_key_api.find_structure
325: (flexfield => acct_flexfield
326: , structure_number => p_chart_of_accounts_id);
327:
328: ------------------------------------------------------------
327:
328: ------------------------------------------------------------
329: -- Get number of segments enabled and the segments names. --
330: ------------------------------------------------------------
331: fnd_flex_key_api.get_segments (flexfield => acct_flexfield
332: , structure => acct_structure
333: , enabled_only => TRUE
334: , nsegments => p_num_enabled_segments
335: , segments => acct_segments);