cancel
Showing results for 
Search instead for 
Did you mean: 

Descending sorting by a characteristic field

Former Member
0 Kudos

Hello experts

I am developing a report in BEX.

The output of the report i want to show on descending sorting by a characteristic field.

The problem is caused by the fact that sorting is done by char field, but the field itself contains only numbers, always.

I mean it looks like this:

Characteristic - Portion NumberKey Figure
9001111
8592222
811212
7952121
7325454
76666
6242211
Etc.4444

Please advise how to sort correctly.

Accepted Solutions (1)

Accepted Solutions (1)

vinay_lohakare5
Contributor
0 Kudos

Hello,

Use the option to sort it by text OR

create the replacment path variable with Portion Number as the ref char.

Thanks,

Vinay

Former Member
0 Kudos

Hello,

The characteristic Portion_Numb does not contain text table.

It only char12 field without text table, master data table and hierarchy table.

That is not possible to sort by text.

Would you please be more specific about the possibility of "create replacment path variable with Portion Number as the ref char"?

former_member182343
Active Contributor
0 Kudos

Hi,

I suggest you to do modelling changes by writing ABAP code at transofrmation level.

Use Start routine and sort data by ascending using key field and and modify data to result_package.

Replay the status, we will try will all possible ways.

Regards,

rvc

Former Member
0 Kudos

Hi vijay

I want to sort the output of a query with descending sort according to characteristic Portion_Numb, char12.

I do not think it's the solution, there is no connection between sorting the data in the output of the query, and sort the data while loading data.

In any case, the data in DSO sorted already. Since the data are loaded in the delta, once a day, according to the infoobject  Portion_Numb. And still it display data sorted incorrectly, as the table above...

former_member182343
Active Contributor
0 Kudos

I guess position_number and char_12 are keys in DSO.

Can you debug once and check the order sequence in result_package.

former_member223480
Active Contributor
0 Kudos

Hi Evgeny

Do you have any conversion routine on Portion_Numb characteristic?

If you don't have, I suggest to use the alpha conversion and try with it.

What is the data type of the characteristic?

Thank you

Yiannis

Former Member
0 Kudos

Hello Yiannis

Thanks for the reply.

Infoobject named Portion_Numb does not have any conversion routine.

The data type of Portion_Numb is Char12.

During loading data into a DSO, in a transformation level, i use the L_Trim(Portion_Numb) formula, which cuts leading blank characters.

So there is no need in ALPHA conversion routine.

I would like to find a solution in BEX.

former_member223480
Active Contributor
0 Kudos

ok then, transform this char into a formula (replacement path-key, hide it ) and use a condition on that formula (top n).

former_member210253
Contributor
0 Kudos

Hi ,

Create one formula, in the formula window, create a formula variable of type Replacement path with Partition number and then put it in the formula window.

then create condition (TOP N where N=9999999......) on this new formula.

Regards,

BAbu

Former Member
0 Kudos

Thank you for the help.

Former Member
0 Kudos

Hello Yiannis.
Thank you for the help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

    I think whatever that is displayed now is the Key. I believe the characteristic must be having text component as well. Please sort it on text to get the desired result.

Find attached the screenshot for doing the same.

Hope this helps.

Regards

Prem.