hi Joy
add one more set of brackets like below in red.
( Company Code = 'ABC' AND Account Type = 'K' AND
Document Type = 'KR' OR Document Type = 'KZ' OR
Document Type = 'RE' AND W. Tax Code <> '' ) OR (
Company Code ="ABC" AND (
G/L = '1171605' OR G/L = '1171631' OR
G/L = '1171634' OR G/L = '1171635' OR
G/L = '1171636' OR G/L = '1171637' OR
G/L = '1171650' ) )
Regards
Sach!n