Application Development and Automation 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: 
Read only

longtext in customfiled

Former Member
0 Likes
1,652

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

4 REPLIES 4
Read only

GK817
Active Contributor
1,473

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

Read only

Sandra_Rossi
Active Contributor
1,473

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.

Read only

GK817
Active Contributor
1,473

Thanks Sandra. What i meant was directly in custom table.I have updated my answer. I appreciate your response!

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,473

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)