The electronic structure of the ternary RPtIn (R = La, Ce) compounds, which crystallize in the hexagonal ZrNiAl-type structure, was studied by X-ray photoelectron spectroscopy measurements and calculation using the ab initio methods (linear mu n-tin orbital in the atomic sphere approximation, full potential linear mu n-tin orbital, full potential linear orbital). The results showed that the valence band in these compounds is formed by the Pt 5d and In 5s and 5p states. The band calculations with spin orbit coupling have shown that the Ce 4f peaks consist of two peaks above the Fermi level that correspond to the Ce 4f7/2 and 4f5/2 doublet and wide peaks corresponding to the La 4f states. The analysis of Ce 3d spectra on the basis of the Gunnarsson Schonhammer model gives hybridization of 4f orbitals with the conduction electron band equal to 170 meV.