‎2006 Dec 21 6:34 AM
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
‎2006 Dec 21 6:50 AM
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
‎2006 Dec 21 6:50 AM
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
‎2006 Dec 21 6:51 AM
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
‎2006 Dec 21 7:06 AM
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