can't make class txt1 into a string

I’m new with Applescript and am trying to use it in conjunction with SAP. I’m trying to do the following:

set bookingValue to textlist 1 of session 1 of connection 1 as string

The error message I am receiving is "Can’t make «class txt1» 1 of «class sewi» 1 of «class conn» 1 of application “SAPGUI” into a string.

Any ideas?

Excuse my ignorance but I don’t even know what SAP is. Seeing, though, that no-one has given you a reply I’ll make a suggestion. If your variable, textlist, is in fact a list then you could try something along the lines of:

(textlist 1 of session 1 of connection 1)'s item 1

.