Posts

Showing posts from September, 2017

AP (Payable) Invoice and Payment details Query

Below given query will fetch details for Payable invoice along with its payments details. It will fetch details like invoice number, currency code, date, supplier name, invoice amount, line amount, term name, check number ,PO number, payment details, operating unit and ledger details. Query : select aia.invoice_num,              aia.invoice_currency_code,        aia.invoice_date,        aps.vendor_name,        aila.line_number,        aia.invoice_amount,        aila.amount line_amount,        pha.segment1 po_number,        aila.line_type_lookup_code,        apt.name Term_name,              gcc.concatenated_segments distributed_code_combinations,        aca.check_number,        aipa.amount payment_amount,...

How to use VArray in PLSQL

--Example for VArray------------- ========================================== DECLARE   TYPE abc IS VARRAY(20) OF NUMBER;   v1 abc; BEGIN   v1 := abc();   v1.extend();   v1(1) := 1234;   v1.extend();   v1(2) := 5678;   v1.extend();   v1(3) := 7890;   dbms_output.put_line('FIRST VALUE ' || v1(1));   dbms_output.put_line('SECOND VALUE ' || v1(2));   dbms_output.put_line('THIRD VALUE ' || v1(3)); END; -------- Output -------- FIRST VALUE 1234 SECOND VALUE 5678 THIRD VALUE 7890 =========================================== DECLARE   TYPE abc IS VARRAY(20) OF VARCHAR2(100);   v1 abc; BEGIN   v1 := abc();   v1.extend();   v1(1) := 'DEMO FOR';   v1.extend();   v1(2) := 'VARRAY';   v1.extend();   v1(3) := 'EXAMPLE';   dbms_output.put_line('FIRST VALUE: ' || v1(1));   dbms_output.put_line('SECOND VALUE: ' || v1(2));   dbms_output.put_line('...