26 April 2011

Create PO release during Requisition import without ASL

Here we will see how to create PO release during Requisition import without setting up Sourcing and ASL (Approved Supplier List)

While adding record to PO_REQUISITIONS_INTERFACE_ALL, we need to populate below columns..


AUTOSOURCE_FLAG, 
AUTOSOURCE_DOC_HEADER_ID,
AUTOSOURCE_DOC_LINE_NUM,
DOCUMENT_TYPE_CODE

After this run Requisition Import Program, it will create PO release even ASL is not setup.


Sample SQL for non-inventory item requisition:

      INSERT
      INTO PO_REQUISITIONS_INTERFACE_ALL
        (ORG_ID
        ,DELIVER_TO_LOCATION_ID
        ,DELIVER_TO_REQUESTOR_ID
        ,AUTHORIZATION_STATUS
        ,REQUISITION_TYPE
        ,QUANTITY
        ,UNIT_PRICE
        ,UOM_CODE
        ,CURRENCY_CODE
        ,PREPARER_ID
        ,CHARGE_ACCOUNT_ID
        ,SOURCE_TYPE_CODE
        ,HEADER_DESCRIPTION
        ,DESTINATION_TYPE_CODE
        ,DESTINATION_ORGANIZATION_ID
        ,INTERFACE_SOURCE_CODE
        ,CATEGORY_ID
        ,ITEM_DESCRIPTION
        ,SUGGESTED_VENDOR_ID
        ,SUGGESTED_VENDOR_SITE_ID
        ,AUTOSOURCE_FLAG
        ,AUTOSOURCE_DOC_HEADER_ID
        ,AUTOSOURCE_DOC_LINE_NUM
        ,DOCUMENT_TYPE_CODE
        )
      VALUES
        (l_org_id
        ,l_deliver_to_location_id
        ,l_deliver_to_requestor_id
        ,'APPROVED'
        ,'PURCHASE'
        ,l_quantity
        ,l_unit_price
        ,l_uom_code
        ,l_currency_code
        ,l_preparer_id
        ,l_charge_account_id
        ,'VENDOR'
        ,l_header_description
        ,'EXPENSE' 
        ,l_destination_organization_id
        ,l_interface_source_code
        ,l_category_id
        ,l_item_description
        ,l_suggested_vendor_id
        ,l_suggested_vendor_site_id
        ,'Y'
        ,l_autosource_doc_header_id
        ,l_autosource_doc_line_num
        ,l_document_type_code --'BLANKET'
        ) ;