Code: Alles auswählen.
DATA: IF, EQ, TO, NE, ADD, ELSEIF, SUBTRACT, FROM.
IF IF EQ EQ.
ADD ADD TO TO.
ELSEIF ELSEIF NE NE.
SUBTRACT SUBTRACT FROM FROM. .
ENDIF.
Code: Alles auswählen.
DATA: COMPUTE, SIN, COS, TAN.
COMPUTE COMPUTE = COS( COS ) + SIN( SIN ) - TAN( TAN ).
Code: Alles auswählen.
DATA: CASE, WHEN ,OR, WRITE.
CASE CASE. WHEN WHEN OR OR. WRITE WRITE. ENDCASE.
Code: Alles auswählen.
TYPES TYPE TYPE I.
DATA: DATA, WRITE, AT TYPE TYPE, UNIT.
WRITE AT AT WRITE UNIT UNIT.
Code: Alles auswählen.
DATA STRUCTURE LIKE STRUC.
DATA LIKE.
DATA TABLES LIKE STRUCTURE OCCURS 0 WITH HEADER LINE.
DATA USING.
PERFORM PERFORM
TABLES TABLES
USING USING.
FORM PERFORM TABLES TABLES STRUCTURE STRUCTURE USING USING LIKE LIKE.
ENDFORM.
Code: Alles auswählen.
DATA: CALL_FUNCTION,
EXPORTING,
IMPORTING,
EXCEPTIONS,
DESTINATION(4) VALUE 'BACK'.
CALL FUNCTION CALL_FUNCTION
DESTINATION DESTINATION
EXPORTING EXPORTING =
EXCEPTIONS EXCEPTIONS
OTHERS = 1.
Code: Alles auswählen.
TYPES:
BEGIN OF TYPE,
WHERE,
AND,
END OF TYPE.
DATA: WHERE,
AT TYPE STANDARD TABLE OF TYPE,
INTO TYPE TYPE,
EQ,
AND,
NE.
LOOP AT AT INTO INTO WHERE WHERE NE NE AND AND EQ EQ.
ENDLOOP.
Code: Alles auswählen.
SELECT SELECT FROM FROM AS AS INTO INTO WHERE WHERE. EXIT. ENDSELECT.
Selbst wenn man die Namensraum-Prüfungen der Development Workbench umgeht: Welche DB lässt es denn zu, dass man eine Tabelle FROM mit Feldnamen SELECT anlegt?ewx hat geschrieben:Und hier noch eins, dass fehlerfrei wäre, wenn es eine Tabelle FROM mit dem Feld SELECT gäbe:Code: Alles auswählen.
SELECT SELECT FROM FROM AS AS INTO INTO WHERE WHERE. EXIT. ENDSELECT.
Code: Alles auswählen.
REPORT REPORT.
DATA:INTO, WHERE LIKE TABLE OF INTO.
SELECT SELECT AS AS FROM FROM AS AS INTO INTO WHERE (WHERE):,.
EXIT.EXIT.
ENDSELECT.ENDSELECT.
Code: Alles auswählen.
REPORT REPORT.
INCLUDE IF IF FOUND.
INCLUDE INCLUDE IF FOUND. " vermutlich erst ab 6.x, und nicht dokumentiert
DATA: FUNCTION,DESTINATION,EXPORTING,IMPORTING,CHANGING,TABLES(1) OCCURS 1.
DATA: OF TYPE I VALUE 1, SPLIT, ADD, NEXT, UNTIL, GIVING, MOVE, TO, USING(2).
DATA: BY, TO, DEFAULT, LIKE, ESCAPE, %_HINTS, COMPUTE, DO, VARYING.
CONSTANTS OCCURS TYPE I VALUE 0.
DATA: BEGIN OF INTO OCCURS OCCURS, " ?
BY, WHERE TYPE X,
NO, FIELDS,
END OF INTO,
TABLE LIKE INTO[], SORT LIKE INTO[], AT LIKE INTO[], COLLECT LIKE INTO,
KEY, INDEX, Z TYPE X.
TABLES TRDIR.
SELECT SUBC FROM TRDIR INTO TABLE TABLE WHERE NAME LIKE LIKE ESCAPE ESCAPE %_HINTS %_HINTS.
BREAK BREAK.
DO DO TIMES VARYING VARYING FROM FROM NEXT NEXT. ENDDO.
SORT SORT BY BY (INTO-BY) (INTO-BY).
READ TABLE TABLE INTO INTO WITH KEY KEY.
READ TABLE TABLE INDEX INDEX TRANSPORTING NO NO FIELDS FIELDS.
PARAMETERS AS AS CHECKBOX DEFAULT DEFAULT MEMORY ID MODIF MODIF ID ID_ USER-COMMAND USER-COMMAND.
LOOP AT AT INTO INTO FROM FROM TO TO WHERE WHERE Z Z.
ENDLOOP.
COLLECT COLLECT INTO INTO.
COMPUTE COMPUTE = COMPUTE - COMPUTE * COMPUTE.
ADD ADD NEXT NEXT UNTIL UNTIL GIVING GIVING.
MOVE MOVE TO TO.
TRANSLATE USING USING USING.
CONCATENATE SPLIT SPLIT INTO INTO SEPARATED BY BY.
SPLIT SPLIT AT SPLIT INTO SPLIT SPLIT SPLIT SPLIT SPLIT...
PERFORM OF OF OF OF OF OF OF OF OF OF OF OF OF OF OF ... " ad nauseam
PERFORM PERFORM IN PROGRAM (SY-REPID) IF FOUND. " ohne Variable PERFORM
CALL FUNCTION FUNCTION
DESTINATION DESTINATION
EXPORTING EXPORTING = EXPORTING
IMPORTING IMPORTING = IMPORTING
CHANGING CHANGING = CHANGING
TABLES TABLES = TABLES
EXCEPTIONS EXCEPTIONS XXY XYX YXX.
EXEC SQL PERFORMING PERFORMING.
FOO FOO BAR BAR ; ;
ENDEXEC.
FORM OF.ENDFORM.
FORM PERFORMING.
RANGES IN FOR INTO-BY.
DATA: WITH, EQ, SUBMIT.
SUBMIT (SUBMIT) WITH WITH EQ EQ
WITH IN IN IN.
ENDFORM.
Code: Alles auswählen.
FIELD-SYMBOLS <>.
ASSIGN TO TO <>.
DATA: AND, NP, O LIKE Z, OR LIZE Z, CHECK, BETWEEN, MESSAGE, TYPE, WITH.
CHECK Z Z Z OR OR BETWEEN BETWEEN AND AND AND O O O.
CHECK CHECK Z Z OR OR BETWEEN BETWEEN AND AND OR OR O O AND AND NP NP.
CHECK ( ( <> <> <> ) ) . .
MESSAGE MESSAGE TYPE TYPE WITH WITH INTO INTO.
Da traten ja deutliche Lücken in der ABAP-Syntax zutage.Frank Dittrich hat geschrieben:Allerdings nicht getestet. Und bei manchen Dingen bin ich mir nicht sicher, ob es so geht.
Code: Alles auswählen.
REPORT REPORT.
INCLUDE IF IF FOUND. " vermutlich erst ab 6.x,
INCLUDE INCLUDE IF FOUND. " und nicht dokumentiert
DATA: FUNCTION,DESTINATION,EXPORTING,IMPORTING,CHANGING,
TABLES(1) OCCURS 1.
DATA: OF TYPE I VALUE 1, SPLIT, ADD, THEN, UNTIL, GIVING, MOVE, FROM,
TO, NEXT, USING(2).
DATA: BY, DEFAULT, LIKE, ESCAPE,
ORACLE, INFORMIX, ADABAS, AS400, DB2, DB6, MSSQLNT ,
COMPUTE, DO, VARYING.
CONSTANTS OCCURS TYPE I VALUE 0.
DATA: BEGIN OF INTO OCCURS OCCURS,
BY, WHERE TYPE X,
NO, FIELDS,
END OF INTO,
TABLE LIKE INTO[], SORT LIKE INTO[], AT LIKE INTO[],
COLLECT LIKE INTO, KEY, INDEX, Z TYPE X.
TABLES TRDIR.
SELECT SUBC FROM TRDIR INTO
TABLE TABLE WHERE NAME LIKE LIKE ESCAPE ESCAPE
%_HINTS ORACLE ORACLE INFORMIX INFORMIX ADABAS ADABAS
AS400 AS400 DB2 DB2 DB6 DB6 MSSQLNT MSSQLNT.
BREAK BREAK.
DO DO TIMES VARYING VARYING FROM FROM NEXT NEXT. ENDDO.
SORT SORT BY BY (INTO-BY) (INTO-BY).
READ TABLE TABLE INTO INTO WITH KEY KEY.
READ TABLE TABLE INDEX INDEX INTO INTO
TRANSPORTING NO NO FIELDS FIELDS.
PARAMETERS AS AS CHECKBOX DEFAULT DEFAULT MEMORY ID MODIF MODIF ID ID_ .
PARAMETER PARAMETE DEFAULT DEFAULT MODIF ID ID_
USER-COMMAND USER-COMMAND.
LOOP AT AT INTO INTO FROM FROM TO TO WHERE WHERE Z Z.
ENDLOOP.
COLLECT COLLECT INTO INTO.
COMPUTE COMPUTE = COMPUTE - COMPUTE * COMPUTE.
ADD ADD THEN THEN UNTIL UNTIL GIVING GIVING.
MOVE MOVE TO TO.
TRANSLATE USING USING USING.
CONCATENATE SPLIT SPLIT INTO INTO SEPARATED BY BY.
SPLIT SPLIT AT SPLIT INTO SPLIT SPLIT SPLIT SPLIT SPLIT...
PERFORM OF OF OF OF OF OF OF OF OF OF OF OF OF OF OF ... " ad nauseam
PERFORM PERFORM IN PROGRAM (SY-REPID) IF FOUND. " ohne Variable PERFORM
FIELD-SYMBOLS <>.
ASSIGN TO TO <>.
DATA: AND, NP, O LIKE Z, OR LIKE Z, CHECK LIKE Z, M LIKE Z,
BETWEEN, MESSAGE, TYPE, WITH, IF.
CHECK CHECK BETWEEN AND AND OR OR O O O OR NP NP NP OR Z Z Z.
CHECK CHECK Z Z OR M M M.
CHECK ( ( <> <> <> ) ) . .
MESSAGE MESSAGE TYPE TYPE.
MESSAGE S000(MESSAGE) WITH WITH INTO INTO.
CALL FUNCTION FUNCTION : :
DESTINATION DESTINATION
EXPORTING EXPORTING = EXPORTING
IMPORTING IMPORTING = IMPORTING
CHANGING CHANGING = CHANGING , ,
TABLES TABLES = TABLES
EXCEPTIONS EXCEPTIONS XXY XYX YXX . .
EXEC SQL.
FOO FOO BAR BAR ; ;
ENDEXEC.
EXEC SQL PERFORMING PERFORMING.
SELECT SELECT FROM FROM BOOL INTO :INTO
ENDEXEC.
FORM OF.ENDFORM.
FORM PERFORMING.
RANGES IN FOR INTO-BY.
DATA: WITH, EQ, SUBMIT.
SUBMIT (SUBMIT) WITH WITH EQ EQ
WITH IN IN IN.
ENDFORM.
Code: Alles auswählen.
DATA: BY, DEFAULT, LIKE, ESCAPE,
Code: Alles auswählen.
CONSTANTS VALUE VALUE '#'.
DATA: BY, DEFAULT, LIKE, ESCAPE VALUE VALUE,