Skip to Content
avatar image
Former Member

create standard text with CREATE_TEXT FM problem

I have created SO10 text using CREATE_TEXT FM, while in debugging, i found the FM is successfully executed and i could read the text using READ_TEXT FM, but i cannot see the standard text in SO10 transaction.

Why is it so? where is my text stored?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jun 06, 2017 at 07:19 AM

    Hello,

    Are you using COMMIT WORK AND WAIT after create_text FM and save_direct = 'X'.

    You can also try CALL FUNCTION 'SAVE_TEXT.

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 06, 2017 at 07:00 AM

    Hi,

    try to import header from read_text and check whether the header in SO10 is same as the header of read_text ?

    Regards,

    Priyanka.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 06, 2017 at 08:59 AM

    Hi Paru,

    As Chintu said, I think that you have to Add COMMIT WORK AND WAIT. to your code like in the code bellow:

    REPORT ZINET_TEXT01.


    DATA : it_FLINES TYPE STANDARD TABLE OF TLINE.

    START-OF-SELECTION.

    APPEND 'BLABLABLABLABNLABLA' TO it_FLINES.
    APPEND 'BLABLABLABLABNLABLA' TO it_FLINES.


    CALL FUNCTION 'CREATE_TEXT'
    EXPORTING
    FID = 'ST'
    FLANGUAGE = 'E'
    FNAME = 'ZINETEST02'
    FOBJECT = 'TEXT'
    * SAVE_DIRECT = 'X'
    * FFORMAT = '*'
    TABLES
    FLINES = it_FLINES
    EXCEPTIONS
    NO_INIT = 1
    NO_SAVE = 2
    OTHERS = 3
    .
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    COMMIT WORK AND WAIT.
    ENDIF.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Priyanka.

      Yes, I tried the FM CREATE_TEXT without COMMIT statement and I didn't find the text lines after running the program.

      What I know about COMMIT Statement is :

      It terminates an SAP LUW and stores the changes on the data base, ( This means that it applies the changes immediately to the database ),

      Regards,

      Salah.

  • Jun 06, 2017 at 06:50 PM

    The transaction SO10 is only for the long texts which are named "standard texts", i.e. those in table STXH with TDOBJECT = 'TEXT'.

    Add comment
    10|10000 characters needed characters exceeded