On an inventory layout, place the Products::itemCode field
enter find mode.
put an asterisk into the Products::itemCode field
Click the Omit button in the status toolbar so that you are finding inventory records that do not show any data in the related itemcode field.
Perform the find.
These same steps can be scripted. With a script, it is not necessary to place the itemCode field on this layout in order to get this to work. (But it is useful as a way to confirm that the find worked as expected.)