pralash
1st March 2018, 09:42
Hello,

While referring the existing script, I have seen so many places the statement such as RETIFNOKT.... So what is the main usage of this.... The script is as follows....

function extern boolean whinh210.tlot.is.mandatory()
{
if whwmd.dll0400.item.is.lot.in.inventory( whinh210.item,
whinh210.comp) then
RETIFNOKT(lot.is.mandatory(whinh210.lsel))
endif

return(false)
}

Here what is the meaning for RETIFNOKT function... Please let me know about it....
Thanks in advance,
Regards,
Pralash

bdittmar
1st March 2018, 10:18
Hello,
read the DEV-Guide.

vahdani
15th March 2018, 11:05
Hallo Pralash,

sorry for the late reply!

This is a shorthand which is defined in include tcmcs2000. Apprantly RETIFNOTOKT(some.function(...)) is shorthand for call some.functon(...) if the function returns a NOT OK - ie a value not equal to 0 - then return true (T)!!! Why there is a need for this shorthand I cannot say but it is almost the same as follwing:

long l.ret

l.ret = some.function(...)
if l.ret <> 0 then
return(true)
endif

return(false)

In your case if entered item is lot controlled and a specific lot must be entered (whinh210.lsel = yes) then the flag whinh210.tlot.is.mandatory is raised (returns true) otherwise it is not mandatory to enter the lot (returns false)

pralash
16th March 2018, 09:54
Hi,

Thanks so much for your information.....

Regards,
Pralash