ASCII zu Character converter in ABAP

Wandelt ASCII in Character um,Verwendung wie folgt:
Perform AscChar using 98 changing w_char
Perform AscChar using 'A' changing w_num.

Like it? Share it!
Form AscChar Using pu_in changing pc_out. Data: Begin of t__chr, "ASCII/CHR Converter asc type x, End of t__chr, w__chr(5) type c, w__num type i, w__len type i, w__type(1) type c. Move 0 to pc_out. Describe field pu_in type w__type. Case w__type. When 'C'. Move pu_in to w__chr. Compute w__len = strlen( w__chr ). Move w__chr to t__chr. Move t__chr-asc to pc_out. When Others. Move pu_in to w__num. If w__num > 0 and w__num < 256. Move w__num to t__chr-asc. Move t__chr to pc_out. EndIf. EndCase. EndForm.

>_ Author

>_ last updated 4 yearss ago

>_ Language: ABAP