cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to read edited cell values from table view 'LineEDIT' mode

Former Member
0 Kudos

Hello Gurus,

Need urgent help on Cell binding - Here's what I have:

I have a bsp with one tableview for users to update shelf quantity.

Selection mode is <b>Lineedit</b>. I used this only bcos in this I need not select a row to update it - let me know if this is wrong.

Our users do not like to click on the row to select and edit it! I am not getting the edited values from the tableview.

Although I am using a contoller and view, it's not really an MVC. Can someone please guide me on this?

<b>

code in IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS

append initial line to p_column_definitions assigning <def>.
<def>-columnname = 'SHLQTY'.
<def>-title = 'Shelf Qty'.
<def>-EDIT = 'X'.

Code in IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.

p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
                            id        = p_cell_id
*                            type      = 'DATE'
*                            showhelp  = 'TRUE'
*                            type       = 'QUAN'
                            VALUE      = val
                            cellvalue = 'TRUE'
                            _VALUE = P_CELL_BINDING )

</b>

I do not see anything coming in <b>P_CELL_BINDING</b> .

Tableview in layout

<b>

<htmlb:tableView id                    = "result"
                       design                = "STANDARD"
                       headerText            = "Header Text"
                       filter                = "SERVER"
                       onNavigate            = "onMyNavigate"
                       selectionMode         = "lineedit"
                       emptyTableText        = "No records found!"
                       onRowSelection        = "onMyRowSelection"
                       allRowsEditable       = "TRUE"
                       selectedRowKeyTable   = "<%= rkTab %>"
                       table                 = "<%= datatab %>"
                       selectedRowIndexTable = "<%= sRTable %>"
                       iterator              = "<%= iterator %>"
                       visibleRowCount       = "10" >
      </htmlb:tableView>

</b>

I update an internal table Datatab with all the values I require.

Any idea why the cell binding id not working?

Many thanks in advance.

Mike

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

Look at the below thread..

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

Raja T

Answers (1)

Answers (1)

Former Member
0 Kudos

Would really appreciate if someone can look into this - I really looked at many similar forum questions / blogs and could not get the answer.

StefanRoesch
Active Participant
0 Kudos

Hello Mike,

to make databinding work you need to use a model and the datatab table needs to be an attribute of this model.

then you need to change the parameter "table" of your tv-tag to something like this:

table                 = "//model/datatab"

if you don't want to use databinding you dont have to provide the parameter _value of your inputfield, but then you have to receive the entered values manually... (so i would go for the model...)

regards,

Stefan.

Former Member
0 Kudos

Thank you for the replies - I really appreciate it. I am a little confused on how bsps were written before MVC was in place - I believe application classes were being used and I am thinking why databinding is possible only from models and not application classes - any idea?

StefanRoesch
Active Participant
0 Kudos

Hi Mike,

databinding is not possible with application classes. There are just a nice way to handle "session variables". You can use them with MVC as well.

Before MVC there was flow logic. Single formfield-values are receved e.g. when declared as page parameters. Values from tableViews are received e.g. in OnInputProcessing" by fetching the TV-Object from HTMLB_MANAGER and then calling methods like "GET_CELL_VALUE".

DATA: tv          type ref to CL_HTMLB_TABLEVIEW,
      table_event type ref to CL_HTMLB_EVENT_TABLEVIEW.
tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request
                                  name    = 'tableView'
                                  id      = 'mytv1' ).
table_event = tv->data.
myValue = table_event->get_cell_value( row_index  = 1 column_index = 1 ).

good luck,

stefan.