09-15-2006 11:39 AM
HAI FRIENDS,
I AM USING ON FUNCTION MODULE I.E "READ_TEXT".
HERE I GET THE IN TWO TYPES I.E
1) TO GET A MATERIAL WITH TEXT.
2) TO GET A MATERIAL WITHOUT TEXT.
NOW I WANT TO ADD SOME TEXT FOR WITHOUT TEXT MATERIAL
HERE I AM USING ON FUNCTION MODULE I.E "SAVE_TEXT".
MY DOUBT IS WHERE WE GIVE NEWTEXT FOR THE FOLLOWING FUCTION MODULE
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = I_THEAD
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = I_TLINE.
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
THANKS & REGARDS
VALLAMUTHU.M
09-15-2006 11:43 AM
DATA: IT_TLINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
Lets assume you have the text to be saved in the internal table IT_TEXT.
data : x_header TYPE thead.
to populate the data into SAVE_TEXT,you should know the values for the below fields.
x_header-tdobject = 'VBBK'.
x_header-tdname = lv_name . <--your material no
x_header-tdid = 'ZMAN'.
x_header-tdspras = 'E'.
LOOP AT IT_TEXT .
IT_TLINES-TDFORMAT = '*'.
IT_TLINES-TDLINE = IT_TEXT-LINE.
APPEND IT_TLINES.
CLEAR IT_TLINES.
ENDLOOP.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = X_HEADER
* INSERT = ' '
SAVEMODE_DIRECT = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
LINES = IT_TLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
*--ERROR.
ELSE.
*--SUCCESS.
ENDIF.
regards
Srikanth
but remember,if you use SAVE_TEXT all previous text will be overwritten with the new text from IT_TLINES table.
so before using this you should use READ_TEXT and append your new text to this IT_TLINES table and then call SAVE_TEXT.
check this link,for more info about this FM
Message was edited by: Srikanth Kidambi
09-15-2006 11:43 AM
DATA: IT_TLINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
Lets assume you have the text to be saved in the internal table IT_TEXT.
data : x_header TYPE thead.
to populate the data into SAVE_TEXT,you should know the values for the below fields.
x_header-tdobject = 'VBBK'.
x_header-tdname = lv_name . <--your material no
x_header-tdid = 'ZMAN'.
x_header-tdspras = 'E'.
LOOP AT IT_TEXT .
IT_TLINES-TDFORMAT = '*'.
IT_TLINES-TDLINE = IT_TEXT-LINE.
APPEND IT_TLINES.
CLEAR IT_TLINES.
ENDLOOP.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = X_HEADER
* INSERT = ' '
SAVEMODE_DIRECT = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
LINES = IT_TLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
*--ERROR.
ELSE.
*--SUCCESS.
ENDIF.
regards
Srikanth
but remember,if you use SAVE_TEXT all previous text will be overwritten with the new text from IT_TLINES table.
so before using this you should use READ_TEXT and append your new text to this IT_TLINES table and then call SAVE_TEXT.
check this link,for more info about this FM
Message was edited by: Srikanth Kidambi
09-15-2006 11:46 AM
put this FM in Loop .
loop at i_tab.
loop at itab_text where matnr = i_tab-matnr.
append lines.
endloop.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = I_THEAD
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
LINES = I_TLINE.
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* OBJECT = 4
* OTHERS = 5
endloop.
09-15-2006 11:46 AM
10-04-2013 3:09 PM
H exper,
I used FM "SAVE_TEXT" but I do not know the value of tdobject (object) , tdid of Sales text tab to input in program?
Please guide me .
Thanks alot.