WHERE ( A.F20CRT BETWEEN :as_date_dt_from AND :as_date_dt_to
AND ( V.ZC3CEM LIKE :as_empno OR V.ZC3CEM2 LIKE :as_empno )
AND A.F20QDP BETWEEN :as_dept_cd_from AND :as_dept_cd_to
AND (CASE IFNULL(A.F20DOCN, '') WHEN '' THEN 'Y' ELSE 'N' END) = :as_erp_yn
AND A.F20STS LIKE :as_sts )
OR ( A.F20PRN = :as_key )
WITH UR