How To Fix F2159 - City code & is not defined for country & region & (T005G)


SAP Error Message - Details

  • Message type: E = Error

  • Message class: F2 - Master Data Maintenance: Customer, Vendor

  • Message number: 159

  • Message text: City code & is not defined for country & region & (T005G)

  • Show details Hide details


  • Self-Explanatory Message

    Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.

    To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.

    Unfortunately, there isn't any extra information in this error notice.



    What else can you do?

    First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).

    Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.

    You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.


Smart SAP Assistant

  • What is the cause and solution for SAP error message F2159 - City code & is not defined for country & region & (T005G) ?

    The SAP error message F2159 indicates that there is an issue with the city code not being defined for a specific country and region in the system. This error typically arises when you are trying to process a transaction that requires a valid city code, but the system cannot find the corresponding entry in the configuration.

    Cause:

    1. Missing City Code: The city code you are trying to use is not defined in the SAP system for the specified country and region.
    2. Incorrect Configuration: The configuration for the city codes in the T005G table (which stores the city codes and their corresponding country and region) may be incomplete or incorrect.
    3. Data Entry Error: There may be a typo or incorrect entry in the city code or the country/region fields.

    Solution:

    1. Check City Code Configuration:

      • Go to the transaction code SPRO to access the SAP Customizing Implementation Guide.
      • Navigate to Logistics > General > Master Data > Business Partner > Define City Codes.
      • Verify if the city code in question is defined for the specified country and region. If it is not, you will need to add it.
    2. Add Missing City Code:

      • If the city code is missing, you can create a new entry for it. Make sure to enter the correct city name, city code, country, and region.
    3. Verify Data Entry:

      • Double-check the data entry in the transaction that triggered the error. Ensure that the city code, country, and region are entered correctly.
    4. Transport Changes: If you are working in a development environment and have made changes, ensure that these changes are transported to the production environment.

    5. Consult Documentation: If you are unsure about the correct city code or how to configure it, refer to SAP documentation or consult with your SAP Basis or functional team.

    Related Information:

    • T005G Table: This table contains the mapping of city codes to their respective countries and regions. You can view and edit entries in this table using transaction code SE11 (Data Dictionary).
    • Business Partner Master Data: Ensure that the business partner master data is correctly maintained, as it may also reference city codes.
    • SAP Notes: Check for any relevant SAP Notes that may address this specific error or provide additional guidance.

    By following these steps, you should be able to resolve the F2159 error and ensure that the city code is properly defined in your SAP system.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo simplifies finding the accurate answers to SAP message errors. I now use every week. A must have tool for anyone working with SAP! Highly recommended!
Rate 1
Kent Bettisworth
Executive SAP Consultant