Split journal tracing View 4-from payable types invoice payable

Source: Internet
Author: User
From payable invoice (this split is thorough)


Select gjl. je_header_id,

Gjl. je_line_num,

Gjh. je_source,

Gjh. name,

Gjh.doc _ sequence_value,

Pv. vendor_id,

Pv. vendor_name,

Vs. vendor_site_id,

Vs. vendor_site_code vendor_address,

Null gl_desc,

Ai. description invoice_desc, -- invoice description (Abstract)

Gjh. default_1_tive_date, -- GL date

Gcc. segment4, -- Subject

Ael. entered_dr,

Ael. entered_cr,

Decode (ael. entered_cr, null, 'borrower ', 'lender') entered_cls,

'B'

From gl_je_headers_v gjh,

Gl_je_lines_v gjl,

Gl_import_references r,

Ap_ AE _lines_all ael,

Ap_ AE _headers_all aeh,

Ap_accounting_events_all AE,

Ap_invoices_all ai,

Gl_code_combinations_kfv gcc,

Po_vendors pv,

Po_vendor_sites_all

Where gjh. je_source = 'payables'

And gjl. je_header_id = gjh. je_header_id

And gjh. status = 'P'

And r. je_header_id = gjl. je_header_id

And r. je_line_num = gjl. je_line_num

And gjl. code_combination_id = gcc. code_combination_id

And gcc. segment4 = '000000' -- subject section --- ticket payable

And ael. third_party_id = pv. vendor_id

And ael. third_party_sub_id = vs. vendor_site_id

And ael. gl_sl_link_id = r. gl_sl_link_id

And AE. accounting_event_id = aeh. accounting_event_id

And ai. invoice_id = AE. source_id

And AE. source_table = 'ap _ INVOICES'

And aeh. AE _header_id = ael. AE _header_id

And gcc. segment2 = nvl (p_syb_name, gcc. segment2)-Business Department

And pv. vendor_id = nvl (p_vendor_name, pv. vendor_id)

And vs. vendor_site_id = nvl (p_vendor_site, vs. vendor_site_id)

And gjh. period_name between p_begin_date and p_end_date

And r. gl_sl_link_table = 'apache'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.