‎2019 Dec 15 8:12 AM
Hi ,
Developing dialog program , in custom screen created I/o field for maintaining comment , This comment can store in custom table.
please let me know what data type field to be create in custom table to store comment and comment hw much can I stored ( I,e chars)
Thanks,
Sai
‎2019 Dec 15 1:38 PM
Hi Sai,
You can use FMs CREATE_TEXT, SAVE_TEXT and READ_TEXT to create/save and read long texts. Long texts are not be saved directly in custom DB tables. If you search for these FMs on community, you will find lots of sample code also.
Another option could be using CL_GUI_TEXTEDIT and it's usage is depicted in program SAPTEXTEDIT_DEMO_3. I haven't used it recently but it seems to do the similar functiona. You may have to use different method that is used in program SAPTEXTEDIT_DEMO_3.
There are a few useful FMs suggested by Sandra below in the comment. Please go through the same as well.
GK
‎2019 Dec 15 6:10 PM
Maybe you could complete "Long texts are not be saved in a DB table": either SAVE_TEXT with parameter SAVEMODE_DIRECT = 'X' or COMMIT_TEXT will save to the standard table of texts (STXH, STXL).
NB: EDIT_TEXT or EDIT_TEXT_INLINE can also be used to display the standard "long text" editor. All those function modules are described in the SAP Library.
‎2019 Dec 15 6:14 PM
Thanks Sandra. What i meant was directly in custom table.I have updated my answer. I appreciate your response!
‎2019 Dec 15 6:13 PM
Predefined elementary data types of the ABAP dictionary are described in the ABAP documentation (Overview of All Built-In Dictionary Types).
(for instance, STRING data type = unlimited length)