1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Useful R12 Scripts-3

Discussion in 'Oracle Apps Technical' started by Ramji, Feb 3, 2012.

  1. Ramji

    Ramji Forum Guru

    Messages:
    525
    Likes Received:
    177
    Trophy Points:
    1,505
    Location:
    Nomad
    To Find what amount is posted in GL for a CCID

    THE SCRIPT

    Code (SQL):
     SELECT SUM(nvl(accounted_cr,0)), SUM(nvl(accounted_dr,0))
            FROM gl.gl_je_headers h, gl.gl_je_lines l
                WHERE l.je_header_id = h.je_header_id
                                    AND h.je_from_sla_flag='Y'
                                        AND h.je_source = 'Receivables'
                                            AND h.ledger_id =  &ledger_id
                                            AND h.period_name = '&period_name'
                                            AND l.code_combination_id = &ccid;
    THE PARAMETERS
    CCID
    Period

    Enjoy