09-08-2008 7:52 AM
Hi ,
suppose i have created a standard text in SO10 like the following:
*----
event
*----
now i want to call this text using FM 'Read_text'. what shal i do to write this.
09-08-2008 8:12 AM
Hi Prasenjit Sengupta,
Please use following function as:
data : tbody like TLINE occurs 0 with header line.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ST'
LANGUAGE = sy-langu
NAME = 'NAME_AT_SO10'
OBJECT = 'TEXT'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = tbody
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* NOT_FOUND = 4
* OBJECT = 5
* REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
and you can use loop to process tbody.
loop at tbody.
endloop.
This will solve your problem.
Deniz.
09-08-2008 8:04 AM
09-08-2008 8:05 AM
hI,
pass the parameteres to this function module as below:
CLIENT 100
ID ST
LANGUAGE EN
NAME <standard text name>
OBJECT TEXT
ARCHIVE_HANDLE 0
LOCAL_CAT
and in return you will get hte entire standard text in the internal table LINES.
Pass this internal table to function module 'EDIT_TEXT' to display the standard text.
Hope this helps.
Regards,
RSS
09-08-2008 8:12 AM
Hi Prasenjit Sengupta,
Please use following function as:
data : tbody like TLINE occurs 0 with header line.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ST'
LANGUAGE = sy-langu
NAME = 'NAME_AT_SO10'
OBJECT = 'TEXT'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = tbody
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* NOT_FOUND = 4
* OBJECT = 5
* REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
and you can use loop to process tbody.
loop at tbody.
endloop.
This will solve your problem.
Deniz.