My Oracle Support Banner

PO Rescheduled From Supply Planning Work Area Failed with Error ORA-06531: Reference to uninitialized collection (Doc ID 2603063.1)

Last updated on MARCH 02, 2023

Applies to:

Oracle Purchasing - Version 12.2.8 and later
Information in this document applies to any platform.

Symptoms

On : 12.2 version, Data Collections

In Oracle Purchasing, reschedule API failed with error, ORA-06531 : reference to uninitialized collection.

ERROR
-----------------------
ORA-06531: Reference to uninitialized collection

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1) Create a PO with a need by date and promised date and approve it.

2)The need by date and promised dates are given different.
 
3) Change the need by date to promised date and  checked if the promised date timestamp is modified, via the
  reschedule API. So call the reschedule API version 4 via the  stand alone procedure call from the sql explorer.

For Example :

  declare
  bool boolean;
  l_error po_tbl_varchar2000;
  newNeedBy po_tbl_date:=po_tbl_date();
  oldNeedBy po_tbl_date;
  line_id po_tbl_number;
  shipment_no po_tbl_number;
  firm_status po_tbl_varchar25;
  clear_promised_date po_tbl_varchar1;
  l_date1 date;
  l_date2 date;
 
  begin
 
  select NEED_BY_DATE into l_date2 from po_line_locations_all where oldNeedBy := po_tbl_date(l_date2);
 
  newNeedBy := po_tbl_date(sysdate+20);
 
  line_id := po_tbl_number(&xxxxxx);---po_line_id
  shipment_no:= po_tbl_number(1);
  firm_status:= po_tbl_varchar25('Y');
  clear_promised_date:= po_tbl_varchar1('N');
 
  bool:=po_reschedule_pkg.RESCHEDULE(
  oldNeedBy, --x_need_by_dates_old
  newNeedBy, --x_need_by_dates
  &yyyyy,--x_po_header_id
  line_id,--x_po_line_ids
  &zzzzzz,--x_supply_number
  shipment_no,--x_shipment_nums
  null,--p_estimated_pickup_dates
  null,--p_ship_methods
  firm_status,--x_shipment_firm_status
  clear_promised_date,--x_clear_promised_date
  l_error--x_error_message
  );
 
  end;
 
 4) Calling the Reschedule API version 4 via the stand alone procedure call


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.