No accuracy in the Ramp Test

I have done the Ramp Test twice and in both this test gives me in the end a FTP way above of where I am if I make the test in the 20 min FTP Test, but waaaay above. I was in 303 FTP with 69 kg and when I finished the Ramp Test it gave me 341 FTP, yes I have got better for sure I have no doubt of it but 301 to 341 is a huge difference. I will do the 20 mim FTP Test and I think I’ll be in around 315 - 320 FTP Unless that the ramp test is for some specific measurement that I am not doing that is totally wrong as an FTP measure, I usually can do the GAPP training after the ramp test and this time I got killed at 1/3 of the training, I just got my two legs cramps for the intervals at 422 435 and 460 watts it was crazy, way way above my capabilities.