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

Reading text elements

Former Member
0 Likes
803

Dear Friends;

I want to read text elements of a purchase request's lines. Is there a fm or method to read text elements of the relevant lines of a purchase requisition?

Thx in advance

Ali

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
752

Hi Please Look into the following sample code.

Like that you can use the READ_TEXT Function module for your case.

REPORT ylsr_read_text_from_std_tcode.

DATA : w_id TYPE thead-tdid, " Text ID of text to be read

w_name TYPE thead-tdname, " Name of text to be read

w_object TYPE thead-tdobject, " Object of text to be read

w_language TYPE thead-tdspras. " Language of text to be read

DATA: it_tline TYPE TABLE OF tline,

st_tline TYPE tline.

w_id = 'F01'.

w_name = '450000004800010'.

w_object = 'EKPO'.

w_language = 'EN'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = w_id

language = w_language

name = w_name

object = w_object

TABLES

lines = it_tline

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.

  • The required output will be avialable in the IT_tline table.

LOOP AT it_tline INTO st_tline.

WRITE 😕 st_tline-tdline.

ENDLOOP.

Message was edited by:

Lakshmi Sekhar Reddy

5 REPLIES 5
Read only

Former Member
0 Likes
752

Yes there is:

READ_TEXT is the name of the fm.

Regards,

Ravi

Read only

Former Member
0 Likes
752

use <b>READ_TEXT</b> ....

regards

aswin

Read only

Former Member
0 Likes
752

HI,

You can use ABAP statemant "READ TEXTPOOL prog ... INTO itab ... LANGUAGE lg" to read text elements from one report ( standard report - prog ) to an internal table ( itab )

REGARDS,

DEEPTHI

Read only

Former Member
0 Likes
752

Ali,

READ_TEXT is the Fm, Pass the Correct parameters to it and read the text

Regards

Vijay

Read only

Former Member
0 Likes
753

Hi Please Look into the following sample code.

Like that you can use the READ_TEXT Function module for your case.

REPORT ylsr_read_text_from_std_tcode.

DATA : w_id TYPE thead-tdid, " Text ID of text to be read

w_name TYPE thead-tdname, " Name of text to be read

w_object TYPE thead-tdobject, " Object of text to be read

w_language TYPE thead-tdspras. " Language of text to be read

DATA: it_tline TYPE TABLE OF tline,

st_tline TYPE tline.

w_id = 'F01'.

w_name = '450000004800010'.

w_object = 'EKPO'.

w_language = 'EN'.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = w_id

language = w_language

name = w_name

object = w_object

TABLES

lines = it_tline

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.

  • The required output will be avialable in the IT_tline table.

LOOP AT it_tline INTO st_tline.

WRITE 😕 st_tline-tdline.

ENDLOOP.

Message was edited by:

Lakshmi Sekhar Reddy