on 01-05-2015 7:24 PM
Hello, I am trying to add some rows to my ALV report, so I am using this code:
method ONACTIONADD_ENTRIES .
DATA: lr_comp_alv TYPE REF TO if_wd_component_usage,
lr_comp_if_alv TYPE REF TO iwci_salv_wd_table,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_comp_alv = wd_this->wd_cpuse_alv( ).
IF lr_comp_alv->has_active_component( ) IS INITIAL.
lr_comp_alv->create_component( ).
ENDIF.
lr_comp_if_alv = wd_this->wd_cpifc_alv( ).
*... Configure ALV
lr_config = lr_comp_if_alv->get_model( ).
lr_config->if_salv_wd_table_settings~set_edit_mode(
IF_SALV_WD_C_TABLE_SETTINGS=>edit_mode_mass
).
endmethod.
This method executes when the user press a Button, but once it is called the new rows doesn't appear.
However, if I press the standard ALV buttons "Append Row" or "Insert Row" the new rows from the mode_mass appear and also the new inserted/appended row.
I don't know what I am missing.
Thank you for your time and help
Hi,
To have new row on action of your button, you need to add a row to your table's context.
i.e. on action of your button,
data lt_data type wd_this->elements_<<NAME_OF_NODE>.
'..... get node reference
'..... read data from node
lo_node->get_static_attributes_table(
importing
table = lt_data )
append initial line to lt_data.
lo_node->bind_table( new_items = lt_data )
Hope this helps you.
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 | |
10 | |
7 | |
7 | |
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.