f_modify_selectstr.srf 670 B

12345678910111213141516171819202122232425262728
  1. $PBExportHeader$f_modify_selectstr.srf
  2. global type f_modify_selectstr from function_object
  3. end type
  4. forward prototypes
  5. global function string f_modify_selectstr (string arg_selectstr)
  6. end prototypes
  7. global function string f_modify_selectstr (string arg_selectstr);String ls_ret,ls_selectstr
  8. ls_selectstr = Lower(arg_selectstr)
  9. IF Pos(ls_selectstr,' where ',1) > 0 THEN
  10. IF f_return_storageidstr() <> '' THEN
  11. ls_selectstr = ls_selectstr + ' and ' + f_return_storageidstr()
  12. END IF
  13. ELSE
  14. IF f_return_storageidstr() <> '' THEN
  15. ls_selectstr = ls_selectstr + ' where ' + f_return_storageidstr()
  16. END IF
  17. END IF
  18. ls_ret = ls_selectstr
  19. RETURN ls_ret
  20. end function