I had used the following code to prevent the iPhone from entering the sleep mode.
[UIApplication sharedApplication].idleTimerDisabled=YES
But is it possible to put the iphone in Sleep mode programmatically?
No sir, we just can't do it cap'n... we don't... have.. the power.
That's just another thing Apple doesn't want us tinkering with.