Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Uploading Long Text for FI document

Former Member
0 Likes
1,683

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

3 REPLIES 3
Read only

Former Member
0 Likes
1,060

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

Read only

0 Likes
1,060

Hi Luis,

I tried with the same but still it is not updating I am getting SY-SUBRC as 0 from SAVE_TEXT also.

Read only

Former Member
0 Likes
1,060

Hi

Issue resolved by SAVEMODE_DIRECT = 'X' in save_text function module