Saturday, September 6, 2014

ONT Interface: Insert Sales Order using the interface tables in the Order Management Module

--This is an example from a real project, please change the values below to fit your requirements

INSERT INTO oe_headers_iface_all
            (order_source_id, orig_sys_document_ref, order_source, org_id,
             ordered_date, order_type, salesrep, customer_number, created_by,
             creation_date, last_updated_by, last_update_date
            )

    VALUES (0,                                              --order_source_id
               'Integrition_Order7',                   --orig_sys_document_ref
                                    'Online',                   --order_source
                                             101,                     --org_id
             SYSDATE,                                           --ordered_date
                     'Corporate Sales Order',                     --order_type
                                             'No Sales Credit',     --salesrep
                                                               '1284',
                                                                      --customer_no
             -1,
             --created_by
             SYSDATE,                                          --creation_date
                     -1,
                        --last_updated_by
                        SYSDATE                             --last_update_date
            );
INSERT INTO oe_lines_iface_all
            (order_source_id, orig_sys_document_ref, org_id, line_number,
             orig_sys_line_ref, line_type, item_type_code, inventory_item,
             ordered_quantity, order_quantity_uom, created_by, creation_date,
             last_updated_by, last_update_date
            )
     VALUES (0,                                       --      ORDER_SOURCE_ID,
               'Integrition_Order7',                  --ORIG_SYS_DOCUMENT_REF,
                                    101,                             --ORG_ID,
                                        1,                      --LINE_NUMBER,
             1,                                            --ORIG_SYS_LINE_REF
               'Order Lines',                                     --LINE_TYPE,
                             'STANDARD',                     --ITEM_TYPE_CODE,
                                        '500213',            --INVENTORY_ITEM,
             1,                                            --ORDERED_QUANTITY,
               'Ea',                                     --ORDER_QUANTITY_UOM,
                    -1,                                          --created_by,
                       SYSDATE,                        --       creation_date,
             -1,                                           -- last_updated_by,
                SYSDATE
            -- last_update_date
            );
COMMIT ;