f_find_cusmtrlname.srf 738 B

12345678910111213141516171819202122232425262728
  1. $PBExportHeader$f_find_cusmtrlname.srf
  2. global type f_find_cusmtrlname from function_object
  3. end type
  4. forward prototypes
  5. global function integer f_find_cusmtrlname (Int arg_cusid, Int arg_mtrlid, ref string arg_cusmtrlcode, ref string arg_cusmtrlname, ref string arg_cusmtrlmode)
  6. end prototypes
  7. global function integer f_find_cusmtrlname (Int arg_cusid, Int arg_mtrlid, ref string arg_cusmtrlcode, ref string arg_cusmtrlname, ref string arg_cusmtrlmode);Int rslt = 1
  8. SELECT cusmtrlcode, cusmtrlname, cusmtrlmode
  9. into :arg_cusmtrlcode, :arg_cusmtrlname, :arg_cusmtrlmode
  10. FROM u_cusmtrlname
  11. where cusid = :arg_cusid and mtrlid = :arg_mtrlid;
  12. IF sqlca.SQLCode <> 0 THEN
  13. rslt = 0
  14. GOTO ext
  15. END IF
  16. ext:
  17. RETURN rslt
  18. end function