on 06-11-2009 2:25 PM
Hi,
I have been given text id and del doc number how to read the texts using Read_text Function Module
Thanks and Regards,
V
Hi,
To use the READ_TEXT FM you need the following fields
ID
LANGUAGE
NAME
OBJECT
As you said that you know the ID and the document number.
So ID will contain the ID.
The document number will go into the NAME.
The object you will have to find out by actually seeing the text in the document.
When you go to the text-editor to edit this text; Go to header in the menu options and you will find the necessary details.
Regards,
Ankur Parab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
do it like this.
you have doc no. concatenate it with your item no. if it is item level text which is ur text name.
else to check the text name open the invoice double click on item or header whatever is ur case.
go to texts tab and click on ur text . in right side u will see ur text. open it in change mode. now go to editor to edit it.now click on GOTO->header->. here u find how ur text name and object also which u have to pass to FM.
for id u have pass as it is.
language is ur form language.
pass this and FM will give the text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the below code.
CONCATENATE 'ARE1' wa_final-are1_no wa_are1-docyr INTO v_are_no.
wa_thead-tdid = '0001'.
wa_thead-tdspras = 'E'.
wa_thead-tdobject = 'J1IARE1'.
wa_thead-tdname = v_are_no.
*--to check whether the standard text is present
IF NOT v_are_no IS INITIAL.
SELECT SINGLE tdname
FROM stxh
INTO v_tdname
WHERE tdname EQ v_are_no
AND tdobject EQ 'J1IARE1'
AND tdid EQ '0001'
AND tdspras EQ 'EN'.
ENDIF.
*--reading the long text entered in the editor
IF sy-subrc IS INITIAL.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = wa_thead-tdid
language = wa_thead-tdspras
name = wa_thead-tdname
object = wa_thead-tdobject
TABLES
lines = i_are_no.
ENDIF.
DELETE i_are_no WHERE tdline = '#' AND tdline = ' '.
READ TABLE i_are_no INTO wa_are_no INDEX 1.
wa_final-are1_plant_no = wa_are_no-tdline.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see the sample code...
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = lt_text_id
language = l_text_language
name = l_text_name
object = l_text_object
TABLES
lines = l_lines "Internal table
EXCEPTIONS
OTHERS = 1.
Prabhudas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vikram,
As Ankur said your need this parameters to fetch the data.
To use the READ_TEXT FM you need the following fields
ID
LANGUAGE
NAME
OBJECT
To get this need to double click on the part where the text actually appears then Navigate to
GOTO-> Headers in the menu bar.
you will get all the details.
Hope this solves your issue. In case you face problem, revert back I will explain things with a example.
Hope the discussion was helpful.
Cheers,
Suvendu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.