<?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: Sending internal table data to Application server using XML format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388020#M1994469</link>
    <description>&lt;P&gt;Dear Gourab,&lt;/P&gt;&lt;P&gt;I am not splitting the string into table. But the structure &lt;STRONG&gt;SWBHTMLINE&lt;/STRONG&gt; has data type of 255 char length. Is there any other FM to do the same? Another thing is that, I am working with third party . I dont know how they are fatching data from server. But from their end they complained of the line breaking error. I can create a new report program for my clarity but it will be of no use for the other party software.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 03:41:20 GMT</pubDate>
    <dc:creator>former_member308418</dc:creator>
    <dc:date>2021-06-30T03:41:20Z</dc:date>
    <item>
      <title>Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388012#M1994461</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
  &lt;P&gt;Good day.&lt;/P&gt;
  &lt;P&gt;I am trying to send data from my internal table to the application server in XML format. I have used CALL TRANSFORMATION for this purpose. My report is generating XML data but when I am trying to put that XML file in XML Validator, I am getting errors like data is broken and going to another line. So, users actually cannot use that data. Please tell me a way to solve this from my end.&lt;/P&gt;
  &lt;P&gt;Here is my piece of code for the conversion.&lt;/P&gt;
  &lt;P&gt;DATA : itab TYPE swbhtmltable,&lt;/P&gt;
  &lt;P&gt; lv_xml_result TYPE string,&lt;/P&gt;
  &lt;P&gt; lv_file TYPE string.&lt;/P&gt;
  &lt;P&gt;CALL FUNCTION 'SWA_STRING_TO_TABLE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; character_string = lv_xml_result&lt;BR /&gt; IMPORTING&lt;BR /&gt; character_table = itab.&lt;/P&gt;
  &lt;P&gt;OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;
  &lt;P&gt; LOOP AT itab INTO DATA(wa).&lt;BR /&gt; TRANSFER wa-linedata TO lv_file.&lt;BR /&gt; ENDLOOP.&lt;BR /&gt;&lt;BR /&gt; CLOSE DATASET lv_file.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 15:20:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388012#M1994461</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2021-06-29T15:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388013#M1994462</link>
      <description>&lt;P&gt;Hi Ferdaus,&lt;/P&gt;&lt;P&gt;Did you try downloading the data to your local system to make sure the transformation is correct? Also what is the length of the internal table line?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gourab&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 15:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388013#M1994462</guid>
      <dc:creator>Gourab_Dey</dc:creator>
      <dc:date>2021-06-29T15:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388014#M1994463</link>
      <description>&lt;P&gt;Dear Sandra Rossi,&lt;/P&gt;&lt;P&gt;Thanks for the prompt reply. The error says as below. Also, I am attaching my file here. Please check.&lt;A href="https://answers.sap.com/storage/temp/1949978-text.txt"&gt;text.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" style="background-color: initial; color: inherit;" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 16:21:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388014#M1994463</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2021-06-29T16:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388015#M1994464</link>
      <description>&lt;P&gt;Hi Gourab,&lt;/P&gt;&lt;P&gt;Thanks for your reply. Internal table line has a length of char255. Did you mean to convert from my transported xml file to internal table again ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 16:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388015#M1994464</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2021-06-29T16:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388016#M1994465</link>
      <description>&lt;P&gt;The error you are getting is due to new line character. There are couple of line break.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 16:30:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388016#M1994465</guid>
      <dc:creator>Gourab_Dey</dc:creator>
      <dc:date>2021-06-29T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388017#M1994466</link>
      <description>&lt;P&gt;See the attached file, I have removed the line break and tested with XML validator, it passed the validation.&lt;/P&gt;&lt;A href="https://answers.sap.com/storage/temp/1949979-xmltxt.txt"&gt;xmltxt.txt&lt;/A&gt;</description>
      <pubDate>Tue, 29 Jun 2021 16:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388017#M1994466</guid>
      <dc:creator>Gourab_Dey</dc:creator>
      <dc:date>2021-06-29T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388018#M1994467</link>
      <description>Can you please do one thing. Dont split the string into table. Write the string directly to AL11 and see how it's working.Also, how you are seeing the generated file? Are you downloading from AL11. If so, dont use tcode "CG3Y". Becuase CG3Y has length constrain of 255 i guess. So, if you wish to download the data from AL11, create a new report program and read the dataset and download to local file.Let us know if this works.Thanks,Gourab</description>
      <pubDate>Tue, 29 Jun 2021 16:38:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388018#M1994467</guid>
      <dc:creator>Gourab_Dey</dc:creator>
      <dc:date>2021-06-29T16:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388019#M1994468</link>
      <description>&lt;P&gt;I see in your file that you have copied the file from the output of AL11. You must not do that (because of line breaks as explained by Gourab). You must create a program to download the file from the application server to user's laptop or anywhere else.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 17:37:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388019#M1994468</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-06-29T17:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388020#M1994469</link>
      <description>&lt;P&gt;Dear Gourab,&lt;/P&gt;&lt;P&gt;I am not splitting the string into table. But the structure &lt;STRONG&gt;SWBHTMLINE&lt;/STRONG&gt; has data type of 255 char length. Is there any other FM to do the same? Another thing is that, I am working with third party . I dont know how they are fatching data from server. But from their end they complained of the line breaking error. I can create a new report program for my clarity but it will be of no use for the other party software.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 03:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388020#M1994469</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2021-06-30T03:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388021#M1994470</link>
      <description>&lt;P&gt;Hi Ferdaus,&lt;/P&gt;&lt;P&gt;The issue basically due to the line break. So, we will not use the function module "SWA_STRING_TO_TABLE", rather will transfer the XML string, which will ensure there will not be any line split.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : itab TYPE swbhtmltable,
lv_xml_result TYPE string,
lv_file TYPE string.
"Start of comment by Gourab
*CALL FUNCTION 'SWA_STRING_TO_TABLE'
*EXPORTING
*character_string = lv_xml_result
*IMPORTING
*character_table = itab.
"End of comment by Gourab
OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
"Start of comment by Gourab
*LOOP AT itab INTO DATA(wa).
*TRANSFER wa-linedata TO lv_file.
*ENDLOOP.
"End of comment by Gourab
"Start of addition by Gourab
TRANSFER lv_xml_result TO lv_file.
"End of addition by Gourab

CLOSE DATASET lv_file.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Alternately, the third party application which is reading the file can also remove the new line character before validation.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gourab&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 05:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388021#M1994470</guid>
      <dc:creator>Gourab_Dey</dc:creator>
      <dc:date>2021-06-30T05:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sending internal table data to Application server using XML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388022#M1994471</link>
      <description>&lt;P&gt;Thanks Gourab. I have sent data as per this idea and found no error. &lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Ferdaus.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 09:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-internal-table-data-to-application-server-using-xml-format/m-p/12388022#M1994471</guid>
      <dc:creator>former_member308418</dc:creator>
      <dc:date>2021-06-30T09:16:42Z</dc:date>
    </item>
  </channel>
</rss>

