  Numerous delta Sct and gamma Dor pulsators are identified in the region of
the Hertzsprung-Russell diagram that is occupied by chemically peculiar
magnetic Ap stars. The connection between delta Sct and gamma Dor pulsations
and the magnetic field in Ap stars is however not clear: theory suggests for
magnetic Ap stars some critical field strengths for pulsation mode suppression
by computing the magnetic damping effect for selected p and g modes. To test
these theoretical considerations, we obtained PEPSI spectropolarimetric
snapshots of the typical Ap star HD340577, for which delta Sct-like pulsations
were recently detected in TESS data, and the gamma Dor pulsator HR8799, which
is a remarkable system with multiple planets and two debris disks. Our
measurements reveal the presence of a magnetic field with a strength of several
hundred Gauss in HD340577. The measured mean longitudinal field would be the
strongest field measured so far in a delta Sct star if the pulsational
character of HD340577 is confirmed spectroscopically. No magnetic field is
detected in HR8799.
