ABAP dynamic internal table sort saves the day
Posted: August 16, 2014 Filed under: SAP, SAP ABAP Leave a commentRequirement to refresh the ALV to display only display unique fields. Thankfully the sort fields of an itab can be specified dynamically now.
TRY.
SORT gt_output BY (lt_sorttab).
DELETE ADJACENT DUPLICATES FROM gt_output COMPARING ALL FIELDS.
CATCH cx_sy_dyn_table_ill_comp_val.
gt_output[] = lt_output[].
ENDTRY.