<?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 Create Data Dynamically? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569868#M22185</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;How can i create data from complex json. This data nested structure. Also can be contain array in array line. It is so complex &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;Example JSON;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;[
  {
    "MATKL": "Mal Grubu 1",
    "ATTRB": {
      "TYPE": "A",
      "BRANCH": "B"
    },
    "MATNR": [
      {
        "NAME": "Malzeme 1",
        "WEIGHT": "12,2",
        "LENGTH": "",
        "UoM": "KG"
      }
    ]
  },
  {
    "MATKL": "Mal Grubu 1",
    "ATTRB": {
      "TYPE": "A",
      "BRANCH": "B"
    },
    "MATNR": [
      {
        "NAME": "Malzeme 1",
        "WEIGHT": "12,2",
        "LENGTH": "",
        "UoM": "KG"
      }
    ]
  }
]
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;BR /&gt;Its output like that;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/103452-json.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I need to seperate all json data into my dynamic structure type then i will use it update my z tables.&lt;/P&gt;
  &lt;P&gt;Call transformation statement's result parameter must be same type json data. If not contain same fields. I cant transfer it to internal table completly.&lt;/P&gt;
  &lt;P&gt;Note : Standard class or function module can be use in old SAP version(Kernel Id).&lt;/P&gt;
  &lt;P&gt;How can i solve it? Please help. &lt;/P&gt;
  &lt;P&gt;Thanks for your valuable answers.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2018 13:04:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-01-16T13:04:37Z</dc:date>
    <item>
      <title>JSON to ABAP Create Data Dynamically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569868#M22185</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;How can i create data from complex json. This data nested structure. Also can be contain array in array line. It is so complex &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;Example JSON;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;[
  {
    "MATKL": "Mal Grubu 1",
    "ATTRB": {
      "TYPE": "A",
      "BRANCH": "B"
    },
    "MATNR": [
      {
        "NAME": "Malzeme 1",
        "WEIGHT": "12,2",
        "LENGTH": "",
        "UoM": "KG"
      }
    ]
  },
  {
    "MATKL": "Mal Grubu 1",
    "ATTRB": {
      "TYPE": "A",
      "BRANCH": "B"
    },
    "MATNR": [
      {
        "NAME": "Malzeme 1",
        "WEIGHT": "12,2",
        "LENGTH": "",
        "UoM": "KG"
      }
    ]
  }
]
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;BR /&gt;Its output like that;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/103452-json.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I need to seperate all json data into my dynamic structure type then i will use it update my z tables.&lt;/P&gt;
  &lt;P&gt;Call transformation statement's result parameter must be same type json data. If not contain same fields. I cant transfer it to internal table completly.&lt;/P&gt;
  &lt;P&gt;Note : Standard class or function module can be use in old SAP version(Kernel Id).&lt;/P&gt;
  &lt;P&gt;How can i solve it? Please help. &lt;/P&gt;
  &lt;P&gt;Thanks for your valuable answers.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569868#M22185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-01-16T13:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Create Data Dynamically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569869#M22186</link>
      <description>&lt;P&gt;You can dynamicaly parse JSON with sxml_writer.&lt;/P&gt;
  &lt;P&gt;There is example program named &lt;STRONG&gt;demo_json_oo_reader&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;It is also in abapdocu: &lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenabap_json_oo_reader_abexa.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenabap_json_oo_reader_abexa.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569869#M22186</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2018-01-16T13:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Create Data Dynamically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569870#M22187</link>
      <description>&lt;P&gt;See this SAP-Blog on ABAP and JSON : &lt;A href="https://blogs.sap.com/2013/07/04/abap-news-for-release-740-abap-and-json/" target="_blank"&gt;link&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;SAP-Help provides Info and Samples on Parsing JSON : &lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenjson_oview.htm" target="_blank"&gt;link&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Other Samples on JSON Serialize / De-Serializer Wiki-page make the case for using Classes "/UI5/CL_JSON_PARSER" and "/UI5/CL_JSON" : &lt;A href="https://goo.gl/RKVNGx" target="_blank"&gt;link&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;I would suggest looking into the Wiki-CodeSamples and using "/UI5/CL_JSON" for Parsing JSON in a 'known' format, and "/UI5/CL_JSON_PARSER" when handling 'unknown' data ...&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 19:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569870#M22187</guid>
      <dc:creator>NTeunckens</dc:creator>
      <dc:date>2018-01-16T19:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Create Data Dynamically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569871#M22188</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenabap_json.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenabap_json.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 20:03:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569871#M22188</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2018-01-16T20:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to ABAP Create Data Dynamically?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569872#M22189</link>
      <description>&lt;P&gt;Thanks for your all valuable answers. I found below solution for my requirements. The next step is create dynamically data from json string. Now, below solution is without kernel version so enogh for me.&lt;/P&gt;
  &lt;P&gt;Also, you can use alternative solution SAP standard method : &lt;STRONG&gt;cl_fdt_json&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://gist.github.com/mydoghasworms/2291540"&gt;Go to Github link see for all content&lt;/A&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;* Rather use &lt;A href="https://gist.github.com/mydoghasworms/4888a832e28491c3fe47" target="test_blank"&gt;https://gist.github.com/mydoghasworms/4888a832e28491c3fe47&lt;/A&gt;
* The alternative is a better parser although it is not an emmitter)
*----------------------------------------------------------------------*
*       CLASS json_util DEFINITION
*---------------------------------------------------------------------*
CLASS json_util DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      data_to_json IMPORTING data TYPE any
                   RETURNING value(json) TYPE string,

      json_to_data IMPORTING json TYPE string
                   CHANGING data TYPE any.

ENDCLASS.                    "json_util DEFINITION

*----------------------------------------------------------------------*
*       CLASS json_util IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS json_util IMPLEMENTATION.
  METHOD data_to_json.
    DATA: lr_desc TYPE REF TO cl_abap_typedescr.
    DATA: lr_elem TYPE REF TO cl_abap_elemdescr.
    DATA: lr_sdes TYPE REF TO cl_abap_structdescr.
    DATA: ls_comp TYPE cl_abap_structdescr=&amp;gt;component.
    DATA: lt_comp TYPE cl_abap_structdescr=&amp;gt;component_table.
    DATA: lv_json TYPE string.
    DATA: lv_field TYPE string.
    DATA: lv_value TYPE text255.

    FIELD-SYMBOLS: &amp;lt;field&amp;gt; TYPE any.

    DATA: lt_x031l TYPE dd_x031l_table.
    DATA: ls_x031l TYPE x031l.
    DATA: ls_dfies TYPE dfies.
    DATA: lv_meth(30) TYPE c VALUE 'GET_DDIC_FIELD'.
    DATA: lv_date TYPE d.
    DATA: lv_date_c(10) TYPE c.
    DATA: lv_time TYPE t.
    DATA: lv_time_c(8) TYPE c.
    DATA: lv_tabix TYPE i.
    DATA: lv_index TYPE i.
    DATA: lv_passed1st TYPE boole_d.

    lr_desc = cl_abap_typedescr=&amp;gt;describe_by_data( data ).

    CASE lr_desc-&amp;gt;type_kind.

      WHEN cl_abap_typedescr=&amp;gt;typekind_struct1 OR cl_abap_typedescr=&amp;gt;typekind_struct2.
        json = '{'.
* Use RTTI to discover structure members and process them individually
        lr_sdes ?= lr_desc.
        lt_comp = lr_sdes-&amp;gt;get_components( ).
        LOOP AT lt_comp INTO ls_comp.


          ASSIGN COMPONENT ls_comp-name OF STRUCTURE data

            TO &amp;lt;field&amp;gt;.

          IF sy-subrc = 0 AND &amp;lt;field&amp;gt; IS NOT INITIAL.

* For consecutive elements, add a comma separator after the previous value
            IF lv_passed1st = 'X'.

              CONCATENATE json ',' INTO json.

            ENDIF.



            lv_json = data_to_json( data = &amp;lt;field&amp;gt; ).



            CONCATENATE json ' "' ls_comp-name '": ' lv_json INTO json.



            lv_passed1st = 'X'.

          ENDIF.



        ENDLOOP.

        CONCATENATE json '}' INTO json.

      WHEN cl_abap_typedescr=&amp;gt;typekind_table.

        DATA: ld_line TYPE REF TO data.

        FIELD-SYMBOLS: &amp;lt;tab&amp;gt; TYPE ANY TABLE.

        FIELD-SYMBOLS: &amp;lt;line&amp;gt; TYPE any.

        ASSIGN data TO &amp;lt;tab&amp;gt;.

        CREATE DATA ld_line LIKE LINE OF &amp;lt;tab&amp;gt;.

        ASSIGN ld_line-&amp;gt;* TO &amp;lt;line&amp;gt;.



* Open array for table entries

        json = '['.



        LOOP AT &amp;lt;tab&amp;gt; INTO &amp;lt;line&amp;gt;.

          lv_json = data_to_json( data = &amp;lt;line&amp;gt; ).

          CONCATENATE json lv_json INTO json SEPARATED BY space.

          AT LAST.

            CONTINUE.

          ENDAT.

* Separate consecutive values by commas

          CONCATENATE json ',' INTO json.

        ENDLOOP.



* Close array for table entries

        CONCATENATE json ']' INTO json SEPARATED BY space.



      WHEN cl_abap_typedescr=&amp;gt;typekind_dref.

* For data references, dereference the data and call method again

        FIELD-SYMBOLS: &amp;lt;data&amp;gt; TYPE any.

        ASSIGN data-&amp;gt;* TO &amp;lt;data&amp;gt;.

        IF sy-subrc = 0.

          json = data_to_json( data = &amp;lt;data&amp;gt; ).

        ELSE.

          json = '{}'. "Will produce empty JS object

        ENDIF.

      WHEN OTHERS.

* For elementary types, we merely return a text representation of the value

        json = data.

        CONDENSE json.



* Escape special characters

        REPLACE ALL OCCURRENCES OF '\'                                    IN json WITH '\\'.

        REPLACE ALL OCCURRENCES OF '"'                                    IN json WITH '\"'.

        REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;newline        IN json WITH '\n'.

        REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;horizontal_tab IN json WITH '\t'.

        REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;form_feed      IN json WITH '\f'.

        REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;vertical_tab   IN json WITH '\v'.

        REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=&amp;gt;backspace      IN json WITH '\b'.



* Numeric values do not need to be escaped

        IF lr_desc-&amp;gt;type_kind NE cl_abap_typedescr=&amp;gt;typekind_num AND

           lr_desc-&amp;gt;type_kind NE cl_abap_typedescr=&amp;gt;typekind_packed AND

           lr_desc-&amp;gt;type_kind NE cl_abap_typedescr=&amp;gt;typekind_float AND

           lr_desc-&amp;gt;type_kind NE cl_abap_typedescr=&amp;gt;typekind_int AND

           lr_desc-&amp;gt;type_kind NE cl_abap_typedescr=&amp;gt;typekind_int1 AND

           lr_desc-&amp;gt;type_kind NE cl_abap_typedescr=&amp;gt;typekind_int2.

          CONCATENATE '"' json '"' INTO json.

        ENDIF.



    ENDCASE.



  ENDMETHOD.                    "data_to_json



  METHOD json_to_data.

    DATA: lv_off TYPE i.

    DATA: lv_len TYPE i.

    DATA: lv_key TYPE string.

    DATA: lv_value TYPE string.

    DATA: lv_char TYPE char1.    "Current chacater

    DATA: lv_pchar TYPE char1.   "Previous character

    DATA: lv_instr TYPE boole_d. "Indicator: cursor in string

    DATA: lv_level TYPE i.       "Depth inside a block

    DATA: lv_table TYPE boole_d.

    FIELD-SYMBOLS: &amp;lt;fk&amp;gt; TYPE string.

    FIELD-SYMBOLS: &amp;lt;data&amp;gt; TYPE any.

    FIELD-SYMBOLS: &amp;lt;table&amp;gt; TYPE ANY TABLE.

    FIELD-SYMBOLS: &amp;lt;sotab&amp;gt; TYPE SORTED TABLE.

    FIELD-SYMBOLS: &amp;lt;sttab&amp;gt; TYPE STANDARD TABLE.

    FIELD-SYMBOLS: &amp;lt;line&amp;gt; TYPE any.

    DATA: ls_line TYPE REF TO data.

    DATA: lr_td TYPE REF TO cl_abap_typedescr.

    DATA: lr_ttd TYPE REF TO cl_abap_tabledescr.



* If the incoming json contains no '{}[]', we are dealing with

* a basic (scalar) value that is simply assigned to the data

* and then we return

    IF json NA '{}[]'.

* Replace escape characters (TODO: Check if there are more!)

      lv_value = json.

      REPLACE ALL OCCURRENCES OF '\n' IN lv_value WITH cl_abap_char_utilities=&amp;gt;newline.

      REPLACE ALL OCCURRENCES OF '\t' IN lv_value WITH cl_abap_char_utilities=&amp;gt;horizontal_tab.

      REPLACE ALL OCCURRENCES OF '\f' IN lv_value WITH cl_abap_char_utilities=&amp;gt;form_feed.

      REPLACE ALL OCCURRENCES OF '\v' IN lv_value WITH cl_abap_char_utilities=&amp;gt;vertical_tab.

      REPLACE ALL OCCURRENCES OF '\b' IN lv_value WITH cl_abap_char_utilities=&amp;gt;backspace.

      REPLACE ALL OCCURRENCES OF '\\' IN lv_value WITH '\'.

* TODO: Deal with specific data types, e.g. dates etc.

      data = lv_value.

      EXIT.

    ENDIF.



    lv_len = strlen( json ).



* Check if we are dealing with a table

    lr_td = cl_abap_typedescr=&amp;gt;describe_by_data( data ).

    IF lr_td-&amp;gt;type_kind = cl_abap_typedescr=&amp;gt;typekind_table.

* This information is used later...

      lv_table = 'X'.

      ASSIGN data TO &amp;lt;table&amp;gt;.

      CREATE DATA ls_line LIKE LINE OF &amp;lt;table&amp;gt;.

      ASSIGN ls_line-&amp;gt;* TO &amp;lt;line&amp;gt;.

    ELSE.

      lv_table = ' '.

    ENDIF.



* Reset counters/flags

    lv_off = 0.

    lv_instr = ' '.

    lv_level = 0.

    ASSIGN lv_key TO &amp;lt;fk&amp;gt;.



    WHILE lv_off &amp;lt; lv_len.

      lv_char = json+lv_off(1).



**********************************************************************

* IN STRING

**********************************************************************

* Character is in a string delimited by double quotes

      IF lv_instr = 'X'.

        IF lv_char = '"'.

* Switch out of delimited character string

          IF lv_pchar NE '\'.

            lv_instr = ' '.

          ELSE.

            CONCATENATE &amp;lt;fk&amp;gt; lv_char INTO &amp;lt;fk&amp;gt; RESPECTING BLANKS.

          ENDIF.

        ELSE.

          CONCATENATE &amp;lt;fk&amp;gt; lv_char INTO &amp;lt;fk&amp;gt; RESPECTING BLANKS.

        ENDIF.



**********************************************************************

* OUTSIDE STRING

**********************************************************************

* Character is not in a string delimited by double quotes

      ELSE.



* On opening character, shift level up

        IF lv_char CA '{['.

          ADD 1 TO lv_level.

        ENDIF.



* When the value is contained in a {}/[], the entire value must

* be passed to the next level of processing

        IF lv_level &amp;gt; 1.

          CONCATENATE &amp;lt;fk&amp;gt; lv_char INTO &amp;lt;fk&amp;gt; RESPECTING BLANKS.

        ELSE.

          IF lv_char CA '[{'. "&amp;lt;- Chars ignored outside of str

          ELSEIF lv_char = ':'.

            ASSIGN lv_value TO &amp;lt;fk&amp;gt;.

* The key collected up to now is assigned to the data member

            TRANSLATE lv_key TO UPPER CASE.

            SHIFT lv_key LEFT DELETING LEADING space.

            ASSIGN COMPONENT lv_key OF STRUCTURE data TO &amp;lt;data&amp;gt;.



* End of a key/value pair (we bump up against delimiter) - pass to next level

          ELSEIF ( lv_char = ',' OR lv_char = '}' ) AND lv_table = space.



* Process collected value

            SHIFT lv_value LEFT DELETING LEADING space.

            json_to_data( EXPORTING json = lv_value CHANGING data = &amp;lt;data&amp;gt; ).



* Clear key and value

            CLEAR: lv_key, lv_value.



            ASSIGN lv_key TO &amp;lt;fk&amp;gt;.



            CLEAR: lv_key, lv_value.



* End of a key/value pair (we bump up against delimiter) - pass to next level

* But in table mode, we pass an instance of a row of the table, and afterward

* add it to the table

          ELSEIF ( lv_char = ',' OR lv_char = ']' ) AND lv_table = 'X'.



* Process collected value

* Inside array in JSON, there are no keys, only list of values, the collected

* value is in lv_key

            SHIFT lv_key LEFT DELETING LEADING space.

            json_to_data( EXPORTING json = lv_key CHANGING data = &amp;lt;line&amp;gt; ).



* On return: if dealing with table, add the record to the table

            lr_ttd ?= lr_td.

            IF lr_ttd-&amp;gt;table_kind = cl_abap_tabledescr=&amp;gt;tablekind_sorted

              OR lr_ttd-&amp;gt;table_kind = cl_abap_tabledescr=&amp;gt;tablekind_hashed.

              ASSIGN data TO &amp;lt;sotab&amp;gt;.

              INSERT &amp;lt;line&amp;gt; INTO TABLE &amp;lt;sotab&amp;gt;.

            ELSE.

              ASSIGN data TO &amp;lt;sttab&amp;gt;.

              APPEND &amp;lt;line&amp;gt; TO &amp;lt;sttab&amp;gt;.

            ENDIF.

            CLEAR &amp;lt;line&amp;gt;.



* Clear key and value

            CLEAR: lv_key, lv_value.



            ASSIGN lv_key TO &amp;lt;fk&amp;gt;.



            CLEAR: lv_key, lv_value.



* Switch cursor into delimited string; consecutive characters

* are then treated as part of a key or value, even if they are

* special characters

          ELSEIF lv_char = '"'.

            lv_instr = 'X'.



* Other chars processed as either key or value

          ELSE.

            CONCATENATE &amp;lt;fk&amp;gt; lv_char INTO &amp;lt;fk&amp;gt; RESPECTING BLANKS.

          ENDIF.



        ENDIF.



* On closing character, shift level down again

        IF lv_char CA '}]'.

          SUBTRACT 1 FROM lv_level.

        ENDIF.



* END: Are we in string or out?

      ENDIF.



      lv_pchar = lv_char.

      ADD 1 TO lv_off.

    ENDWHILE.

  ENDMETHOD.                    "json_to_data

ENDCLASS.                    "json_util IMPLEMENTATION



START-OF-SELECTION.



  DATA : go_json TYPE REF TO json_util.



  DATA : gv_json TYPE string,

         gt_itab TYPE ztest_tt_001.



  gv_json =

  '[{"MATKL":"Mal Grubu 1","ATTRB":{"TYPE":"A","BRANCH":"B"},"MATERIAL":[{"NAME":"Malzeme 1","WEIGHT":"12,2","LENGTH":"","UoM":"KG"}]}]'.



  CREATE OBJECT go_json.



  CALL METHOD go_json-&amp;gt;json_to_data

    EXPORTING

      json = gv_json

    CHANGING

      data = gt_itab.



  BREAK-POINT.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jan 2018 11:23:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/json-to-abap-create-data-dynamically/m-p/569872#M22189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-01-19T11:23:05Z</dc:date>
    </item>
  </channel>
</rss>

