2007 Apr 19 5:09 PM
Hi ALL,
How to get the Headre Text for the Sales Order Number...
Do we have to use READ_TEXT if yes..
what all parameters to be passed and what will b ethe OBJECT for this ....
Thanks .
2007 Apr 19 5:12 PM
Object should be VBBK.
Name should be the SO Number.
Regards,
Ravi
Hi ALL,
How to get the Headre Text for the Sales Order Number...
Do we have to use READ_TEXT if yes..
what all parameters to be passed and what will b ethe OBJECT for this ....
Thanks .
2007 Apr 19 5:12 PM
Object should be VBBK.
Name should be the SO Number.
Regards,
Ravi
2007 Apr 19 5:13 PM
Hi,
The texts you find in all SAP Object, like orders, invoice, materials, ... can be extract with FM 'READ_TEXT'.
To know the parameters of the FM, you 'll have to go to the text ( in plain page mode ), then you do "GOTO" -> "HEADER", and a pop-up window opens with the parameters you need ( Text name, language, text id, text object ).
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
Regards,
Bhaskar
2007 Apr 19 5:14 PM
hi,
Go to header texts and get the id, name, object of the text.
tables : vbak.
DATA: BEGIN OF lines OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF lines.
data : text1(60) TYPE C ,
text2(60) TYPE C ,
text3(60) TYPE C ,
text4(60) TYPE C ,
text5(60) TYPE C .
data: w_id like thead-tdid, "Text ID
w_name like thead-tdname, "Name
w_object like thead-tdobject. "Texts: aplication
w_id = 'Z100'.
w_name = VBAK-VBELN.
w_object = 'VBBK'.
clear lines.
CLEAR TEXT1.
CLEAR TEXT2.
CLEAR TEXT3.
CLEAR TEXT4.
CLEAR TEXT5.
call function 'READ_TEXT'
EXPORTING
id = w_id
language = 'E'
name = w_name
object = w_object
TABLES
lines = 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.
ELSE .
REad table lines index 1.
if sy-subrc = 0.
text1 = lines-tdline.
endif.
REad table lines index 2.
if sy-subrc = 0.
text2 = lines-tdline.
endif.
REad table lines index 3.
if sy-subrc = 0.
text3 = lines-tdline.
endif.
REad table lines index 4.
if sy-subrc = 0.
text4 = lines-tdline.
endif.
REad table lines index 5.
if sy-subrc = 0.
text5 = lines-tdline.
endif.
ENDIF.
Regards
sailaja.
2007 Apr 19 5:15 PM
HI GOTO header -> texts for particular sales order and select the text you want.
Double click on the text so that u will get a form header. in that goto HEader so that u will find the vallues to be passed to FM READ_text.
Reward for useful answers
2007 Apr 19 5:15 PM
Hi,
Yes, you can use FM READ_TEXT to read header text for sales order.
Please check this sample code.
DATA: TDNAME LIKE THEAD-TDNAME.
CLEAR: TEXT. REFRESH: TEXT.
TDNAME = VBAK-VBELN.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '0001'
LANGUAGE = SY-LANGU
NAME = TDNAME
OBJECT = 'VBBK'
TABLES
LINES = TEXT
EXCEPTIONS
NOT_FOUND = 1.
Regards,
Ferry Lianto
2007 Apr 20 6:14 AM
HI All ,
Thanks for your comments on this ..
I was passing all the parameters as mentioned by you..only mistake i was doing was not passing the leading zeroes in Sales Order ..
Its now working ..
Thanks .
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |