cancel
Showing results for 
Search instead for 
Did you mean: 

How to loop on JSON Output in SAP MII?

Former Member
0 Kudos

Hi Experts,

I have a scenario where I am receiving a JSON output from an external system
in to MII. This JSON contains data in a form of rows. I want to store this JSON
data in to my MII database table ( SQL Server 2008). Each row in JSON would be
1 record in my table

Option1 I have is to can convert this JSON to XML by using JSON to XML
converter action block and loop on this XML to insert this record to MII Table.

I am looking for some other options where I can directly use this JSON data
to store in my table either by looping this JSON directly or some other ways.

Please advise, if loop on JSON is possible in MII or suggest any other way
to get this data stored in to MII Table.

Regards,

Kirti

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You could use JQuery to loop through your JSON object. Or use plain javascript. It depends on your use case.

Anushree

Answers (3)

Answers (3)

swaroop_anasane
Active Contributor
0 Kudos

Hi Kriti,

When you say there's no way around, you must be referring to BLS. On UI there are ways as already mentioned by Anushree and Rohit.

Warm Regards,

Swaroop

Former Member
0 Kudos

Thats Correct. There is no way around to loop JSON in MII BLS.

Former Member
0 Kudos

Thanks Rohit and Anushree for replying.

I understand that I will have to convert JSON to XML to consume it in MII BLS and then do the further processing and there is no other way around it.

Former Member
0 Kudos

Hi Kirti,

You cannot loop on JSON in MII BLS.

As Anushree mentioned out this can done in UI using plain javascript or JQuery.

Best way was would be converting JSON to XML and then do the further processing.

Regards,

Rohit Negi.