Bu konuda çok fazla e-mail geldiği için örnek ekleme ihtiyacı duydum.

TYPES:
  BEGIN OF ty_customer,
    customer TYPE char10,
    name     TYPE char30,
    city     TYPE char30,
    route    TYPE char10,
  END   OF ty_customer.
 
 TYPES: tt_customers TYPE SORTED TABLE OF ty_customer
          WITH UNIQUE KEY customer.
 
TYPES: tt_citys TYPE STANDARD TABLE OF char30 WITH EMPTY KEY.
 
DATA(t_customres) =
VALUE tt_customers(
  ( customer = 'C0001' name = 'Ali AK' city = 'NY' route = 'R0001' )
  ( customer = 'C0002' name = 'Veli YILMAZ'  city = 'ANKARA' route = 'R0003' )
  ( customer = 'C0003' name = 'MUSTERI 1' city = 'ANKARA' route = 'R0001' )
  ( customer = 'C0004' name = 'MUSTERI 2' city = 'ANKARA' route = 'R0003' )
  ( customer = 'C0005' name = 'MUSTERI 3' city = 'ANKARA' route = 'R0001' )
).
 
 
LOOP AT t_customres INTO DATA(ls_cust_2)
     GROUP BY  ( route = ls_cust_2-route )
      ASCENDING
      WITHOUT MEMBERS
      REFERENCE INTO DATA(route_group_2).
 
  WRITE: / route_group_2->route.
 
 
ENDLOOP.
 
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com