Hi,
Do not use transaction RSA3 for checking the extraction of "HIERARCHY" datasources. Transaction RSA3 can lead to errors while testing hierarchy data sources.
Use report RSA1HCAT to check hierarchies where following are displayed.
1.Meta data
2.Hierarchy tree
3.Hierarchy list
And coming to error it seems like there is syntax error in generated extraction program. Try running report RSA1HCAT and if you still get same error then analyse the dump from ST22. Else you can even debug the finished job in ERP system by selecting the respective job in SM37 and then using "JDBG" in command prompt it will go to debugging mode.
Srikanth.