2008 Mar 06 10:34 AM
Hi Experts,
I need your help i need to read text on text editor .on this editor i use save_text function module and read_text FM.
Read_Text FM call it ask me ID ,LANGUAGE,NAME,OBJECT
is not defied this i hvae to create somewhere(standard) transaction.
Kindly guide me where i have to create all these objects.
Thanks in advance.
Points sure.
Hi Experts,
I need your help i need to read text on text editor .on this editor i use save_text function module and read_text FM.
Read_Text FM call it ask me ID ,LANGUAGE,NAME,OBJECT
is not defied this i hvae to create somewhere(standard) transaction.
Kindly guide me where i have to create all these objects.
Thanks in advance.
Points sure.
2008 Mar 06 12:50 PM
2008 Mar 06 1:13 PM
HI
U can go to va02,
give sales order number,
click on item number,
goto the Texts tab.
One big box is there. Place the cursor and double click
select the Goto menu/ Header .
If select the item Header.
It will shows thew Text name , Language,Text id and Text object.
Like wise we found parameters passing to read_text fm
Read_text fm is used to get text from sap and place that text into the our internal table. we get the data in internal table and place this data in sap script..etc.
Ex:
If u want get text written sales order item level. Use the follwing
code:
The Object field what we given in Read_text FM varied from header level and item level.
DATA : name TYPE thead-tdname,
g_tline TYPE TABLE OF tline WITH HEADER LINE,
it_vbap TYPE TABLE OF vbap WITH HEADER LINE.
vbeln = vbak-vbeln.
select * from vbap into
table it_vbap where vbeln = vbeln.
CONCATENATE vbeln it_vbap-posnr INTO name.
CONDENSE name.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'Z001'
language = sy-langu
name = name
object = 'VBBP'
TABLES
lines = g_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.
CALL FUNCTION 'FORMAT_TEXTLINES'
EXPORTING
cursor_column = 0
cursor_line = 0
endline = 99999
formatwidth = 45
linewidth = 45
startline = 1
language = sy-langu
IMPORTING
NEW_CURSOR_COLUMN =
NEW_CURSOR_LINE =
TABLES
lines = g_tline
EXCEPTIONS
BOUND_ERROR = 1
OTHERS = 2
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
g_tline : having text data in salesorder item level.
Whatever data we got is not properly formated. U can format the data using the FM:Format_Textlines
The Object field in Read_text FM Stores in table:TTXOB.
U see the function module documentation for the Read_text fm.
If it is helpful rewards points
Regards
Pratap.M
2011 Feb 08 8:06 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |