Skip to main content
Question

How is it possible to send a purchase order to a supplyer in csv format ?

  • February 16, 2026
  • 1 reply
  • 29 views

Forum|alt.badge.img+5

Hi,

How is it possible to send a purchase order in csv format to the supplyer of the purchase order when i am printing the purchase order ?

 

1 reply

Forum|alt.badge.img+5
  • Author
  • Sidekick (Customer)
  • February 17, 2026

Is it possible by an event to catch the moment when the printing is done ?

I tried with an event on the creation on this table PURCH_INFO_SERVICES_RPT with this code:

 

set serveroutput on

declare
   LC$PART_NO   PURCHASE_ORDER_LINE_ALL .PART_NO%Type ;

   Cursor C_lig_achat Is
   Select
    p.PART_NO
   From
    PURCHASE_ORDER_LINE_ALL p
                inner join PURCHASE_ORDER_PRINT_REP pp
               on p.order_no = pp.order_no
   Where
    pp.result_key = &NEW:RESULT_KEY
   ;

begin 

CREATE DIRECTORY FICHIERS_OUT AS 'D:\UTL_FILE_DIR\out.csv';

GRANT WRITE ON DIRECTORY FICHIERS_OUT TO PUBLIC;

   Open  C_lig_achat ;
   Fetch C_lig_achat Into LC$PART_NO;
    utl_file.put_line (FICHIERS_OUT,  || ';' LC$PART_NO);
   Close C_lig_achat ;

UTL_FILE.FCLOSE_ALL


end; 

 

but the response is “ORA-00922: missing or invalid option”.