SAP ABAP ASJSON ABAP TYPES TABLE

Get Example source ABAP code based on a different SAP table
  


ARTICLE

asJSON - Mapping of Internal Tables
Internal tables are represented in asJSON as JSON arrays. The rows of the internal table are represented in their canonical representation as the components of the array. All table categories are allowed. Serializations do not pass any information about the table category to the JSON data. If the target field of a deserialization is a sorted table, the rows are sorted accordingly.

Notes
An internal table that does not have an associated JSON object component in deserializations retains its previous value. If an empty array is assigned to an internal table, it is set to its type-specific initial value (i.e. emptied). To initialize the internal table in either case, the transformation option clear with the value 'all' can be used.
Unlike in the asXML representation of internal tables, asJSON does not require a name like item for the table rows.

Example
See asJSON for Internal Tables.