<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Delete NULL characters from XML file saved into FB03 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575816#M22579</link>
    <description>&lt;P&gt;Hi Raj.&lt;/P&gt;&lt;P&gt;I used the nexts FM:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer     = lv_binario64
    TABLES
      binary_tab = ltd_solix.


  CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
    EXPORTING
      region                = 'B'
    IMPORTING
      folder_id             = wa_fol_id
    EXCEPTIONS
      communication_failure = 1
      owner_not_exist       = 2
      system_failure        = 3
      x_error               = 4
      OTHERS                = 5.


  CALL FUNCTION 'SO_DOCUMENT_INSERT_API1'
    EXPORTING
      folder_id     = wa_fol_id
      document_data = wa_obj_data
      document_type = wa_extension "'EXT'
    IMPORTING
      document_info = wa_obj_id
    TABLES
      object_header = ltd_objhead
      contents_hex  = ltd_solix.


    CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
      EXPORTING
        obj_rolea      = wa_target_bo
        obj_roleb      = wa_note
        relationtype   = 'ATTA'
      EXCEPTIONS
        no_model       = 1
        internal_error = 2
        unknown        = 3
        OTHERS         = 4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Jimmy.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2019 14:08:05 GMT</pubDate>
    <dc:creator>Jimmy21</dc:creator>
    <dc:date>2019-12-04T14:08:05Z</dc:date>
    <item>
      <title>Delete NULL characters from XML file saved into FB03</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575814#M22577</link>
      <description>&lt;P&gt;Hi guys. &lt;/P&gt;
  &lt;P&gt;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:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/82550-2017-11-07-11-15-48-to-remove-spaces-nulls-from-bi.png" /&gt;&lt;/P&gt;
  &lt;P&gt;This is my code: &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;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&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;lt_content return data in format chineese (TX SNLS) like this: &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/82551-2017-11-07-11-27-41-to-remove-spaces-nulls-from-bi.png" /&gt;&lt;/P&gt;
  &lt;P&gt;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.&lt;/P&gt;
  &lt;P&gt;Please gurus really I need you help.&lt;/P&gt;
  &lt;P&gt;Jimmy.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 16:26:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575814#M22577</guid>
      <dc:creator>Jimmy21</dc:creator>
      <dc:date>2017-11-07T16:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete NULL characters from XML file saved into FB03</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575815#M22578</link>
      <description>&lt;P&gt;Hi Jimmy, How did you resolve this issue as I am facing the same issue with one of the XML that is generated by my custom program&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 14:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575815#M22578</guid>
      <dc:creator>former_member599240</dc:creator>
      <dc:date>2019-11-11T14:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Delete NULL characters from XML file saved into FB03</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575816#M22579</link>
      <description>&lt;P&gt;Hi Raj.&lt;/P&gt;&lt;P&gt;I used the nexts FM:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer     = lv_binario64
    TABLES
      binary_tab = ltd_solix.


  CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
    EXPORTING
      region                = 'B'
    IMPORTING
      folder_id             = wa_fol_id
    EXCEPTIONS
      communication_failure = 1
      owner_not_exist       = 2
      system_failure        = 3
      x_error               = 4
      OTHERS                = 5.


  CALL FUNCTION 'SO_DOCUMENT_INSERT_API1'
    EXPORTING
      folder_id     = wa_fol_id
      document_data = wa_obj_data
      document_type = wa_extension "'EXT'
    IMPORTING
      document_info = wa_obj_id
    TABLES
      object_header = ltd_objhead
      contents_hex  = ltd_solix.


    CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
      EXPORTING
        obj_rolea      = wa_target_bo
        obj_roleb      = wa_note
        relationtype   = 'ATTA'
      EXCEPTIONS
        no_model       = 1
        internal_error = 2
        unknown        = 3
        OTHERS         = 4.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Jimmy.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 14:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-null-characters-from-xml-file-saved-into-fb03/m-p/575816#M22579</guid>
      <dc:creator>Jimmy21</dc:creator>
      <dc:date>2019-12-04T14:08:05Z</dc:date>
    </item>
  </channel>
</rss>

