2007-03-06

SAP :如何做ASCII Code轉換?

(1)由字元取得該ASCII Code

data : c.
field-symbols : <n> type x.
data : rn type i.
c = 'A'.
assign c to <n> casting.
move <n> to rn.
write rn.



A ---> 65

(2)由ASCII Code轉成字元


data : i type i value 66.
data : x type x.
field-symbols : <fc> type c.
move i to x.
assign x to <fc> casting type c.
move <fc> to c.
write c.


66 ---> B

來源:http://www.sap-img.com/abap/how-can-i-get-ascii-value-of-any-letter.htm

沒有留言: