cancel
Showing results for 
Search instead for 
Did you mean: 

get text from textEdit

murat_kaya
Participant
0 Kudos

hello experts,

i have a textEdit field on the page and a button, when i write something to the textEdit field and press the button, it goes to the OnInputProcessing event, and the event handler is;

IF....

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

ELSEIF button_event->server_event = 'myAppButton'.

data ?= cl_htmlb_manager=>get_data( request = runtime->server->request

name = 'textEdit'

id = 'myComment').

IF data IS NOT INITIAL.

gv_text = data->text.

ENDIF.

ENDIF.

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

here is the definition of textEdit in the layout

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

<htmlb:form>

<htmlb:textEdit id = "myComment"

cols = "120"

text = "<%=gv_text %>" />

</htmlb:form>

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

but the data->text is empty, i cannot get the text i wrote into data, what is wrong here, what should i do?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kaya,

For Text edit element the entered data are stored at TIHTTPNVP.

So Write the below code under the Do_handle_data.

DATA : GET_data TYPE LINE OF TIHTTPNVP.
READ TABLE FORM_FIELDS INTO GET_data  WITH KEY NAME = 'myComment'.

Now GET_data contains the Data of text edit.

Thanks.

murat_kaya
Participant
0 Kudos

thanks everybody,

i found why it didn't work myself and i corrected it, it didn't work because the button and the textEdit was not defined in the same htmlb form, when i put them in the same form, it worked fine...

thanks anyway...

Former Member
0 Kudos

Hi,

I have tested your code, and it works well...

Are you sure the event server name is correct (button name)?

Is data referencing to an instance of the class CL_HTMLB_TEXTEDIT in debug?

Regards,

Tanguy

murat_kaya
Participant
0 Kudos

no idea?