‎2008 Mar 13 10:57 PM
I wander how to come to text in
(the biggest window).
I need to change text in this biggest window.
I am trying unsuccessfuly with this function (do you have any idea)
CALL FUNCTION 'READ_TEXT'
like in program:
REPORT ZREADTEXT.
DATA: lines LIKE tline OCCURS 0 WITH HEADER LINE,
Ltexts like thead-tdname.
CLEAR ltexts
Ltexts+00(18) = matnr.
tp_name+00(06) = '000000'.
tp_name+06(12) = <ta_output>-matnr.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'GRUN'
language = 'E'
name = Ltexts
object = 'MATERIAL'
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 NE 0.
CONTINUE.
ENDIF.
LOOP AT LINES.
WRITE:/ LINES-TDLINE.
ENDLOOP.
‎2008 Mar 14 4:02 AM
Hi Tine,
If you want to RETRIVE already entered text for a material , use READ_TEXT.
Can you explain your requirement in detail??
regards,
‎2008 Mar 14 6:23 AM
I need to change via program the text in window (biggest one) which you approach via transaction MM02->Basic data1->Basic data text
‎2008 Mar 14 6:32 AM
Then use FM 'SAVE_TEXT'.
Give the Text attributes properly (ID, LANGUAGE, NAME, OBJECT) and enter the text you want to enter in the tables parameter LINES.
Regards,
‎2008 Mar 14 6:50 AM
Soryy, as per my previous post, the above solution wont work.
You will need to call function module 'BAPI_MATERIAL_SAVEDATA' for the purpose.
Pass required values in the Importing parameter HEADDATA and tables MATERIALLONGTEXT
Please try it out.