‎2008 Dec 29 9:23 AM
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
‎2008 Dec 29 9:28 AM
‎2008 Dec 29 9:29 AM
Hi,
In PAI ( Suppose If a button is pressed)
Use Insert Command to Insert the text in the Table field.
Regards
Sandipan
‎2008 Dec 29 9:43 AM
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
‎2008 Dec 29 10:20 AM
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