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

SAVE_TEXT in update task

Former Member
0 Likes
2,502

hi,

In my program i have a requirement to save all the text after using COMMIT_TEXT.

can anyone give me a sample code for using COMMIT_TEXT after SAVE_TEXT or give me an idea how and which FM to call in UPDATE TASK and do i required to use explicitly COMMIT WORK after calling FM COMMIT_TEXT.

<< Please do not offer rewards >>

sandy

Edited by: Rob Burbank on Mar 26, 2009 10:28 AM

4 REPLIES 4
Read only

Former Member
0 Likes
1,148

Hi sandeep,

The save mode of a text module (dialog, update) is defined via the table TTXOB with the text object. In certain cases it makes sense to save the text immediately (for example, in batch programs) instead of in the update task.

' ' Save mode according to text object

'X' Save text module immediately

Regards,

Prabhudas

Read only

0 Likes
1,148

Hi Prabhu,

Before writing this post i have searched so many things...

My question is very specific...how to use FM: SAVE_TEXT in update task followed by FM:COMMIT_TEXT.

sandy

Read only

0 Likes
1,148

Hi experts,

pls help me out for the above said issue.

i m sure there must be someone who can guide me.......

thanx

sandyp

Read only

0 Likes
1,148

Hi,

do this like this.

u don't need to call as Update task and no need to have COMMIT WORK also.

CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
*     CLIENT                = SY-MANDT
     header                = gs_comm_thead
     insert                = 'X'
     savemode_direct       = 'X'
*     OWNER_SPECIFIED       = ' '
*     LOCAL_CAT             = ' '
*   IMPORTING
*     FUNCTION              =
*     NEWHEADER             =
    TABLES
      lines                 = gt_commtline
   EXCEPTIONS
     id                    = 1
     language              = 2
     name                  = 3
     object                = 4
     OTHERS                = 5.

Regards,

Bharat.