Vous êtes sur la page 1sur 8

Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

Copyright (c) 2019, Oracle. All rights reserved. Oracle Confidential.

Vision Demo - How To Import Standard Purchase Orders Using the Purchase Document Open Interface
PDOI (12.2 and 12.1.3 Enhanced PDOI) (Doc ID 2014101.1)

In this Document

Goal
Solution

a - Purchase Order with a single line


b. Purchase Order with a single line
c. Purchase Order with a single line
d. Purchase Order with a single line
References

APPLIES TO:

Oracle Purchasing - Version 12.1.3 and later


Information in this document applies to any platform.

GOAL

What are the steps required to import Standard Purchase Orders using the Purchasing Document Open Interface and is there any sample
sample data that can be used in a vision environment ?

This note is designed to explain the steps to import a Standard Purchase Order and to provide sample data from a Vision environment to
facilitate testing.

Please note that the scripts provided here are only sample scripts to introduce users to the functionality. More columns are available for use
in the interface tables and more data can be
imported depending on what is required. Please see the section at the end of the note for more documentation on the import process.

The scope of this Note is defined to importing Standard Purchase Orders. The use of the Import Price Catalog program will not be
demonstrated here.

For Import Price Catalogs - see the following note:

SOLUTION

NOTE: In the images below and/or the attached document, user details / company name / address / email / telephone number
represent a fictitious sample (based upon made up data used in the Oracle Demo Vision instance). Any similarity to actual persons,
living or dead, is purely coincidental and not intended in any manner.Replace this with note box text.

1 - Open SQL Developer and open database connection for the environment to be used for import

WARNING : This step will delete data from the interface tables. Do not do this if others are testing any part of the purchasing process as
these tables are used, not only during import, but during other processes such as autocreate. This step is only to be used during testing in
test environment. Please do not delete interface data in a production environment.

Run the following statements to clear existing data from the interface tables. Please note that this may interfere with other testing.

truncate table po.po_headers_interface;


truncate table po.po_lines_interface;
truncate table po.po_line_locations_interface;

1 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

truncate table po.po_distributions_interface;


truncate table po.po_interface_errors;
commit;

This step can be ignored if required. This step is only included here to clear out any data from the interface tables so as to prevent any
confusion over the results obtained by running the import program.

2. Please use the following insert statements to populate the interface tables depending on the scenario required :

a - Purchase Order with a single line

No data in PO_LINE_LOCATIONS_INTERFACE or PO_DISTRIBUTIONS_INTERFACE:

INSERT INTO po.po_headers_interface


(interface_header_id,
batch_id,
process_code,
action,
org_id,
document_type_code,
currency_code,
agent_id,
vendor_name,
vendor_site_code,
ship_to_location,
bill_to_location,
reference_num)
VALUES
(apps.po_headers_interface_s.NEXTVAL,
2,
'PENDING',
'ORIGINAL',
204,
'STANDARD',
'USD',
57, -- Your buyer id
'Office Supplies, Inc.',
'OFFICESUPPLIES',
'V1- New York City',
'V1- New York City',
'PO_MULTI_SHIPMENT');

INSERT INTO po.po_lines_interface


(interface_line_id,
interface_header_id,
line_num,
shipment_num,
line_type,
item,
uom_code,
quantity,
unit_price,
ship_to_organization_code,
ship_to_location,
line_loc_populated_flag,
need_by_date)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713',
'Ea',
1,
50,
'V1',
'V1- New York City',
'N',
sysdate+1);

Upon submitting the 'Import Standard Purchase Order' concurrent program - the Group Lines parameter was No.

2 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

Also note that the PO_LINES_INTERACE.LINE_LOC_POPULATED_FLAG is set to N - as PO_LINE_LOCATIONS_INTERFACE is not


being populated.

__________________________________________________________________________________________________________________________

b. Purchase Order with a single line

Multiple shipments - PO_LINE_LOCATIONS_INTERFACE - not populated.

INSERT INTO po.po_headers_interface


(interface_header_id,
batch_id,
process_code,
action,
org_id,
document_type_code,
currency_code,
agent_id,
vendor_name,
vendor_site_code,
ship_to_location,
bill_to_location,
reference_num)
VALUES
(apps.po_headers_interface_s.NEXTVAL,
2,
'PENDING',
'ORIGINAL',
204,
'STANDARD',
'USD',
57, -- Your buyer id
'Office Supplies, Inc.',
'OFFICESUPPLIES',
'V1- New York City',
'V1- New York City',
'PO_MULTI_SHIPMENT4');

INSERT INTO po.po_lines_interface


(interface_line_id,
interface_header_id,
line_num,
shipment_num,
line_type,
item,
uom_code,
quantity,
unit_price,
ship_to_organization_code,
ship_to_location,
need_by_date,
line_loc_populated_flag)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713',
'Ea',
1,
50,
'V1',
'V1- New York City',
sysdate+1,
'N');

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_distribution_id,
distribution_num,
quantity_ordered)
VALUES
(po_headers_interface_s.currval,
po.po_lines_interface_s.CURRVAL,
po.po_distributions_interface_s.NEXTVAL,

3 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

1,
1);

INSERT INTO po.po_lines_interface


(interface_line_id,
interface_header_id,
line_num,
shipment_num,
line_type,
item,
uom_code,
quantity,
unit_price,
ship_to_organization_code,
ship_to_location,
need_by_date,
line_loc_populated_flag)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
2,
'Goods',
'CM96713',
'Ea',
2,
50,
'V1',
'V1- New York City',
sysdate+1,
'N');

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_distribution_id,
distribution_num,
quantity_ordered)
VALUES
(po_headers_interface_s.currval,
po.po_lines_interface_s.CURRVAL,
po.po_distributions_interface_s.NEXTVAL,
1,
2);

Upon submitting the 'Import Standard Purchase Order' concurrent program - the Group Lines parameter was Yes, as there are
multiple records inserted for the shipments.
Also note that the PO_LINES_INTERACE.LINE_LOC_POPULATED_FLAG is set to N - as PO_LINE_LOCATIONS_INTERFACE is not
being populated.

__________________________________________________________________________________________________________________________

c. Purchase Order with a single line

Multiple shipments - PO_LINE_LOCATIONS_INTERFACE is populated.

INSERT INTO po.po_headers_interface


(interface_header_id,
batch_id,
process_code,
action,
org_id,
document_type_code,
currency_code,
agent_id,
vendor_name,
vendor_site_code,
ship_to_location,
bill_to_location,
reference_num)
VALUES
(apps.po_headers_interface_s.NEXTVAL,
2,
'PENDING',

4 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

'ORIGINAL',
204,
'STANDARD',
'USD',
57, -- Your buyer id
'Office Supplies, Inc.',
'OFFICESUPPLIES',
'V1- New York City',
'V1- New York City',
'PO_MULTI_SHIPMENT5');

INSERT INTO po.po_lines_interface


(interface_line_id,
interface_header_id,
line_num,
shipment_num,
line_type,
item,
uom_code,
quantity,
unit_price,
ship_to_organization_code,
ship_to_location,
line_loc_populated_flag)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713',
'Ea',
2,
10,
'V1',
'V1- New York City',
'Y');

Insert into PO.PO_LINE_LOCATIONS_INTERFACE


(INTERFACE_LINE_LOCATION_ID,
INTERFACE_HEADER_ID,
INTERFACE_LINE_ID,
SHIPMENT_TYPE,
SHIPMENT_NUM,
SHIP_TO_ORGANIZATION_ID,
SHIP_TO_LOCATION_ID,
NEED_BY_DATE,
PROMISED_DATE,
QUANTITY,
CREATION_DATE)
Values
(po_line_locations_interface_s.nextval,--- INTERFACE_LINE_LOCATION_ID,
po_headers_interface_s.currval,--- INTERFACE_HEADER_ID,
po_lines_interface_s.currval, --- INTERFACE_LINE_ID,
'STANDARD', --- SHIPMENT_TYPE,
1, --- SHIPMENT_NUM,
204,--- SHIP_TO_ORGANIZATION_ID,
211,--- SHIP_TO_LOCATION_ID,
SYSDATE,--- NEED_BY_DATE,
SYSDATE,--- PROMISED_DATE,
1,--- QUANTITY,
SYSDATE);--- CREATION_DATE

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_line_location_id,
interface_distribution_Id,
distribution_num,
quantity_ordered
)
VALUES
(po_headers_interface_s.currval,
po_lines_interface_s.currval,
po_line_locations_interface_s.currval,
po_distributions_interface_s.nextval,
1,
1
);

5 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

Insert into PO.PO_LINE_LOCATIONS_INTERFACE


(INTERFACE_LINE_LOCATION_ID,
INTERFACE_HEADER_ID,
INTERFACE_LINE_ID,
SHIPMENT_TYPE,
SHIPMENT_NUM,
SHIP_TO_ORGANIZATION_ID,
SHIP_TO_LOCATION_ID,
NEED_BY_DATE,
PROMISED_DATE,
QUANTITY,
CREATION_DATE)
Values
(po_line_locations_interface_s.nextval,--- INTERFACE_LINE_LOCATION_ID,
po_headers_interface_s.currval,--- INTERFACE_HEADER_ID,
po_lines_interface_s.currval, --- INTERFACE_LINE_ID,
'STANDARD', --- SHIPMENT_TYPE,
2, --- SHIPMENT_NUM,
204,--- SHIP_TO_ORGANIZATION_ID,
2084,--- SHIP_TO_LOCATION_ID,
SYSDATE,--- NEED_BY_DATE,
SYSDATE,--- PROMISED_DATE,
1,--- QUANTITY,
SYSDATE);--- CREATION_DATE,

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_line_location_id,
interface_distribution_Id,
distribution_num,
quantity_ordered
)
VALUES
(po_headers_interface_s.currval,
po_lines_interface_s.currval,
po_line_locations_interface_s.currval,
po_distributions_interface_s.nextval,
1,
1
);

commit;

Upon submitting the 'Import Standard Purchase Order' concurrent program - the Group Lines parameter was Yes, as there are
multiple records inserted for the shipments.
Also note that the PO_LINES_INTERACE.LINE_LOC_POPULATED_FLAG is set to Y - as PO_LINE_LOCATIONS_INTERFACE is being
populated.

_______________________________________________________________________

d. Purchase Order with a single line

Single shipment - multiple distributions - PO_LINE_LOCATIONS_INTERFACE populated.

INSERT INTO po.po_headers_interface


(interface_header_id,
batch_id,
process_code,
action,
org_id,
document_type_code,
currency_code,
agent_id,
vendor_name,
vendor_site_code,
ship_to_location,
bill_to_location,
reference_num)
VALUES
(apps.po_headers_interface_s.NEXTVAL,
2,

6 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

'PENDING',
'ORIGINAL',
204,
'STANDARD',
'USD',
57, -- Your buyer id
'Office Supplies, Inc.',
'OFFICESUPPLIES',
'V1- New York City',
'V1- New York City',
'PO_MULTI_SHIPMENT6');

INSERT INTO po.po_lines_interface


(interface_line_id,
interface_header_id,
line_num,
shipment_num,
line_type,
item,
uom_code,
quantity,
unit_price,
ship_to_organization_code,
ship_to_location,
line_loc_populated_flag)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713',
'Ea',
3,
10,
'V1',
'V1- New York City',
'Y');

Insert into PO.PO_LINE_LOCATIONS_INTERFACE


(INTERFACE_LINE_LOCATION_ID,
INTERFACE_HEADER_ID,
INTERFACE_LINE_ID,
SHIPMENT_TYPE,
SHIPMENT_NUM,
SHIP_TO_ORGANIZATION_ID,
SHIP_TO_LOCATION_ID,
NEED_BY_DATE,
PROMISED_DATE,
QUANTITY,
CREATION_DATE)
Values
(po_line_locations_interface_s.nextval,--- INTERFACE_LINE_LOCATION_ID,
po_headers_interface_s.currval,--- INTERFACE_HEADER_ID,
po_lines_interface_s.currval, --- INTERFACE_LINE_ID,
'STANDARD', --- SHIPMENT_TYPE,
1, --- SHIPMENT_NUM,
204,--- SHIP_TO_ORGANIZATION_ID,
204,--- SHIP_TO_LOCATION_ID,
SYSDATE,--- NEED_BY_DATE,
SYSDATE,--- PROMISED_DATE,
3,--- QUANTITY,
SYSDATE);--- CREATION_DATE

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_line_location_id,
interface_distribution_Id,
distribution_num,
quantity_ordered
)
VALUES
(po_headers_interface_s.currval,
po_lines_interface_s.currval,
po_line_locations_interface_s.currval,
po_distributions_interface_s.nextval,
1,
1
);

7 of 8 9/30/2019, 6:49 PM
Document 2014101.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_line_location_id,
interface_distribution_Id,
distribution_num,
quantity_ordered
)
VALUES
(po_headers_interface_s.currval,
po_lines_interface_s.currval,
po_line_locations_interface_s.currval,
po_distributions_interface_s.nextval,
2,
1
);

INSERT INTO po.po_distributions_interface


(interface_header_id,
interface_line_id,
interface_line_location_id,
interface_distribution_Id,
distribution_num,
quantity_ordered
)
VALUES
(po_headers_interface_s.currval,
po_lines_interface_s.currval,
po_line_locations_interface_s.currval,
po_distributions_interface_s.nextval,
3,
1
);

commit;

Upon submitting the 'Import Standard Purchase Order' concurrent program - the Group Lines parameter was No, as there are
multiple records inserted for the shipments.
Also note that the PO_LINES_INTERACE.LINE_LOC_POPULATED_FLAG is set to Y - as PO_LINE_LOCATIONS_INTERFACE is being
populated.

REFERENCES

NOTE:1939713.1 - Purchase Order Documents Interface (PDOI) Enhancement Features and Considerations
NOTE:2013280.1 - Importing Multiple Shipments for a Standard Purchase Order (PO) Gives Error: This line cannot be grouped. (VALUE=1)
NOTE:1982357.1 - Import Price Catalogs is Ending in Error - 'Error: This Line Cannot Be Grouped As The Matching Criteria Is Not Satisfied.
(VALUE=2)'
Didn't find what you are looking for?

8 of 8 9/30/2019, 6:49 PM

Vous aimerez peut-être aussi