Certain airlines will let you in the cockpit if you have a non rev ticket and the cabin is full. This is at the captains discretion. I know of Air France having done it. I was put in the FA jump seat once by the captain on an SAS flight. Thought that was strange since I'm not an FA.
Anyway. It may work if you have a ticket.