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

sorting char field

former_member188001
Active Participant
0 Likes
786

All,

I have to sort an internal table with single field. This field is of type CHAR25. When I sort it, the actual data is lost and I see some wierd data.

Please let me know how do I sort this kind of an internal table.

Thanks,

Salil

6 REPLIES 6
Read only

Former Member
0 Likes
746

Hi,

paste in your code.

how did you execute sort.

sort itab by field(char25).

or just sort itab?

regards,

jo

Read only

0 Likes
746
TYPES : BEGIN OF ty_card,
          ccnum TYPE ccnum,
        END OF ty_card.

        gt_output      TYPE STANDARD TABLE OF ty_card,
       gw_output      TYPE ty_card.


SORT gt_output BY ccnum.
DELETE ADJACENT DUPLICATES FROM gt_output.
DESCRIBE TABLE gt_output LINES g_total.
Read only

0 Likes
746

I think field CCNUM is for credit card numbers , please check whether the data in this field is encrypted or not

Read only

0 Likes
746

yes, all the cards are encrypted. and i want to sort them.

Read only

0 Likes
746

If it encrypted then it may contain some system characters. so sorting will not work on this. Your option will be either decrypt the and then sort. ( I think in credit card numbers that will not be allowed due to security reasons)

Better talk to business users

Read only

0 Likes
746

Well, we adopted a different approach to take care of the entire credit card stuff.