Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

JSON deep structure to dynamic internal table

jeevitha_d
Member
0 Kudos

Hi ,

I have a requirement where I need to convert a given json array in deep structure form to dynamic internal table .

I have used

data : it_item1 TYPE REF TO data.

CALL METHOD /ui2/cl_json=>deserialize
EXPORTING
json = str "array holding the values required
CHANGING
data = it_item1.

I tried converting it_item1 to internal table but came across the following error:"IT_ITEM1" is not an internal table.

Thank you

1 ACCEPTED SOLUTION

geert-janklaps
Active Contributor

Hi,

Please have a look at following wiki, usage of /ui2/cl_json is explained here in detail.

https://wiki.scn.sap.com/wiki/display/Snippets/One+more+ABAP+to+JSON+Serializer+and+Deserializer

Best regards,

Geert-Jan Klaps

1 REPLY 1

geert-janklaps
Active Contributor

Hi,

Please have a look at following wiki, usage of /ui2/cl_json is explained here in detail.

https://wiki.scn.sap.com/wiki/display/Snippets/One+more+ABAP+to+JSON+Serializer+and+Deserializer

Best regards,

Geert-Jan Klaps