Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JSON data fetching and populating in internal table in SAP

Hi Team,

I have a requirement where in I want to feed data from JSON file into SAP. JSON contains a number of arrays or entities with different fields.

For eg: [ "A" { "AF1" : "AV1" , "AF2": "AV2"} , "B" { "BF1" : "BV1" , "BF2" : "BV2" , "BF3" : "BV3"} , C... and so on.

I now want to read all these data for A, B, C.. and enter it into SAP. I created a deep structure having A,B,C as structures which in turn contains all the fields. Now, how do I add all these data into the internal table? Also, there are multiple values of A, B ,C like after C we again have another set of data A.B,C and so on.

I tried with some logic by checking characters and then for brackets and accordingly adding data. But I facing many issues.

It would of great help if you all can help me with the pointers on how to achieve this.

Thank you.

Not what you were looking for? View more on this topic or Ask a question