Application Development and Automation 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: 
Read only

using READ_TEXT function module

Former Member
0 Likes
3,613

hi friends...

i want to print header text data of a PO..( me23-header-texts-text overview)..

i know this is done thru READ TEXT function module..plz tell how should i print these text...

regards..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,579

hi madan,

find the TDID, TDNAME, TDOBJ from table STXH and pass the parameters to the read_text fm , you will be able to read the text.

regards

vijay

6 REPLIES 6
Read only

Former Member
0 Likes
1,579

types:begin of mystring,

*object like THEAD-TDOBJECT,

*end of mystring.

*data : itab type table of mystring WITH HEADER LINE.

data : itab type THEAD-TDNAME,

itab1 type standard table of tline with header line.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = '0001'

LANGUAGE = 'B'

*NAME = itab-object

NAME = itab

OBJECT = 'MVKE'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = itab1.

if sy-subrc = 0.

write:/ 'success'.

endif.

Read only

Former Member
0 Likes
1,579

See this piece of code may help u.

*Get the contents of Additional PO Information field from sales order

*header texts to script.

thead-tdid = 'ZA03'.

thead-tdspras = 'E'.

thead-tdname = vbdka-vbeln.

thead-tdobject = 'VBBK'.

call function 'READ_TEXT'

exporting

id = thead-tdid

language = thead-tdspras

name = thead-tdname

object = thead-tdobject

importing

header = thead

tables

lines = tlines

exceptions

id = 01

language = 03

name = 02

not_found = 05

object = 01

savemode = 04.

Read only

0 Likes
1,579

Hi Madan...

hope this piece of code might help you ...

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = 'ZTS4'

LANGUAGE = 'J'

NAME = WK_VBELN

OBJECT = 'VBBP'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = TLINETAB

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.

Regards,

Santosh

Read only

0 Likes
1,579
<b>thead-tdid = 'F01'.
thead-tdspras = 'E'.
thead-tdname = EKKO-EBELN.
thead-tdobject = 'EKKO'</b>.

call function 'READ_TEXT'
exporting
id = thead-tdid
language = thead-tdspras
name = thead-tdname
object = thead-tdobject
importing
header = thead
tables
lines = tlines
exceptions
id = 01
language = 03
name = 02
not_found = 05
object = 01
savemode = 04.

Regards

vijay

Read only

Former Member
0 Likes
1,579

To use text in program, you have to use FM 'READ_TEXT' to get the text.

To get the parameter of this function Module, you have to go to the text you want, diplay it in plain page mode and then via the menu 'GO TO' --> 'HEADER' .

A popup window give you : object id, name, ...

The table "t_tdline" contains the entire text .

CALL FUNCTION 'READ_TEXT'

EXPORTING*

CLIENT = SY-MANDT

id = w_id

language = sy-langu

name = w_name

object = w_object*

ARCHIVE_HANDLE = 0*

LOCAL_CAT = ' '

IMPORTING

HEADER = tables

lines = t_tdlines

Hope this helps,

reward if useful..

Message was edited by: Ashok Kumar Prithiviraj

Message was edited by: Ashok Kumar Prithiviraj

Read only

Former Member
0 Likes
1,580

hi madan,

find the TDID, TDNAME, TDOBJ from table STXH and pass the parameters to the read_text fm , you will be able to read the text.

regards

vijay