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 FM SAVE_TEXT

Former Member
0 Likes
2,947

Hello,

I am having a problem in saving the text.

I used the FM and the function module retirns with Sy-subrc = 0.

I see the record in STXH.

However when i see in IA11 transaction I dont see the long text uploaded yet.

DO I need to do something after this .

Please let me know.

Thanks,

Raju..


      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
*       CLIENT                = CLIENT
          HEADER               = HEADER
         INSERT                = 'X'
         SAVEMODE_DIRECT       = 'X'
         OWNER_SPECIFIED       = 'X'
*   LOCAL_CAT             = 'X'
       IMPORTING
         FUNCTION              = STATUS
         NEWHEADER             = HEADER
        TABLES
          LINES                 = LINES
       EXCEPTIONS
         ID                    = 1
         LANGUAGE              = 2
         NAME                  = 3
         OBJECT                = 4
         OTHERS                = 5
                .

12 REPLIES 12
Read only

Former Member
0 Likes
1,752

U can not see the long text directly in the database

U have to use FM READ_TEXT to see the long text.

to this FM, u have to pass TDID, TD OBJECT, TD NAME AND TD SPRAS

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 20, 2008 10:03 AM

Read only

0 Likes
1,752

Thanks Narendra,

I have used the FM to read text and I have everything. I am passing the same text to save and am having problems in Saving it.

ANy suggestions.

Read only

0 Likes
1,752

Any More Suggestions friends.

Raju...

Read only

0 Likes
1,752

Hello,

1.Are u using COMMIT_TEXT or COMIIT_WORK after calling the save text.

2. Does the table STXH have an entry for the text u have created.

3. If every thing is okay then create a text in the Tcode IA11 directly and compare the entry with ur entry in STXH.

Hope with this you can sort out the issue.,

Cheers,

Vasanth

Read only

0 Likes
1,752

Thanks Vasant.

I have looked into one of the previous post and have done everything you have mentioned.

The entry also exists in STXH table. However I am still Unable to process the records.

However in IA11, there is a check box for long text. when I do manually go and create a long text the check box is automatically checked on., However when I am using the FM its not.

One more observation for the operation that already had a check mark on and now when I try to save the laong text it created and removed the older text.

Please suggest,

Raju.

Read only

0 Likes
1,752

Hi Raju,

That is the problem with SAVE_TEXT, it does not append lines to the existing text but edits it completely.

If you want to append to an existing long text, you'll have to read the text first using READ_TEXT and then append the other lines to that table and then use SAVE_TEXT with the whole appended table.

The first issue, you can only solve by finding the database table. Because your long text is getting created and you can see it in STXH.

But what r you doing to link this text with your object.

When you create it manually, the corresponding table gets updated, but the SAVE_TEXT doesnt do that.

That is why you can see your long text in STXH but not in IA11.

What is the field that gets checked on in IA11 when you have a long text?

Read only

0 Likes
1,752

Hi Raju,

Kindly let everyone know if you were able to fix this problem.

Thanks,

Vaibhav.

Read only

0 Likes
1,752

hi, the answer is...

you are missing COMMIT WORK after SAVE_TEXT

kisses.. miau

Read only

Former Member
0 Likes
1,752

hello Raju,

I had the same experience with work order long text.

The problem occurs when you create a new long text right?

For me, I had to update the field txtsp field of table AFVC to link the long text to work order.

i gues you also have to do some thing like this. I am not sure which table needs to be updated.

I suggest you debug the program for IA11 and check the table field for long text.

~goldie.

Read only

0 Likes
1,752

Thanks Goldie,

Will do.

Thanks again for the suggestions.

Raju.

Read only

Former Member
0 Likes
1,752

Is there a long text exists indicator in an associated table (sometimes called LTEXT)? This has to be set ON ('X') or SAP will not look for your long texts, if the long text exists indicator is not ON.

Read only

0 Likes
1,752

Before anyone else decides to respond, check the date of the OP.

Rob