Hi Kiran,
Both are different in terms of operation.
Session Idle-timeout would wait for X seconds and if there is no traffic ( data) flowing in that X seconds, it will tear down the connection.
However in case of keepalive, it will check for keepalives from other end and if no keepalive is received in stipulated time, it will tear down the session.
So if you configure both idle-timeout and keepalive it will only tear down the session if no keepalives are received from remote end in stipulated time.
HTH,,
Smitesh