2010 Sep 13 12:06 PM
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
2010 Sep 13 12:09 PM
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.
2010 Sep 13 12:14 PM
Hi Deb,
The parameter "Language" must have a lenght of 1 character (put "E" instead of "EN")
Regards,
Ana Luisa.
2010 Sep 13 12:17 PM
Suggest you use a structure of type thead to store your input values. ALWAYS use sy-langu for tdspras/language input.
2010 Sep 13 12:26 PM
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
2010 Sep 13 1:56 PM
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 !!
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |