‎2006 Nov 28 3:17 PM
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
‎2006 Nov 28 3:26 PM
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
‎2006 Nov 28 3:18 PM
‎2006 Nov 28 3:18 PM
‎2006 Nov 28 3:21 PM
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
‎2006 Nov 28 3:21 PM
Ali,
READ_TEXT is the Fm, Pass the Correct parameters to it and read the text
Regards
Vijay
‎2006 Nov 28 3:26 PM
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