Pages

Monday, June 19, 2017

Purchasing Import

--// Document Reference (Doc ID 2014101.1) For Assistance Doc ID 1369663.2
--// 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.
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,
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',
'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
);

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,
'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
);

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.

No comments:

Post a Comment