4 Replies Latest reply on Jan 17, 2010 10:21 PM by 580352

    How can we import po distributions by using po_distributions_interface ?

    Cagri EGEMEN
      Hi we are trying to import distributions of standard purchase order. We are trying to create distributions just because copy quotation functionallity does not provide us po distribution lines. We want to create line distributions by interface.

      Thanks in advance

      Cagri
        • 1. Re: How can we import po distributions by using po_distributions_interface ?
          rioman
          Hi,

          You can find information about the PO distributions interface in [this manual|http://download.oracle.com/docs/cd/B25284_01/current/acrobat/115mfgapi.zip]. Hope it helps.

          Regards.
          • 2. Re: How can we import po distributions by using po_distributions_interface
            580352
            Hi Cagri,

            Here is a sample script from metalink, please refer note 296286.1 [296286.1|https://support.oracle.com:443/CSP/ui/flash.html#tab=KBHome(page=KBHome&id=()),(page=KBNavigator&id=(bmDocTitle=How%20To%20Import%20Standard%20PO%20With%20Multiple%20Shipments%20And%20Distributions&from=BOOKMARK&bmDocID=296286.1&viewingMode=1143&bmDocType=HOWTO&bmDocDsrc=DOCUMENT))] for more details.


            Here is an example to populate multiple shipments and distributions.
            This example creates one line , two shipments, one shipment has two distributions.

            --------------------------------------------------
            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,
            9,
            'PENDING',
            'ORIGINAL',
            204, -- Your operating unit id
            'STANDARD',
            'USD', -- Your currency code
            57, -- Your buyer id
            'Office Supplies, Inc.',
            'OFFICESUPPLIES',
            'V1- New York City', -- Your ship to
            'V1- New York City', -- Your bill to
            'TEST3') -- Any reference num
            /

            INSERT INTO po.po_lines_interface
            (interface_line_id,
            interface_header_id,
            line_num,
            shipment_num,
            line_type,
            item,
            uom_code,
            quantity,
            unit_price,
            promised_date,
            ship_to_organization_code,
            ship_to_location)
            VALUES
            (po_lines_interface_s.nextval,
            po_headers_interface_s.currval,
            1,
            1,
            'Goods',
            'CM11062',
            'Ea',
            1,
            17.50,
            '10-JAN-2005',
            'V1',
            'V1- New York City' )
            /
            INSERT INTO po.po_distributions_interface
            (interface_header_id,
            interface_line_id,
            interface_distribution_id,
            distribution_num,
            quantity_ordered,
            charge_account_id)
            VALUES
            (po_headers_interface_s.currval,
            po.po_lines_interface_s.CURRVAL,
            po.po_distributions_interface_s.NEXTVAL,
            1,
            1,
            12975) -- Your Charge Account Id
            /
            INSERT INTO po.po_lines_interface
            (interface_line_id,
            interface_header_id,
            line_num,
            shipment_num,
            line_type,
            item,
            uom_code,
            quantity,
            unit_price,
            promised_date,
            ship_to_organization_code,
            ship_to_location)
            VALUES
            (apps.po_lines_interface_s.NEXTVAL,
            apps.po_headers_interface_s.CURRVAL,
            1,
            2,
            'Goods',
            'CM11062', -- Your item
            'Ea',
            2,
            17.50,
            '10-JAN-2005',
            'V1',
            'V1- New York City')
            /
            INSERT INTO po.po_distributions_interface
            (interface_header_id,
            interface_line_id,
            interface_distribution_id,
            distribution_num,
            quantity_ordered,
            charge_account_id)
            VALUES
            (po.po_headers_interface_s.CURRVAL,
            po.po_lines_interface_s.CURRVAL,
            po.po_distributions_interface_s.NEXTVAL,
            1,
            1,
            12975) -- Your charge account id
            /
            INSERT INTO po.po_distributions_interface
            (interface_header_id,
            interface_line_id,
            interface_distribution_id,
            distribution_num,
            quantity_ordered,
            charge_account_id)
            VALUES
            (po.po_headers_interface_s.CURRVAL,
            po.po_lines_interface_s.CURRVAL,
            po.po_distributions_interface_s.NEXTVAL,
            2,
            1,
            12975) -- Your charge account id
            /

            Thanks
            Shailendra
            • 3. Re: How can we import po distributions by using po_distributions_interface
              Cagri EGEMEN
              Hi Shailendra,

              First of all thank you for your updates.

              We can now create a po with the script you have referred. But is it possible to create distributions of one po which has header and line informations ?

              Thanks in advance

              Cagri
              • 4. Re: How can we import po distributions by using po_distributions_interface
                580352
                Hi Cagri,

                Do you mean, you want to create/add new line/distribution to the existing PO using this interface?

                The answer is yes you can.

                Please refer to metalink note for example: [ID 395234.1|https://support.oracle.com:443/CSP/ui/flash.html#tab=KBHome(page=KBHome&id=()),(page=KBNavigator&id=(viewingMode=1143&bmDocType=HOWTO&bmDocDsrc=DOCUMENT&bmDocTitle=Is%20It%20Possible%20To%20Add%20New%20Lines%20To%20A%20Standard%20Purchase%20Order%20Via%20Pdoi%20?&from=BOOKMARK&bmDocID=395234.1))]

                Thanks
                Shailendra