cancel
Showing results for 
Search instead for 
Did you mean: 

Don't we have array kind of things in SAP MII?

0 Kudos

I am working on SAP MII 14.0. I have to send the data from SAP to OTM using MII as Middleware.

We will get multile items in one XML as SAP Response at a time. Each item will have OTM_Ship tag which contains different value for each item. We have to save all QTM_Ships in one list.

So Please suggest me that how can i save all OTM_Ship values in one list.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raviteja,

SAP MII has data type of List.

You can create a transaction variable of type List and then store the values in the list using insert(list, location, value) method.

Regards,

Rohit Negi

0 Kudos

ok one more query please.

Using loop we will save each OTM_Ship in the list. After that If i want to check whether the current OTM_Ship is already there in the list or not, then how can we check that using that perticular list.

Former Member
0 Kudos

Hi Raviteja,

You can use the Map data type in this case.

Map will not allow duplicate keys.

Use this method: put(map, key, value)

Regards,

Rohit Negi.

0 Kudos

I should have to use if condition for OTM_Ship. Because i have to send the data based on that only.

Also can you please explain how can i use if condition for List or Map.

Former Member
0 Kudos

Hi Raviteja,

Once you have stored the values in the List you can use the For Next Loop.

Set the 'To' param as size(List_Name)-1

Then you can get the values in the list by: List_Name{#For_Next_Loop_0.CurrentItem#}

This same logic can also be used to check the existence of an element in the list.

Regards,

Rohit Negi.

0 Kudos

Hi Rohit,

Thank you som much now it is working.

Answers (0)