*&---------------------------------------------------------------------*
*& Report ZDEMO13
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zdemo13.
DATA:BEGIN OF gs_itab,
text(255),
END OF gs_itab,
gt_itab LIKE TABLE OF gs_itab.
DATA:binary_tab TYPE TABLE OF solix.
DATA:binary_lin TYPE solix.
DATA:output_length TYPE i.
gs_itab = '我'.
APPEND gs_itab TO gt_itab.
CALL FUNCTION 'SCMS_TEXT_TO_BINARY'
IMPORTING
output_length = output_length
TABLES
text_tab = gt_itab
binary_tab = binary_tab
EXCEPTIONS
failed = 1
OTHERS = 2.
READ TABLE binary_tab INTO binary_lin INDEX 1.
WRITE binary_lin-line+0(output_length).
*DATA:gv_buffer TYPE xstring.
*gv_buffer = binary_lin-line.
*CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
* EXPORTING
* buffer = gv_buffer
** APPEND_TO_TABLE = ' '
** IMPORTING
** output_length = output_length
* TABLES
* binary_tab = binary_tab.
*
*READ TABLE binary_tab INTO binary_lin INDEX 1.
*WRITE binary_lin-line+0(output_length).
阅读(2382) | 评论(0) | 转发(0) |