title: Deserialize JSON to table
body: <p>I need to populate tables in ABAP from data received through an API.</p>
  
  <p>I'm using the following ABAP function to populate an existing ABAP table from json.</p>
  
  <p>The JSON is correct, and the Table contains corresponding tables within tables.</p>
  
  <pre><code>/ui2/cl_json=&gt;deserialize( EXPORTING json = lv_json
                               CHANGING data = lt_abap  ).
  </code></pre>
  
  <p>Running this returns a blank lt_abap table.</p>
  
  <p>When changing the output to be a structure this works fine. But the problem is a need a TABLE, rather than a STRUCTURE for subsequent calls</p>
  
  <pre><code>/ui2/cl_json=&gt;deserialize( EXPORTING json = lv_json
                               CHANGING data = ls_abap
  </code></pre>
  
  <p>Can anyone suggest a solution o get he JSON into my TABLE?</p>
  
  <p>JSON:</p>
  
  <pre><code>{
      "Id": "1369130",
      "Venueid": "0005",
      "Userid": "1320625",
      "Menuid": "null",
      "Created": "2019-07-29T08:18:35.000+0000",
      "items": [
        {
          "Id": "4255354",
          "Total": "3.10",
          "Price": "2.80",
          "Qty": "1",
          "Orderid": "1369130",
          "Menuitemid": "1447268",
          "Externalid": "",
          "Name": "Breakfast Roll Deal",
          "modifiers": [
            {
              "Price": "0.00",
              "Qty": "1",
              "Id": "0000001",
              "Orderitemid": "4255354",
              "Externalid": "1000716",
              "Name": "Bacon and Sausage Corn Topped Roll"
            },
            {
              "Price": "0.30",
              "Qty": "1",
              "Id": "00000002",
              "Orderitemid": "4255354",
              "Externalid": "E1001587",
              "Name": "Extra Sausage"
            },
            {
              "Price": "0.00",
              "Qty": "1",
              "Id": "00000003",
              "Orderitemid": "4255354",
              "Externalid": "1000774",
              "Name": "Latte"
            },
            {
              "Price": "0.00",
              "Qty": "1",
              "Id": "00000004",
              "Orderitemid": "4255354",
              "Externalid": "E",
              "Name": "Spread"
            }
          ]
        }
  ]
    }
  </code></pre>
  
  <p>Table Structure matches exactly.</p>