2011 Oct 11 5:35 PM
Hi Experts,
Can you let me know how to upload the long text in the FI document those are already posted. I tried with save_text fucntion module with
TDNAME = Company Code + Document number + Fiscal Year + Line item ,
TDID = '0001'.
TDSPRAS = 'EN'.
TDOBJECT = 'DOC_ITEM'.
But it is not updating the text.
Please find the code below.
DATA : l_head TYPE thead,
l_wa_line TYPE tline,
l_i_line TYPE STANDARD TABLE OF tline.
START-OF-SELECTION.
l_head-tdname = '010216000001082011001'.
l_head-tdid = '0001'.
l_head-tdspras = 'EN'.
l_head-tdobject = 'DOC_ITEM'.
l_wa_line-tdformat = '*'.
l_wa_line-tdline = 'Item_text1234'.
APPEND l_wa_line TO l_i_line.
l_wa_line-tdformat = '*'.
l_wa_line-tdline = 'Item_text1234'.
APPEND l_wa_line TO l_i_line.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
header = l_head
insert = 'X'
TABLES
lines = l_i_line
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
I tried even by calling commit _text fucntion module
Hi Experts,
Can you let me know how to upload the long text in the FI document those are already posted. I tried with save_text fucntion module with
TDNAME = Company Code + Document number + Fiscal Year + Line item ,
TDID = '0001'.
TDSPRAS = 'EN'.
TDOBJECT = 'DOC_ITEM'.
But it is not updating the text.
Please find the code below.
DATA : l_head TYPE thead,
l_wa_line TYPE tline,
l_i_line TYPE STANDARD TABLE OF tline.
START-OF-SELECTION.
l_head-tdname = '010216000001082011001'.
l_head-tdid = '0001'.
l_head-tdspras = 'EN'.
l_head-tdobject = 'DOC_ITEM'.
l_wa_line-tdformat = '*'.
l_wa_line-tdline = 'Item_text1234'.
APPEND l_wa_line TO l_i_line.
l_wa_line-tdformat = '*'.
l_wa_line-tdline = 'Item_text1234'.
APPEND l_wa_line TO l_i_line.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
header = l_head
insert = 'X'
TABLES
lines = l_i_line
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
I tried even by calling commit _text fucntion module
2011 Oct 11 5:58 PM
Hi,
try to read a long from a existing document with READ_TEXT, and post the HEADER.
regards
Edited by: Luis Constantino on Oct 11, 2011 6:58 PM
2011 Oct 11 6:16 PM
Hi Luis,
I tried with the same but still it is not updating I am getting SY-SUBRC as 0 from SAVE_TEXT also.
2011 Oct 11 6:37 PM
Hi
Issue resolved by SAVEMODE_DIRECT = 'X' in save_text function module
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |