简体   繁体   English

ATC检查-prio 3消息-“字符串中缺少文本元素”

[英]ATC Check - prio 3 message - “Text element missing in a character string”

I am getting message "Text element missing in a character string" during ATC Checks for constant. 我在ATC检查常量期间收到消息“字符串中缺少文本元素”。

CONSTANTS c_north TYPE c LENGTH 5 VALUE 'North'.

How can i remove "Text element missing in a character string", 如何删除“字符串中缺少文本元素”,

Please let me know what is the best solution. 请让我知道什么是最好的解决方案。

regards, 问候,

Umar Abdullah 乌马尔·阿卜杜拉(Umar Abdullah)

The message is issued, because of a hardcoded text, which cannot be translated. 由于硬编码的文本而无法翻译,因此发出了此消息。 To simply remove the message you have to use a pragma, add ##NO_TEXT before (!) the line closing dot: 要简单地删除您必须使用编译指示的消息,请在行结束点(!)之前添加##NO_TEXT

CONSTANTS c_north TYPE c LENGTH 5 VALUE 'North' ##NO_TEXT.

This removes the message, however does not solve the original problem, that the hardcoded text cannot be translated (which can be an issue in a multi-language system landscape). 这样就删除了消息,但是并不能解决原始问题,即无法翻译硬编码文本(这在多语言系统环境中可能是一个问题)。 To overcome this you can create a text element in the program and use the text element instead of the constant. 为了克服这个问题,您可以在程序中创建一个text元素,并使用text元素代替常量。

You can also use Extenden Program Check (Ctrl + F4 or just below ATC in the menu) as well, which in many cases gives more detailed information about weak points in the program and how to overcome these. 您还可以使用Extenden Program Check(扩展程序检查)(Ctrl + F4或菜单中ATC的正下方),在许多情况下,它可以提供有关程序弱点以及如何克服这些弱点的更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM