After some great help from CTSC, I finally figured the solenoid 4E87 is outside the trans above the top of the gear shift. In order to get to it, you have pull out the following in sequence.
1. Hazard switch
2. Panel holding the air vents
3. Front panel containing the controls to AC etc
4. Lower panel where your NAV DVD section.
5. The centre knob
6. Menu switch
7. Gear shift knob + cover + drive panel (which indicate which gear you are in)
8. The complete mid section panel.
9. Cigarette lighter holder
And now finally if you see right above the gear shift, you will see a cable going into the gear shift. That little connector wire is going into the solenoid 4E87 (picture attached). Now back to my problem. During cold start I get a warning for this solenoid not being functional and then it disappears after few minutes. I have checked the solenoid is fine to its resistance of 19-21 Ohms, and the connecting cable has the right voltage during the day time, but strangely at cold start, the cable does not have any voltage at all for few minutes thus causing that fault message.
Does anyone has any idea why the cable will not have voltage for first few minutes? Anyone good with BMW WDS and know where the current in this cable is coming from that I can diagnose further?