Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in READ_TEXT FM

Former Member
0 Likes
627

Dear Experts,

I am using FM READ_TEXT for reading the text maintained in ME23N t-code and to display in Smartform.For fist line item its printing the text but for 2nd line item its not. When i debbuged the FM its taking the same Name (concatenation of PO No and Line item no) in memory ID. For eg. if Po No is 410070090 and has line item 10 and 20.for 1st time Name = 41007009000010 and for 2nd line item it should be 41007009000020 .But its taking 41007009000010.Pls help.........

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
588

Hi,

In the text name just concatenate ebeln eblep in to v_name

now pass the v_name to read_text function module and after the read text fucntion module try to clear the v_name so that when the loop comes it takes the line item 2nd.

for example

loop at it_po into wa_po.

clear v_name.

concatenate wa_po-ebeln wa_po-ebelp into v_name.

now pas v_name to rea text.

read_text

name = va_name

clear v_name.

endloop..

Just check this.. dont hard code the name..

Please let me know if you need further info..

Regards

Satish Boguda

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
588

this will solve i think so ..


IMPORT tline TO rt_lines
FROM DATABASE stxl(tx)
CLIENT rt_client
ID stxl_id
ACCEPTING TRUNCATION
IGNORING CONVERSION 
ERRORS

or free memory id 'SAPLSTXD' after using read_text

Please refer

Read only

Former Member
0 Likes
588

Check with your ABAP Logic into Loop around FM Read_Text for concatenation for Text name.

somewhere you are missing to increase the Text name from 41007009000010 to 41007009000020.How this number is stored into variable?

Read only

Former Member
0 Likes
589

Hi,

In the text name just concatenate ebeln eblep in to v_name

now pass the v_name to read_text function module and after the read text fucntion module try to clear the v_name so that when the loop comes it takes the line item 2nd.

for example

loop at it_po into wa_po.

clear v_name.

concatenate wa_po-ebeln wa_po-ebelp into v_name.

now pas v_name to rea text.

read_text

name = va_name

clear v_name.

endloop..

Just check this.. dont hard code the name..

Please let me know if you need further info..

Regards

Satish Boguda