on 01-03-2005 10:47 AM
Hi,
Are these 2 things possible in BSP tableview - Using tableview to accept user inputs and adding new empty rows dynamically to the tableview? My requirement is as follows:
1. My client wants that I should have a tableview with Inputfields & dropdownboxes in which the user can enter & save values in the database.
2.Initially the tableview should have 1 empty row for input & as the user enters some value in it a new row should be added to the tableview for the next entry.
If anyone has done this please help me out.
Regards
Tejaswini
Two minor remarks:
(1) "APPEND INITIAL LINE TO itab." is the fastest way to empty lines in the table.
(2) In terms of debugging, sometimes you can not debug into our classes, as they have the system flag set. Look in the menu of debugger, and just activate system debugging to debug through all of our code as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh,
Thanks a lot. Now my iterator is working fine. In RENDER_CELL_START I am fetching the P_ROW_DATA_REF and displaying the values for each cell that is being rendered.
Your inputs have been a great help.
Regards
Tejaswini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Tableview iterator is specified in the layout in the tableview tag.
Now for this iterator, i have class implemented.
I want to debug the interface methods - render_col_start and render_row_start for this iterator.
I set the HTTPbreakpoint, but it doesnt take me to these implementations.
How can I reach to that point?
Regards,
Krupa
Hi Naresh,
Yes I am modifying my internal table with the values from the tableview. Everytime a new row is added I want to display the existing internal table values in the table view and also give the user a new row for input. But the previous values are getting lost and the tableview is displayed with empty rows alongwith a new row for input.
My code for onInputProcessing() is as follows:
DATA temp LIKE LINE OF tab1.
CASE event->name.
WHEN 'button'.
case event->id.
when 'ADD'.
temp-zr8klpaya = table_event->get_cell_value(
row_index = table_event->selectedrowindex
column_index = '2' ).
temp-zr8klgoaq = table_event->get_cell_value (
row_index = table_event->selectedrowindex
column_index = '3' ).
IF temp IS NOT INITIAL.
APPEND temp TO tab1.
ENDIF.
endcase.
Can you explain to me what your requirement was and how you have developed the logic for it?
Regards
Tejaswini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tejaswini
Check few following things
1. whether get_cell_value is returning the value in the variable
2. whthere your internal table is getting updated
My code is like this
tlist ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'tableView'
id = 'zaddress' ).
IF tlist IS NOT INITIAL.
DATA: tlist_data TYPE REF TO cl_htmlb_event_tableview.
tlist_data = tlist->data.
IF tlist_data->prevselectedrowindex IS NOT INITIAL.
DATA: rowlist LIKE LINE OF intaddress.
FIELD-SYMBOLS: <row> LIKE LINE OF intaddress.
TRY.
CALL METHOD tlist_data->get_simple_data
EXPORTING
row_idx = tlist_data->prevselectedrowindex
col_name = 'DEPARTURE'
CHANGING
data = rowlist-departure.
CATCH cx_sy_conversion_error .
ENDTRY.
TRY.
CALL METHOD tlist_data->get_simple_data
EXPORTING
row_idx = tlist_data->prevselectedrowindex
col_name = 'ZDATE'
CHANGING
data = rowlist-zdate.
CATCH cx_sy_conversion_error .
ENDTRY.
append rowlist to intaddress.
becoz i tried with get_cell_value but it was not working for me. thats why i used get_simple_data.
Hope this will solve your problem
Regards
Naresh
Hi,
I went through the weblogs & I am now using tableview iterator to add new rows to my internal table on click of a button that is present in the tableview. But I am facing a new problem. I want the data that I have input in the previous rows to appear in the tableview. But I am getting empty rows. How do I assign the values of the internal table to the tableview? This is how I am doing it now.
<htmlb:tableView id = "tv1"
table = "<%= tab1 %>"
allRowsEditable = "TRUE"
selectionMode = "LINEEDIT"
selectedRowIndex = "<%= index %>"
iterator = "<%= iterator %>" >
</htmlb:tableView>
When I am checking in onInputProcessing the tab1 has values that I enter in it.But it does not appear inn the tableview. Please help I am unable to think what else is to be done.
Regards
Tejaswini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh,
Thanks for the suggestions,I will try them out.
How do you append new lines to the tableview at runtime?Suppose the user enters values in the first empty row I need to generate another empty row so that he can enter further data.
Regards
Tejaswini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can edit the lines in table view using table view iterators.For details of iterators you can see the following weblog by Brian
/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
i have also done the same thing in of the requirement by giving empty rows in table.
actually i ahve appened few blank rows in the table in onCreate event.
Hope it will help you.
regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.