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

problem in text editor

Former Member
0 Likes
455

Hello all,

I hav created a text editor in my module pool program. now i m fetching data from internal table to text editor , now i want to add some more data in it n save it back to ztable ,how to do this?????

thanks in advance

4 REPLIES 4
Read only

Former Member
0 Likes
424

hi,

refer to this demo program..SAPSCRIPT_DEMO_NOTE_EDITOR

Read only

Former Member
0 Likes
424

Hi,

In PAI ( Suppose If a button is pressed)

Use Insert Command to Insert the text in the Table field.

Regards

Sandipan

Read only

Former Member
0 Likes
424

hello

If u r going to insert new records into the databse table then go for INSERT statement ,

if updating the existing record then go for UPDATE statemnt.

All the above shud be under PAI events.

Add a push button on the selection screen with function code 'SAVE' /or any thing it can be.

Case sy-ucomm.

When 'SAVE'

Insert...

or

Update....

Revrt back if any issues.

Regards,

Naveen

Read only

Former Member
0 Likes
424

Hi ,

To add data to the screen container we need to set the text editor as active

initially we read data from text using READ_TEXT passing the required parameters

call method editor->set_text_as_stream

exporting

text = text_tab.

Once you enter the values we can fetch it from the screen text editor back to th internal table

call method editor1->get_text_as_r3table

importing

table = int_table

exceptions

error_dp = 1

error_cntl_call_method = 2

error_dp_create = 3

potential_data_loss = 4

others = 5.

types: begin of ty_editor,

edit(254) type c,

end of ty_editor.

data: int_table type standard table of ty_editor.

Everything completed means ...on user action of save....

use function module SAVE_TEXT..For this(READ_TEXT/SAVE_TEXT usage) we must have created an text name and other parameters in SO10

Hope it helps

Regards

Byju