You should always give the EXACT error message, best along with the error message number. There is no need to be vague while you see the error in clear letter directly on your screen.
The BAPI has a good documentation in SE37. And in this documentation is a hyperlink to a specific documentation on the longtext segment. If that alone is not sufficient then add screenshots or coding to give us a chance to evaluate what you have done.