‎2006 May 19 10:24 AM
Hi,
somebody knows how to change an additional text in a sales order using the EDIT_TEXT function module ?
Thxs
Antonio.
THANKS!!****
Hi guys,
very thanks for your help!!
They have been very useful and have solved my problem.
thxs again,
Antonio.
Message was edited by: Antonio Castro
‎2006 May 19 10:31 AM
here you have to GIVE the below fields
1) text name : <doc number> (in our case)
2)Language : EN
3) text id : A01
4) text Object : EKKO
note down these fields & values.
in your program you can use either READ_TEXT & SAVE_TEXT for this purpose.
READ_TEXT : IF any header text available,it will be downloaded to your program in TDLINES. you have to pass above parameters for this func module.
save_Text : first you populate all values in LINES * fill all HEADER details with the above mentioned values & then call this Func module.
this will create header text
X_HEADER-TDOBJECT = 'VBBK'.
X_HEADER-TDNAME = <YOUR PO NO>.
X_HEADER-TDID = 'ZMAN'.
X_HEADER-TDSPRAS = 'E'.
you read the existing text by using READ_TEXT function module & the text comes to IT_TDLINES internal table. modify/add new entries to that table & finally call the function module SAVE_TEXT to save the text.
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.
ENDIF.
IT_TLINES : is the internal table with the Text.
hope this gives you clear picture .
regards
srikanth
Message was edited by: Srikanth Kidambi
‎2006 May 19 10:29 AM
Hi
Which your problem?
That function open the text editor to change a text, so you need to transfer the header data e the text lines.
You can use the fm READ_TEXT to get the text data and then transfer them to fm EDIT_TEXT.
Max
‎2006 May 19 10:31 AM
here you have to GIVE the below fields
1) text name : <doc number> (in our case)
2)Language : EN
3) text id : A01
4) text Object : EKKO
note down these fields & values.
in your program you can use either READ_TEXT & SAVE_TEXT for this purpose.
READ_TEXT : IF any header text available,it will be downloaded to your program in TDLINES. you have to pass above parameters for this func module.
save_Text : first you populate all values in LINES * fill all HEADER details with the above mentioned values & then call this Func module.
this will create header text
X_HEADER-TDOBJECT = 'VBBK'.
X_HEADER-TDNAME = <YOUR PO NO>.
X_HEADER-TDID = 'ZMAN'.
X_HEADER-TDSPRAS = 'E'.
you read the existing text by using READ_TEXT function module & the text comes to IT_TDLINES internal table. modify/add new entries to that table & finally call the function module SAVE_TEXT to save the text.
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.
ENDIF.
IT_TLINES : is the internal table with the Text.
hope this gives you clear picture .
regards
srikanth
Message was edited by: Srikanth Kidambi
‎2006 May 19 10:35 AM
You can do that even using SAVE_TEXT to modify the text.
only thing is to find the correct parameters.
TDOBJECT VBBK for header
TDID 0001 check it,based on config it varies
TDNAME -->sales order if it is header
TDOBJECT VBBP for item
TDID 0001 check it,based on config it varies
TDNAME -->sales order + item if it is item
along with that you need to pass the text to it.
Regards
vijay
‎2006 May 19 11:03 AM
Hi,
Use READ_TEXT to retrieve the data, change it and then use the function module SAVE_TEXT to Save it.
Make sure you call the function module COMMIT_TEXT as texts might not get saved with the commit work.
Hope this helps.
Satya