PS: ItemId has a special code format in a project, so I used itemId mask in "like" statement.
static void NBA_GetEmptyBOM(Args _args)
{
BOM tBOM;
BOMVersion tBomVersion;
info("Run");
while select tBOMVersion
where tBomVersion.ItemId like '?-?????-??????'
notexists join tBOM
where tBOM.BOMId == tBomVersion.BOMId
{
info(tBomVersion.BOMId + " with itemId: " + tBomVersion.ItemId);
}
info("Done");
}
PPS: A report about BOM statement could be a better solution, but I in a current stage we decided not to spend developer time on developing the report.