cancel
Showing results for 
Search instead for 
Did you mean: 

inputfield in iterator

Former Member
0 Kudos

Hi all!!

HOw i save the values that user put in an inputfield that i create dinamically using iterator?

I create the inputfield:

IF ( m_row_ref->ko = 'X' OR m_row_ref->fora_servei = 'X' )

AND m_row_ref->nivell = c_nivell3.

p_replacement_bee = cl_htmlb_inputfield=>factory(

id = p_cell_id

disabled = lv_disable

maxlength = '12'

size = '12'

width = '80'

value = m_row_ref->referencia

type = 'STRING'

cellvalue = 'TRUE'

  • submitonEnter = 'TRUE'

tooltip = 'Insertar referencia' ).

ELSE.

nbsp_bee->add( html = '&nbsp' ).

p_replacement_bee = nbsp_bee.

ENDIF.

I'm using flow logic and my problem is that the user can insert data but then i don't know how to save this to the internal table.

I'm saving other values like checkboxes using the event tiggered :

for example: ONINPUTPROCESSING

when 'DRP'.

lrf_event_selection ?= lrf_event.

id = lrf_event_selection->id.

CLEAR: lv_aux1, lv_aux2.

SPLIT id AT c_id_actvtable INTO lv_aux1 lv_aux2.

CLEAR: row, col.

SPLIT lv_aux2 AT '_' INTO row col.

READ TABLE t_linies_cl INTO wa_linia INDEX row.

wa_linia-motiu = lrf_event_selection->selection.

MODIFY t_linies_cl FROM wa_linia INDEX row.

MOVE 'FALSE' TO gravat.

But with the input field i can not tigger an event and i don't know how to save the information before iteraor render the cell again for other event.

A lot of thanks in advance, please i need this help...

Thanks again!!!

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

Here you go...


Here is an example :

  data: table_event type ref to cl_htmlb_event_tableview,
        table       type ref to cl_htmlb_tableview.
 
  table ?= cl_htmlb_manager=>get_data( request = runtime->server->request
                                       name    = 'tableView'
                                       id      = tableview_id ).
 
 
  table_event ?= table->data.
 
  value = table_event->get_cell_value( row_index    = row_index
                                       column_index = column_index ).


<i>*Reward each useful answer</i>

Raja T

Answers (2)

Answers (2)

Former Member
0 Kudos

A thousands of thanks Raja!!! and thanks to uou too Rajeev.

The solution that Raja suggested me works perfectly!! A milion of thanks again.

Rajeev I understand that the solution you suggested me is correctly, I was doing this after i post my question, but I don't why this don't work; sure I was making something wrong but with iterator this don't work for me... I'm newbie in this. For other inputFields that aren't in iterator i was already using this methos and works perfectly.!!!

Thanks again to everybody!!!

Former Member
0 Kudos

Miquel,

You can also use get_data method of InputField

DATA: data TYPE REF TO CL_HTMLB_INPUTFIELD.

data ?= CL_HTMLB_MANAGER=>GET_DATA( request =

runtime->server->request

name = 'inputField'

id = 'myInputField1'

).

IF data IS NOT INITIAL.

value = data->value.

ENDIF.

where u dynamically pass the inputfield id that is generated from p_cell_id. Generally p_cell_id is the combination of tableview id, row number and column number (you can check that by viewing source of HTML). Your column number is fixed.

Regards

Rajeev