在Oracle EBS中创建具有多个地址的客户(12.1)

时间:2017-08-10 21:55:19

标签: oracle-ebs

我试图使用Oracle EBS 12.1中的客户接口表(RA_CUSTOMERS_INTERFACE_ALL)来创建一个有多个地址的新客户,而且我没有运气。

此时,我可以创建客户,只创建他们的BILL_TO地址。但是,当我在接口表中为其SHIP_TO和DELIVER_TO地址添加另一个条目时,接口程序拒绝它们,并出现以下错误。

  

DELIVER_TO:BILL_TO_ORIG_ADDRESS_REF应仅定义为   交运地址。您只能为客户Bill-To定义帐户   站点。

     

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 个答案:

没有答案