How To Fix GS072 - Formula lines and 'All values' lines cannot contain any variables


SAP Error Message - Details

  • Message type: E = Error

  • Message class: GS - Sets

  • Message number: 072

  • Message text: Formula lines and 'All values' lines cannot contain any variables

  • Show details Hide details
  • What causes this issue?

    You have tried to insert a variable as a from-value or as a to-value in
    a line of a basic set. However, the line is a formula line or an
    'All values' line. You cannot insert a variable in these set lines.

    System Response

    The system rejects your attempt to insert the variable.

    How to fix this error?

    Choose a different line into which you can insert variable.
    If you want to insert the variable in a new line, you can create a new
    blank set line before the current line using the function "Insert line"
    and then insert the variable in this line.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message GS072 - Formula lines and 'All values' lines cannot contain any variables ?

    The SAP error message GS072 indicates that there is an issue with the formula lines or 'All values' lines in a report or query where variables are being used incorrectly. This error typically arises in the context of SAP reporting tools, such as SAP Query or SAP Report Painter/Writer, where certain types of calculations or aggregations are being defined.

    Cause:

    The error occurs because:

    1. Formula Lines: In SAP, formula lines are meant to perform calculations based on fixed values or predefined constants. If you attempt to use variables (like selection criteria or dynamic values) in these lines, the system will throw this error.
    2. 'All Values' Lines: Similar to formula lines, 'All values' lines are designed to aggregate or summarize data without the use of variables. Using variables in these lines is not permitted.

    Solution:

    To resolve the GS072 error, you can take the following steps:

    1. Review the Formula: Check the formula lines in your report or query. Ensure that you are not using any variables. Replace any variables with fixed values or constants.

    2. Adjust 'All Values' Lines: If you have defined any 'All values' lines, ensure that they do not include variables. Modify them to use only static values.

    3. Use Variables Appropriately: If you need to use variables for dynamic calculations, consider using them in a different context, such as in selection criteria or in a different part of the report where they are allowed.

    4. Consult Documentation: Refer to the SAP documentation or help files related to the specific reporting tool you are using. This can provide additional insights into the limitations and correct usage of formulas and variables.

    5. Testing: After making the necessary adjustments, test the report or query again to ensure that the error has been resolved.

    Related Information:

    • SAP Documentation: Check the official SAP Help Portal for detailed information on using formulas and variables in your specific version of SAP.
    • SAP Community: Engage with the SAP Community forums where you can find discussions and solutions related to similar issues faced by other users.
    • Training Resources: Consider training sessions or tutorials on SAP reporting tools to better understand how to structure your reports without encountering such errors.

    By following these steps, you should be able to resolve the GS072 error and successfully run your report or query in SAP.

    • 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's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker