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: 

I want to create JSON of DEEP Structure in SAP ABAP .

0 Kudos

When I am Seriliazing ABAP DEEP Structure to JSON using code.
------------------------------------------------------------------------------------------------------------------------

-converting GT_MAIN into JSON

ls_json-value = /ui2/cl_json=>serialize( data =GT_MAIN compress = abap_false

pretty_name = /ui2/cl_json=>pretty_mode-camel_case ).

ls_json-key = 'Detail'.

APPEND ls_json TO et_json.

------------------------------------------------------------------------------------------------------------------

it is not converting all data in JSON.

So Please guide me on how to convert Deep structure to JSON.

My Deep Structure Format is
ZHN_FI_PV_ST is also encapsulated in Table Type.
the format is Table Type----> Structure ---- > Table type ----> Structure..

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

You say "it is not converting". What do you get and what do you expect? (please provide an example, table type/structure is not sufficient to understand) Or do you mean the issue is that the JSON doesn't contain "ZHN_FI_PV_DTL_TT":[{...}], or contains "ZHN_FI_PV_DTL_TT":[] (?), although the component is not empty?

mateuszadamus
Active Contributor
0 Kudos

Hello hafiz_naeem

There is plenty of SAP OSS notes for /UI2/CL_JSON class. Do you have them all implemented?

Kind regards,
Mateusz

saravanan_palani
Discoverer
0 Kudos

Hi hafiz_naeem

Have you found a way to resolve the problem. I'm facing a same problem please let me know the way if you resolved it.

Regards,

Saran

0 Kudos

Thanks for coming to SAP Community for answers. Please post your question as a new question here:

https://answers.sap.com/questions/ask.htmlSince you're new in asking questions here, check out our tutorial about asking and answering questions (if you haven't already), as it provides tips for preparing questions more effectively, that draw responses from our members. Please note, that your post here won't be answered.