From an article by Raju Bharatan reproduced here. Excerpts
“They weren’t in Bhairavi, come to think of it. But the total musician never thinks of the raag while composing. He plays in Sur and raag just flows. So I can’t go along with you on the point that Mera joota hai Japani, as it finally emerged, because it was in Bhairavi. I maintain that my first three tunes were good, very good. But then I only looked at the tune Raaj Saab had an exact visual idea of what he wanted. And he just seized that fourth tune from my custody the moment I struck the right note, as he audio-visualised it”.
"Incidentally, I always prepared the tune first and then got words written by Shailendra. Letting the poet write the song first, I had discovered, led to his penning the song-lyrics in the same monotonous metre. No, I don’t agree this, my reverse style of tuning, placed a limitation on Shailendra’s poetry. The Ramaiyya vastavaiyya tune came first, yet did Shailendra’s poetry suffer in any way’ No! the words for me represented the portrait, the tune the frame. Once the framework was ready in the form of my tune, the portrait, the song- lyric, could always be fitted in, exactly to size.”