您的位置:首页 > 其它

abap 学习笔记(3) 数据字典和数据对象

2008-08-18 15:33 239 查看
在程序使用数据字典内置类型时,将转化为abap内置类型

ACCP-------N(6)

CHAR-------C(n)

CLNT--------C(3)

具体查<<sap程序设计>> 92页

下面是系统 字段示例:

SY-SUBRC 返 回代码值( 0,如果操 作成功)

SY-UNAME 用 户的登录名

SY-DATUM 当 前日期

SY-UZEIT 当 前时间

SY-TCODE 当 前事务

Neither this documentation nor any part of it may be copied or reproduced in any form or by any means or translated into another language, without the prior consent of SAP AG.

write /(8) time using edit mask '__:__:__'.

数据赋值

move source to destination.

destination = source.

连接字符串

CONCATENATE s1 s2 s3 s4 into s_dest [separated by sep]

后面separated by 是分隔符

data s type string.

concatenate 'a' 'b' 'c' into s separated by '|'.

write / s.

拆分字符串

split s_source at sep into s1 s2 s3.

拆分成n行内表

split s_source at sep into table itab.

替换字段内容

replace str1 with str2 into s_dest [length len].

s_dest是要被替换的原来的整个字符串 length后面限制长度.

确定字段长度

strlen( str)

substring的功能在abap中

'abc'+2(1)

得到 'c' 2表示从第3个开始,1表示取一个,1如果不写,表示取到底
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: