You can use the Portal Identity management - UME APIs to get the logged on user.
Now, to your requirement to update the information to the backend SAP sytem, you need to run some application in the portal to send the info back to SAP tables through custom RFCs.
One option would be run some application as an iView, on the home page of the portal. This application could be Web Dynpro or any other Java component which is connected to the backend SAP system. Have a custom RFC to update the tables with login info sent by this application.
Regards,
Sharath