//Catgeory Based on product Number
private str category(ItemId itemId)
{
InventTable inventtable;
// EcoResCategory category;
EcoResProductCategory prodCategory;
RecId catRecid;
str 100 categoryStr;
str recursiveCall(RecId _recid)
{
while select category where category.RecId == _recid//prodCategory.Category
{
categoryStr = '-'+category.code+categoryStr;
recursiveCall(category.ParentCategory);
}
return categoryStr;
}
;
inventtable = InventTable::find(itemId);
select prodCategory where prodCategory.Product == inventtable.Product;
return strDel(recursiveCall(prodCategory.Category),1,1);
}
private str category(ItemId itemId)
{
InventTable inventtable;
// EcoResCategory category;
EcoResProductCategory prodCategory;
RecId catRecid;
str 100 categoryStr;
str recursiveCall(RecId _recid)
{
while select category where category.RecId == _recid//prodCategory.Category
{
categoryStr = '-'+category.code+categoryStr;
recursiveCall(category.ParentCategory);
}
return categoryStr;
}
;
inventtable = InventTable::find(itemId);
select prodCategory where prodCategory.Product == inventtable.Product;
return strDel(recursiveCall(prodCategory.Category),1,1);
}
No comments:
Post a Comment