catnesma
19th December 2012, 10:59
Hello All,

Trying to write a query in UE.... To restrict users entering/creating a warehouse receipt if they do not have proper authorizations for that warehouse and company.

Main session is whinh2100m100 and I want to disable one of satellite session (whinh3512m600)

comp = get.compnr()
user = logname$
cwar = whinh200.stco
stty = whinh200.stty

if stty = tctyps.warehouse and comp = 101 then

select whinh999.*
from whinh999
where whinh999.comp = :comp
and whinh999.user = :user
and whinh999.cwar = :cwar
selectdo
|enable.satellite("whinh3512m600")
selectempty
disable.satellite("whinh3512m600")
dal.set.error.message("whinh200ue")
return(DALHOOKERROR)
endselect
endif


I get an error while comiling the UE as follows:

Unresolved refrerence to function 'disable.satellite'

BaanInOhio
19th December 2012, 16:20
If you are trying to put 'disable.satellite' in a user exit script, it won't work even if it compiled successfully. UE's are pretty limited and generally won't support form or form field related functionality. UEs are limited to operations that would affect directly the table (insert, update, delete) and is attached to a table, not a specific session. 'disable.satellite' is only relevant in multi-main table sessions and the UE script doesn't have any way to determine the session type since it is table-based.