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!

How to print multiple invoices through form personalization?

Discussion in 'Oracle Apps Technical' started by jagadekara, Oct 7, 2014.

  1. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi All,

    In Ap Invoice Form I have done form personalization which is printing an invoice.
    I have a concurrent program which prints invoice by taking org_id and invoice_num as parameters.
    So Through a procedure I am calling that program by form personalization. It is working fine.

    But now I need to Select two or more invoices at a time and print those one by one.

    How to do that?
     
  2. nilesh.dudhane

    nilesh.dudhane Active Member

    Messages:
    42
    Likes Received:
    2
    Trophy Points:
    135
    Location:
    India
    Hi Jagadekara,

    1. Create new Custom table to store org_id and invoice_num.
    2.When you select multiple Invoices at that time inserting org_id and invoice number one by one in custom table.
    3.After that create another procedure which pass org_id and invoice number(using cursor) as parameter to your procedure which submit the request and call this newly created procedure in form personalization.

    Hope this will work for you.

    Thanks
    Nilesh
     
  3. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    How to insert those in custom table?
     
  4. nilesh.dudhane

    nilesh.dudhane Active Member

    Messages:
    42
    Likes Received:
    2
    Trophy Points:
    135
    Location:
    India
    Hi,

    Create following procedure and call it in personalization to insert invoice num and org id into custom table

    Code (SQL):
    CREATE OR REPLACE PROCEDURE xx_test(invoice_num varchar2) IS
    cursor c1 IS
    SELECT org_id,invoice_num
    FROM ap_invoices_all aia
    WHERE aia.invoice_num=invoice_num;
    BEGIN
    FOR i IN c1 loop
    INSERT INTO xx_test_t(org_id,invoice_num)
    VALUES(i.org_id,i.invoice_num);
    commit;
    END loop;
    exception
    WHEN others THEN
    dbms_output.put_line(sqlerrm);
    END;
    Thanks
    Nilesh
     
  5. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi Nilesh,

    invoice_num is a paremeter which come from invoice form right?

    But I am getting only on einvoice_num even though I select 2 invoices.