Application Development 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: 

create standard text with CREATE_TEXT FM problem

Former Member
0 Kudos

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?

6 REPLIES 6

satyapriyanka_vana
Active Participant
0 Kudos

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.

Chintu6august
Contributor

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

salah_zinet
Participant
0 Kudos

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.

0 Kudos

Hi Salah,

Have you tried without COMMIT statement. Because, I didn't use COMMIT statement and still I can view the text lines in the standard text.

Regards,

Priyanka.

0 Kudos

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.

Sandra_Rossi
Active Contributor
0 Kudos

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