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

Close

How To Fix WER147 - Data reference of type &1 cannot be created


SAP Error Message - Details

  • Message type: E = Error

  • Message class: WER - Messages for the package WER

  • Message number: 147

  • Message text: Data reference of type &1 cannot be created

  • 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 WER147 - Data reference of type &1 cannot be created ?

    The SAP error message WER147: Data reference of type &1 cannot be created typically occurs when there is an attempt to create a data reference (field symbol or data reference variable) for a data type that is not allowed or not supported in the current context.


    Cause

    • The error arises because the system cannot create a data reference for the specified data type.
    • This usually happens when the data type is:
      • A reference type that cannot be referenced again (e.g., a data reference to a data reference).
      • An incompatible or undefined type.
      • A type that does not support referencing, such as certain built-in types or complex types that are not allowed to be referenced.
    • It can also occur if the data type name passed to the CREATE DATA statement or the GET REFERENCE OF statement is incorrect or not fully qualified.

    Typical Scenario

    Example ABAP code that might cause this error:

    DATA: ref TYPE REF TO data,
          ref_ref TYPE REF TO REF TO data.
    
    CREATE DATA ref TYPE 'REF TO data'. " This is invalid and causes WER147

    Or:

    DATA: ref TYPE REF TO data.
    
    CREATE DATA ref TYPE 'REF TO REF TO data'. " Trying to create a reference to a reference

    Solution

    1. Check the data type you are trying to create a reference for:

      • Ensure that the data type is a valid, non-reference type.
      • You cannot create a data reference to a reference type (i.e., no "REF TO REF TO" types).
    2. Correct the type name:

      • Make sure the type name passed to CREATE DATA or GET REFERENCE OF is correct and fully qualified if necessary.
      • For example, use 'I' for integer, 'C' for character, or a valid structure name.
    3. Avoid creating references to references:

      • If you need to reference a data reference, reconsider your design.
      • Usually, a single level of referencing is sufficient.
    4. Use appropriate syntax:

      • For example, to create a data reference to an integer:

        DATA: ref TYPE REF TO data.
        CREATE DATA ref TYPE i.
    5. If you want to create a reference to a reference, redesign your data model.


    Related Information

    • ABAP Documentation on Data References:
      SAP Help Portal: Data References

    • SAP Notes and Community:
      Search for WER147 in SAP Notes or SAP Community for specific cases and patches.

    • Common ABAP Statements Involved:

      • CREATE DATA
      • GET REFERENCE OF
      • Field symbols (FIELD-SYMBOLS <fs> TYPE ...)

    Summary

    Aspect Details
    Error WER147: Data reference of type &1 cannot be created
    Cause Attempt to create a data reference for an invalid or unsupported data type (e.g., reference to reference)
    Solution Use valid, non-reference data types; avoid references to references; verify type names
    Related ABAP data references, CREATE DATA statement, SAP Notes, SAP Community

    If you provide the exact code snippet causing the error, I can help you pinpoint the issue more precisely.

    • 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