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

FM SAVE_TEXT not working

Former Member
0 Likes
2,068

Hi All,

I have a requirement wherein I have to write some text into the Goto --> Header --> Texts in VA02 transaction.

For this I am using the FM SAVE_TEXT with the following parameters:

TDOBJECT = '0000012255' ==== This is the order number

TDNAME = 'VBBK' ==== This is some name which I was advised to provide here

TDID = 'ZSMX' ==== This is the output type

TDPSRAS = 'EN' ==== This is the language key for English

I have tried testing this FM separately in SE37 also. I tried using CREATE_TEXT also but that also in turn calls SAVE_TEXT with INSERT option. So, both these FMs are narrowing down to the same error message.

But each time I try the FM it returns the same error message "Text Object i not available." I debugged and checked and found out that the object that I mentioned was not maintained in the table TTXOB and so it was giving me such a message.

Please help me out.

Thanks!

Regards,

Namrata Khanna

Hi All,

I have a requirement wherein I have to write some text into the Goto --> Header --> Texts in VA02 transaction.

For this I am using the FM SAVE_TEXT with the following parameters:

TDOBJECT = '0000012255' ==== This is the order number

TDNAME = 'VBBK' ==== This is some name which I was advised to provide here

TDID = 'ZSMX' ==== This is the output type

TDPSRAS = 'EN' ==== This is the language key for English

I have tried testing this FM separately in SE37 also. I tried using CREATE_TEXT also but that also in turn calls SAVE_TEXT with INSERT option. So, both these FMs are narrowing down to the same error message.

But each time I try the FM it returns the same error message "Text Object i not available." I debugged and checked and found out that the object that I mentioned was not maintained in the table TTXOB and so it was giving me such a message.

Please help me out.

Thanks!

Regards,

Namrata Khanna

5 REPLIES 5
Read only

Former Member
0 Likes
1,046

Hello


TDOBJECT = 'VBBK      '. " <- with 6 spaces after last letter
TDNAME = '0000012255'.
instead of 
TDNAME = 'VBBK'
TDOBJECT = '0000012255'

Read only

Former Member
0 Likes
1,046

Hi,

You may be giving the wrong Text id in FM. Check the Properties of Text data in VA02

Regards

Vinod

Read only

Former Member
0 Likes
1,046

Hi,

I think your input parameters are wrong. Text object(TDOBJECT) should be 'VBBK' and TDNAME should have the order number..

Can you check this one..

Regards,

Guna

Read only

Former Member
0 Likes
1,046

Hi Namrata,

I tried the following code myself and is working fine, you can also try the same

data: TD_ID TYPE THEAD-TDID.

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

FID = td_id

FLANGUAGE = sy-langu

FNAME = ''

FOBJECT = ''

SAVE_DIRECT = 'X'

FFORMAT = '*'

TABLES

FLINES = DT_LINES

fill this accordingly and DT_LINES Contains the long text you want to maintain.

Hope it helps u..

Regards,

Ibrar

Read only

Former Member
0 Likes
1,046

TDNAME is always DOCUMENT/ITEM/LINE No. in SD. Look at how other texts are stored, by reviewing the settings for SD texts in table STXH.