10-08-2007 3:11 PM
I am getting <(> and <)> before and after & while reading standard text in so10.
Is there any way to remove these junk characters at function module (read_text) level.
Like if i have text like K&G in standard text.
It becomes K<(>&<)>G at internal table level in READ_TEXT.
10-08-2007 3:57 PM
The output of the function TLINES, has two fields TDFORMAT and TDLINE.
You should consider only TDLINE field for the data.
Regards
vasu
10-08-2007 3:57 PM
The output of the function TLINES, has two fields TDFORMAT and TDLINE.
You should consider only TDLINE field for the data.
Regards
vasu
10-08-2007 4:05 PM
You can use REPLACE STRING command to get rid of this problem.
REPLACE sub_string WITH new INTO dobj
[IN {BYTE|CHARACTER} MODE]
[LENGTH len].
But question is why these characters are appearing? I hope you are just considering data from TDLINE field as well as can you check once in SO10 text, if these characters are appearing.
ashish
10-08-2007 4:33 PM
hi Ashish,
I am considering data only from tdline.
to make my problem more clear you all can try doing this.
1) go to so10 give text name as z***, text id as FIKO, Language as EN, press create.
2) write & as text and save.
3) write program to read this text z*** such as...
CALL FUNCTION 'READ_TEXT'
EXPORTING
object = 'TEXT'
id = 'FIKO'
name = 'Z***'
language = sy-langu
IMPORTING
header = header
TABLES
lines = lines
EXCEPTIONS
not_found = 1
OTHERS = 2.
now in lines u will see <(>&<)> instead of &.
i can replace but some how i want to get the correct value in lines itself, i.e '&'.
Regards,
Kumar.
10-08-2007 4:37 PM
I am not able to see this in my system as this is a custom text (starts with Z). No one will able to check the same in their system.
So now this is just your call. I am surprised why the name is Z**. We use '" to search for strings and not in the names.
ashish
10-08-2007 4:50 PM
Hi Kumar,
Even I searched for custom text names in SO10 with Text ID <b>FIKO</b>..but I coudn't find one...I am on ECC 6.0 and could find one standard text with Text ID <b>FIKO</b>...It is:
F140_IND_TEXT
ID FIKO
LANGUAGE DE
NAME F140_IND_TEXT
OBJECT TEXT
When I entered this selections in FM ' READ_TEXT ' , I got correct entries with no special characters as you mentioned.....Check this text name with ID as mentioned above....
Regards,
Vivek
10-08-2007 4:55 PM
By Z*** I mean u can use any Z name to create and call the text.
You can create ur own text starting with Z and follow my previous shown example.
10-09-2007 10:59 AM
Hi Ashish/Vivek,
Any reply to my query??
try creating a standard text in so10 and read it by read_text...see my example for more detail.
10-09-2007 11:04 AM
Hi Kumar,
I know this problem, this is a bug.
On SO10 :
Swicth to PC editor, you'll be able to remove the wrong characters...
Hope this helps,
Erwan
10-10-2007 11:55 AM
Thanks Erwan... My problem is solved by moving into the change editor, i can remove the unwanted characters.
01-17-2012 10:05 AM
Hi
I am able to remove the <(>&<)> by replacing the pattern with & using the REPLACE ALL OCCURANCES OF '<(>&<)>' IN TABLE WITH '&'.
Before the replace all statment is executed, the line has the pattern mentioned above and is as shown below:
<(>&<)><(>&<)><(>&<)><(>&<)><(>&<)>
<(>&<)><(>&<)><(>&<)>.
Now, after the replace all statement is executed the output is seen as below:
&&&&&
&&&.
Whereas, the &&& in the second line can fit in the first line. So can you please help me displaying the text in the continuation of the first line.
Regards,
Indira
10-08-2007 4:04 PM
data : t_line type standard table of tline with header line.
call function 'READ_TEXT'
exporting
ID ' ST'
LANGUAGE 'EN'
NAME 'TEXTname'
OBJECT 'TEXT'
tables
LINES t_line[]
loop at t_line.
write:/ t_line-tdline.
endloop
10-25-2010 9:49 AM
I too have the issue with STD TEXT as the READ_TEXT is fetching value with junk - <(> <)> angular brakets,
like XYZ PLC <(>,<)> COUNTRY <)> ...
Text is pre-populated with junk data during saving , so this has to be handle in the editor code
System details: ECC 6.0 NW 7.0
Editor: SAP's classic editor + Script editor + MS Word
Probably SAP Notes available for this issue , please let us know any one knows abt the FIX or Notes
Edited by: Thomas Paul jr on Oct 25, 2010 1:11 PM
10-18-2011 6:28 PM
I am seeing the same characters around any comma which is at the end of a line.
call function 'READ_TEXT'
exporting
ID = L_ID
LANGUAGE = L_SPRAS
NAME = L_NAME
OBJECT = L_OBJECT
importing
HEADER = L_HEADER
tables
LINES = L_LINES
exceptions
NOT_FOUND = 01.
L_ID = MPO
L_NAME = 010M056019700000000100000002
L_OBJECT = BOM
L_SPRAS = E
BOM text on screen, using CS03
(MINREV):
(REFNUM):
(RD): C1018,C1019,C1020,C1021,C1022,C1023,C1024,C1027,
(C1025),
(C1211)
(COM):
BOM Text received from function call in l_lines
1 * (MINREV):
2 * (REFNUM):
3 * (RD): C1018,C1019,C1020,C1021,C1022
4 = ,C1023,C1024,C1027<(>,<)>
5 * (C1025)<(>,<)>
6 * (C1211)
7 * (COM):
Notice that where the line ends, with a comma, in the CS03 view, The function is placing the characters around the comma.
I did not see this before I started testing for the ECC6.0 upgrade.
I know how to code to remove the extra characters.
However, I am wondering if there is an alternate way to call the READ_TEXT function, that does not return the junk characters.
Edited by: eileen_g on Oct 18, 2011 7:45 PM
09-09-2014 12:59 PM