on 05-20-2013 9:36 PM
Hi experts,
I'm facing a problem with ABAP ALV, and after researching I couldn't find the solution for that.
In my scenario I'm dynamically creating my ALV from DB (I'm using ORM for this, in case it makes any difference), and if I have several rows on my ALV, after selecting the values I want in the "first page", if I scroll down for further selecting other items, the items I've just selected they get deselected.
When dynamically creating the ALV I've set this
lr_interfacecontroller->get_model( )->if_salv_wd_table_settings~set_selection_mode( cl_wd_table=>e_selection_mode-multi_no_lead ).
but it doesn't solves my problem (actually I've tried different values, but none of them did the job).
I've also tried other attributes (don't remember which of them) from this interface and from other interfaces, but still with no success.
Thanks in advance for your help!
Best regards,
Giovani
Hello Giovani,
According to me the solution you have implemented above is perfect.
The problem that you might have occurred is that you have bind the table again on some action.
This means when you have selected the rows in first page and scrolled some hook methods are called like before_action after_action modify_view ( view hook methods ) and post_processing before_navigation ( component controller hook methods ). Please check that you have not used bind_table( ) again in any of these methods.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well an easy option is to keep an attribute in node char1 , as flag , and one checkbox in the Generated Table UI , so that user can select multiple values even after scrolling down..
Best Regards,
Anoop Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anoop,
Thanks for the suggestion. In fact I've considered the usage of checkboxes for this, but instead of going for this approach we are trying to achieve the usage of the "standard" functionality of clicking on the rows, so if there is an alternative for this we'd prefer it rather using checkboxes.
Best regards,
Giovani
Hi Giovani,
Check this document http://scn.sap.com/docs/DOC-41911
Hi John,
I wasn't able to try this approach due to time constraints for the delivery of the project (so I don't know if it will indeed do what I need or not), but for sure it is at least helpful in order to improve the solution to not request the CTRL click for selecting the rows.
Once I'm able to try this I'll provide a more suitable response to this proposal.
Thanks and regards,
Giovani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navneet,
Thanks for the suggestion, but it's not applicable to my problem.
The fact is that I don't have an ALV to configure in this way (it's created dynamically), but even if I had it at design time this solution wouldn't fit to my needs, as my problem is not related to displaying one or another field, but to keep selected any previously selected rows when scrolling down the ALV, for example.
Best regards,
Giovani
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Giovani,
Did you try in this way....
DATA:
lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
l_value TYPE REF TO cl_salv_wd_config_table,
lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_salv_wd_table = wd_this->wd_cpifc_alv_child( ).
l_value = lr_salv_wd_table->get_model( ).
lr_table_settings ?= l_value .
lr_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-MULTI_no_lead ).
regards,
narayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Narayan,
I didn't tried this way, but does this make any difference?
I mean, the code I've written does exactly the same as yours, but instead of declaring some variables and assigning them one at a time, I only directly call the methods in line...
Could you elaborate a little bit more on this topic ("in line" X declarative calling) in case it has differences, please?
Regards,
Giovani
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.