Thanks but I'm stuck on the first step. I'll try what æryn told me.
You can primary scan the scannable megaships from 10km out, you can't scan landable megaships though as mentioned, the difference should be clear in the name, it appears you are scanning the wrong megaships? The megaships you should be scanning will have names in the format "BAT-183 Bowman-class Researcher" a code followed by a description, haulers, detention, cropper and etc, these are normally the mission objective ships.
They will show up in the nav panel if you have scanned the system.
Oh yes, just to add, not every system has megaships available to scan.
Third edit, you need to use the regular "target" function before trying to scan, target the megaship then use the scanner. Make sure you keep it running for long enough.
Another edit: Once you have scanned the megaship and got close enough the sub-targets show up in your contacts panel.