2017-08-10 126 views
0

我試圖使用Oracle EBS 12.1中的客戶界面表(RA_CUSTOMERS_INTERFACE_ALL)來創建具有多個地址的新客戶,而且我沒有任何運氣。在Oracle EBS中創建具有多個地址的客戶(12.1)

在這一點上,我可以創建客戶,只有他們的BILL_TO地址。但是,當我爲接口表中的SHIP_TO和DELIVER_TO地址添加另一個條目時,接口程序將拒絕它們,並出現以下錯誤。

DELIVER_TO:BILL_TO_ORIG_ADDRESS_REF應僅用於 定義運地址。您只能爲客戶帳單定義帳戶,以便 網站。

SHIP_TO:您只能爲客戶「收單」網站定義帳戶。

下面是我用來將記錄插入到RA_CUSTOMERS_INTERFACE_ALL和RA_CUSTOMER_PROFILES_INT_ALL表中的代碼示例。其中,我只是試圖將相同的地址與所有三種地址類型相關聯,但理想情況下,我還希望可以選擇使用不同的地址。

-- BILL_TO 
INSERT INTO APPS.RA_CUSTOMERS_INTERFACE_ALL (ORIG_SYSTEM_CUSTOMER_REF, 
             SITE_USE_CODE, 
             ORIG_SYSTEM_ADDRESS_REF, 
             INSERT_UPDATE_FLAG, 
             CUSTOMER_NAME, 
             CUSTOMER_STATUS, 
             PRIMARY_SITE_USE_FLAG, 
             ORIG_SYSTEM_PARENT_REF, 
             LOCATION, 
             ADDRESS1, 
             CITY, 
             STATE, 
             PROVINCE, 
             COUNTY, 
             POSTAL_CODE, 
             COUNTRY, 
             ADDRESS_ATTRIBUTE1, --Customer Classification Code 
             ADDRESS_ATTRIBUTE2, --Sales Channel 
             SITE_USE_ATTRIBUTE_CATEGORY, 
             SITE_USE_ATTRIBUTE1, 
             SITE_USE_ATTRIBUTE4, 
             SITE_USE_ATTRIBUTE5, 
             CUSTOMER_CATEGORY_CODE, 
             LAST_UPDATED_BY, 
             LAST_UPDATE_DATE, 
             CREATED_BY, 
             CREATION_DATE, 
             ORG_ID, 
             GL_ID_REC, 
             GL_ID_REV) 
VALUES (
      'EVAN1', --ORIG_SYSTEM_CUSTOMER_REF 
      'BILL_TO', --SITE_USE_CODE 
      'EVAN1', --ORIG_SYSTEM_ADDRESS_REF 
      'I', --INSERT_UPDATE_FLAG 
      'EVAN TEST CUST 1', --CUSTOMER_NAME 
      'A', --CUSTOMER_STATUS 
      'Y', --PRIMARY_SITE_USE_FLAG 
      'PARENT1', --ORIG_SYSTEM_PARENT_REF 
      'EVAN TEST LOCATION', --LOCATION 
      '123 TEST ST', --ADDRESS1 
      'BEVERLY HILLS', --CITY 
      'CA', --STATE 
      'CA', --PROVINCE 
      'COUNTY OF LOS ANGELES', --COUNTY 
      '90210', --POSTAL_CODE 
      'US', --COUNTRY 
      'End User Customer', --ADDRESS_ATTRIBUTE1 
      'DOMESTIC NON-OEM', --ADDRESS_ATTRIBUTE2 
      'BILL_TO', --SITE_USE_ATTRIBUTE_CATEGORY 
      '1', --SITE_USE_ATTRIBUTE1 
      'No', --SITE_USE_ATTRIBUTE4 
      'No', --SITE_USE_ATTRIBUTE5 
      'CUSTOMER', --CUSTOMER_CATEGORY_CODE 
      1111, --LAST_UPDATED_BY 
      SYSDATE, --LAST_UPDATE_DATE 
      1111, --CREATED_BY 
      SYSDATE, --CREATION_DATE 
      111, --ORG_ID 
      1111, --GL_ID_REC 
      1111 --GL_ID_REV 
); 

-- SHIP_TO 
INSERT INTO APPS.RA_CUSTOMERS_INTERFACE_ALL (ORIG_SYSTEM_CUSTOMER_REF, 
             SITE_USE_CODE, 
             ORIG_SYSTEM_ADDRESS_REF, 
             INSERT_UPDATE_FLAG, 
             CUSTOMER_NAME, 
             CUSTOMER_STATUS, 
             PRIMARY_SITE_USE_FLAG, 
             ORIG_SYSTEM_PARENT_REF, 
             LOCATION, 
             ADDRESS1, 
             CITY, 
             STATE, 
             PROVINCE, 
             COUNTY, 
             POSTAL_CODE, 
             COUNTRY, 
             ADDRESS_ATTRIBUTE1, --Customer Classification Code 
             ADDRESS_ATTRIBUTE2, --Sales Channel 
             SITE_USE_ATTRIBUTE_CATEGORY, 
             SITE_USE_ATTRIBUTE1, 
             SITE_USE_ATTRIBUTE4, 
             SITE_USE_ATTRIBUTE5, 
             CUSTOMER_CATEGORY_CODE, 
             LAST_UPDATED_BY, 
             LAST_UPDATE_DATE, 
             CREATED_BY, 
             CREATION_DATE, 
             ORG_ID, 
             GL_ID_REC, 
             GL_ID_REV) 
VALUES (
      'EVAN1', --ORIG_SYSTEM_CUSTOMER_REF 
      'SHIP_TO', --SITE_USE_CODE 
      'EVAN1', --ORIG_SYSTEM_ADDRESS_REF 
      'I', --INSERT_UPDATE_FLAG 
      'EVAN TEST CUST 1', --CUSTOMER_NAME 
      'A', --CUSTOMER_STATUS 
      'Y', --PRIMARY_SITE_USE_FLAG 
      'PARENT1', --ORIG_SYSTEM_PARENT_REF 
      'EVAN TEST LOCATION', --LOCATION 
      '123 TEST ST', --ADDRESS1 
      'BEVERLY HILLS', --CITY 
      'CA', --STATE 
      'CA', --PROVINCE 
      'COUNTY OF LOS ANGELES', --COUNTY 
      '90210', --POSTAL_CODE 
      'US', --COUNTRY 
      'End User Customer', --ADDRESS_ATTRIBUTE1 
      'DOMESTIC NON-OEM', --ADDRESS_ATTRIBUTE2 
      'SHIP_TO', --SITE_USE_ATTRIBUTE_CATEGORY 
      '1', --SITE_USE_ATTRIBUTE1 
      'No', --SITE_USE_ATTRIBUTE4 
      'No', --SITE_USE_ATTRIBUTE5 
      'CUSTOMER', --CUSTOMER_CATEGORY_CODE 
      1111, --LAST_UPDATED_BY 
      SYSDATE, --LAST_UPDATE_DATE 
      1111, --CREATED_BY 
      SYSDATE, --CREATION_DATE 
      111, --ORG_ID 
      1111, --GL_ID_REC 
      1111 --GL_ID_REV 
); 

--DELIVER_TO 
INSERT INTO APPS.RA_CUSTOMERS_INTERFACE_ALL (ORIG_SYSTEM_CUSTOMER_REF, 
             SITE_USE_CODE, 
             ORIG_SYSTEM_ADDRESS_REF, 
             INSERT_UPDATE_FLAG, 
             CUSTOMER_NAME, 
             CUSTOMER_STATUS, 
             PRIMARY_SITE_USE_FLAG, 
             ORIG_SYSTEM_PARENT_REF, 
             LOCATION, 
             ADDRESS1, 
             CITY, 
             STATE, 
             PROVINCE, 
             COUNTY, 
             POSTAL_CODE, 
             COUNTRY, 
             ADDRESS_ATTRIBUTE1, --Customer Classification Code 
             ADDRESS_ATTRIBUTE2, --Sales Channel 
             SITE_USE_ATTRIBUTE_CATEGORY, 
             SITE_USE_ATTRIBUTE1, 
             SITE_USE_ATTRIBUTE4, 
             SITE_USE_ATTRIBUTE5, 
             CUSTOMER_CATEGORY_CODE, 
             LAST_UPDATED_BY, 
             LAST_UPDATE_DATE, 
             CREATED_BY, 
             CREATION_DATE, 
             ORG_ID, 
             GL_ID_REC, 
             GL_ID_REV) 
VALUES (
      'EVAN1', --ORIG_SYSTEM_CUSTOMER_REF 
      'DELIVER_TO', --SITE_USE_CODE 
      'EVAN1', --ORGI_SYSTEM_ADDRESS_REF 
      'I', --INSERT_UPDATE_FLAG 
      'EVAN TEST CUST 1', --CUSTOMER_NAME 
      'A', --CUSTOMER_STATUS 
      'Y', --PRIMARY_SITE_USE_FLAG 
      'PARENT1', --ORIG_SYSTEM_PARENT_REF 
      'EVAN TEST LOCATION', --LOCATION 
      '123 TEST ST', --ADDRESS1 
      'BEVERLY HILLS', --CITY 
      'CA', --STATE 
      'CA', --PROVINCE 
      'COUNTY OF LOS ANGELES', --COUNTY 
      '90210', --POSTAL_CODE 
      'US', --COUNTRY 
      'End User Customer', --ADDRESS_ATTRIBUTE1 
      'DOMESTIC NON-OEM', --ADDRESS_ATTRIBUTE2 
      'DELIVER_TO', --SITE_USE_ATTRIBUTE_CATEGORY 
      '1', --SITE_USE_ATTRIBUTE1 
      'No', --SITE_USE_ATTRIBUTE4 
      'No', --SITE_USE_ATTRIBUTE5 
      'CUSTOMER', --CUSTOMER_CATEGORY_CODE 
      1111, --LAST_UPDATED_BY 
      SYSDATE, --LAST_UPDATE_DATE 
      1111, --CREATED_BY 
      SYSDATE, --CREATION_DATE 
      111, --ORG_ID 
      1111, --GL_ID_REC 
      1111 --GL_ID_REV 
); 

INSERT INTO APPS.RA_CUSTOMER_PROFILES_INT_ALL (
    INSERT_UPDATE_FLAG, 
    ORIG_SYSTEM_CUSTOMER_REF, 
    CUSTOMER_PROFILE_CLASS_NAME, 
    CREDIT_HOLD, 
    LAST_UPDATED_BY, 
    LAST_UPDATE_DATE, 
    CREATION_DATE, 
    CREATED_BY, 
    ORG_ID 
) VALUES (
    'I', --INSERT_UPDATE_FLAG 
    'EVAN1', --ORGI_SYSTEM_CUSTOMER_REF 
    'MYPROFILE', --CUSTOMER_PROFILE_CLASS_NAME 
    'Y', --CREDIT_HOLD 
    1111, --LAST_UPDATED_BY 
    SYSDATE, --LAST_UPDATE_DATE 
    SYSDATE, --CREATION_DATE 
    1111, --CREATED_BY 
    111 --ORG_ID 
); 

回答

0

因此,經過今天更多的嘗試和錯誤,我才得以實現它。對於非付款人地址,我不得不從客戶界面插入刪除下列:

  • CUSTOMER_STATUS
  • ORIG_SYSTEM_PARENT_REF
  • CUSTOMER_CATEGORY_CODE
  • GL_ID_REC
  • GL_ID_REV

將這些字段設置爲NULL,客戶界面程序就能夠成功附加額外的地址接受我的客戶帳戶。通過修改ORIG_SYSTEM_ADDRESS_REF字段,我可以讓它爲所有三個使用相同的地址/位置,或根據需要爲每種類型創建單獨的地址/位置。

相關問題