11-21-2007 9:41 PM
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
11-22-2007 12:32 AM
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
11-22-2007 12:32 AM
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