ewx

Knobelaufgabe zum Wochenende Abapforum SEPT 2010

ewx
Sep 11th, 2020
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 0.67 KB | None | 0 0
  1. "https://www.abapforum.com/forum/viewtopic.php?f=16&p=96618#p96618
  2.  
  3.   TYPES _bday_filter TYPE SORTED TABLE OF d WITH UNIQUE KEY table_line.
  4.  
  5.   SELECT birthday, COUNT( * ) AS cnt
  6.     FROM @ct_data AS data
  7.     GROUP BY birthday
  8.     ORDER BY cnt DESCENDING
  9.    INTO TABLE @DATA(result).
  10.  
  11.   TRY.
  12.       ct_data = FILTER #( ct_data IN
  13.            VALUE _bday_filter( FOR GROUPS bday OF wa IN result
  14.                                 WHERE ( cnt = result[ 3 ]-cnt )
  15.                                   GROUP BY wa-birthday
  16.                                     ( bday ) )
  17.           WHERE birthday = table_line ).
  18.     CATCH cx_sy_itab_line_not_found.
  19.       CLEAR ct_data.
  20.   ENDTRY.
  21.  
Add Comment
Please, Sign In to add comment