导客户联系人出现错误:在任何指定时间,ARHDQMSS 只允许有一个待定并发请求。

今天通过WEB ADI导客户收货地址时,程序如下:

CREATE OR REPLACE PACKAGE BODY cux_17_cust_site_import_pkg IS

  PROCEDURE OUTPUT_MSG(P_MESSAGE IN VARCHAR2) AS
 
  BEGIN
    DBMS_OUTPUT.PUT_LINE(P_MESSAGE);
  END OUTPUT_MSG;

  PROCEDURE MAIN(p_customer_number     IN VARCHAR2,
                 p_customer_name       IN VARCHAR2,
                 p_ship_location       IN VARCHAR2,
                 p_part_site_name      IN VARCHAR2,
                 p_bill_location       IN VARCHAR2,
                 p_state               IN VARCHAR2, --省
                 p_city                IN VARCHAR2, --市
                 p_county              IN VARCHAR2, --区县
                 p_address1            IN VARCHAR2,
                 p_postal_code         IN VARCHAR2,
                 p_primary_flag        IN VARCHAR2,
                 p_contact_person      IN VARCHAR2,
                 p_contact_phone       IN VARCHAR2,
                 p_carriers            IN VARCHAR2, --承运商
                 p_sub_condition       IN VARCHAR2, --仓储条件
                 p_despatch_des        IN VARCHAR2, --发运说明
                 p_safety_stock        IN NUMBER, --安全库存
                 p_price_list          IN VARCHAR2, --价目表
                 p_org_code            IN VARCHAR2, --提货仓库
                 p_despatch_method     IN VARCHAR2, --发运方法
                 p_freight_cash_method IN VARCHAR2, --运费结算方式
                 P_ATTRIBUTE1          IN NUMBER default null,
                 P_ATTRIBUTE2          IN NUMBER default null,
                 P_ATTRIBUTE3          IN NUMBER default null,
                 P_ATTRIBUTE4          IN NUMBER default null,
                 P_ATTRIBUTE5          IN NUMBER default null,
                 P_ATTRIBUTE6          IN VARCHAR2 default null,
                 P_ATTRIBUTE7          IN VARCHAR2 default null,
                 P_ATTRIBUTE8          IN VARCHAR2 default null,
                 P_ATTRIBUTE9          IN VARCHAR2 default null,
                 P_ATTRIBUTE10         IN VARCHAR2 default null,
                 P_ATTRIBUTE11         IN NUMBER default null,
                 P_ATTRIBUTE12         IN NUMBER default null,
                 P_ATTRIBUTE13         IN NUMBER default null,
                 P_ATTRIBUTE14         IN NUMBER default null,
                 P_ATTRIBUTE15         IN NUMBER default null,
                 P_ATTRIBUTE16         IN VARCHAR2 default null,
                 P_ATTRIBUTE17         IN VARCHAR2 default null,
                 P_ATTRIBUTE18         IN VARCHAR2 default null,
                 P_ATTRIBUTE19         IN VARCHAR2 default null,
                 P_ATTRIBUTE20         IN VARCHAR2 default null) IS
 
    l_msg VARCHAR2(1000);
    L_EXCEPTION EXCEPTION;
 
    l_party_id              number;
    l_orig_system_reference VARCHAR2(200);
    l_cust_account_id       number;
    l_bill_site_use_id      number;
    l_cust_acct_site_id     number;
    l_carriers              VARCHAR2(200);
    l_price_list_id         number;
    l_ORGANIZATION_ID       number;
    l_ship_via              VARCHAR2(200);
    l_freight_term          VARCHAR2(200);
 
    --1.
    P_LOCATION_REC  HZ_LOCATION_V2PUB.LOCATION_REC_TYPE;
    X_LOCATION_ID   NUMBER;
    X_RETURN_STATUS VARCHAR2(2000);
    X_MSG_COUNT     NUMBER;
    X_MSG_DATA      VARCHAR2(2000);
 
    --2.
    P_PARTY_SITE_REC    HZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE;
    X_PARTY_SITE_ID     NUMBER;
    X_PARTY_SITE_NUMBER VARCHAR2(2000);
 
    --3.
    P_CUST_ACCT_SITE_REC HZ_CUST_ACCOUNT_SITE_V2PUB.CUST_ACCT_SITE_REC_TYPE;
    X_CUST_ACCT_SITE_ID  NUMBER;
 
    --4.
    P_CUST_SITE_USE_REC    HZ_CUST_ACCOUNT_SITE_V2PUB.CUST_SITE_USE_REC_TYPE;
    P_CUSTOMER_PROFILE_REC HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
    X_SITE_USE_ID          NUMBER;
 
    --5.
    P_CREATE_PERSON_REC HZ_PARTY_V2PUB.PERSON_REC_TYPE;
    X_PARTY_ID5         NUMBER;
    X_PARTY_NUMBER5     VARCHAR2(2000);
    X_PROFILE_ID        NUMBER;
 
    --6.
    P_ORG_CONTACT_REC HZ_PARTY_CONTACT_V2PUB.ORG_CONTACT_REC_TYPE;
    X_ORG_CONTACT_ID  NUMBER;
    X_PARTY_REL_ID    NUMBER;
    X_PARTY_ID6       NUMBER;
    X_PARTY_NUMBER6   VARCHAR2(2000);
 
    --7.
    P_CR_CUST_ACC_ROLE_REC HZ_CUST_ACCOUNT_ROLE_V2PUB.CUST_ACCOUNT_ROLE_REC_TYPE;
    X_CUST_ACCOUNT_ROLE_ID NUMBER;
 
    --8.
    P_CONTACT_POINT_REC HZ_CONTACT_POINT_V2PUB.CONTACT_POINT_REC_TYPE;
    P_PHONE_REC         HZ_CONTACT_POINT_V2PUB.PHONE_REC_TYPE;
    P_EDI_REC_TYPE      HZ_CONTACT_POINT_V2PUB.EDI_REC_TYPE;
    P_EMAIL_REC_TYPE    HZ_CONTACT_POINT_V2PUB.EMAIL_REC_TYPE;
    P_TELEX_REC_TYPE    HZ_CONTACT_POINT_V2PUB.TELEX_REC_TYPE;
    P_WEB_REC_TYPE      HZ_CONTACT_POINT_V2PUB.WEB_REC_TYPE;
    X_CONTACT_POINT_ID  NUMBER;
 
  BEGIN
    mo_global.init('S');
 
    begin
      select hp.party_id, hca.cust_account_id, hp.orig_system_reference
        into l_party_id, l_cust_account_id, l_orig_system_reference
        from hz_parties hp, hz_cust_accounts hca
       where hp.party_id = hca.party_id
         and hca.account_number = p_customer_number
         and hp.party_name = p_customer_name;
    exception
      when others then
        l_msg := '客户编号或客户名称错误';
        RAISE l_exception;
    end;
 
    begin
      select hcsu.site_use_id, hcsu.cust_acct_site_id
        into l_bill_site_use_id, l_cust_acct_site_id
        from hz_cust_accounts       hca,
             hz_cust_acct_sites_all hcas,
             hz_cust_site_uses_all  hcsu
       where hca.account_number = p_customer_number
         and hca.cust_account_id = hcas.cust_account_id
         and hcas.cust_acct_site_id = hcsu.cust_acct_site_id
         and hcas.org_id = hcsu.org_id
         and hcas.org_id = fnd_profile.VALUE('ORG_ID')
         and hcsu.site_use_code = 'BILL_TO'
         and hcsu.location = p_bill_location;
    exception
      when others then
        l_msg := '该组织下该客户不存在此收单地址编号';
        RAISE l_exception;
    end;
 
    begin
      select pv.vendor_number
        into l_carriers
        from ap_vendors_v pv, po_vendor_sites_all pvs
       where pv.vendor_type_lookup_code = 'CARRIER'
         and pv.vendor_id = pvs.vendor_id
         and pvs.ORG_ID = fnd_profile.value('ORG_ID')
         and pv.vendor_name = p_carriers;
    exception
      when others then
        l_msg := '承运商错误';
        RAISE l_exception;
    end;
 
    begin
      select price_list_id
        into l_price_list_id
        from SO_PRICE_LISTS
       where name = p_price_list;
    exception
      when others then
        l_msg := '价目表错误';
        RAISE l_exception;
    end;
 
    begin
      select ood.ORGANIZATION_ID
        into l_ORGANIZATION_ID
        from org_organization_definitions ood
       where ood.OPERATING_UNIT = fnd_profile.VALUE('ORG_ID')
         and ood.ORGANIZATION_CODE = p_org_code;
    exception
      when others then
        l_msg := '此组织下不存在此提货仓库';
        RAISE l_exception;
    end;
 
    begin
      select lookup_code
        into l_ship_via
        from oe_ship_methods_v omv
       where lookup_type = 'SHIP_METHOD'
         and omv.MEANING = p_despatch_method;
    exception
      when others then
        l_msg := '发运方法错误';
        RAISE l_exception;
    end;
 
    begin
      select sl.LOOKUP_CODE
        into l_freight_term
        from so_lookups sl
       where lookup_type = 'FREIGHT_TERMS'
         and sl.MEANING = p_freight_cash_method;
    exception
      when others then
        l_msg := '运费结算方式错误';
        RAISE l_exception;
    end;
 
    -- 1. Create a physical location
    BEGIN
    
      P_LOCATION_REC.COUNTRY           := 'CN';
      P_LOCATION_REC.STATE             := p_state;
      P_LOCATION_REC.CITY              := p_city;
      P_LOCATION_REC.county            := p_county;
      P_LOCATION_REC.ADDRESS1          := p_address1;
      P_LOCATION_REC.POSTAL_CODE       := p_postal_code;
      P_LOCATION_REC.CREATED_BY_MODULE := 'HZ_CPUI';
      HZ_LOCATION_V2PUB.CREATE_LOCATION('T',
                                        P_LOCATION_REC,
                                        X_LOCATION_ID,
                                        X_RETURN_STATUS,
                                        X_MSG_COUNT,
                                        X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_location_id: ' || X_LOCATION_ID);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := '调用CREATE_LOCATION处理存在(' || X_MSG_COUNT || ')错误:' ||
                 X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
    END;
 
    -- 2. Create a party site using party_id location_id from step 1
    ------------------------------------
    BEGIN
   
      P_PARTY_SITE_REC.PARTY_ID                 := l_party_id;
      P_PARTY_SITE_REC.LOCATION_ID              := X_LOCATION_ID;
      P_PARTY_SITE_REC.party_site_name          := p_part_site_name;
      P_PARTY_SITE_REC.IDENTIFYING_ADDRESS_FLAG := 'Y';
      P_PARTY_SITE_REC.CREATED_BY_MODULE        := 'HZ_CPUI';
      --P_PARTY_SITE_REC.orig_system_reference    := X_LOCATION_ID;
      --P_PARTY_SITE_REC.orig_system              := 'USER_ENTERED';
      HZ_PARTY_SITE_V2PUB.CREATE_PARTY_SITE('T',
                                            P_PARTY_SITE_REC,
                                            X_PARTY_SITE_ID,
                                            X_PARTY_SITE_NUMBER,
                                            X_RETURN_STATUS,
                                            X_MSG_COUNT,
                                            X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_party_site_id: ' || X_PARTY_SITE_ID);
      DBMS_OUTPUT.PUT_LINE('x_party_site_number: ' || X_PARTY_SITE_NUMBER);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := '调用CREATE_PARTY_SITE处理存在(' || X_MSG_COUNT || ')错误:' ||
                 X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
    END;
 
    -- 3. Create an account site using cust_account_id and party_site_id from step 2.
    ------------------------------------
    BEGIN
     
      P_CUST_ACCT_SITE_REC.CUST_ACCOUNT_ID := l_cust_account_id; --<<value for cust_account_id
      P_CUST_ACCT_SITE_REC.PARTY_SITE_ID   := X_PARTY_SITE_ID; --<<value for party_site_id from >
      --P_CUST_ACCT_SITE_REC.LANGUAGE          := 'US';
      P_CUST_ACCT_SITE_REC.CREATED_BY_MODULE := 'HZ_CPUI';
      HZ_CUST_ACCOUNT_SITE_V2PUB.CREATE_CUST_ACCT_SITE('T',
                                                       P_CUST_ACCT_SITE_REC,
                                                       X_CUST_ACCT_SITE_ID,
                                                       X_RETURN_STATUS,
                                                       X_MSG_COUNT,
                                                       X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_cust_acct_site_id: ' || X_CUST_ACCT_SITE_ID);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := '调用CREATE_CUST_ACCT_SITE处理存在(' || X_MSG_COUNT || ')错误:' ||
                 X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
   
    END;
 
    -- 4. Create an account site use using cust_acct_site_id from step 5 and site_use_code='BILL_TO'
    ------------------------------------
    BEGIN
     
      P_CUST_SITE_USE_REC.CUST_ACCT_SITE_ID   := X_CUST_ACCT_SITE_ID; --<<value for   CUST_ACCT_SITE_ID FROM STEP 5 >
      P_CUST_SITE_USE_REC.SITE_USE_CODE       := 'SHIP_TO';
      P_CUST_SITE_USE_REC.LOCATION            := p_ship_location;
      P_CUST_SITE_USE_REC.BILL_TO_SITE_USE_ID := l_bill_site_use_id;
      IF p_primary_flag = '是' then
        P_CUST_SITE_USE_REC.primary_flag := 'Y';
      ELSE
        P_CUST_SITE_USE_REC.primary_flag := 'N';
      END IF;
      P_CUST_SITE_USE_REC.attribute1        := p_sub_condition; --仓储条件
      P_CUST_SITE_USE_REC.attribute2        := p_despatch_des; --发运说明
      P_CUST_SITE_USE_REC.attribute3        := l_carriers; --承运商
      P_CUST_SITE_USE_REC.attribute4        := p_safety_stock; --安全库存量
      P_CUST_SITE_USE_REC.price_list_id     := l_price_list_id; --价目表
      P_CUST_SITE_USE_REC.warehouse_id      := l_ORGANIZATION_ID; --提货仓库
      P_CUST_SITE_USE_REC.ship_via          := l_ship_via; --发运方法
      P_CUST_SITE_USE_REC.freight_term      := l_freight_term; --运费结算方式
      P_CUST_SITE_USE_REC.CREATED_BY_MODULE := 'HZ_CPUI';
      HZ_CUST_ACCOUNT_SITE_V2PUB.CREATE_CUST_SITE_USE('T',
                                                      P_CUST_SITE_USE_REC,
                                                      P_CUSTOMER_PROFILE_REC,
                                                      '',
                                                      '',
                                                      X_SITE_USE_ID,
                                                      X_RETURN_STATUS,
                                                      X_MSG_COUNT,
                                                      X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_site_use_id: ' || X_SITE_USE_ID);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := '调用CREATE_CUST_SITE_USE处理存在(' || X_MSG_COUNT || ')错误:' ||
                 X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
    END;
 
    -- 5. Create a definition contact
    ------------------------------------
    BEGIN
     
      --execute immediate('alter session set sql_trace=true');
      P_CREATE_PERSON_REC.PERSON_PRE_NAME_ADJUNCT := 'MR.';
      P_CREATE_PERSON_REC.PERSON_FIRST_NAME       := p_contact_person;
      P_CREATE_PERSON_REC.PERSON_LAST_NAME        := p_contact_person;
      P_CREATE_PERSON_REC.CREATED_BY_MODULE       := 'HZ_CPUI';
      -- P_CREATE_PERSON_REC.party_rec.orig_system_reference := X_SITE_USE_ID;
      --P_CREATE_PERSON_REC.party_rec.orig_system           := 'USER_ENTERED';
   
      HZ_PARTY_V2PUB.CREATE_PERSON('T',
                                   P_CREATE_PERSON_REC,
                                   X_PARTY_ID5,
                                   X_PARTY_NUMBER5,
                                   X_PROFILE_ID,
                                   X_RETURN_STATUS,
                                   X_MSG_COUNT,
                                   X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_party_id: ' || X_PARTY_ID5);
      DBMS_OUTPUT.PUT_LINE('x_party_number: ' || X_PARTY_NUMBER5);
      DBMS_OUTPUT.PUT_LINE('x_profile_id: ' || X_PROFILE_ID);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := 'CREATE_PERSON处理存在(' || X_MSG_COUNT || ')错误:' ||
                 X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
    END;
 
    -- 6. Create a relation cont-org using party_id from step 5 and party_id exist
    ------------------------------------
    BEGIN
      P_ORG_CONTACT_REC.CREATED_BY_MODULE                := 'HZ_CPUI';
      P_ORG_CONTACT_REC.PARTY_REL_REC.SUBJECT_ID         := X_PARTY_ID5; --<<value for party_id from step 5>
      P_ORG_CONTACT_REC.PARTY_REL_REC.SUBJECT_TYPE       := 'PERSON';
      P_ORG_CONTACT_REC.PARTY_REL_REC.SUBJECT_TABLE_NAME := 'HZ_PARTIES';
      P_ORG_CONTACT_REC.PARTY_REL_REC.OBJECT_ID          := l_party_id; --<<value for party_id from step 2>
      P_ORG_CONTACT_REC.PARTY_REL_REC.OBJECT_TYPE        := 'ORGANIZATION';
      P_ORG_CONTACT_REC.PARTY_REL_REC.OBJECT_TABLE_NAME  := 'HZ_PARTIES';
      P_ORG_CONTACT_REC.PARTY_REL_REC.RELATIONSHIP_CODE  := 'CONTACT_OF';
      P_ORG_CONTACT_REC.PARTY_REL_REC.RELATIONSHIP_TYPE  := 'CONTACT';
      P_ORG_CONTACT_REC.PARTY_REL_REC.START_DATE         := SYSDATE;
      HZ_PARTY_CONTACT_V2PUB.CREATE_ORG_CONTACT('T',
                                                P_ORG_CONTACT_REC,
                                                X_ORG_CONTACT_ID,
                                                X_PARTY_REL_ID,
                                                X_PARTY_ID6,
                                                X_PARTY_NUMBER6,
                                                X_RETURN_STATUS,
                                                X_MSG_COUNT,
                                                X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_org_contact_id: ' || X_ORG_CONTACT_ID);
      DBMS_OUTPUT.PUT_LINE('x_party_rel_id: ' || X_PARTY_REL_ID);
      DBMS_OUTPUT.PUT_LINE('x_party_id: ' || X_PARTY_ID6);
      DBMS_OUTPUT.PUT_LINE('x_party_number: ' || X_PARTY_NUMBER6);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := ' HZ_PARTY_CONTACT_V2PUB.CREATE_ORG_CONTACT API处理存在(' ||
                 X_MSG_COUNT || ')错误:' || X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
   
    END;
 
    -- 7. Create a contact using party_id you get in step 6 and cust_account_id from step 0
    ------------------------------------
    BEGIN
      -- NOTE:
      -- must be unique CUST_ACCOUNT_ID, PARTY_ID,ROLE_TYPE
      -- must be unique CUST_ACCT_SITE_ID, PARTY_ID,ROLE_TYPE 
      P_CR_CUST_ACC_ROLE_REC.PARTY_ID        := X_PARTY_ID6; --<<value for party_id from step 6>
      P_CR_CUST_ACC_ROLE_REC.CUST_ACCOUNT_ID := l_cust_account_id; --<<value for cust_account_id from step 0>
      IF p_primary_flag = '是' then
        P_CR_CUST_ACC_ROLE_REC.PRIMARY_FLAG := 'Y';
      else
        P_CR_CUST_ACC_ROLE_REC.PRIMARY_FLAG := 'N';
      END IF;
      P_CR_CUST_ACC_ROLE_REC.ROLE_TYPE         := 'CONTACT';
      P_CR_CUST_ACC_ROLE_REC.CREATED_BY_MODULE := 'HZ_CPUI';
      P_CR_CUST_ACC_ROLE_REC.cust_acct_site_id := X_CUST_ACCT_SITE_ID; --add by raofengbo
      HZ_CUST_ACCOUNT_ROLE_V2PUB.CREATE_CUST_ACCOUNT_ROLE('T',
                                                          P_CR_CUST_ACC_ROLE_REC,
                                                          X_CUST_ACCOUNT_ROLE_ID,
                                                          X_RETURN_STATUS,
                                                          X_MSG_COUNT,
                                                          X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_cust_account_role_id: ' ||
                           X_CUST_ACCOUNT_ROLE_ID);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
      IF (X_RETURN_STATUS <> 'S') THEN
        l_msg := 'HZ_CUST_ACCOUNT_ROLE_V2PUB.CREATE_CUST_ACCOUNT_ROLE API处理存在(' ||
                 X_MSG_COUNT || ')错误:' || X_MSG_DATA;
        OUTPUT_MSG(X_MSG_DATA);
        RAISE l_exception;
      END IF;
   
    END;
 
    -- 8.
    ------------------------------------------------------
 
    BEGIN
   
      P_CONTACT_POINT_REC.CONTACT_POINT_TYPE := 'PHONE';
      P_CONTACT_POINT_REC.OWNER_TABLE_NAME   := 'HZ_PARTY_SITES'; --to create contact at site level
      P_CONTACT_POINT_REC.OWNER_TABLE_ID     := X_PARTY_SITE_ID; -- value for party_site_id from HZ_PARTY_SITES
      P_CONTACT_POINT_REC.CREATED_BY_MODULE  := 'HZ_CPUI';
      P_PHONE_REC.PHONE_NUMBER               := p_contact_phone;
      P_PHONE_REC.PHONE_LINE_TYPE            := 'GEN';
   
      HZ_CONTACT_POINT_V2PUB.CREATE_CONTACT_POINT('T',
                                                  P_CONTACT_POINT_REC,
                                                  P_EDI_REC_TYPE,
                                                  P_EMAIL_REC_TYPE,
                                                  P_PHONE_REC,
                                                  P_TELEX_REC_TYPE,
                                                  P_WEB_REC_TYPE,
                                                  X_CONTACT_POINT_ID,
                                                  X_RETURN_STATUS,
                                                  X_MSG_COUNT,
                                                  X_MSG_DATA);
   
      DBMS_OUTPUT.PUT_LINE('***************************');
      DBMS_OUTPUT.PUT_LINE('Output information ....');
      DBMS_OUTPUT.PUT_LINE('x_contact_point_id: ' || X_CONTACT_POINT_ID);
      DBMS_OUTPUT.PUT_LINE('x_return_status: ' || X_RETURN_STATUS);
      DBMS_OUTPUT.PUT_LINE('x_msg_count: ' || X_MSG_COUNT);
      DBMS_OUTPUT.PUT_LINE('x_msg_data: ' || X_MSG_DATA);
      DBMS_OUTPUT.PUT_LINE('***************************');
   
    END;
    commit;
  EXCEPTION
    WHEN l_exception THEN
    
      OUTPUT_MSG(l_msg);
      fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
      fnd_message.SET_TOKEN('MESSAGE', substr(l_msg, 1, 100));
      app_exception.raise_exception;
    WHEN OTHERS THEN
     
      fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
      fnd_message.SET_TOKEN('MESSAGE', substr(SQLERRM, 1, 50));
      app_exception.raise_exception;
  END MAIN;

END cux_17_cust_site_import_pkg;

 

当程序执行到第五步时,即导客户收货地址联系人时会报错:

FND CONC-SINGLE PENDING REQUEST N PROGRAM ARHDQMSS  : 在任何指定时间,ARHDQMSS 只允许有一个待定并发请求。

通过一层一层追踪调用的程序包,发现错误出现在验证配置文件(HZ_DQM_ENABLE_REALTIME_SYNC)之后会提交请求:DQM Serial Sync Index Program (DQM 序列同步索引程序)

通过HZ_DQM_ENABLE_REALTIME_SYNC查询matelink,发现以下解决方案:

 

Cause

The issue is caused by the following setup:

Profile HZ: DQM Synchronization Method is not set to No

Currently the HZ_DQM_SYNC_INTERFACE table is always populated whenever you create/update an entity irrespective of HZ_DQM_ENABLE_REALTIME_SYNC profile option.
This profile option is used to control the staging of data
i.e. to raise the DQM real time sync event which does the staging. If you don't want to stage the data each time a record are record is created then his profile option can be set to No to avoid raising the DQM sync event.

Basically there was no way to turn off insertion into the DQM sync interface tables for customers who are not using DQM.

Solution

To implement the solution, please execute the following steps:

1. Go into the responsibility: SystemAdministrator.
2. Navigate to MENUPATH >Profile > System.
3. Query for HZ: DQM Synchronization Method profile. Set the value to Disable.
4. Please retest the issue.
5. If the issue is resolved, please migrate the solution as appropriate to other environments.

In R12, we cannot set the value for 'HZ: DQM Synchronization Method' .

In R12, to implement the solution, please execute the following steps:
1. Go to Trading Community Manager Responsibility
2. Administration -> Relationship -> DQM(Tab) -> Setup -> Synchronisation Method -> DISABLE

Note - If navigating to DQM(tab) errors then run the concurrent program DQM Staging Program with Stage All Data Option.

 

 

你可能感兴趣的:(导客户联系人出现错误:在任何指定时间,ARHDQMSS 只允许有一个待定并发请求。)