我正在尝试使用 Oracle EBS 12.1 中的客户接口表 (RA_CUSTOMERS_INTERFACE_ALL) 创建具有多个地址的新客户,但我没有任何运气。
此时,我可以创建客户并且只创建他们的 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
);