Skip to Content
author's profile photo Former Member
Former Member

WRITE_TEXT

Using READ_TEXT we can read the sapscript text. Is there a function to write text to sapscript text. I want to replace the existing text.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2007 at 11:22 PM

    Hi Megan,

    You have to use SAVE_TEXT.

    Here you have to pass THEAD & IT_LINES

    thead-tdid = <Object ID>.

    thead-tdobject = <Object>.

    thead-tdspras = 'EN'.

    thead-tdname = <Object Name>.

    IT_LINES is the internal table like TLINE, through this you can pass the text which you want to save.

    CALL FUNCTION 'SAVE_TEXT'

    EXPORTING

    CLIENT = SY-MANDT

    HEADER = thead

    SAVEMODE_DIRECT = 'X'

    insert = ' '

    • OWNER_SPECIFIED = ' '

    • LOCAL_CAT = ' '

    • IMPORTING

    • FUNCTION =

    • NEWHEADER =

    TABLES

    LINES = it_lines

    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.

    Regards,

    Satish

    Message was edited by:

    Satish Panakala

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 02, 2007 at 12:11 AM

    Megan,

    yes it's WRITE_TEXT. But if the text object is used in transactional handling (like order header/item or material texts), you will need COMMIT_TEXT also.

    Regards,

    Clemens

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 12:14 AM

    I am trying out SAVE_TEXT. But it writes another line of text and keeps the existing lines of text. I want to delete the existing lines of text and replace them with the new text. How to do that?

    Or is there another fm that I can use.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.