on 05-18-2010 8:11 AM
Hi,
I have an ALV table with default "Append row" "Delete Row" buttons. When i give append row initially, then a new row is added to the end of the table. But when i give field sorting (Ascending order), and then go for Append row, a new row which is added to the top of the table. User want this to be added always in the end of the table. Can anyone please help me on this? ...
Thanks,
Sathishkumar GS
Hi Sathish,
Yes, add new buttons & give your own code. When user hits your APPEND/ADD button, in the method, Read number of table elements & Add table row at index = no_of_elements + 1.
Thanks,
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code for your reference : (Taken from the thread mentioned earlier)
DATA display_function TYPE REF TO cl_salv_wd_function.
LR_FUNCTION_SETTINGS->IF_SALV_WD_FUNCTION_SETTINGS~CREATE_FUNCTION(
EXPORTING
ID = 'BTN_DISPLAY_DET'
RECEIVING
VALUE = display_function ).
* set button and tool tip text
LV_BUTTON_TEXT = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( '007' ).
CREATE OBJECT lo_own_button.
lo_own_button->set_text( LV_BUTTON_TEXT ).
LV_BUTTON_Tooltip = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( '008' ).
CALL METHOD LO_OWN_BUTTON->SET_TOOLTIP
EXPORTING
VALUE = LV_BUTTON_Tooltip.
display_function->set_editor( lo_own_button ).
where you coded the routines for showing the alv, at the end after creating the alv object.
appending table:
via wizard: get contet as table operation, like node->get_static_attributes_table( importing table = my_table ).
then:
append initial line to my_table.
and now bind to conext like.
node->bind_table( my_table ).
Maybe a self defined button "append" and "delete" would help you out?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.