Hast du meinen Vorschlag schon ausprobiert?freshsett hat geschrieben:ne ist nicht unicode
Code: Alles auswählen.
:
:
IF sy-subrc = 0.
* cl_bconv = cl_abap_conv_out_ce=>create( ).
* cl_xconv = cl_abap_conv_out_ce=>create( ).
*
*
* CLEAR: i, j.
*
* LOOP AT pdf.
* DO 134 TIMES.
* i = sy-index - 1.
* lword = cl_abap_conv_out_ce=>uccp( pdf+i(1) ).
*
* IF lcharlen > 1.
* cl_xconv->write( n = 1 data = lword+1(1) ).
* j = j + 1.
* IF j GE numbytes. EXIT. ENDIF.
*
* cl_xconv->write( n = 1 data = lword(1) ).
* j = j + 1.
* IF j GE numbytes. EXIT. ENDIF.
*
* ENDIF.
*
* ENDDO.
* ENDLOOP.
*
* lbuffer = cl_xconv->get_buffer( ).
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = numbytes
* FIRST_LINE = 0
* LAST_LINE = 0
IMPORTING
buffer = lbuffer
TABLES
binary_tab = pdf
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lbuffer
TABLES
binary_tab = it_content[].
CALL FUNCTION 'SO_CONVERT_CONTENTS_BIN'
EXPORTING
it_contents_bin = it_content[]
IMPORTING
et_contents_bin = it_content[].
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
:
:
Code: Alles auswählen.
:
:
IF sy-subrc = 0.
* cl_bconv = cl_abap_conv_out_ce=>create( ).
* cl_xconv = cl_abap_conv_out_ce=>create( ).
*
*
* CLEAR: i, j.
*
* LOOP AT pdf.
* DO 134 TIMES.
* i = sy-index - 1.
* lword = cl_abap_conv_out_ce=>uccp( pdf+i(1) ).
*
* IF lcharlen > 1.
* cl_xconv->write( n = 1 data = lword+1(1) ).
* j = j + 1.
* IF j GE numbytes. EXIT. ENDIF.
*
* cl_xconv->write( n = 1 data = lword(1) ).
* j = j + 1.
* IF j GE numbytes. EXIT. ENDIF.
*
* ENDIF.
*
* ENDDO.
* ENDLOOP.
*
* lbuffer = cl_xconv->get_buffer( ).
concatenate lines of pdf into lbuffer in byte mode.
lbuffer = lbuffer(numbytes).
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = numbytes
* FIRST_LINE = 0
* LAST_LINE = 0
IMPORTING
buffer = lbuffer
TABLES
binary_tab = pdf
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lbuffer
TABLES
binary_tab = it_content[].
CALL FUNCTION 'SO_CONVERT_CONTENTS_BIN'
EXPORTING
it_contents_bin = it_content[]
IMPORTING
et_contents_bin = it_content[].
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
:
:
Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag:
freshsett
meine natürlich auch ! (Unicode war nicht meine Idee)Meine Devise: Immer mit dem Originalformat in Originallänge arbeiten.
Code: Alles auswählen.
concatenate lines of pdf into lbuffer in byte mode.
lbuffer = lbuffer(numbytes).
Code: Alles auswählen.
data:
ld_string type string,
lr_convert type ref to cl_abap_conv_out_ce.
concatenate lines of pdf into ld_string respecting blanks.
ld_string = ld_string(numbytes).
create object lr_convert.
lr_convert->convert( EXPORTING data = ld_string
IMPORTING buffer = lbuffer ).