I think SEtools can be used for this. I'm not sure because I haven't tried myself, but theres supposed to be an "Identify" option that tells you the code.