Do you have any question about this error?
Message type: E = Error
Message class: D0 - Machine-level ABAP/4 Dictionary texts (e.g. debugging)
Message number: 704
Message text: Standards violation: Name contains at least one hyphen
The object name may not contain any hyphens according to the naming
convention.
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Remove the hyphen from the object name. If the hyphen was used on
purpose to improve readability of the name, replace it with
an underscore.
Error message extract from SAP system. Copyright SAP SE.
D0704
- Standards violation: Name contains at least one hyphen ?The SAP error message D0704, which states "Standards violation: Name contains at least one hyphen," typically occurs when you are trying to create or modify an object (like a variable, function, or class) in ABAP (Advanced Business Application Programming) that includes a hyphen (-) in its name. In ABAP, certain naming conventions are enforced, and the use of hyphens is not allowed in object names.
Cause:
The primary cause of this error is the inclusion of a hyphen in the name of an object you are trying to create or modify. This is against the naming conventions defined by SAP for ABAP programming.
Solution:
To resolve this error, you should rename the object to remove any hyphens. Here are some steps you can follow:
Identify the Object: Determine which object is causing the error. This could be a variable, function, class, or any other entity in your ABAP code.
Rename the Object: Change the name of the object to eliminate the hyphen. You can use underscores (_) or camel case (e.g.,
myVariable
instead ofmy-variable
) as alternatives.Update References: If the object is referenced elsewhere in your code, make sure to update all references to the new name to avoid any inconsistencies.
Check Naming Conventions: Familiarize yourself with the naming conventions in ABAP to avoid similar issues in the future. Generally, valid names can include letters (A-Z, a-z), numbers (0-9), and underscores (_), but must start with a letter.
Related Information:
By following these steps and guidelines, you should be able to resolve the D0704 error and adhere to SAP's naming standards.
Get instant SAP help. Start your 7-day free trial now.
D0703
Standards violation: Name contains at least one blank
What causes this issue? The naming convention stipulates that object names may not contain any blanks.System Response The system issues an error mes...
D0702
Standards violation: Name has over & letters
What causes this issue? The name of the object is too long.System Response The system issues an error message and will not allow you to continue wit...
D0705
Standards violation: First letter of name must be in range 'A'...'Z'
What causes this issue? According to the SAP naming convention, object names must begin with a letter.System Response The system issues an error mes...
D0706
Standards violation: & is not allowed as the first letter of the name
What causes this issue? The specified character is not permitted as the first letter of the object name.System Response The system issues an error m...
Click on this link to search all SAP messages.