Sometimes I run into that error if I'm creating a new GL account but it already exists. SAP will grey out the fields and the script can't input data. Try running the script in debug mode to see where it's failing.
For the account groups, you should be able to see the codes in SAP when you open the drop-down. Here's a screenshot from our demo system.
Alternatively, you could create an Allowed Values list for that field, importing the values from SAP, or use the Lookup Values button.
------------------------------
Yoon Chung | SE
Winshuttle North America
------------------------------