Application Development and Automation 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: 
Read only

JSON deep structure to dynamic internal table

jeevitha_d
Member
0 Likes
4,099

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
Read only

geert-janklaps
SAP Mentor
SAP Mentor
1,706

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
Read only

geert-janklaps
SAP Mentor
SAP Mentor
1,707

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