Infolinks

Friday 20 July 2012

Create An Order via Order Import For A Simple ATO Model

Create An Order via Order Import For A Simple ATO Model

How to create an order via Order Import for a simple ATO model with the following configuration.




For E.g:
ATO Model (542851)

     |- ATO Option Class (542852)

           |--Option Item (152840)

Use the script below to insert the header and lines by populating the order import interface

Now run the Order Import Concurrent program.
INSERT INTO OE_HEADERS_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,creation_date
,created_by
,last_update_date
,last_updated_by
,operation_code
,sold_to_org_id
)
VALUES (
1227 --order_source_id
,'12345' --orig_sys_document_ref
,sysdate --creation_date
,-1 --created_by
,sysdate --last_update_date
,-1 --last_updated_by
,'INSERT' --operation_code
,1005 --sold_to_org_id
);
INSERT INTO OE_LINES_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,orig_sys_line_ref
,inventory_item_id
,ordered_quantity
,operation_code
,created_by
,creation_date
,last_updated_by
,last_update_date
,top_model_line_ref
,item_type_code
)
VALUES (
1227 --order_source_id
,'12345' --orig_sys_document_ref
,'1' --orig_sys_line_ref
,542851 --inventory_item
,1 --ordered_quantity
,'INSERT' --operation_code
,-1 --created_by
,sysdate --creation_date
,-1 --last_updated_by
,sysdate --last_update_date
,'1' --top_model_line_ref
,'MODEL' --item_type_code
);
INSERT INTO OE_LINES_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,orig_sys_line_ref
,inventory_item_id
,ordered_quantity
,operation_code
,created_by
,creation_date
,last_updated_by
,last_update_date
,top_model_line_ref
,link_to_line_ref
,item_type_code
)
VALUES (
1227 --order_source_id
,'12345' --orig_sys_document_ref
,'2' --orig_sys_line_ref
,542852 --inventory_item_id
,1 --ordered_quantity
,'INSERT' --operation_code
,-1 --created_by
,sysdate --creation_date
,-1 --last_updated_by
,sysdate --last_update_date
,'1' --top_model_line_ref
,'1' --link_to_line_ref
,'CLASS' --item_type_code
);
INSERT INTO OE_LINES_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,orig_sys_line_ref
,inventory_item_id
,ordered_quantity
,operation_code
,created_by
,creation_date
,last_updated_by
,last_update_date
,top_model_line_ref
,link_to_line_ref
,item_type_code
)
VALUES (
1227 --order_source_id
,'12345' --orig_sys_document_ref
,'3' --orig_sys_line_ref
,152840 --inventory_item_id
,1 --ordered_quantity
,'INSERT' --operation_code
,-1 --created_by
,sysdate --creation_date
,-1 --last_updated_by
,sysdate --last_update_date
,'1' --top_model_line_ref
,'2' --link_to_line_ref
,'OPTION' --item_type_code
);
commit;

No comments:

Post a Comment