‎2008 Jul 10 12:00 PM
Hi friends,
If I want to display item text maintained in tcode,Whether it is mandatory to concatenate Item no & document no and passing it into FM READ_TEXT?
Kindly reply.
‎2008 Jul 10 12:03 PM
Hi,
Yes you need to pass document number and item no.
See the below example:
dl_id = 'F03'.
dl_object = 'EKPO'.
dl_langu = sy-langu.
concatenate i_ebeln i_ebelp into dl_name.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = dl_id
LANGUAGE = dl_langu
NAME = dl_name
OBJECT = dl_object
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = dt_lines
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.
raise not_found.
ENDIF.
Thanks,
Keerthi.
‎2008 Jul 10 12:03 PM
Hi,
Yes you need to pass document number and item no.
See the below example:
dl_id = 'F03'.
dl_object = 'EKPO'.
dl_langu = sy-langu.
concatenate i_ebeln i_ebelp into dl_name.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = dl_id
LANGUAGE = dl_langu
NAME = dl_name
OBJECT = dl_object
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = dt_lines
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.
raise not_found.
ENDIF.
Thanks,
Keerthi.
‎2008 Jul 10 12:10 PM
HI,
Yes Both are Mandatory.
Please use the link below it will help you.
http://www.sap-basis-abap.com/sapac002.htm
With Regards,
Venkatesh.H.N
Please reward points if helpful
‎2008 Jul 10 12:10 PM
Hi Hosmath,
I think it is not necessary.
You have four parameters in READ_TEXT function module .
ID
LANGUAGE
NAME
OBJECTYou get these parameters from the text of the particulat transaction.
For Example in Transaction VA01.
Menu path
Goto ---> Header ---> Texts
we maintain the texts related to transaction here.
Here double click on the Text, now u can see the text editor.
here Menu Path
Goto ---> Header
Here you can find four fields. You need to pass these fields to the READ_TEXT function module..
Text Name
Language
Text ID
Text ObjectBest regards,
raam
‎2008 Jul 10 12:16 PM
HI,
Yes, because the textname is nothing but the combination of fields item No and document no.
‎2008 Jul 10 12:31 PM
hi
in the script layout, inthe element where u want to print the text - write the code as given below:
INCLUDE <TDNAME> OBJECT <TDOBJECT> ID <TDID> language <&NAST-SPRAS&
Using thsi u can print the text directly without using READ_TEXT.
Cheers,
Snehi.
‎2008 Jul 10 12:37 PM
Hi,
Yes it is mendatory to concatenate those things and pass this number to the 'READ_TEXT' Function module than you will get the text in your internal table.
Thanks,
Khushbu.