Do you have any question about this error?
Message type: E = Error
Message class: ACM_SYNTAX - ACM: DCL Syntax Error Messages
Message number: 079
Message text: Comparison between numerical and character-like types not allowed
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.
ACM_SYNTAX079
- Comparison between numerical and character-like types not allowed ?The SAP error message ACM_SYNTAX079 indicates that there is an attempt to compare numerical and character-like types in your ABAP code, which is not allowed. This error typically arises when you are trying to perform a comparison operation (like
=
,<>
,<
,>
, etc.) between variables or fields of different data types—specifically, between a numeric type (likeI
,F
, orP
) and a character-like type (likeC
orN
).Cause:
- Data Type Mismatch: The most common cause is that one of the operands in the comparison is a numeric type while the other is a character type.
- Implicit Type Conversion: ABAP does not automatically convert between numeric and character types for comparison, which leads to this error.
- Incorrect Variable Declaration: Sometimes, the variables may not be declared correctly, leading to type mismatches.
Solution:
To resolve this error, you need to ensure that both operands in the comparison are of the same data type. Here are some steps you can take:
Check Data Types: Review the data types of the variables involved in the comparison. You can use the ABAP Data Dictionary or check the variable declarations in your code.
Explicit Conversion: If you need to compare a numeric value with a character-like value, you can convert one of the values to match the other type. For example:
- If you are comparing a numeric variable with a character variable, convert the character variable to a numeric type using
CONVERT
orCAST
functions.- If you are comparing a numeric variable with a character-like variable, convert the numeric variable to a character type using
CONCATENATE
orWRITE
statements.Example:
DATA: lv_num TYPE i, lv_char TYPE c LENGTH 10. lv_num = 100. lv_char = '100'. " Correct comparison IF lv_num = lv_char. " Do something ENDIF.
In this case, you might want to convert
lv_char
to a numeric type before comparison.Use Appropriate Functions: Use functions like
CONCATENATE
,WRITE
, orCAST
to ensure that the types match before performing the comparison.Debugging: If you are unsure where the error is occurring, use debugging tools to step through your code and inspect the types of the variables at runtime.
Related Information:
By ensuring that the data types match before performing comparisons, you can avoid the ACM_SYNTAX079 error in your ABAP programs.
Get instant SAP help. Start your 7-day free trial now.
ACM_SYNTAX078
Entity &1 does not have a parameter &2
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
ACM_SYNTAX077
Invalid aspect &1
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
ACM_SYNTAX080
&1 is longer than &2
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
ACM_SYNTAX081
Aspects not allowed in path filters
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.