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

Long Text FM READ_TEXT Error

Former Member
0 Likes
930

Dear All,

I am using the FM "READ_TEXT" to extract the long text of Tasklist. While passing the required parameter value to this FM via SE37, i am getting all the correct text. However while calling the same FM from Program & passing the same parameter value, it throws me errors of 'Type conflicting'. My code is below:

Data: itab_text TYPE TLINE OCCURS 0.

CLEAR ITAB_TEXT[].

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = '025'

ID = 'PLPO'

LANGUAGE = 'EN'

NAME = '025E000023600000000200000002'

OBJECT = 'ROUTING'

TABLES

LINES = itab_TEXT[]

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Same hardcodedvalue which i am passing in above FM is working in SE37.

Regds

Deb

Dear All,

I am using the FM "READ_TEXT" to extract the long text of Tasklist. While passing the required parameter value to this FM via SE37, i am getting all the correct text. However while calling the same FM from Program & passing the same parameter value, it throws me errors of 'Type conflicting'. My code is below:

Data: itab_text TYPE TLINE OCCURS 0.

CLEAR ITAB_TEXT[].

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = '025'

ID = 'PLPO'

LANGUAGE = 'EN'

NAME = '025E000023600000000200000002'

OBJECT = 'ROUTING'

TABLES

LINES = itab_TEXT[]

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Same hardcodedvalue which i am passing in above FM is working in SE37.

Regds

Deb

5 REPLIES 5
Read only

Former Member
0 Likes
831

Don't pass the values hardcode. Instead use variables with the correct type; you can find the type of the parameters in the function itself.

Read only

Former Member
0 Likes
831

Hi Deb,

The parameter "Language" must have a lenght of 1 character (put "E" instead of "EN")

Regards,

Ana Luisa.

Read only

Former Member
0 Likes
831

Suggest you use a structure of type thead to store your input values. ALWAYS use sy-langu for tdspras/language input.

Read only

Former Member
0 Likes
831

Hi,

As suggested by others,Change Language from 'EN' to 'E' or better use a variable type SY-LANGU.

Thanks & Regards,

Rock.

Edited by: Rock on Sep 13, 2010 1:26 PM

Read only

Former Member
0 Likes
831

DATA: header LIKE thead,

textid(4) VALUE 'PLPO',

object(10) VALUE 'ROUTING',

name(70,.

Use CONCATENATE INTO name -To create the name to be passed.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = textid

language = sy-langu

name = name

object = object

IMPORTING

header = header

Hope it helps !!