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

Long text field...

Former Member
0 Likes
596

hi to all

I am creating a module pool.

I created a table in which a field required so that i can enter any no of characters.

What will be the data type of that field. so that i will be able to enter multiple lines in that...

Thanks & Regards

Anubhav

hi to all

I am creating a module pool.

I created a table in which a field required so that i can enter any no of characters.

What will be the data type of that field. so that i will be able to enter multiple lines in that...

Thanks & Regards

Anubhav

3 REPLIES 3
Read only

Former Member
0 Likes
573

If you are passing the type STRING variable than FM will not accept it.

You need to do like this:

codeDATA: L_STRING TYPE STRING,

L_CHAR(2000).

l_CHAR = L_STRING.

CALL FUNCTION 'RKD_WORD_WRAP'

EXPORTING

TEXTLINE = L_CHAR

OUTPUTLEN = 255

....[/code]

Reward Points if useful.

Read only

0 Likes
573

Thanks for your response.

Actually I want the functionality that when I double click on a field, a editor should open and i will be able to enter multiple lines and then save this in a table....

Thanks & regards

Anubhav

Read only

0 Likes
573

Hi Anubhav,

There is a limit of the maximum number of characters allowed for a field in a DB table. Hence you might have to decide on what the maximum length can be, and then create <allowed_length>/<max_length_per_field> number of fields to store the entered data.

For entering the data - much like you do while writing programs (same editor) - the editor can be brought up by using the class CL_GUI_TEXT_EDIT. the where used and help on this method is very good. When you double click on the field, you can call another screen (pop up) which has a container with the text edit control, on entering the data, you can parse and save it into the various fields in the database table as discussed above. When retrieving it, you do the same, and the user in the front end wont know whats happening anyway.

Hope this helps.

Regards,

Aditya