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

Close

How To Fix ACI_COMPILER_GENERIC070 - Missing end statement, expected '&1' was '&2'.


SAP Error Message - Details

  • Message type: E = Error

  • Message class: ACI_COMPILER_GENERIC - EXPERIMENTAL, DON'T USE (ACI: Generic Compiler Messages)

  • Message number: 070

  • Message text: Missing end statement, expected '&1' was '&2'.

  • 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 ACI_COMPILER_GENERIC070 - Missing end statement, expected '&1' was '&2'. ?

    The SAP error message ACI_COMPILER_GENERIC070 indicates that there is a syntax error in your ABAP code, specifically that the compiler expected an "end statement" but found something else. The message typically follows this format:

    • Expected: The statement that the compiler was expecting (denoted as '&1').
    • Found: The statement that was actually found (denoted as '&2').

    Cause

    This error usually occurs due to one of the following reasons:

    1. Missing End Statement: You may have forgotten to include an END statement for a control structure (like IF, CASE, LOOP, etc.).
    2. Mismatched Statements: There might be a mismatch between the opening and closing statements. For example, you might have an IF statement without a corresponding ENDIF.
    3. Incorrect Syntax: There could be a syntax error in the code that leads the compiler to misinterpret the structure of your code.
    4. Commented Code: Sometimes, if you have commented out parts of your code incorrectly, it can lead to confusion in the compiler.

    Solution

    To resolve this error, you can follow these steps:

    1. Check the Code Structure: Review the code around the line where the error occurs. Ensure that all control structures have their corresponding end statements.

      • For example, if you have an IF statement, make sure there is an ENDIF.
      • If you have a LOOP, ensure there is an ENDLOOP.
    2. Look for Typos: Check for any typos or syntax errors in your code that might cause the compiler to misinterpret the structure.

    3. Use the ABAP Editor: Utilize the ABAP editor's syntax check feature (by pressing Ctrl + F2 or using the menu option) to identify the exact location of the error.

    4. Commenting: If you have commented out code, ensure that the comments are correctly formatted and do not interfere with the code structure.

    5. Review Nested Structures: If you have nested control structures, ensure that each nested structure is properly closed.

    Related Information

    • ABAP Documentation: Refer to the official SAP ABAP documentation for detailed information on control structures and syntax rules.
    • Debugging Tools: Use debugging tools available in the ABAP Workbench to step through your code and identify where the error might be occurring.
    • Community Forums: If you are unable to resolve the issue, consider reaching out to SAP community forums or support for additional assistance.

    By carefully reviewing your code and ensuring that all structures are properly closed, you should be able to resolve the ACI_COMPILER_GENERIC070 error.

    • 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