f_get_sccode.srf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $PBExportHeader$f_get_sccode.srf
  2. global type f_get_sccode from function_object
  3. end type
  4. forward prototypes
  5. global function integer f_get_sccode (long arg_scid, transaction arg_transaction, ref string arg_sccode, ref string arg_msg)
  6. end prototypes
  7. global function integer f_get_sccode (long arg_scid, transaction arg_transaction, ref string arg_sccode, ref string arg_msg);//====================================================================
  8. // Function: f_get_sccode(arg_scid,arg_transaction,arg_sccode,arg_msg)
  9. //--------------------------------------------------------------------
  10. // Description: 取分部代号
  11. //--------------------------------------------------------------------
  12. // Arguments:
  13. // value long arg_scid
  14. // value transaction arg_transaction
  15. // reference string arg_sccode
  16. // reference string arg_msg
  17. //--------------------------------------------------------------------
  18. // Returns: integer
  19. //--------------------------------------------------------------------
  20. // Author: yyx Date: 2003.11.12
  21. //--------------------------------------------------------------------
  22. // Modify History:
  23. //
  24. //====================================================================
  25. SELECT sccode
  26. INTO :arg_sccode
  27. FROM u_scdef
  28. Where scid = :arg_scid USING arg_transaction;
  29. IF arg_transaction.SQLCode <> 0 THEN
  30. arg_msg = '取分部代号失败>>'+arg_transaction.SQLErrText
  31. RETURN 0
  32. END IF
  33. RETURN 1
  34. end function