0 Replies Latest reply on Mar 31, 2014 10:52 AM by 875689

    Receiving open interface - RCV_ASL_NOT_FOUND

    875689

      Hi all,

       

      I met a problem during creating receiving open interface (rcv_headers_interface, rcv_transactions_interface) for expense item (no part number).  After created po release from expense po line (no item, part number), I created the receipt interface and submitted this one, I got a error message from po_interface_errors like these below:

      • Interface_type: RCV-856
      • Column_name: SUPPLY_AGREEMENT_FLAG
      • Error_message: Supply agreement item  does not have a matching approved supplier list.
      • Error_message_name: RCV_ASL_NOT_FOUND
      • Table_name: RCV_TRANSACTIONS_INTERFACE.

       

      I tried to investigate and saw that just po which had the supply_agreement_flag = 'N' will be submitted successfully. However, I don't know how to ignore the checking this flag in receipt interface.

       

      CREATE OR REPLACE PROCEDURE ES_CREATE_RECEIPT_INTERFACE(p_po_header_id   IN number,

                                                          p_po_line_id     in number,

                                                          p_vendor_site_id in number,

                                                          p_quantity       in number,

                                                          p_ship_to_location_id in number,

                                                          p_po_release_id in number,

                                                          p_group_id OUT number)

          IS

        v_rcv_header_id       number;

        v_rcv_tran_id         number;

        V_VENDOR_ID           number;

        V_PO_LINE_LOCATION_ID number;

        V_PO_DISTRIBUTION_ID  number;

        V_SHIP_TO_LOCATION_ID number;

        v_po_unit_price       number;

        v_rcv_group_id        number;

        v_msg varchar2(3000);

      BEGIN

       

        if p_po_release_id = -1 then

          p_group_id := -1;

          return;

        end if;

        select po.vendor_id

          into V_VENDOR_ID

          from po_headers_all po

         where po.po_header_id = p_po_header_id;

       

        select pll.line_location_id,

               pd.po_distribution_id,

               pll.ship_to_location_id,pll.price_override

          into V_PO_LINE_LOCATION_ID, V_PO_DISTRIBUTION_ID, V_SHIP_TO_LOCATION_ID,v_po_unit_price

          from po_line_locations_all pll, po_distributions_all pd

         where pll.po_release_id = pd.po_release_id

           and pll.po_release_id = p_po_release_id;

       

        select rcv_headers_interface_s.nextval into v_rcv_header_id from dual;

        select rcv_transactions_s.nextval into v_rcv_tran_id from dual;

        select RCV_INTERFACE_GROUPS_S.Nextval into v_rcv_group_id from dual;

          insert into rcv_headers_interface

          (header_interface_id,

           group_id,

           processing_status_code,

           receipt_source_code,

           transaction_type,

           auto_transact_code,

           last_update_date,

           last_updated_by,

           last_update_login,

           creation_date,

           created_by,

           vendor_id,

           vendor_site_id,

           ship_to_organization_id,

           expected_receipt_date,

           employee_id,

           validation_flag)

        values

          (v_rcv_header_id,--header_interface_id

           v_rcv_group_id,--group_id

           'PENDING',--processing_status_code

           'VENDOR',--receipt_source_code

           'NEW',--transaction_type

           'DELIVER',--auto_transact_code

           sysdate,--last_update_date

           1219,--last_updated_by 1219 5209 (JYU)

           NULL,--last_update_login

           sysdate,--creation_date

           1219,--created_by 1219

           v_vendor_id,--vendor_id,v_vendor_id

           p_vendor_site_id,--vendor_site_id

           42,--ship_to_organization_id

           sysdate,--expected_receipt_date

           NULL,--employee_id

           'Y'--validation_flag

           );

        INSERT INTO rcv_transactions_interface

          (interface_transaction_id,

           GROUP_ID,

           last_update_date,

           last_updated_by,

           creation_date,

           created_by,

           last_update_login,

           transaction_type,

           transaction_date,

           processing_status_code,

           processing_mode_code,

           transaction_status_code,

           quantity,

           unit_of_measure,

           auto_transact_code,

           receipt_source_code,

           vendor_id,

           vendor_site_id,

           source_document_code,

           po_header_id,

           po_line_id,

           destination_type_code,

           --deliver_to_location_id,

           header_interface_id,

           validation_flag,

           to_organization_id,

           SHIP_TO_LOCATION_ID,

           PO_RELEASE_ID,

           PO_LINE_LOCATION_ID,

           interface_source_code,

           item_description,

           uom_code,

           employee_id,

           primary_quantity,

           primary_unit_of_measure,

           routing_header_id,

           routing_step_id,

           po_unit_price,

           currency_code,

           currency_conversion_date,

           po_distribution_id,

           inspection_status_code,

           location_id,

           deliver_to_location_id,

           destination_context,

           source_doc_quantity,

           source_doc_unit_of_measure

           )

        VALUES

          (v_rcv_tran_id,--interface_transaction_id

           v_rcv_group_id,--GROUP_ID

           sysdate,--last_update_date

           1219,--last_updated_by 1219

           sysdate,--creation_date

           1219,--created_by 1219

           1219,--last_update_login 1219

           'RECEIVE',--transaction_type

           SYSDATE,--transaction_date

           'PENDING',--processing_status_code

           'BATCH',--processing_mode_code IMMEDIATE

           'PENDING',--transaction_status_code

           p_quantity,--quantity

           'Each',--unit_of_measure

           'DELIVER',--auto_transact_code

           'VENDOR',--receipt_source_code

           v_vendor_id,--vendor_id

           p_vendor_site_id,--vendor_site_id

           'PO',--source_document_code

           P_PO_HEADER_ID,--po_header_id

           P_PO_LINE_ID, --Both values to be changed po_line_id

           'EXPENSE',--destination_type_code RECEIVING

           --32387,

           v_rcv_header_id,--header_interface_id

           'Y',--validation_flag

           42,--to_organization_id

           V_SHIP_TO_LOCATION_ID,--SHIP_TO_LOCATION_ID  V_SHIP_TO_LOCATION_ID

           p_po_release_id,--PO_RELEASE_ID

           v_PO_LINE_LOCATION_ID,--PO_LINE_LOCATION_ID

           'RCV',--interface_source_code

           'expense',--item_description

           'EA',--uom_code

           NULL,--employee_id

           p_quantity,--primary_quantity

           'Each',--primary_unit_of_measure

           null,--routing_header_id

           null,--routing_step_id

           null,--po_unit_price

           null,

           null,--currency_conversion_date

           v_po_distribution_id,--po_distribution_id

           null,--inspection_status_code

           null,--location_id

           V_SHIP_TO_LOCATION_ID,--deliver_to_location_id 3917

           'EXPENSE',--destination_context

           p_quantity,--source_doc_quantity

           'Each'--source_doc_unit_of_measure

           );

       

          p_group_id := v_rcv_group_id;

        RETURN;

      EXCEPTION

        WHEN OTHERS THEN

          /*

          raise_application_error(-20001,

                                  'An error was encountered - ' || SQLCODE ||

                                  ' -ERROR- ' || SQLERRM);

          */

          v_msg := 'An error was encountered - ' || SQLCODE || ' -ERROR- ' ||

                   SQLERRM;

          insert into xx_vms.es_invoice_errors

            (GENERATED_BY,

             PO_HEADER_ID,

             PO_LINE_ID,

             error_message,

             creation_date)

          values

            ('ES_CREATE_RECEIPT_INTERFACE',

             P_PO_HEADER_ID,

             P_PO_LINE_ID,

             v_msg,

             sysdate);

            

          v_rcv_group_id := -1;

          return;

       

      END ES_CREATE_RECEIPT_INTERFACE;

      /

       

       

      Could you help me how I can keep the checking ASL in receipt interface?

       

      Best regards,