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

Close

How To Fix VG012 - ISO country key & is not assigned (header).


SAP Error Message - Details

  • Message type: E = Error

  • Message class: VG - EDI Messages in SD

  • Message number: 012

  • Message text: ISO country key & is not assigned (header).

  • Show details Hide details
  • What causes this issue?

    In the header of the <GL:EDI>EDI</>-intermediate document
    <GL:Intermediate_Document>(intermediate document)</> there is an ISO
    country code which is not maintained in the global parameters for the
    respective country.

    How to fix this error?

    If the ISO country code should be supplied, make the appropriate entry.
    Otherwise you should find out how the unauthorized value got into the
    intermediate document.
    If you have the authorization, change the ISO country code as required
    in <GL:Customizing>Customizing</>.
    If not, inform your system administrator.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message VG012 - ISO country key & is not assigned (header). ?

    SAP Error Message:
    VG012 - ISO country key & is not assigned (header).


    Cause:

    This error occurs when the ISO country key (country code) entered in the document header is not assigned or maintained in the system for the relevant organizational data or transaction. Essentially, SAP expects a valid and assigned ISO country key for the transaction, but it is missing or incorrectly configured.


    Explanation:

    • The ISO country key is a standardized two-character country code (e.g., DE for Germany, US for United States).
    • SAP uses this key in various master data and transactional data to identify countries.
    • If the country key is not assigned or maintained properly in the system, SAP cannot process the document and throws this error.
    • This often happens in logistics documents like deliveries, shipments, or sales orders where the country key is mandatory.

    Common Scenarios:

    • The country key is missing in the customer or vendor master data.
    • The country key is not assigned in the relevant customizing settings.
    • The country key is entered incorrectly or does not exist in the system.
    • The organizational unit (e.g., sales area, plant) does not have the country key assigned.

    Solution:

    1. Check the Country Key in the Document:

      • Verify the country key entered in the document header (e.g., sales order, delivery).
      • Ensure it is a valid ISO country code.
    2. Maintain Country Key in Master Data:

      • Check customer/vendor master data for the country key.
      • Use transaction codes like XD03 (Display Customer) or XK03 (Display Vendor) to verify.
    3. Assign Country Key in Customizing:

      • Go to SPRO ? Logistics Execution ? Shipping ? Basic Shipping Functions ? Define Country Keys.
      • Ensure the country key is defined and active.
    4. Assign Country Key to Organizational Units:

      • Check if the country key is assigned to the relevant organizational units (e.g., sales area, plant).
      • This can be done in customizing under relevant IMG nodes depending on the module.
    5. Check for User Exits or Enhancements:

      • Sometimes custom code may validate or overwrite country keys.
      • Review any user exits or BADIs related to country key assignment.
    6. Re-enter or Correct the Country Key:

      • If the country key was entered manually, correct it to a valid ISO code.

    Additional Information:

    • The ISO country key is maintained in table T005.
    • You can check valid country keys using transaction SE16 or SE16N on table T005.
    • If the country key is missing in T005, it needs to be added via customizing.
    • This error is common in shipping and sales documents where country information is mandatory for legal or logistical reasons.

    Summary:

    Aspect Details
    Error VG012 - ISO country key & is not assigned (header)
    Cause Missing or unassigned ISO country key in document header or master data
    Solution Verify and maintain correct ISO country key in master data and customizing
    Key Tables T005 (Country Codes)
    Transactions XD03, XK03, SE16N, SPRO (Customizing)

    If you need further assistance, please provide the transaction or document type where the error occurs, and I can help with more specific steps.

    • 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