SELECT NVL(SUM(A.AMOUNT),0) INTO W_ATS_RE_BOOKED_AMT FROM XXXXXXXXX A, ( SELECT B.TRD_NO FROM XXXXXXXXX B WHERE B.CLIENT_CD = W_IN_CLIENT_CD