Do you have any question about this error?
Stop googling SAP errors. Use our Free Essentials plan instead - no credit card needed. Start Now →
Message type: E = Error
Message class: RSWADMDERR2 - BEx Web applications: Error messages for XML/HTML-Parsing
Message number: 140
Message text: Unterminated comment?
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.
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.
RSWADMDERR2140
- Unterminated comment? ?The SAP error message RSWADMDERR2140: Unterminated comment typically occurs in the context of ABAP programming or when working with SAP's data extraction tools. This error indicates that there is a comment in the code that has not been properly closed, leading to a syntax error.
Cause:
- Unclosed Comment Block: In ABAP, comments can be made using
*
for single-line comments or/* ... */
for multi-line comments. If a multi-line comment is started with/*
but not properly closed with*/
, the system will throw this error.- Incorrect Comment Syntax: Using comment syntax incorrectly or mixing comment styles can also lead to this error.
- Code Generation Issues: If the code is generated dynamically or through a tool, there might be a bug in the generation logic that leads to unterminated comments.
Solution:
- Check the Code: Review the ABAP code where the error is reported. Look for any instances of
/*
that do not have a corresponding*/
. Ensure that all comments are properly closed.- Correct Comment Syntax: Make sure that comments are written correctly. For example:
- Single-line comment:
* This is a comment
- Multi-line comment:
/* This is a multi-line comment */
- Use the ABAP Editor: If you are using the ABAP Editor (SE38 or SE80), it may highlight syntax errors. Use this feature to identify and correct the issue.
- Check for Code Generation Issues: If the code is generated, review the generation logic to ensure it correctly handles comments.
Related Information:
By following these steps, you should be able to resolve the RSWADMDERR2140 error and ensure that your ABAP code is syntactically correct.
Get instant SAP help. Sign up for our Free Essentials Plan.
RSWADMDERR2138
Too many '&1' elements
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
RSWADMDERR2137
Tag '&1' does not contain properly commented (