01-10-2017 4:14 PM
Hello guys, I have an internal table with data sorted:
sort it_datos by aerolinea fecha1 hora .
I need group by matric becase I need the follow order: A - S A-S No: A-A S-S
this becase this is a table of Flights, when A: Arrivals When S: Departures. Ans I need my report wihr arrivals and departures.
here I have an error on my report:
As you can see I have not the order I want, because in XA-ACO the next row is not XA-ACO (I have market the rows like I want in pair)
The question is, how can I group this table by matric for follow the order A/S ??
01-10-2017 5:33 PM
See https://blogs.sap.com/2016/06/23/group-by-for-internal-tables-step-by-stepc/
With additions ASCENDING|DESCENDING you can define the sort order.
01-10-2017 7:11 PM
Looks like you need to hire a programmer, or at least someone who can manage to sort an excel spreadsheet. Maybe you should put your data in to Excel and try different sorts to see what works.
In this particular case, sort by all the fields that you need an order of importance aerolina, matrlo, numero, a/s, fecha and hora.
01-10-2017 7:31 PM
Before down voting, why don't you try it? Your "matrlo" field groups your flights together within an airline, if you start your sort with that, they will all stay together. So Airline, Matrlo... then whatever else.