What you are describing is the default tab order for the fields. If you press tab instead of enter you should see the cursor move from field to field in exactly that order. To get this to work with the Enter key, Select the fields while in layout mode and select that option in the inspector. ( Inspector | Data | behavior | Go to next field )
If pressing tab does not move you from field to field in the order you want, select Set Tab Order... from the layouts menu and you'll be able to change the order.
"i want it to go to the beggining of next row"
This is not moving through fields via tab order but through records (or portal records in this instance). You would need script trigger attached to last field in the row which would fire script (upon field exit) of:
Go To Field [ portal field first to start typing ]
Go To Portal Row [ Next ]
Be sure you have scroll bar showing or it will only move through the rows being displayed and then exit the portal.
The script trigger shouldn't be necessary here.
I have a portal with two fields and 3 portal records. If I put the cursor in field 1, row 1 and press tab, the cursor moves from row 1 field1 to row 1 field 2 to row 2 field 1 to row 2 field 2... In otherwords ,the cursor moves from field to field in left to right, top to bottom order as long as I've specifed Field 1 as the field just before field 2 in my tab order. It'll keep the cursor in the portal until it reaches the last field of the last row in the portal--which is the blank "add record" row if creation of related records is enabled for the portal's relationship.