a - PO with a single line :
-
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,
-
1,
-
'PENDING',
-
'ORIGINAL',
-
204,
-
'STANDARD',
-
'USD',
-
57,
-
'Office Supplies, Inc.',
-
'OFFICESUPPLIES',
-
'V1- New York City',
-
'V1- New York City',
-
'TestPO');
-
-
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)
-
VALUES
-
(po_lines_interface_s.nextval,
-
po_headers_interface_s.currval,
-
1,
-
1,
-
'Goods',
-
'CM96713',
-
'Ea',
-
1,
-
50,
-
'V1',
-
'V1- New York City' );
-
-
commit;
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,
1,
'PENDING',
'ORIGINAL', -- Indicates this is a new document
204, -- Org id for operating unit Vision Operations
'STANDARD', -- Indicates a standard PO is being imported
'USD', -- The currency to be used in the PO
57, -- The ID of the buyer
'Office Supplies, Inc.', -- Supplier name
'OFFICESUPPLIES', -- Supplier Site
'V1- New York City', -- Ship to location name
'V1- New York City', -- Bill to location name
'TestPO'); -- Reference that can be tied to the imported PO
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)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713', -- Item to imported on the PO line
'Ea', -- Unit of Measure
1,
50, -- Line price in specified currency
'V1', -- Inventory Organization which will receive the shipment
'V1- New York City' ); -- Ship to location name
commit;
b - PO with one line and one distribution :
-
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,
-
'Office Supplies, Inc.',
-
'OFFICESUPPLIES',
-
'V1- New York City',
-
'V1- New York City',
-
'TestPO');
-
-
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)
-
VALUES
-
(po_lines_interface_s.nextval,
-
po_headers_interface_s.currval,
-
1,
-
1,
-
'Goods',
-
'CM96713',
-
'Ea',
-
1,
-
50,
-
'V1',
-
'V1- New York City' );
-
-
INSERT INTO po.po_distributions_interface
-
(interface_header_id,
-
interface_line_id,
-
interface_distribution_id,
-
distribution_num,
-
quantity_ordered,
-
charge_account_id)
-
VALUES
-
(po_headers_interface_s.currval,
-
po.po_lines_interface_s.CURRVAL,
-
po.po_distributions_interface_s.NEXTVAL,
-
1,
-
1,
-
12975);
-
-
commit;
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',
'TestPO');
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)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713',
'Ea',
1,
50,
'V1',
'V1- New York City' );
INSERT INTO po.po_distributions_interface
(interface_header_id,
interface_line_id,
interface_distribution_id,
distribution_num,
quantity_ordered,
charge_account_id)
VALUES
(po_headers_interface_s.currval,
po.po_lines_interface_s.CURRVAL,
po.po_distributions_interface_s.NEXTVAL,
1,
1,
12975); -- Code Combination ID for the Charge Account to be used on the Distribution
commit;
c - PO with two lines :
-
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,
-
3,
-
'PENDING',
-
'ORIGINAL',
-
204,
-
'STANDARD',
-
'USD',
-
57,
-
'Office Supplies, Inc.',
-
'OFFICESUPPLIES',
-
'V1- New York City',
-
'V1- New York City',
-
'TestPO');
-
-
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)
-
VALUES
-
(po_lines_interface_s.nextval,
-
po_headers_interface_s.currval,
-
1,
-
1,
-
'Goods',
-
'CM96713',
-
'Ea',
-
1,
-
50,
-
'V1',
-
'V1- New York City' );
-
-
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)
-
VALUES
-
(po_lines_interface_s.nextval,
-
po_headers_interface_s.currval,
-
2,
-
1,
-
'Goods',
-
'CM96713',
-
'Ea',
-
1,
-
80,
-
'V1',
-
'V1- New York City' );
-
-
commit;
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,
3,
'PENDING',
'ORIGINAL',
204,
'STANDARD',
'USD',
57,
'Office Supplies, Inc.',
'OFFICESUPPLIES',
'V1- New York City',
'V1- New York City',
'TestPO');
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)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
1,
1,
'Goods',
'CM96713',
'Ea',
1,
50,
'V1',
'V1- New York City' );
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)
VALUES
(po_lines_interface_s.nextval,
po_headers_interface_s.currval,
2,
1,
'Goods',
'CM96713',
'Ea',
1,
80,
'V1',
'V1- New York City' );
commit;
d - PO with one line and two shipments :
-
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,
-
4,
-
'PENDING',
-
'ORIGINAL',
-
204,
-
'STANDARD',
-
'USD',
-
57,
-
'Office Supplies, Inc.',
-
'OFFICESUPPLIES',
-
'V1- New York City',
-
'V1- New York City',
-
'TestPO');
-
-
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,
-
promised_date)
-
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);
-
-
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,
-
promised_date)
-
VALUES
-
(apps.po_lines_interface_s.NEXTVAL,
-
apps.po_headers_interface_s.CURRVAL,
-
1,
-
2,
-
'Goods',
-
'CM96713',
-
'Ea',
-
2,
-
50,
-
'V1',
-
'V1- New York City',
-
sysdate+5);
-
-
commit;
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,
4,
'PENDING',
'ORIGINAL',
204,
'STANDARD',
'USD',
57,
'Office Supplies, Inc.',
'OFFICESUPPLIES',
'V1- New York City',
'V1- New York City',
'TestPO');
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,
promised_date)
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);
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,
promised_date)
VALUES
(apps.po_lines_interface_s.NEXTVAL,
apps.po_headers_interface_s.CURRVAL,
1,
2,
'Goods',
'CM96713',
'Ea',
2,
50,
'V1',
'V1- New York City',
sysdate+5);
commit;
e - PO with one line, one shipment and two distributions :
-
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,
-
5,
-
'PENDING',
-
'ORIGINAL',
-
204,
-
'STANDARD',
-
'USD',
-
57,
-
'Office Supplies, Inc.',
-
'OFFICESUPPLIES',
-
'V1- New York City',
-
'V1- New York City',
-
'TestPO');
-
-
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,
-
promised_date)
-
VALUES
-
(po_lines_interface_s.nextval,
-
po_headers_interface_s.currval,
-
1,
-
1,
-
'Goods',
-
'CM96713',
-
'Ea',
-
5,
-
50,
-
'V1',
-
'V1- New York City',
-
sysdate+1);
-
-
INSERT INTO po.po_distributions_interface
-
(interface_header_id,
-
interface_line_id,
-
interface_distribution_id,
-
distribution_num,
-
quantity_ordered,
-
charge_account_id)
-
VALUES
-
(po_headers_interface_s.currval,
-
po.po_lines_interface_s.CURRVAL,
-
po.po_distributions_interface_s.NEXTVAL,
-
1,
-
1,
-
12975);
-
-
INSERT INTO po.po_distributions_interface
-
(interface_header_id,
-
interface_line_id,
-
interface_distribution_id,
-
distribution_num,
-
quantity_ordered,
-
charge_account_id)
-
VALUES
-
(po_headers_interface_s.currval,
-
po.po_lines_interface_s.CURRVAL,
-
po.po_distributions_interface_s.NEXTVAL,
-
2,
-
4,
-
12976);
-
-
commit