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

Save_text

Former Member
0 Likes
1,357

Hi!

I use BAPI to post to gl account, and if it is successfully posted, I can get a document number such as :5100000009.

I would like to insert my long text in internal table to accounting document, and found that FM save_text might be suitable for me. However, I do not know how to use it.

When i run FB03, and i enter the document number, company code, fiscal year and execute it, i would like to see that my long text is being inserted using the FM save_text.


DATA: it_theader TYPE STANDARD TABLE OF thead WITH header line,
      it_tline   TYPE STANDARD TABLE OF tline WITH header line,

  CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
     CLIENT                = SY-MANDT
      HEADER               = it_theader
     INSERT                = ' '
     SAVEMODE_DIRECT       = 'X'
   TABLES
      LINES                = it_tline
   EXCEPTIONS
     ID                    = 1
     LANGUAGE              = 2
     NAME                  = 3
     OBJECT                = 4
     OTHERS                = 5 .

In the it_header, what should i fill in in TDOBJECT, TDNAME and TDID?

How about the TDFORMAT in the it_line.

I only know that my long text should be in it_tline-tdline.

Please show me how to use this FM.

thanks a lot!

null

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
954

Hi Ying

Please proceed as below to know the values that are to be populated for any texts SAP:

1. Consider a sample document.

2. Go to the text.

3. Double click on the text, so it takes to the editor.

4. In editor, use menupath: Goto->Header.

5. The next popup window will give the details of object, id, language and way to populate the name.

For your information all text id's can be found in table: <b>TTXID.</b>

Hope this helps.

Kind Regards

Eswar

3 REPLIES 3
Read only

Former Member
0 Likes
955

Hi Ying

Please proceed as below to know the values that are to be populated for any texts SAP:

1. Consider a sample document.

2. Go to the text.

3. Double click on the text, so it takes to the editor.

4. In editor, use menupath: Goto->Header.

5. The next popup window will give the details of object, id, language and way to populate the name.

For your information all text id's can be found in table: <b>TTXID.</b>

Hope this helps.

Kind Regards

Eswar

Read only

Former Member
0 Likes
954

Hi,

For line item text in FB03..

Text name bseg-bukrsbseg-belnrbseg-gjahr+bseg-buzei

Language EN

Text ID 0001

Text object DOC_ITEM

Thanks,

Naren

Read only

Former Member
0 Likes
954

HI,

TDOBJECT = 'DOC_ITEM',

TDNAME = Concatenation of Co.code, Doc.No, fiscal year, lineitem.

if co.code = 0020, Doc.no. 5100000009, fiscal yr - 2006, line item 001

then, TDNAME would be 002051000000092006001

TDID '0001' (for Notes)

TDFORMAT = '*'

TDLINE = actual text line upto 132 chars.

Regards

Subbu