While creating new script in HP unified functional testing, it doesn't record the script after 8-10 lines and gives error.
Potential causes of the symtom you describe:
1) UFT no longer has the plugin actvated for SAPGUI. (after restarting the UFT application.) - Try looking in File > Settings >
2) UFT SAPGUI plugin does not support the object types you are using.
3) UFT was restarted between recording the first lines and the last lines. Some applications must be opened by UFT or after UFT has been started.