In this work, we present a new solution representation for the Helmholtz transmission problem in a bounded domain in R^2 with a thin and periodic layer of finite length. The layer may consists of a periodic pertubation of the material coefficients or it is a wall modelled by boundary conditions with an periodic array of small perforations. We consider the periodicity in the layer as the small variable delta and the thickness of the layer to be at the same order. Moreover we assume the thin layer to terminate at re-entrant corners leading to a singular behaviour in the asymptotic expansion of the solution representation. This singular behaviour becomes visible in the asymptotic expansion in powers of delta where the powers depend on the opening angle. We construct the asymptotic expansion order by order. It consists of a macroscopic representation away from the layer, a boundary layer corrector in the vicinity of the layer, and a near field corrector in the vicinity of the end-points. The boundary layer correctors and the near field correctors are obtained by the solution of canonical problems based, respectively, on the method of periodic surface homogenization and on the method of matched asymptotic expansions. This will lead to transmission conditions for the macroscopic part of the solution on an infinitely thin interface and corner conditions to fix the unbounded singular behaviour at its end-points. Finally, theoretical justifications of the second order expansion are given and illustrated by numerical experiments. The solution representation introduced in this article can be used to compute a highly accurate approximation of the solution with a computational effort independent of the small periodicity delta.