Code: Alles auswählen.
DATA: x TYPE XSTRING.
TRY.
CALL METHOD cl_bcs_convert=>xtab_to_xstring
EXPORTING
it_xtab = file_content_binary
RECEIVING
rv_xstring = x.
CATCH cx_bcs .
ENDTRY.
TRY.
CALL METHOD cl_bcs_convert=>xstring_to_xtab
EXPORTING
iv_xstring = x
IMPORTING
et_xtab = object_hex.
CATCH cx_bcs .
ENDTRY.
Code: Alles auswählen.
DATA lbuffer TYPE XSTRING.
DATA contents_hex TYPE solix_tab.
DATA numbytes TYPE i.
DATA: BEGIN OF lt_pdf OCCURS 0,
t(134),
END OF lt_pdf.
* I_tab nach Xstring
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = numbytes
IMPORTING
buffer = lbuffer
TABLES
binary_tab = lt_pdf
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
* Xstring nach Itab
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lbuffer
TABLES
binary_tab = contents_hex[].
Code: Alles auswählen.
try.
cl_bcs_convert=>xstring_to_xtab(
exporting
iv_xstring = cl_bcs_convert=>xtab_to_xstring( file_content_binary )
importing
et_xtab = object_hex
).
catch cx_bcs.
endtry.