Skip to Content
-1

Delete NULL characters from XML file saved into FB03

Nov 07, 2017 at 04:26 PM

48

avatar image
Former Member

Hi guys.

I'm looking the solution for several weeks. I'm creating a XML file into Tcode FB03 (attachment), but when I open my file I see characters NULL (notepad ++). like this:

This is my code:

lv_my_rawstring = '3C627265616B666173745F6D656E753E3C666F6F643E3C6E61'.
DATA: lt_content TYPE SOLI.

CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer        = lv_my_rawstring
    IMPORTING
      output_length = lv_filesize
    TABLES
      binary_tab    = lt_content.

CALL FUNCTION 'SO_CONVERT_CONTENTS_BIN'
    EXPORTING
      it_contents_bin = lt_content
    IMPORTING
      et_contents_bin = lt_content.

CALL FUNCTION 'SO_CONVERT_CONTENTS_BIN'
      TABLES
        objcont       = lt_content<br>

lt_content return data in format chineese (TX SNLS) like this:

I tried convert this to string and deleting '#' characters with REPLACE, but don't working. There are bit null and I read the convertion hex to binary can generate bit null.

Please gurus really I need you help.

Jimmy.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers