Hi Guys,
I'm just looking at section of code and I think my understanding isn't a 100%.
I've exported the bfgitem.itemcode to a file and can see there are records.
The next line "if not available bfgitem then next.", my understanding is the code will jump straight to the "create t-compstyle." (Code1.PNG) section as there are records so the section in the middle is skipped.
However I also exported the brmitem.itemcode and that also contains records ...... so I'm clearly not understanding it.
Can anyone assist and clarify?
Thanks,
Hassam
I'm just looking at section of code and I think my understanding isn't a 100%.
Code:
find first bfgitem where bfgitem.inentity = p-inentity and
bfgitem.itemcode = t-bomcomp.itemcode no-lock no-error.
if not available bfgitem then next.
find first darwin.range where range.range = bfgitem.range no-lock no-error.
find first brmitem where brmitem.inentity = p-inentity and
brmitem.itemcode = t-bomcomp.component no-lock no-error.
if not available brmitem then next.
/*component by style records*/
find first t-compstyle where t-compstyle.itemcode = bfgitem.statisticscode and
t-compstyle.component = t-bomcomp.component no-lock no-error.
if not available t-compstyle then do:
create t-compstyle.
assign
t-compstyle.leaditem = bfgitem.statisticscode
t-compstyle.itemcode = t-bomcomp.itemcode
t-compstyle.component = upper(t-bomcomp.component)
t-compstyle.productgroup = upper(brmitem.prodgroup)
t-compstyle.compcol = substring(brmitem.itemcode,8,3)
t-compstyle.description = upper(brmitem.description).
I've exported the bfgitem.itemcode to a file and can see there are records.
The next line "if not available bfgitem then next.", my understanding is the code will jump straight to the "create t-compstyle." (Code1.PNG) section as there are records so the section in the middle is skipped.
However I also exported the brmitem.itemcode and that also contains records ...... so I'm clearly not understanding it.
Can anyone assist and clarify?
Thanks,
Hassam