Request for an account and Costcenter combination of code id description

Hello

IAM on R12 and I have a requirement for the breakdown of the accounts payable invoice account description, cost center description in the minutes.

I have check the table using the query

Select *.
of fnd_id_flex_segments
where application_id = 101
and id_flex_code = ' GL #

I see that the segment3 = 'Cost center' and segment4 = 'account '.

Please help me with the query to get the account description, costcenter description for each distribution charge.

SELECT aid.invoice_id, gcc.segment3 account, gcc.segment4 costcenter
Of
help ap_invoice_distributions_all,
gl_code_combinations gcc
WHERE aid.dist_code_combination_id = gcc.code_combination_id


Thank you
Munna

Hello Munna.

I use to do it in a simple way. First, find the flex_value_set_id:

Select nom_segment, flex_value_set_id
of fnd_id_flex_segments
where application_id = 101
and id_flex_code = ' GL #

Now change your query:

SELECT aid.invoice_id, gcc.segment3, f1.description, gcc.segment4, f2.description
Of
help ap_invoice_distributions_all,
gl_code_combinations gcc,
fnd_flex_values_vl f1,
fnd_flex_values_vl f2
WHERE aid.dist_code_combination_id = gcc.code_combination_id
and f1.flex_value_set_id =
and f2.flex_value_set_id =
and gcc.segment3 = f1.flex_value
and gcc.segment4 = f2.flex_value

I hope this helps.
Octavio

Tags: Oracle Applications

Similar Questions

Maybe you are looking for