12345678910111213141516171819202122232425262728293031 |
- $PBExportHeader$f_find_dftstorageid.srf
- global type f_find_dftstorageid from function_object
- end type
- forward prototypes
- global function integer f_find_dftstorageid (long arg_mtrlid, ref long arg_storageid)
- end prototypes
- global function integer f_find_dftstorageid (long arg_mtrlid, ref long arg_storageid);Int rslt = 1
- IF arg_mtrlid = 0 THEN
- arg_storageid = 0
- RETURN 1
- END IF
- SELECT top 1 storageid
- INTO :arg_storageid
- FROM u_mtrl_storage
- Where mtrlid = :arg_mtrlid;
- IF sqlca.SQLCode <> 0 THEN
- arg_storageid = 0
- END IF
- if isnull(arg_storageid) then arg_storageid = 0
- RETURN rslt
- end function
|