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 - How run it ?

Former Member
0 Likes
912

Hello,

please provide me some exemple for this MF.

SAVE_TEXT and

CREATE_TEXT

I tried to use they but I got errors....

Wich is the difference ?

tks a lot,

bye.

Hello,

please provide me some exemple for this MF.

SAVE_TEXT and

CREATE_TEXT

I tried to use they but I got errors....

Wich is the difference ?

tks a lot,

bye.

6 REPLIES 6
Read only

Former Member
0 Likes
881

Please check the documentation for SAVE_TEXT. You can search the forum for examples of how to use them and also do a where used list to see how they are used in your system.

Rob

Read only

Former Member
0 Likes
881

Hi Roberto,

For further info chk this link

http://help.sap.com/saphelp_40b/helpdata/en/d6/0db8ef494511d182b70000e829fbfe/content.htm

Thanks and Regards

Srikanth.P

Edited by: Rob Burbank on May 26, 2009 12:34 PM

Edited by: SRIKANTH P on May 26, 2009 10:51 PM

Read only

former_member229729
Active Participant
0 Likes
881

Hi,

Here is a Sample for SAVE_TEXT

-


CONSTANTS: C_STAR    TYPE C VALUE '*',                 " Const: *
             C_AUFK(4) TYPE C VALUE 'AUFK',              " Const: AUFK
             C_AVOT(4) TYPE C VALUE 'AVOT'.              " Const: AVOT
* Internal table to store the Longtext
  DATA:BEGIN OF I_LINES OCCURS 0.
          INCLUDE STRUCTURE TLINE.
  DATA:END OF I_LINES.
* Structure to store the Header details of the Long text
  DATA:K_HEAD   LIKE THEAD.
  I_TEXT = SPACE.
  INSERT I_TEXT INDEX 1.
  IF I_TEXT[] IS NOT INITIAL.
    LOOP AT I_TEXT.
      I_LINES-TDFORMAT = C_STAR.                        " *
      I_LINES-TDLINE = I_TEXT-LINE.
      APPEND I_LINES.
      CLEAR I_LINES.
    ENDLOOP.
    CLEAR   I_ITEMS.
    REFRESH I_TEXT.
  ENDIF.
  IF I_LINES[] IS NOT INITIAL.
    K_HEAD-TDOBJECT = C_AUFK.                          " AUFK
    K_HEAD-TDNAME   = PTDNAME.
    K_HEAD-TDID     = C_AVOT.                          " AVOT
    K_HEAD-TDSPRAS  = SY-LANGU.
* Call function to Save the Long Text into the Editor
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
        CLIENT          = SY-MANDT
        HEADER          = K_HEAD
        SAVEMODE_DIRECT = C_X                          " X
      TABLES
        LINES           = I_LINES[]
      EXCEPTIONS
        ID              = 1
        LANGUAGE        = 2
        NAME            = 3
        OBJECT          = 4
        OTHERS          = 5.
    IF SY-SUBRC EQ 0.
      COMMIT WORK AND WAIT.
    ENDIF.
  ENDIF.

All the best,

Rgds,

Ramani N

Read only

0 Likes
881

Hello Ramani,

the I_TEXT is a table ? wich type ?

tks,

rob.

Read only

0 Likes
881

Hi Roberto,

I_TEXT is the content of the document as text, which is passed in a table with lines of length 255.

Thanks and Regards

Srikanth.P

Read only

Former Member
0 Likes
881

solved