cancel
Showing results for 
Search instead for 
Did you mean: 

Capture user ENTER from get_form_field result

0 Kudos

dear all,

I need to recognize user ENTER character in textarea input field (hex '0D' & '0A') from get_form_field result (in ABAP code). I have tried to convert it to hex, but always get nothing.

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rita,

just like other characters , enter is a special character that u can use in ABAP as "CL_ABAP_CHAR_UTILITIES=>CR_LF" .

Hope it will help u.

Regards,

Ankur

athavanraja
Active Contributor
0 Kudos

If you want the field to be hexa decimal chars you need to set the type as BCD.

Regards

Raja

athavanraja
Active Contributor
0 Kudos

Hi Ankur,

I assume that the poster is talking about user ENTERED and not the ENTER key. (i could be wrong).

Regards

Raja

Former Member
0 Kudos

hi raja,

I think that poster is talking about the ENTER character.

if this is the case,then here is how to do it.

......................

<textarea name = "area1" ...>

</textrarea>

OnInputProcessing

data str type string.

str = request->get_form_field( name = 'area1') .

search str for cl_abap_char_utilities=>cr_lf .

..........

Here SY_FDPOS will contain the position no. where enter character has encountered.

The same approach can be used with <HTMLB:TEXTEDIT> element also.

Hope it is clear now.

Regards,

Ankur

athavanraja
Active Contributor
0 Kudos

Hi Ankur,

The more i read the question, i feel that you are right.

Regards

Raja

Answers (2)

Answers (2)

0 Kudos

dear Raja & Ankur,

thanks for your responses, it's really help.

I have solved my problem by using cl_abap_char_utilities=>cr_lf.

Regards,

Rita.

Former Member
0 Kudos

Hi Rita,

Its nice that ur problem is solved.

So can u please close the thread ?

Regards,

Ankur

athavanraja
Active Contributor
0 Kudos

Question is not clear. Are you saying that you are not able to read the user entered value in the input field using get_form_field? You also talked about hex, do you mean that you are not able to read the user entered hex values from the form field?

Regards

Raja