Spectral behavior of AM Her and QQ Vul in high and intermediate states in the UV