$PBExportHeader$f_oa.srf global type f_oa from function_object end type forward prototypes global function integer f_oa (transaction arg_trans, boolean arg_ifcommit, ref string arg_msg, long arg_powerid, long arg_scid, long arg_billid, string arg_billcode, string arg_relcode, string arg_dscrp) end prototypes global function integer f_oa (transaction arg_trans, boolean arg_ifcommit, ref string arg_msg, long arg_powerid, long arg_scid, long arg_billid, string arg_billcode, string arg_relcode, string arg_dscrp);Int rslt = 1 uo_oa_doc uo_oa uo_oa = CREATE uo_oa_doc uo_oa.ins_tran = sqlca IF uo_oa.p_create_oa_flow(arg_powerid,arg_scid,arg_billid,arg_billcode,arg_relcode,arg_dscrp,arg_ifcommit,arg_msg) = 0 THEN rslt = 0 GOTO ext END IF IF uo_oa.p_init(uo_oa.ins_docid,arg_ifcommit,arg_msg) = 0 THEN rslt = 0 GOTO ext END IF ext: IF rslt = 0 THEN ROLLBACK USING arg_trans; ELSEIF rslt = 1 AND arg_ifcommit THEN COMMIT USING arg_trans; END IF DESTROY uo_oa RETURN rslt end function