How to get the ID from MenuItem


I need to get the id against MenuItem.Name at the runtime via query. How is it possible.
If i introduce fish in the menu how can i run the query to get the unique id assigned to fish in MenuItems.

This was a report expression from emre for my item sales report;

@{REPORT ORDER DETAILS:O.MenuItemId,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}

O.MenuItemId being what your interested in.
This was in V5 topic so posible it might not be available in v4 but haven’t checked.