on 06-13-2008 11:15 AM
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.
you have to capture it in oninputprocessing and pass it to the abap variable to retain the value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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
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
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.