cancel
Showing results for 
Search instead for 
Did you mean: 

Check for Enter in TextEdit Element

Former Member
0 Kudos

Hi,

I have a requirement where i need to check whether the TextEdit element has enter in it.

When i see the text in debugger, it shows # used for enter. I capture this # in a variable and wheni compare it with character '#' it doesnt match.

Can you please help me in identfying enter in Textedit.

Regards,

Piyush

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

try to use cl_abap_char_utilities=>newline for comparing. Normally you can split your string at cl_abap_char_utilities=>newline or ...=>cr_lf.

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

Hi Piyush,

Do like this:

Read the attribute which is binded with the text edit with the help of code wizard.

then use

if lv_text ca cl_abap_char_utilities=>newline." here lv_text contains the value in my text edit 

It will work.

Regards

Arjun