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: 

text editor SAPTEXTEDIT_DEMO3 how does it work

0 Kudos

Hi,

I looked at SAPTEXTEDIT_DEMO3 and am wondering how I can store/retrieve the data in a table. Let's assume I have a table called Z123, how do I need to design the table and how /where to modify the code.

i do not see this code saving/loading the data on SAP.

the load/save local file is working perfectly.

Thanks1

Frans

1 ACCEPTED SOLUTION

Former Member
0 Kudos

In that example, you would need to have your own code to persist the editor contents after the "SAVE" triggers the "g_editor->get_text_as_r3table" i.e. g_mytable will have the editor contents. I've usually used the "SAVE_TEXT" / "READ_TEXT" suite of functions to hold long texts against an object (note the limit of 132 chars in TLINE is different to SAPTEXTEDIT_DEMO3 example's 256), but you could knock up a "Z" table with a handful of columns to store the data e.g. something like


MANDT
KEY_ID     "size / type depends on what you are linking your text to
SEQ_N6     "some sort of seqence number so lines stay in sequence entered
MY_TEXT of type TEXT256 (lowercase allowed)

where the first 3 fields are the primary key.

Jonathan

1 REPLY 1

Former Member
0 Kudos

In that example, you would need to have your own code to persist the editor contents after the "SAVE" triggers the "g_editor->get_text_as_r3table" i.e. g_mytable will have the editor contents. I've usually used the "SAVE_TEXT" / "READ_TEXT" suite of functions to hold long texts against an object (note the limit of 132 chars in TLINE is different to SAPTEXTEDIT_DEMO3 example's 256), but you could knock up a "Z" table with a handful of columns to store the data e.g. something like


MANDT
KEY_ID     "size / type depends on what you are linking your text to
SEQ_N6     "some sort of seqence number so lines stay in sequence entered
MY_TEXT of type TEXT256 (lowercase allowed)

where the first 3 fields are the primary key.

Jonathan