Coggle requires JavaScript to display documents.
SELECT SINGLE * FROM quelle INTO {struktur | variable}
SELECT [DISTINCT] * FROM quelle [INTO | APPENDING] TABLE OF itab.
SELECT [SINGLE] spalte1 [AS name1] spalte2 [AS name2] ... spalteN [AS nameN] ... [ENDSELECT]
DATA: lv_flugnummer TPYE sflight-carrid, lv_verbindung TYPE sflight-connid, lv_flugdatum TYPE sflight-fldate. SELECT SINGLE carrid connid fldate FROM sflight INTO (lv_flugnummer, lv_verbindung, lv_flugdatum).
WHERE {{operand1 {=|EQ|<>|NE|>GT|<|LT|>=|GE|<=|LE} operand2} | {operand [NOT] BETWEEN operand1 AND operand2} | {operand IS [NOT] NULL} | {operand [NOT] in unterabfrage} | {operand LIKE [wildcards]} } ...
:... WHERE ... {operand [NOT] IN seltab} ...
DATA ls_sflight TYPE sflight. SELECT-OPTIONS: so_carr FOR ls_sflight-carrid, so_conn FOR ls_sflight-connid, so_flda FOR ls_sflight-fldate. SELECT carrid connid fldate FROM sflight WHERE carrid IN so_carr AND connid IN so_conn AND fldate IN so_fldate.
SELECT ... FOR ALL ENTRIES IN itab WHERE Spalte Operator itab-Spalte ...
IF lt_spfli IS NOT INITIAL. SELECT carrid connid fldate FROM sflight INTO CORRESPONDING FIELDS OF TABLE lt_sflight FOR ALL ENTRIES IN lt_spfli WHERE carrid = lt_spfli-carrid AND connid = lt_spfli-connid. ENDIF.
SELECT ... ORDER BY { {PRIMARY KEY} | { {spalte1} [ASCENDING|DESCENDING], {spalte2 [ASCENDING|DESCENDING], ...}}}
GROUP BY { {spalte1, spalte2, ...}}
HAVING sql_bedingung
GROUP BY carrid connid HAVING carrid = 'AA'.
DATA: lt_sflight TYPE TABLE OF slight. SELECT FROM sflight FIELDS carrid, connid, fldate WHERE carrid = 'AA' INTO CORRESPONDING FIELDS OF TABLE @lt_sflight.
@dobj
@(ausdruck)
(@DATA(dobj1), @DATA(dobj2))
INTO @DATA(struktur)
INTO TABLE @DATA(itab)
SELECT ... ORDER BY sortierung OFFSET offset
DATA: lv_top TYPE int8, lv_skip TYPE int8. IF (lv_skip>=0) AND (lv_top>lv_skip). SELECT FROM sbook FIELDS carrid, connid, fldate ORDER BY carrid, connid, fldate INTO TABLE @DATA(lt_buchungen) OFFSET @lv_skip UP TO @lv_top ROWS. ENDIF.
SELECT ... quelle INTO CORRESPONDING FIELDS OF TABLE itab FROM itab [INNER] | LEFT| RIGHT | [OUTER] JOIN itab ON join_bedingung WHERE bedingung.
WITH +buchungen(fluggesellschaft, verbindung, datum, kunde) AS SELECT carrid, connid, fldate, customid FROM sbook WHERE cancelled = 'X') SELECT * FROM scustom WHERE id IN (SELECT kunde FROM +buchungen) INTO TABLE @DATA(lt_kunden).
SELECT ... UNION [ALL|DISTINCT] SELECT ... [UNION [ALL|DISTINCT] SELECT ...]
DATA lv_grenze TYPE i VALUE 1800. SELECT carrid, connid, price, CASE WHEN price > @lv_grenze THEN 'First Class' WHEN price < @lv_grenze AND price > 800 THEN 'Business Class' ELSE 'Economy Class' END AS sitzklasse FROM sglicht INTO TABLE @DATA(lt_sflight).
SELECT carrid, connid, cityfrom && '->' && cityto AS verbindung FROM spfli INTO TABLE @DATA(lt_spfli).
[-] operand1 +|-|*|/ [-] operand2 +|-|*|/ [-] operand3
SELECT carrid, connid, fldate, seatsocc+seatsocc_b+seatsocc_f AS belegung FROM sflight INTO TABLE @DATA(lt_flights) WHERE fldate = sy-datum.
CAST(spalte AS dtype)
SELECT CAST(hoehe AS FLTP) * CAST(breite AS FLTP) * CAST(tiefe AS FLTP) AS volumen ...
DATA: lv_abweichung TYPE i VALUE 10. SELECT @Abweichung + price FROM sflight INTO ...
AVG ( [DISTINCT] spalte) MAX( [DISTINCT] spalte|sql_ausdruck) MIN([DISTINCT] spalte|sql_ausdruck) SUM([DISTINCT] spalte|sql_ausdruck) COUNT(DISTINCT spalte|sql_ausdruck) COUNT(*)
coalesce(arg1, arg2)
SELECT coalesce(price, 10) FROM sflight INTO ...
DELETE FROM tabelle WHERE bedingung [ORDER BY ... [OFFSET offset]] [UP TO anzahl ROWS].
DELETE tabelle FROM struktur.
DELETE tabelle FROM itab.
INSERT { {INTO tabelle VALUES struktur} | {tabelle FROM struktur} }.
INSERT INTO tabelle FROM TABLE itab [ACCEPTING DUPLICATE KEYS].
UPDATA tabelle FROM struktur.
UPDATE tabelle FROM itab.
UPDATE tabelle [SET spalte1=... spalte2=...] [WHERE bedingung].
UPDATE sflight SET price=1 WHERE carrid='AA' AND connid='99'.
MODIFY tabelle FROM struktur.
MODIFY tabelle FROM TABLE itab.
SELECT ... FROM tabelle CONNECTION verbindungsname INTO ...
DATA ls_sflight TYPE sflight. SELECT * FROM sflight CONNECTION hdb INTO ls_sflight.