09-21-2006 10:05 PM
The problem is that the function only works when the text is bigger than 40 characters, if the text is less than 40 characters the READ_TEXT FM doesnt return me anything.
Anyone know why this happens and how could be fixed.
09-21-2006 10:13 PM
09-22-2006 4:07 AM
what do u mean with what ?
When I put a text less than 40 characters, I go to the info of the header, and it has no autor, and the FM doesnt work.
But when I write more than 40 characters, in the header appears the autor and the FM works fine.
So how can I get that text no matter the length ?
09-22-2006 4:11 AM
Hi Rodrigo,
The read_text FM will not consider the length of character when processing the text.
The main thing that you need to make sure is you save your text, make sure you pass textname, textID and language value to the FM.
The FM will work no matter how long is the text.
09-22-2006 4:52 AM
Hello,
I did not get u.
I have used read_text in many cases when the text is longer than 40 characters.
Paste ur code we can analyze it.
Regards
09-22-2006 1:58 PM
Hi, ravi. My problem is when the text is lesser than 40 characters.
I will try to explain a little more.
Im working with the iw32 tx
en Component tab, I have an icon to extend the text of a component.
What I need is this text, I write a text bigger than 40 characters the text is saved. I run se37 READ_TEXT function using the name, id, obj and bring me the text. There is no problem at all.
The problem comes when the text is lesser than 40 characters, I save the text. If I re-enter I see it fine my problem keep intact, the problem is that I run se37 READ_TEXT FM using again name, id, obj and bring me nothing, and I dont know why.
09-22-2006 2:16 PM
b/c this is the forum of ABAP i will put the code, but I dont know how to fix this.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'MATK'
language = 'S'
name = l_compo ->Here I have the name
object = 'AUFK'
tables
lines = it_desc_compo
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
OTHERS = 7 .
So when that text (with that ID, OBJ, NAME, LANG) is bigger than 40 characters. works fine and it_desc_compo is filled.
IF the text with sames parameters is lesser than 40, return my sy-subrc = 4. I tested using the se37 tx, and is true. dont bring me nothing altought the text (<40 char) still exist.
09-22-2006 2:18 PM
Hi Rodrigo,
dat maybe because if its less than 40 characters, the text gets stored only in the field for which u ahve the long text extension( not in the Text box ).. just chk the table where this 40 character field maybe ther n u may find the text in this field...
so wat u can do is, if text is not ther via READ_TEXT, then read this field from the table...
hope it helps..
09-22-2006 2:13 PM
Hi,
Why don't you write a small program for this READ_TEXT and test, this will give you clear idea, because you can debug this ....
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = <ID>
LANGUAGE = 'E'
NAME = <Nmae>
OBJECT = <Object>
ARCHIVE_HANDLE = 0
IMPORTING
HEADER = HTEXT
TABLES
LINES = LTEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
Regards
Sudheer