TYPE 'X'.
WRITE c TO .
write: h.
enddo.
* Use Function to Convert String to XSTRING
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = s
* MIMETYPE = ' '
importing
buffer = l_bindata
exceptions
failed = 1
others = 2
.
if sy-subrc = 0.
ULINE /1(80).
write:/ 'Use Function to Convert String to XSTRING'.
ULINE /1(80).
write:/ l_bindata.
endif.
*
** 1. Convert input-table to XSTRING
*CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
* EXPORTING: input_length = length
* IMPORTING: buffer = l_bindata
* TABLES: binary_tab = l_cntbin
* EXCEPTIONS: failed = 1
*