Saturday, September 6, 2014

R12 PO Interface | A script to insert a requisition in the purchasing interface table

here is a script to insert a requisition in the applications using the interface tables.

first you should run this script after modifying your certain data.
then you have to run the request (Requisition Import) from the applications



Regards,
-------------------------Script------------------------------------------
INSERT INTO po_requisitions_interface_all
            (interface_source_code, org_id, destination_type_code,

             authorization_status, preparer_id, charge_account_id,
             source_type_code, unit_of_measure, line_type_id, category_id,
             unit_price, quantity, destination_organization_id,
             deliver_to_location_id, deliver_to_requestor_id, item_description
            )
     VALUES ('IMPORT_EXP',                                  --Interface Source
                          81,                                --Operating Unit
                              'EXPENSE',                    --Destination Type
             'INCOMPLETE',                                            --Status
                          80,         --This comes from per_people_f.person_id of preparer
                             1078,                      --Code Combination ID of charge account
             'VENDOR',                                           --Source Type
                      'Each',                                            --UOM
                             1,                           --Line Type of Goods
                               1123,                         -- Category ID
             12,                                                       --Price
                25,                                                 --quantity
                   83,                --Destination Org ID.
             1362,                                --Deliver to Location ID
                 80,                        --Requester ID
                    'Mahmoud Expense Item'                 --Item Description
            );
            
            commit;