I had a problem on my R1200GS which made the idle very rough and also caused stalling. The problem turned out to be a faulty lamba sensor. There are two sensors one on each exhaust. This was found by the dealer using the diagnostice computer.
My 1150 did that, turned out to be corrosion on the left sparkplug coil. BMW service helpfully pointed out that 'the symptoms became worse when braking!'
Charged me £150 for that . . . . . They did adjust the throttle bodies so I suppose its worth it
Did not even diagnose the spark plug coil, found that on this site! It was very very obvious. Swapped them over prior to buying new ones and it helped greatly but still ropey. New ones fitted bike now works (again) like a treat!