<?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 JSON to ABAP Conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532891#M19476</link>
    <description>&lt;P&gt;Hi Experts&lt;/P&gt;
  &lt;P&gt;I am trying to Upload JSON file into SAP internal table and perform some actions on it.&lt;/P&gt;
  &lt;P&gt;I have referred already to these links:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2013/01/07/abap-and-json/" target="test_blank"&gt;https://blogs.sap.com/2013/01/07/abap-and-json/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/questions/195916/complex-json-structure-to-abap.html" target="test_blank"&gt;https://answers.sap.com/questions/195916/complex-json-structure-to-abap.html&lt;/A&gt; and &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://archive.sap.com/discussions/thread/3817827" target="test_blank"&gt;https://archive.sap.com/discussions/thread/3817827&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;However, there is no information on how to UPLOAD a json file directly into an internal table. &lt;/P&gt;
  &lt;P&gt;Any pointers will be appreciated.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;Regards&lt;/P&gt;
  &lt;P&gt;Dinesh&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2017 08:02:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-11-16T08:02:12Z</dc:date>
    <item>
      <title>JSON to ABAP Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532891#M19476</link>
      <description>&lt;P&gt;Hi Experts&lt;/P&gt;
  &lt;P&gt;I am trying to Upload JSON file into SAP internal table and perform some actions on it.&lt;/P&gt;
  &lt;P&gt;I have referred already to these links:&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2013/01/07/abap-and-json/" target="test_blank"&gt;https://blogs.sap.com/2013/01/07/abap-and-json/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/questions/195916/complex-json-structure-to-abap.html" target="test_blank"&gt;https://answers.sap.com/questions/195916/complex-json-structure-to-abap.html&lt;/A&gt; and &lt;/P&gt;
  &lt;P&gt;&lt;A href="https://archive.sap.com/discussions/thread/3817827" target="test_blank"&gt;https://archive.sap.com/discussions/thread/3817827&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;However, there is no information on how to UPLOAD a json file directly into an internal table. &lt;/P&gt;
  &lt;P&gt;Any pointers will be appreciated.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;Regards&lt;/P&gt;
  &lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 08:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532891#M19476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-16T08:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532892#M19477</link>
      <description>&lt;P&gt;Hi dear.&lt;/P&gt;
  &lt;P&gt;Follow this example, if it's what I imagined.&lt;/P&gt;
  &lt;P&gt;First, you have to create a structure like your json response;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;

TYPES:

TY_T_NAMES TYPE TABLE OF STRING WITH EMPTY KEY,

BEGIN OF TY_ROOT,
MESSAGE TYPE STRING,
NAMES   TYPE TY_T_NAMES,
END OF TY_ROOT.

DATA RESULT TYPE TY_ROOT.

  DATA(_JSON) = '{' &amp;amp;&amp;amp;
                   '"Message":"Hello",' &amp;amp;&amp;amp;
                   '"Names":["John","Julie","Mark","Juan"]' &amp;amp;&amp;amp;
                '}'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;After that, you can use this method to deserialize the data;&lt;BR /&gt; &lt;BR /&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;/UI2/CL_JSON=&amp;gt;DESERIALIZE( 
 EXPORTING 
   JSON = _JSON 
 CHANGING 
   DATA = RESULT ).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Check it&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/83173-print-1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/83174-print-2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Enio, &lt;/P&gt;
  &lt;P&gt;Regards;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 16:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532892#M19477</guid>
      <dc:creator>former_member347303</dc:creator>
      <dc:date>2017-11-16T16:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532893#M19478</link>
      <description>&lt;P&gt;Hi..&lt;/P&gt;
  &lt;P&gt;Thanks for helping.. Solved the issue on own by reading character by character. In actual the json file was pretty complex and Standard SAP was taking a lot of time to deserialize.&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 07:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532893#M19478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-20T07:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532894#M19479</link>
      <description>&lt;P&gt;For complexity, I can understand, but for performance a test of custom ABAP versus kernel had shown that ABAP is slower than kernel (performance ratio was 1.7 for ABAP versus 1 for Kernel - &lt;A href="https://wiki.scn.sap.com/wiki/display/Snippets/Performance+of+JSON+from+scratch+-+sXML+versus+ZCL_MDP_JSON" target="test_blank"&gt;https://wiki.scn.sap.com/wiki/display/Snippets/Performance+of+JSON+from+scratch+-+sXML+versus+ZCL_MDP_JSON&lt;/A&gt; )&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 08:14:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-conversion/m-p/532894#M19479</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-20T08:14:46Z</dc:date>
    </item>
  </channel>
</rss>

