‎2014 Mar 11 6:07 PM
Hi Experts,
We have a requirement to select multiple records in ALV and process them for creation of posting documents.
Able to achieve multiple selection of rows in ALV.
But we need like the below mentioned.
1. When records are processed successfully then STATUS is set to 'S'.
2. When selected 'Select All' standard option in SAP - then it would select even processed records with STATUS = 'S'.
3. But our requirement is when records 'STATUS' = 'S' then even clicked on 'SELECTALL' standard option all rows should be selected except those records with 'STATUS = S'. The rows with STATUS = 'S' should be shown normally in ALV without any kind of selection of rows.
4. That is only rows with status = 'E' (Error must be selected but not records with STATUS = 'S').
please shares ideas if any.
Regards,
Mohammed
‎2014 Mar 11 9:06 PM
Hello,
I would add one more column (as CHAR01 ) in output table for ALV. I would use it as flag when any records are updated successfully, I would just mark it as 'X'.
Also, I would mark this field as hidden so that user perspective there is no change in data layout.
During select all scenario, I would just neglect rows which are marked 'X' & processed all other records.
Regards,
Sameer
‎2014 Mar 12 3:57 AM
Hi Sameer,
Thanks for your reply.
I am following the same scenario, but how the rows in ALV gets selected when clicked on 'SelectAll' option placed on ALV.
Would need some idea in how to proceed programmatically.
Regards,
Mohammed
‎2014 Mar 12 4:11 AM
Hello,
Please see program SALV_TEST_TABLE_EVENTS for your ref.
Regards,
Sameer
‎2014 Mar 12 4:32 AM
‎2014 Mar 12 5:13 AM
Hi,
Thinking aloud...
- Disable the standard SAP selection.
ob_salv_selections = ob_salv_table->get_selections( ).
ob_salv_selections->set_selection_mode( if_salv_c_selection_mode=>none ).
Add your own function to do the selection.
See SALV_DEMO_TABLE_EVENTS
Regards.