2012 Jun 27 8:30 AM
Dear Experts,
i have created one text editor for a field name Project Description. as i can save the data in my z-table whatever i am writing in the editor in 1 line.
But whenever i am writing anything in the editor in multiple lines the data is not being saved in the z-table for all the lines.
Suppose i am writing the details of the field ( Project Description) in multiple lines,but in the table only the last line data is being stored.As i am new to this problem please help me out to resolve this.
2012 Jun 27 9:08 AM
It pretty much looks like any line is written, but the next line is overwriting he prior written.
maybe your z-table does not have a key to support several lines.
maybe you do not fill this key properly, if available
2012 Jun 27 9:23 AM
what is your Z-table design, its its only having the Project ID and may be Language for your Description, then you need to add one more field like counter as a part of primary key which you have to generate within your code for multi-line data save
2012 Jun 27 4:29 PM
2012 Jun 27 4:37 PM
tell how your table looks, tell how your coding for this update looks,
then I (or somebody else) maybe able to tell what is wrong
2012 Jun 27 9:54 AM
Before saving in the ztable, try to concatenate the lines from your text editor to the ztable-field then append.
2012 Jun 27 4:27 PM
Dear Mark,
As it is not defined that how many lines can used by an user...so could you tell me that how is it possible to concatenate the lines as i have to declare those as variables in my program......
Thanks in advance.....
2012 Jun 27 8:30 PM
Rather than saving text in a user table, why not use FMs such as CREATE_TEXT, SAVE_TEXT, etc. they're meant for this purpose and well documented.
Rob
2012 Jun 28 1:07 PM
Hi,
You just follow the below code,
data: o_edit TYPE REF TO cl_gui_textedit,
text_tab_1 LIKE STANDARD TABLE OF line.
CALL METHOD o_edit->set_text_as_r3table
EXPORTING
table = text_tab_1.
From this text_tab_1 internal table to database table(ztable) by using Modify statement.