避免CONVT_NO_NUMBER的Runtime Errors
来源:互联网 发布:网络中的亲社会行为 编辑:程序博客网 时间:2024/05/21 23:33
DATA: pp TYPE p DECIMALS 2.
DATA: cxroot TYPE REF TO cx_root,
exception_msg(1000),
msg(1000).
PARAMETERS: str(6) .
**方法1
TRY .
pp = str.
CATCH cx_root INTO cxroot.
msg = cxroot->get_text( ).
WRITE:/ msg.
ENDTRY.
**方法2
CATCH SYSTEM-EXCEPTIONS convt_no_number = 1.
pp = str .
ENDCATCH.
IF sy-subrc <> 0.
WRITE / 'Error!'.
ENDIF.
**方法3
DATA str_tmp TYPE string .
str_tmp = str.
IF NOT str_tmp CO '0123456789.-'.
WRITE / 'Err'.
ELSE.
pp = str_tmp.
ENDIF.
WRITE / pp.
**方法1和方法2不可以在同一个程序使用
阅读全文
1 0
- 避免CONVT_NO_NUMBER的Runtime Errors
- CONVT_NO_NUMBER
- iOS runtime实用篇 ---避免常见崩溃
- How to Fix Windows Visual C++ Runtime Errors
- GSM/GPRS的CMS errors & CME errors
- html:errors的使用
- Errors
- errors
- errors
- errors
- connection reset errors 的解决办法
- 第一个APP......的Errors
- AT指令返回错误代码: CMS errors & CME errors 的区别!
- Item 58: Used checked exceptions for recoverable conditions and runtime exceptions for programming errors
- Xcode 5 layout errors - Misplaced View Frame for Label will be different at runtime
- Eclipse项目上存在红叉 Problems出现errors:Target runtime XXX is not defined
- 常见的runtime exception
- Runtime类的应用
- Android开发之ListView
- SearchView的基本使用
- 跳转到第三方地图
- 用Node.js来开发后台服务
- Spring AOP详解
- 避免CONVT_NO_NUMBER的Runtime Errors
- SmartGit的相关操作
- sencha cmd常用命令汇总
- mongotemplate mongodb的各种操作 模糊查询 精确查询 等等
- 数据压缩算法:旋转门算法(SDT)的C#实现
- 为WebSphere Application Server v8.5安装并配置JDK7
- 单臂路由&&Trunk详解
- 旋转向量
- 线性表的数组描述