http://www.thotasuman.com/
Query for GL Balancing Segment
SELECT application_column_name
FROM fnd_segment_attribute_values , gl_ledgers gl
WHERE id_flex_code = 'GL#'
AND attribute_value = 'Y'
AND segment_attribute_type = 'GL_BALANCING'
AND application_id = 101
AND id_flex_num = gl.chart_of_accounts_id
AND gl.chart_of_accounts_id = <v_chart_of_accounts_id>
AND gl.ledger_id = <v_ledger_id>;
Query for Segment Delimiter
select concatenated_segment_delimiter from
fnd_id_flex_structures, gl_ledgers gl
where id_flex_code ='GL#'
and id_flex_num = gl.chart_of_accounts_id
and gl.ledger_id = <v_ledger_id>;
vg_delimiter := Fnd_Flex_Ext.get_delimiter
(
'SQLGL',
<v_id_flex_code>,
<v_coa_id>
);
Apis for Segment Information
l_id_flex_code VARCHAR2(25) := 'GL#';
l_acct_seg_attr_type VARCHAR2(30) := 'GL_ACCOUNT';
l_bal_seg_attr_type VARCHAR2(30) := 'GL_BALANCING';
l_retval := fnd_flex_apis.get_segment_column
(
x_application_id => l_application_id,
x_id_flex_code => l_id_flex_code,
x_id_flex_num => p_chart_of_accounts_id,
x_seg_attr_type => l_acct_seg_attr_type,
x_app_column_name => p_acct_segment
); /* Gives you Accouting Segment Information*/
l_retval := fnd_flex_apis.get_segment_column
(
x_application_id => l_application_id,
x_id_flex_code => l_id_flex_code,
x_id_flex_num => p_chart_of_accounts_id,
x_seg_attr_type => l_bal_seg_attr_type,
x_app_column_name => p_bal_segment
); /* Gives you Balancing Segment Information*/
l_ret_val := FND_FLEX_APIS.GET_SEGMENT_COLUMN
(
x_application_id => 200,
x_id_flex_code => 'GL#',
x_id_flex_num => 1120,
x_seg_attr_type => 'GL_BALANCING',
x_app_column_name => vg_bal_segment
-Suman
(http://www.thotasuman.com/)
Query for GL Balancing Segment
SELECT application_column_name
FROM fnd_segment_attribute_values , gl_ledgers gl
WHERE id_flex_code = 'GL#'
AND attribute_value = 'Y'
AND segment_attribute_type = 'GL_BALANCING'
AND application_id = 101
AND id_flex_num = gl.chart_of_accounts_id
AND gl.chart_of_accounts_id = <v_chart_of_accounts_id>
AND gl.ledger_id = <v_ledger_id>;
Query for Segment Delimiter
select concatenated_segment_delimiter from
fnd_id_flex_structures, gl_ledgers gl
where id_flex_code ='GL#'
and id_flex_num = gl.chart_of_accounts_id
and gl.ledger_id = <v_ledger_id>;
vg_delimiter := Fnd_Flex_Ext.get_delimiter
(
'SQLGL',
<v_id_flex_code>,
<v_coa_id>
);
Apis for Segment Information
l_id_flex_code VARCHAR2(25) := 'GL#';
l_acct_seg_attr_type VARCHAR2(30) := 'GL_ACCOUNT';
l_bal_seg_attr_type VARCHAR2(30) := 'GL_BALANCING';
l_retval := fnd_flex_apis.get_segment_column
(
x_application_id => l_application_id,
x_id_flex_code => l_id_flex_code,
x_id_flex_num => p_chart_of_accounts_id,
x_seg_attr_type => l_acct_seg_attr_type,
x_app_column_name => p_acct_segment
); /* Gives you Accouting Segment Information*/
l_retval := fnd_flex_apis.get_segment_column
(
x_application_id => l_application_id,
x_id_flex_code => l_id_flex_code,
x_id_flex_num => p_chart_of_accounts_id,
x_seg_attr_type => l_bal_seg_attr_type,
x_app_column_name => p_bal_segment
); /* Gives you Balancing Segment Information*/
l_ret_val := FND_FLEX_APIS.GET_SEGMENT_COLUMN
(
x_application_id => 200,
x_id_flex_code => 'GL#',
x_id_flex_num => 1120,
x_seg_attr_type => 'GL_BALANCING',
x_app_column_name => vg_bal_segment
-Suman
(http://www.thotasuman.com/)
No comments:
Post a Comment