Adding own variables on user registration to created user I want to add additional informations to a user on registration. 
I have added the fields accountID and clanID to the user .
On registration i load these information according to his entered name from another webpage and i want to have these fields added to the user. 

My question is, how can i add these additional values to the fields programmatically?
How about using the Profile 2 module for this? Exceerpt from its project page:


  Designed to be the successor of the core profile module, which is deprecated for Drupal 7. In contrast to the deprecated module this module provides a new, fieldable 'profile' entity ... leverage the power of fields!


Refer to this video for an introduction to Profile 2 also.

Maybe you also want to consider something like the answer to How to display a profile form using profile2 module ?