$PBExportHeader$f_get_203.srf global type f_get_203 from function_object end type forward prototypes global function decimal f_get_203 (long arg_cmonth, string arg_subname) end prototypes global function decimal f_get_203 (long arg_cmonth, string arg_subname);decimal rslt_amt select ECredit - EDebit into :rslt_amt from cw_balance,cw_subject where cw_balance.accsetid = cw_subject.accsetid and cw_balance.subid = cw_subject.subid and cw_balance.accsetid = :sys_accsetid and cw_balance.yearmon = :arg_cmonth and left(cw_balance.subid,6) = '203002' and ltrim(rtrim(cw_subject.name)) = :arg_subname; if sqlca.sqlcode <> 0 then rslt_amt = 0 end if if isnull(rslt_amt) then rslt_amt = 0 return rslt_amt end function