Application Development 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: 

FB01 long text field

Former Member
0 Kudos

hi,

which field refers to the long text in the FB01??..

I need to print that in script.Any idea??..

Thanks

Sri

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

If its a header text: BKTXT(in table BKPF) and item text: SGTXT(in BSEG)

Regards

Shiva

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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.

0 Kudos

Thank u Santhosh.

Former Member
0 Kudos

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