Hiya,
Need to do it on a regular basis on my P38 as when left for more than five days the battery goes flat due to lots of 433 MHz interference where I live.
The procedure for my 2000 P38 is as follows assuming right hand drive:
Make sure the doors, windows and bonnet are closed, get out and lock the car again with the key. (Note: I have heard but never had to on mine, for 1996 and later models, you have to turn the key to the lock position four times for this step if the remote handset was not used to lock the vehicle). Then turn the key the required number of times according to the following sequence. (At each step the side indicator lights and the dash will light, I believe this is to show it has recognized the input).
1) To enter the first digit, turn the key the required number of times to the unlock position and return, that is from centre to the unlock position and back to centre for the number of time equal to your fist digit.
2) To enter the second digit, turn the key the required number of times to the lock position, which is from centre to the lock position and back to centre for the number of time equal to your fist digit.
3) To enter the third digit, turn the key the required number of times to the unlock position. Same procedure as above.
4) To enter the fourth digit, turn the key the required number of times to the lock position. Same procedure as above.
Turn the key to the unlock position to unlock the door, now place the key into the ignition do not turn or shut the drivers door, and after few seconds the barrel will recognise the key the rest of the doors unlock and now you can turn the key to ignition and start the car.
Note after 3 goes the BeCM goes into a 30 minute lockout mode, during which time the message centre displays "KEY CODE LOCKOUT" and further attempts at EKA will not work.
I got the original info from here:
Security and Alarm System Operation & Diagnosis on Range Rover 4.0/4.6/P38A and have used it ever since with no problems.
Hope that helps?
Cheers
Steve