0 Replies Latest reply on Aug 9, 2016 10:20 AM by 2899282

    Additional price break using interface table

    2899282

      Our requirement is to add or create additional price break to an existing quotation lines .

      We have a script that insert records to PO_HEADERS_INTERFACE, PO_LINES_INTERFACE and PO_LINE_LOCATIONS_INTERFACE.

      We can able to create price break but the existing price break disappear.

      Here is our script:

       

      DECLARE

       

      BEGIN

       

      INSERT INTO po_headers_interface

      (interface_header_id

      , batch_id

      , action

      , document_type_code

      ,document_subtype

      , PO_HEADER_ID

      , vendor_id

      , vendor_site_id

      , org_id

      , currency_code

      , agent_id

      , bill_to_location_id

      , approval_status

      , approved_date

      , created_by

      , creation_date

      , last_updated_by

      , last_update_date

      , comments

      --, attribute11

      , quote_warning_delay

      )

      VALUES (po_headers_interface_s.NEXTVAL,7, 'UPDATE', 'QUOTATION',

      'STANDARD'

      ,589153

      , 136447

      , 159020

      , 5595

      , 'AUD'

      , 29242

      , 931039

      , 'APPROVED'

      , SYSDATE

      , -1

      , SYSDATE

      , -1

      , SYSDATE

      , 'test_rfq_for_status'

      --, NULL

      , 10

      );

       

      --COMMIT ;

       

      --1

       

      INSERT INTO po_lines_interface

      (interface_line_id

      , interface_header_id

      ,action

      ,po_header_id

      , line_type

      , line_num

      , item_id

      , item

      , item_description

      , uom_code

      , unit_price

      , created_by

      , creation_date

      , last_updated_by

      , last_update_date

      , line_attribute11

      )

      VALUES (po_lines_interface_s.NEXTVAL

      , po_headers_interface_s.CURRVAL --po_headers_interface_s.NEXTVAL--

      ,'ADD'

      , 589153

      , 'Goods'

      , 2--1

      , 881964--882096

      , '0000000C5171'

      , 'METALISED POLY.  25MFD/250VAC'

      , 'EA'

      , 100

      , -1

      , SYSDATE

      , -1

      , SYSDATE

      , NULL

      );

       

       

      --2

       

      INSERT INTO po_lines_interface

      (interface_line_id

      , interface_header_id

      --,action

      ,po_header_id

      , line_type

      , line_num

      , item_id

      , item

      , item_description

      , uom_code

      , quantity

      , unit_price

      ,shipment_num

      , shipment_type

      , created_by

      , creation_date

      , last_updated_by

      , last_update_date

      , line_attribute11

      )

      VALUES (po_lines_interface_s.NEXTVAL

      , po_headers_interface_s.CURRVAL --po_headers_interface_s.NEXTVAL--

      --,'ORIGINAL'

      , 589153

      , 'Goods'

      , 2--1

      , 881964--882096

      , '0000000C5171'

      , 'METALISED POLY.  25MFD/250VAC'

      , 'EA'

      , 1

      , 10

      ,1

      ,'QUOTATION'

      , -1

      , SYSDATE

      , -1

      , SYSDATE

      , NULL

      );

       

      COMMIT ;

      dbms_output.put_line('Inserted header:'||po_headers_interface_s.CURRVAL);

      dbms_output.put_line('Inserted line :'||po_lines_interface_s.CURRVAL);

      --dbms_output.put_line('Inserted :'||po_line_locations_interface_s.CURRVAL);

       

      EXCEPTION WHEN OTHERS

      THEN

       

      dbms_output.put_line('EXCEPTION:' || SQLERRM) ;

      END;