Thursday, January 29, 2009

To Extract revenue distribution lines in AR

SELECT distinct c.customer_name, c.customer_number, c.customer_id,
t.customer_trx_id, t.trx_number, ct.NAME invoice_type,
l.line_number, t.org_id, cc.segment1, cc.segment2,
cc.segment3, cc.segment4, cc.segment5, cc.segment6, d.gl_date,
d.cust_trx_line_gl_dist_id, d.code_combination_id,
d.account_class
FROM ra_cust_trx_types_all ct,
ra_customers c,
ra_customer_trx_all t,
ra_customer_trx_lines_all l,
gl_code_combinations cc,
ra_cust_trx_line_gl_dist_all d
WHERE 1 = 1
AND t.cust_trx_type_id = ct.cust_trx_type_id
AND t.bill_to_customer_id = c.customer_id
AND d.customer_trx_id = t.customer_trx_id
AND d.customer_trx_line_id = l.customer_trx_line_id(+)
AND d.code_combination_id = cc.code_combination_id
AND TRUNC (d.gl_date) >= TO_DATE ('01-01-2009', 'DD-MM-YYYY')
AND d.posting_control_id = -3
AND d.account_set_flag = 'N'
AND d.account_class = 'REV'

2 comments:

fried said...

Hi

I read this post two times.

I like it so much, please try to keep posting.

Let me introduce other material that may be good for our community.

Source: Distribution interview questions

Best regards
Henry

Adi's said...

Hi,

What is the significance of the below clause?

Account_set_flag ='N'

Thanks,
Phani