Applies key-based sorting to the items in the BOM table.
eOk if successful or the appropriate error code otherwise.