Stop googling SAP errors. Use our Free Essentials plan instead - no credit card needed. Start Now

Close

How To Fix WXP667 - Country key &1 is different from country key &2 (plant &3)


SAP Error Message - Details

  • Message type: E = Error

  • Message class: WXP - Retail Planning

  • Message number: 667

  • Message text: Country key &1 is different from country key &2 (plant &3)

  • Show details Hide details
  • What causes this issue?

    You tried to create an allocation table in manual planning. In doing
    so, you defined the country characteristic as a planning level. Plant
    &V3& was used when the plant list was created for the allocation table.
    A different country is defined in the master record for plant &V3&.

    System Response

    The allocation table was not created.

    How to fix this error?

    Check the master data for the plant. Alternatively, remove the plant
    from your planning session.

    Procedure for System Administrators

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.


    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message WXP667 - Country key &1 is different from country key &2 (plant &3) ?

    Certainly! Here's a detailed explanation of the SAP error message WXP667:


    SAP Error Message: WXP667

    Text:
    Country key &1 is different from country key &2 (plant &3)


    Cause:

    This error occurs when there is a mismatch between the country key assigned to a particular master data object (such as a vendor, customer, or material) and the country key assigned to the plant or organizational unit involved in the transaction.

    Specifically, the system checks the country key of the master data record against the country key of the plant (or sometimes company code or purchasing organization) and finds that they do not match. This inconsistency can cause issues in processes like purchasing, invoicing, or tax determination, where country-specific rules apply.


    Typical Scenarios:

    • When creating or changing purchasing info records, purchase orders, or contracts, the country key of the vendor or material does not match the country key of the plant.
    • When the plant master data is assigned to a different country than the vendor or customer.
    • When the country key in the vendor master (or customer master) is different from the country key of the plant involved in the transaction.

    Solution:

    1. Check the Country Keys:

      • Verify the country key of the plant (transaction code: OX10 or SPRO ? Enterprise Structure ? Definition ? Logistics - General ? Define Plants).
      • Verify the country key of the vendor/customer/material master data (transaction codes: XK03 for vendor, XD03 for customer, MM03 for material).
    2. Align the Country Keys:

      • If the country key of the plant is correct, update the country key in the vendor/customer master data to match the plant's country key.
      • If the vendor/customer is legitimately from a different country, consider whether the plant assignment is correct or if a different plant should be used.
      • Sometimes, the business process requires that the country keys match for tax or legal reasons. Confirm with your business or tax department.
    3. Adjust Master Data or Organizational Assignments:

      • Change the plant assignment if the plant is incorrectly assigned to a country.
      • Change the vendor/customer master data country key if it was entered incorrectly.
    4. Check Customizing Settings:

      • In some cases, the system may enforce country key consistency via configuration or user exits. Review any custom validations or user exits that might enforce this check.

    Additional Information:

    • This error is a consistency check to ensure compliance with country-specific legal and tax regulations.

    • The message parameters:

      • &1 = Country key of the master data (e.g., vendor)
      • &2 = Country key of the plant
      • &3 = Plant code
    • If the business scenario requires cross-country transactions, you may need to review the process design or consult with SAP support for possible configuration adjustments.


    Summary:

    Aspect Details
    Error Country key mismatch between master data and plant
    Cause Different country keys assigned to plant and vendor/customer/material
    Solution Align country keys by updating master data or plant assignment; verify business process
    Transactions to Check OX10 (Plant), XK03 (Vendor), XD03 (Customer), MM03 (Material)

    If you need help with specific transaction steps or further troubleshooting, feel free to ask!

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Sign up for our Free Essentials Plan.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
The AI Support Assistant is great. It provides comprehensive assistance even on the most difficult issues. I highly recommend this service.
Rate 1
John Jordan
SAP Consultant & Author