How To Fix OO635 - Error importing classes (source code > 72 characters)


SAP Error Message - Details

  • Message type: E = Error

  • Message class: OO - Class Builder/API

  • Message number: 635

  • Message text: Error importing classes (source code > 72 characters)

  • Show details Hide details
  • What causes this issue?

    You tried to import a piece of source code that is wider than 72
    characters. However, the Class Builder's import function only supports
    source code that is a maximum of 72 characters wide.
    Create appropriate line breaks in the source code in the ABAP Editor;
    then import the local classes.

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.

    System Response

    How to fix this error?

    Procedure for System Administrators


    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message OO635 - Error importing classes (source code > 72 characters) ?

    The SAP error message OO635 indicates that there is an issue with importing classes due to the source code exceeding the maximum allowed length of 72 characters per line. This is a common limitation in ABAP (Advanced Business Application Programming) when dealing with certain types of source code, particularly when importing or exporting classes or methods.

    Cause:

    The error occurs when the source code of a class or method contains lines that exceed the 72-character limit. This can happen if:

    • The code is formatted in a way that long lines are created.
    • There are comments or strings that are too long.
    • The code is being imported from an external source that does not adhere to the ABAP line length restrictions.

    Solution:

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

    1. Check the Source Code: Review the source code of the class or method that is causing the error. Look for any lines that exceed 72 characters.

    2. Break Long Lines: If you find any lines that are longer than 72 characters, break them into multiple lines. In ABAP, you can use the continuation character (&) to split long statements across multiple lines.

      Example:

      DATA(lv_long_string) = 'This is a very long string that exceeds the 72 character limit and needs to be split into multiple lines.'.

      Can be split as:

      DATA(lv_long_string) = 'This is a very long string that exceeds the 72 character limit ' &&
                              'and needs to be split into multiple lines.'.
    3. Check Comments and Documentation: Ensure that comments and documentation within the code do not exceed the character limit. If necessary, split long comments into multiple lines.

    4. Use ABAP Editor: If you are using the ABAP editor (SE38 or SE80), it will typically highlight lines that exceed the limit. Use this feature to identify problematic lines.

    5. Re-import the Class: After making the necessary changes, try to re-import the class or method again.

    Related Information:

    • ABAP Line Length Limitations: ABAP has specific limitations regarding line lengths, especially in older versions. Familiarize yourself with these limitations to avoid similar issues in the future.
    • Code Formatting Best Practices: Adhering to best practices for code formatting can help prevent such errors. This includes keeping lines concise and using comments effectively.
    • SAP Notes and Documentation: Check SAP Notes for any updates or specific guidelines related to the OO635 error or class imports.

    By following these steps, you should be able to resolve the OO635 error and successfully import your classes.

    • 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