on 01-22-2014 9:56 AM
Dear Experts,
I have a ALV table in that one of the two col's are from date and to date. So I'm defaulting those two values based on my data base values.
Suppose in row 2 of the below snapshot, the from date = 25.01.2014 and to date = 26.01.2014. So here my logic is todate = from date + 2(2days validity). But it should should also accept date <= 26.01.2014.
Pls help me out how to read the selected/changed row of alv table ?. I'm writing the code in ON_CELL_ACTION .
For Ex : If date is changed in 2nd row, i should read only 2nd row of the table.
Thanks
Santhosh
Hi Santhosh,
From andy alv-event methods you will get parameter R_PARAMS-> INDEX which contains selcted row index. Using this index read entire row of the alv table data like GET_STATIC_ATTRIBUTES.
Modify the values how you required and bind again to table data like BIND_TABLE.
Regards,
Kishorekumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use e.g. the WDDOMODIFYVIEW for this purpose, which will be triggered in any case. There you can implement the logic that is needed.
But you will have to loop through all the records, as I'm not sure if getting only the changed data is possible in ALV (as it is probably not possible for a table element itselft (e.g. using IF_WD_TABLE_METHOD_HNDL or classes using this interface).
I'm supposing you don't expect the user to make the action (e.g. enter) only on the changed row).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the index of the row in on_cell_action from parameter r_params
Lo_node = get the node reference here.
Lo_element = lo_node-> get_element ( index = r_params-> index ).
Now get the static attributes from lo_element.
Hope this helps you.
Let me know if u need further assistance.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.