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

Problem with SAVE_TEXT FM

Former Member
0 Likes
1,884

Hi All,

I am using the function module SAVE_TEXT to save header text for a shipment. When I call the FM it throws an error "I/O error for text VTTK 0005002156 0003 EN". The following are the parameters I am passing to the function module :

HEADER-TDOBJECT = 'VTTK'.

HEADER-TDNAME = Shipment Number or 0005002156.

HEADER-TDID = '0003'.

HEADER-TDSPRAS = 'E'.

The parameter LINES has the text that I am trying to update. Did anyone have a similar problem, if so would appreciate if you can share how you could resolve it.

Thanks

Sunil Achyut

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,454

hELLO Sunil...

Can you check on table STHX, if the text exists. Maybe that is happening

bye

Gabriel

6 REPLIES 6
Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
0 Likes
1,454

Hi,

Try to use this way, it's works for me.

 

DATA: TLINE LIKE TLINE OCCURS 10 WITH HEADER LINE.
    
       CALL FUNCTION 'SAVE_TEXT'
           EXPORTING
                HEADER          = THEADER 
                INSERT          = ' '  "<-- put here 'X' => New text or '  ' => Update 
                SAVEMODE_DIRECT = 'X'
                OWNER_SPECIFIED = 'X'
           TABLES
                LINES           = TLINE      "<-- Must be a TLINE type
           EXCEPTIONS
                ID              = 1          
                LANGUAGE        = 2     
                NAME            = 3          
                OBJECT          = 4         
                OTHERS          = 5.       

Regards.

Marcelo Ramos

Read only

Former Member
0 Likes
1,455

hELLO Sunil...

Can you check on table STHX, if the text exists. Maybe that is happening

bye

Gabriel

Read only

0 Likes
1,454

Marcelo

I am already using the flag for insert and update. One thing that I am confused about insert/update flag is, when is it considered an insert/update. From what I found insert is the first time a text is being added and an update is if text is already there. Sometimes the Subrc equals 0 but still the text is not getting updated, even when I have COMMIT_TEXT when the subrc equals 0.

Gabriel

Where do I check for the table STHX, is it an internal table in the SAVE_TEXT or a DB table.

Thanks

Sunil Achyut

Read only

0 Likes
1,454

Hello,

Sorry I gave you the wrong table, It is STXH, and it´s BD Table.

Bye

Gabriel

Read only

Former Member
0 Likes
1,454

This is very unusual error that typically comes up when your file system is full. I think since texts are actually stored in the file system or in clusters on the database, check with your basis team for table space and/or file system space.

Read only

0 Likes
1,454

All,

Thanks all for your replies. When I use space for the <b>insert</b> parameter of the SAVE_TEXT it works fine. There is another problem, I have written a wrapper for the SAVE_TEXT and am remotely calling the wrapper FM. When the wrapper FM is called from SE37 everything works perfectly but, when its remotely called it doesnt update the header text.

Did anyone have similar issue, if so would appreciate if you could share how you resolved the same.

Thanks

Sunil Achyut