Skip to Content
author's profile photo
Former Member

Problem: Value in Inputfield empty

Hello,

I use the htmlb:tableView and defined one column as editable where a dropdown-list is assigned (by iterator).

In the "OnInputProcessing" I read the new selected value of the edit-column and write this value to my internal table.

Here the Coding of this:

  • Get Data for tv_cols, the current edited row, and update table

DATA: tab_view TYPE REF TO CL_HTMLB_TABLEVIEW.

DATA: tab_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.

DATA value TYPE STRING.

DATA: inputfield TYPE REF TO CL_HTMLB_INPUTFIELD.

FIELD-SYMBOLS: <row> TYPE ZSEM_0APPR_REQU_1.

tab_view ?= CL_HTMLB_MANAGER=>GET_DATA(

request = runtime->server->request

name = 'tableView'

id = 'tab_APPR_REQU_status' ).

  • get changes into internal table

  • get changes into internal table

IF NOT tab_view IS INITIAL.

tab_data = tab_view->data.

IF NOT last_selected_rowIndex IS INITIAL.

READ TABLE gtab_APPR_REQU_1

INDEX last_selected_rowIndex

ASSIGNING <row>.

value = tab_data->GET_CELL_ID(

row_index = last_selected_rowIndex

column_index = '3' ).

inputfield ?= CL_HTMLB_MANAGER=>GET_DATA(

request = request

name = 'inputField'

id = value ).

IF inputField->value is not initial.

<row>-STATUSIQMS = inputField->value.

ENDIF.

ENDIF.

last_selected_rowIndex = tab_data->SelectedRowIndex.

ENDIF.

Now my problem:

If I select a new line in the tableView the value of the line selected before is in the variable "inputField->value" and everything is working fine.

But if I had selected a line and changed the editable column and then push an save-button on the BSP-Site the variable "inputField->value" is empty. Though the "inputfield" itself was assigned correct.

What's going wrong here? How can I get the new value of last changed line?

Thanks in advance

Christian

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Feb 01, 2005 at 11:24 AM

    Whenever you select a new line the OnInputProcessing fires and you can read the value and store it then when the screen is rendered again the value is there and they are now on the new line to edit.

    When you build the element into your table it is assigned the [tablename]_[cell]_[row] and if you know those items then you can do a simple get_form_field call.

    Then you have the value and you can do a table UPDATE to save the value.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Feb 01, 2005 at 11:20 AM

    Christian

    I dont understand. You put a dropdownlist in the column and then you populate an inputfield???

    Maybe there is the problem...

    Regards

    Ariel

    Add comment
    10|10000 characters needed characters exceeded