Skip to Content
0
Feb 01, 2007 at 11:04 AM

How to use create_sort_rule? Please help!

32 Views

Hi Experts,

I want to craete a sort rule for a field. There is a method called create_sort_rule in IF_SALV_WD_SORT interface.

It has following parameters:

inputs:

SORT_ORDER : LIKE IF_SALV_WD_C_SORT=>SORT_ORDER DEFAULT IF_SALV_WD_C_SORT=>SORT_ORDER_ASCENDING

SORT_POSITION : TYPE I OPTIONAL

GROUP_AGGREGATION: TYPE ABAP_BOOL DEFAULT ABAP_FALSE

Output:

VALUE: TYPE REF TO CL_SALV_WD_SORT_RULE

How to use this in a code?

I want to column 'PRODUCT' should be sorted in ascending order, position 1 (it is first column) and it has to group aggregated.

Please help me!

Thanks

Gopal