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

Read_text

Former Member
0 Likes
1,022

Hi all,

I am getting text from read_text . I need to all rows of text into another export parameter of Function module which is declared as XSTRING . Is there any other way to get the data more than 256 characters into Export parameter. Is it possible or not?

8 REPLIES 8
Read only

Former Member
0 Likes
997

Declare one variable

data : l_data type xstring.

call function 'READ_TEXT'

EXPORTING

client = sy-mandt

id = 'IVER'

language = sy-langu

name = tdname

object = 'MATERIAL'

TABLES

lines = int_rtline

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

others = 8.

loop at int_rtline.

concatenate l_data int_rtline-tdline

into l_data separated by space.

endloop.

pass the l_data to ur export parameter

Read only

0 Likes
997

Here the problem is with export parameter it should take more that 256 characters. eventhough i declared as 2000 characters its taking only 256 characters.

Read only

0 Likes
997

What is the other function module? Is that standard SAP? May be its code restrict it to just 256 (which is very common for many old SAP function modules dealing with text).

Read only

0 Likes
997

It is custom function module . Is there way to get more than 256 characters into export paramter . I can change export parameter type also if it is possible.

Read only

0 Likes
997

Can i have ur code ?

Read only

0 Likes
997

What is your custom function module's export parameter currently defined as? Did you try type STRING?

Read only

0 Likes
997

Just check with Debugging and string will have all data and it does not show in debugging ..

Use below FM to see the exact outpput:

data :descrip type string.

data : itab_d like swastrtab occurs 0 with header line.

call function 'SWA_STRING_SPLIT'

EXPORTING

input_string = descrip

max_component_length = 100

TABLES

string_components = itab_d.

text data will be saving multiple lines with each line it has 255 Char.

Reward Points if it is helpful

Thanks

Seshu

Read only

0 Likes
997

What does your custom function module do?