简体   繁体   English

CX_SY_CONVERSION_NO_NUMBER 何时除以 i 类型?

[英]CX_SY_CONVERSION_NO_NUMBER when divide on i type?

I am trying to divide my 2 number.我正在尝试除以我的 2 号。 And I determine them with different type.我用不同的类型确定它们。 I am getting error when I try to divide them.当我尝试划分它们时出现错误。

But my point is, when I am in debug, why does the first number show '*'?但我的观点是,当我在调试时,为什么第一个数字显示'*'? The problem is happening because of this.问题就是因为这个而发生的。

EXCEPTION :  CX_SY_CONVERSION_NO_NUMBER


DATA : sayi1, sayi2 TYPE i.
DATA : sonuc TYPE p LENGTH 3.

BREAK-POINT.
sayi1 = 16.
sayi2 = 19.

sonuc  = sayi1 / sayi2.

WRITE : / sonuc.

You should define every parameter differently in ABAP, you cant do it with like one "type i" :) its not like other languages such as C, C++, Java :)你应该在 ABAP 中以不同的方式定义每个参数,你不能像一个“类型 i”那样做:) 它不像其他语言,如 C、C++、Java :)

So it should be like this:所以它应该是这样的:

DATA : sayi1 type i,
       sayi2 TYPE i.
DATA : sonuc TYPE p LENGTH 3.

Hope it was helpful希望对您有所帮助

Talha塔尔哈

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

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