‎2007 Sep 18 1:37 PM
hi experts,
Pls tell me how to use read_text FM.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0001'
language = 'EN'
name = '0080000055'
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = ????????
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
what i have to put in that lines?
regards,
mani
‎2007 Sep 18 1:40 PM
Lines is returned back from the FM . All you need to specify is an empty internal table definition.
‎2007 Sep 18 1:44 PM
Hi,
make an internal table type TLINE.just pass it there you will get the text inside it..
Thnaks
<b><REMOVED BY MODERATOR></b>
vivekanand
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 18 1:52 PM
‎2007 Sep 18 2:00 PM
data: text like tline occurs 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0001'
language = 'EN'
name = '0080000055'
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = text
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
add this
regards,
Prabhu
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 18 2:05 PM
it is creating dump .
data itab like tline occurs 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0001'
language = 'EN'
name = '0080000055'
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = itab.
‎2007 Sep 18 1:50 PM
Hi,
Here is the sample code
CONSTANTS:
*For text reading like in LCNMMFTX / FORM SET_CONTROL_TEXT
text_id like thead-tdid value 'MATK',
text_obj like thead-tdobject value 'AUFK '.
data tlines like tline occurs 0 with header line.
data tdname like thead-tdname.
data tdheader like thead.
refresh tlines.
tdname = sy-mandt.
tdname+3 = it_proj-rsnum.
tdname+13 = it_proj-rspos.
tdname+17 = it_proj-rsart.
call function 'READ_TEXT'
exporting
id = text_id
language = it_proj-ltxsp
name = tdname
object = text_obj
importing
header = tdheader
tables
lines = tlines.
exceptions
not_found = 01.
Regards
Sudheer
‎2007 Sep 18 1:51 PM
Hi,
This should be your approach
1.Do u want to fetch std text or texts maintained using std Tcodes?
std text : id = 'ST'
language = 'EN'
name = <text name>
object = 'TEXT'
for second u have to find out the details from respective Tcodes going to details
tab < go to - header>
2. delare internal table of type TLINE
3. pass this internal table as given below
tables
lines = itab_text
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 18 1:51 PM
put lines like tlines occurs 0.
dont forget to uncomment the exceptions, becouse u will get errors if there is no text maintained.
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
regards,
Prabhu
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 18 2:17 PM
what is the error u are geeting??
data itab type standard table of tline with header nie.
‎2007 Sep 18 2:33 PM
‎2007 Sep 18 2:50 PM
check which field is creating type conflict
or else copy paste ur code
‎2007 Sep 18 2:52 PM
data itab like tline occurs 0.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0001'
language = 'EN'
name = '0080000055'
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = itab.
‎2007 Sep 18 3:07 PM
Uncomment export parameter
client = sy-mandt,
declare internal table like this:
data: itab type standard table of tline with header line
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo