2007 Jun 22 3:44 PM
Hi,
I am trying to append the text for the sales order through SAVE_TEXT function module. i wrote the code as below but it was not appending the text or not giving any error. can you please let me know what might be the problem.
the code is
---
data: t_header like thead. " long text
data t_long like tline occurs 0 with header line.
data:c_tdform type thead-tdform value 'SYSTEM'." Form name
data: c_tdformat type tline-tdformat value '*'."Tag column
T_HEADer-TDOBJECT = 'VBBK'.
t_HEADer-TDNAME = '0000040457'.
T_HEADer-TDID = 'Z010'.
t_header-tdform = c_tdform.
T_HEADer-TDSPRAS = 'E'.
t_long-tdline = 'Text to append'.
t_long-tdformat = c_tdformat.
append t_long.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = t_header
SAVEMODE_DIRECT = ''
TABLES
LINES = t_long
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
if sy-subrc <> 0.
write: /10 'error'.
endif.
---
can you please correct if you find anything wrong, i am trying for VA02 transaction.
Regards
Jaya
Hi,
I am trying to append the text for the sales order through SAVE_TEXT function module. i wrote the code as below but it was not appending the text or not giving any error. can you please let me know what might be the problem.
the code is
---
data: t_header like thead. " long text
data t_long like tline occurs 0 with header line.
data:c_tdform type thead-tdform value 'SYSTEM'." Form name
data: c_tdformat type tline-tdformat value '*'."Tag column
T_HEADer-TDOBJECT = 'VBBK'.
t_HEADer-TDNAME = '0000040457'.
T_HEADer-TDID = 'Z010'.
t_header-tdform = c_tdform.
T_HEADer-TDSPRAS = 'E'.
t_long-tdline = 'Text to append'.
t_long-tdformat = c_tdformat.
append t_long.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = t_header
SAVEMODE_DIRECT = ''
TABLES
LINES = t_long
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
if sy-subrc <> 0.
write: /10 'error'.
endif.
---
can you please correct if you find anything wrong, i am trying for VA02 transaction.
Regards
Jaya
2007 Jun 22 3:48 PM
2007 Jun 22 3:48 PM
Please use - 'COMMIT_TEXT' - after save_text FM
if sy-subrc eq 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = t_header-TDOBJECT
NAME = t_header-TDNAME
ID = t_header-TDID
LANGUAGE = t_header-TDSPRAS.
endif.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |