Like stated above, scan the car for codes, using a code reader if available. If the batt was not disconnected or drained you might have a transmission code stored and this could be a clue in your diagnosis.
Indeed the NO start situation is due to your gear selector switch not getting power or is at fault. I don't have the diagram handy, to get them I would go to a BMW dealership if available, try to get them from there, order a service manual from dealership or use ALLDATA.com (pay the membership), or look for Mitchell auto software on the internet.
Without any diagram I would remove the round jack that goes in the transmission, and using a voltmeter I would check if there is any power coming to the transmission. I would start to check if the battery has enough voltage, if there is any voltage coming to the shifting level switch/solenoid. Since is illuminating only in S mode that is the problem.
JOY = BMW