cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with editable cell of a tableVIew...

former_member184111
Active Contributor
0 Kudos

Hi All,

I have a tableView with 4 fields, one of the fields QUANTITY is editable .

Now for ex. if there are 5 rows in the TV , if the user selects all 5 and then enters value for QUANTITY field and clicks on the SUBMIT button , the user is navigated to the next page and i can capture these values in my itab,

but if the user selects one row and enters value for QUANTITY field and then selects the second row , ROWSELECTION event is triggered and the page is refreshed ,

so when the page is displayed agan the value enterd in the QUANTITY field for previous row is gone and the fiels becomes blank.

how to show the value for this field , after the page is displayed again after refreshing????

Thanks,

Anubhav.

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you have to capture it in oninputprocessing and pass it to the abap variable to retain the value

former_member184111
Active Contributor
0 Kudos

Hi Raja,

Capturig is fine but how to display the captured value!!!

Thanks,

Anubhav.

athavanraja
Active Contributor
0 Kudos

captured value has to to be update to the itab used with tableView

Raja

former_member184111
Active Contributor
0 Kudos

Hi Raja,

Actually there are two internal tables say ITAB1 and ITAB2, now the table ITAB1 is used for display in the TV and it has only four fields, the fifth fields quantity is just a column added explicitely using tableViewColumns.

When the user presses submit button the selected row's values are captured in the second internal table ITAB2, which has five fields.

But the table used for data dispplay in the TV is ITAB1 with only Four fields and does not have the QUANTITY field and i can only use one table in the attributes of my TV.

Hope my query is clear...

Thanks,

Anubhav.

athavanraja
Active Contributor
0 Kudos

if thats the case just js to set the value

document.getElementById('tv1_1_2').value = <%= caputred_value %>

former_member184111
Active Contributor
0 Kudos

Hi Raja,

I really cantfigure out how to solve my isuue using your code.

The code for my TV is:

<htmlb:tableView             id              = "material"
                                           headerText      = "Materials"
                                           headerVisible   = "true"
                                           design          = "alternating"
                                           visibleRowCount = "10"
                                           fillUpEmptyRows = "true"
                                           onRowSelection  = "MyEventRowSelection"
                                           selectionMode   = "MULTILINEEDIT"
                                           table           = "<%= itab_materials %>" >

                          <htmlb:tableViewColumns>
                              <htmlb:tableViewColumn columnName="MATNR" title="Material Number" width="150">
                              </htmlb:tableViewColumn>
                              <htmlb:tableViewColumn columnName="MAKTG" title="DESCRIPTION" width="200">
                              </htmlb:tableViewColumn>
                              <htmlb:tableViewColumn columnName="VERPR" title="PRICE" width="150">
                              </htmlb:tableViewColumn>
                              <htmlb:tableViewColumn columnName="QUNTY" title="QUANTITY" edit="TRUE" width="200">
                              </htmlb:tableViewColumn>
                              <htmlb:tableViewColumn columnName="MEINS" title="UNIT" width="150">
                              </htmlb:tableViewColumn>
                          </htmlb:tableViewColumns>
                       </htmlb:tableView>

ITAB_MATERIALS has folowing fields:

MATNR

MEINS

MAKTG

VERPR

How to capture the value of FIFTH field QUANTITY and display it when the next row is selected and the page is refrehsed?

Thanks,

ANubhav.

Former Member
0 Kudos

Hi Anubhav,

In your case, i think u can declare some flag variable and whenever the quantity field is changed try populating flag variable with some 'X' and in layout whenever flag = 'X' , define the table view again with the new internal table itab2.

Note: dont forget to clear the flag at the begining of oninputprocessing method..

hope this helps..

Regards,

Sneha

former_member184111
Active Contributor
0 Kudos

Hi ,

As suggested by RAJA , i added the field QTY to the itab_materials ie being used to populate TV , and captured the value of QUANTITY field on ROWSELECTION event and updated the itab_materials.

But each time the MYROWSELECTION event is triggered , the value of attribute PREVSELECTEDROWINDEX is 0.

So i used PREVSELECTEDROWINDEXTABLE .

I still need the reason of PREVSELCTEDROWINDEX being initial always....

Thanks All,

Anubhav.

Edited by: Anubhav Jain on Jun 17, 2008 2:46 PM

Answers (0)