Application Development 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: 

SAVE_TEXT

Former Member
0 Kudos

I am using the function Module save text for saving a text for the header.

When i run the function module it is throwing an error saying that the Text Object does not exist.

The TDOBJECT i am using is VBBK and TDID is 0002.Language E.]

Can someone tell me whats going wrong??

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

CLIENT = SY-MANDT

HEADER = T_HEAD

  • INSERT = ' '

SAVEMODE_DIRECT = 'X'

  • OWNER_SPECIFIED = ' '

  • LOCAL_CAT = ' '

  • IMPORTING

  • FUNCTION =

  • NEWHEADER =

TABLES

LINES = T_TEXT

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

see below code for SAVE_TEXT

DATA: xthead like thead occurs 0 with header line.

thead-tdid = '*'.

thead-tdspras = '*'.

thead-tdname+10(2) = p_parvw.

thead-tdobject = 'ZECC'.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = w_head

insert = ' '

savemode_direct = 'X'

IMPORTING

newheader = w_head

TABLES

lines = w_tab

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

7 REPLIES 7

Former Member
0 Kudos

see below code for SAVE_TEXT

DATA: xthead like thead occurs 0 with header line.

thead-tdid = '*'.

thead-tdspras = '*'.

thead-tdname+10(2) = p_parvw.

thead-tdobject = 'ZECC'.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

header = w_head

insert = ' '

savemode_direct = 'X'

IMPORTING

newheader = w_head

TABLES

lines = w_tab

EXCEPTIONS

id = 1

language = 2

name = 3

object = 4

OTHERS = 5.

Former Member
0 Kudos

Hi

Are you saving the text into sales order header?

first manually try to create a long text in an existing sales order header

save it

double click on it

goto => header

you will see the OBJECT,ID,NAME etc for that text,

check whether the OBJECT is VBBK or not for that

Because for all header texts it is VBBK only.

Then try with the fun module

You can also use create_Text fun module for creating the long texts in the system

  • Call the Function Module to Create Text

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

fid = c_best

flanguage = dl_lan

fname = dl_name

fobject = c_material

save_direct = 'X'

fformat = '*'

TABLES

flines = dt_lines

EXCEPTIONS

no_init = 1

no_save = 2

OTHERS = 3.

IF sy-subrc <> 0.

WRITE:/ 'Long Text Creation failed'(001),

itab-asnum.

ELSE.

WRITE:/ 'Long Text Created Successfully '(002),

itab-asnum.

ENDIF.

reward if useful

regards

Anji

Former Member
0 Kudos

hi supriya

did u make a check, whether there is an entry for the variant you are making in STXH table

Message was edited by:

varalakshmi kannan

Former Member
0 Kudos

i ma saving the text not reading it!!

Former Member
0 Kudos

go to se16 table STXH and check whether the text exists for ur object, name, id.

else, do create_text first...

Former Member
0 Kudos

thanks a lot guys.got the problem solved.i helped myself.

0 Kudos

Hi,

can you please address the below problem, as u had same problem before its urgent can you please solve this or give some idea to procede....

I am facing some problem during the recording of hader text.. Details given below...

I need to do this by using BDC...

&#61607; VA01 Steps as follows:

1. Open VA01

o Enter G2 or L2 order Type

o Enter 9991 for Sales Org

o Enter 01 for Dist Channel

o Enter 99 for Division

2. Enter Customer SAP # from spreadsheet to ship to and sold to

(Enter some appropriate number)

3. Enter Material Code from spreadsheet to Material

(Enter some appropriate number)

4. Enter target quantity as 1

5. Enter Billing date as system date

6. Go to Sales Tab

7. Select Blank for billing block

8. Enter order reason 013 for G2 type or 012 for L2

9. Goto Header, Texts, Choose Invoice header text

10. Enter SVB# from file as well as Quarter Text from file in notes

11. Save

this is want i need to do in order to create invoice serivce request by using BDC.

I can able to get the fields till 8 th point ( i can able to write the program ), but from the 9 th point i m facing the problem..

Bcz it just i need to enter some text here..( may be it's bcz of click )

This is could not able to do it , can you please help me how can i do this ?

Please let me know if i m not clear with my explanation...

Looking forward for your response...

Regards,

Suresh...