03-19-2009 8:01 AM
hi,
which field refers to the long text in the FB01??..
I need to print that in script.Any idea??..
Thanks
Sri
03-19-2009 8:08 AM
Hi Go to FB01-> long text editor.
in menu bar GO-TO option check Header :check below properties like:
Object:
ID:
name:
Language:
Pass the same to READ_TEXT function module.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id =
language =
name =
object =
* 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
Edited by: santosh sarda on Mar 19, 2009 1:39 PM
03-19-2009 8:06 AM
Long text fields are not corresponding to the fields in transprent tables, they were save in bigtext format in database.
You should use function module READ_TEXT to read them.
The way to find import parameters of READ_TEXT is introduces in an article <<18 Techniques for Locating the Underlying Data of a Screen Field>> written by Dennis Barrett
03-19-2009 8:07 AM
Hi,
If its a header text: BKTXT(in table BKPF) and item text: SGTXT(in BSEG)
Regards
Shiva
03-19-2009 8:08 AM
Hi Go to FB01-> long text editor.
in menu bar GO-TO option check Header :check below properties like:
Object:
ID:
name:
Language:
Pass the same to READ_TEXT function module.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id =
language =
name =
object =
* 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
Edited by: santosh sarda on Mar 19, 2009 1:39 PM
03-19-2009 9:09 AM
hi,
i tried to read the text using read_text
But error is coming like this.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
The call to the function module "READ_TEXT" is incorrect:
The function module interface allows you to specify only
fields of a particular type under "LANGUAGE".
The field "'EN'" specified here is a different
field type
----
data: t_lines like tline OCCURS 0,
W_LINES LIKE LINE OF T_LINES.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0001'
LANGUAGE = 'EN'
NAME = '100016000000502008001'
OBJECT = 'DOC_ITEM'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = T_LINES.
03-19-2009 9:17 AM
Sri,
i guess you are passsing langauge wrongly. i checked in FM interface it says:
TDSPRAS SPRAS LANG 1 0 Language Key.
Pass Langagause as E instaed of EN.
Code Change:
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = '0001'
LANGUAGE = 'E' " Instaed of EN use E
NAME = '100016000000502008001'
OBJECT = 'DOC_ITEM'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
LINES = T_LINES.
03-19-2009 9:25 AM
03-19-2009 8:09 AM
Hi Sri,
If you refer to the header text, then the field is BKPF-BKTXT. If you refer to the line item's text, then the field is BSEG-SGTXT.
Regards,
George