on 07-23-2007 8:20 AM
hi experts ,
i got a problem tht ,
i hve a table and i am using the onaction enter .
so wen i created a new row and press entr on tht i want to read the index of tht row .
so pl help in this .
thanks in advance .
its urjent ...
setu
hi,
when you have your event,
you can find your selected element in context_element in wdevent
so you wont need the index
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi nitya ,
i my application i am not selecting any button ,
just i am using onaction enter event .
my req is i am entering the g/l account no .
after this i hve to find this gl acc is valid or invalid ,
i it is valid i hve to set visibility of next coloumn.
so i am creating a new row and entering my gl acc , and just i am hitting my enter .
so i am not selecting And pressing any button , just pressing enter .
thanks
setu
What I meant was, how are you creating a new row? If you have 5 rows already, you will create a 6th by appending an empty row right? In which case, your index will be 6. This is what i meant in the previous post.
Otherwise, I dont think you can get the index directly without a lead selection. You can only get the element by wdevent->get_context_element( 'CONTEXT_ELEMENT' ). You can then get the data in the row by using get_static_attributes on the element. After which you should probably loop, do a field compare and only get the index.
Regards
Nithya
hi koen ,
thanks for u r quick reply .
here i am not clicking any button or any linkaction .
i am using the 'on action enter' , think i am in 6th row of the table and i entered my value omn the field and pressing 'enter key ' . so i want to read the index of tht row .
pl reply for this .
thanks in advance .
setu
As I said earlier, it is not possible to get the index. You can only loop and get the current index by doing a field comparison. That too will fail if you have two identical rows.
A better idea would be to have your table as read-only. Have a 'Display/Change' button in your toolbar. You should be able to select a row and click on 'change'. Then you should make the row as editable and do your validations on the edited values. If you have your entire table as editable, it will not be easy to track the changes.
Otherwise, if you want to have the table as editable only, then you can get the changed values using the context change log. Refer to web dynpro component DEMO_CONTEXT_CHANGES to see how this works. You will not get the index, but you will get all the changes that have been done to the context after the last binding.
Regards
Nithya
Hi Setu,
pls make the below call using the reference to your node to which the Table is Bound.
get Index of selected table item
CALL METHOD NODE_NAME->GET_LEAD_SELECTION_INDEX
RECEIVING INDEX = Lv_Indx.
( DATA: Lv_Indx Type i )
This should definitely solve the Problem.... If so.. Points
Thanks,
Phani M.
PS: reach me if u have any issues./.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I assume you will be creating a new row by appending an empty row to your internal table and bind it to the context again. The index in this case will simply be the last line in your table.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.