Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV sorting issue

Former Member
0 Likes
624

Hi,

I have a ALV report and i have


  PERFORM build_sort USING : '1' 'EBELN' ' ',
                             '2' 'EBELP' 'X',
                             '3' 'TXZ01' ' ',
                             '4' 'ZEKKN' ' ',
                             '5' 'KNTTP' ' ',
                             '6' 'ACC_ASMT' ' ',
                             '7' PO_AMT' ' ',


FORM build_sort USING x_var TYPE c
                      x_fieldname TYPE lvc_fname
                      x_subtot TYPE slis_dosub.


  DATA: lt_sort TYPE lvc_s_sort.


  lt_sort-spos = x_var.
  lt_sort-fieldname = x_fieldname.
  lt_sort-up = 'X' .
  lt_sort-down = space .
  lt_sort-subtot = x_subtot.
  lt_sort-seltext = 'Check Total'.
  APPEND lt_sort TO i_sort.

ENDFORM.               

I want sorting based on PO_AMT which has a data type CURR. But sorting is not working on CURR data type.

My requirement is, i'm displaying PO_AMT for each line item of PO. But if there are multiple invoices, then next lines are blank in this case. I want to group PO_AMT column, so it should represent one cell....first 6 columns i done this using sorting and its working fine....but for CURR data type it's not working.

Pls suggeset...

Thanks,

3 REPLIES 3
Read only

Former Member
0 Likes
561

Hi,

Sort option will not work for CURR, convert it to CHAR.

Regards,

Satish

Read only

0 Likes
561

Satish,

If i convert it to char, then my total, subtotal will not work.

Read only

0 Likes
561

No need to convert from Curr to Char . it should work.

Look at any example program ,it will sort accordingly.

Check the example programs like BCALV_TEST_HIERSEQ_LIST

Thanks

Seshu