origami and ABAP Cleaner
ABAP Cleaner cleans up code: it replaces obsolete statements, removes unused variables and also lays the code out. origami only lays it out. This page compares only the layout: the same code, formatted by ABAP Cleaner's layout rules and by origami.
- ABAP Cleaner
- 1.29.2, default profile reduced to its 47 layout rules with their default options (how). Checked on 2026-11-23 on the 1,964 ABAP and 144 CDS files of the test corpus: these rules change no code and delete no comment; the only reordering is a closing bracket moved in front of a comment or pragma.
- origami
- origami 0.2.1 (style edition 2026), default settings.
- Both
- Line width 120, keywords in upper case, indent 2.
The same code, twice
Each input was run through both tools as it is. The differences come from two choices: origami breaks every line that is too long and ignores the author's line breaks, and it aligns columns only inside one statement.
Method calls
Both hang the parameters behind the opening bracket and align the = signs. A call with two or more parameter keywords puts each keyword on its own line in both tools. origami aligns the = signs per keyword, ABAP Cleaner across all of them.
lo_service->read( exporting iv_id = lv_id importing es_data = ls_data ).
lo_service->check( exporting iv_id = lv_id ).
data(lv_result) = lo_calculator->calculate( iv_amount = lv_amount iv_currency = lv_currency iv_date = sy-datum iv_rounding = abap_true ).lo_service->read( EXPORTING iv_id = lv_id
IMPORTING es_data = ls_data ).
lo_service->check( EXPORTING iv_id = lv_id ).
DATA(lv_result) = lo_calculator->calculate( iv_amount = lv_amount
iv_currency = lv_currency
iv_date = sy-datum
iv_rounding = abap_true ).lo_service->read( EXPORTING iv_id = lv_id
IMPORTING es_data = ls_data ).
lo_service->check( EXPORTING iv_id = lv_id ).
DATA(lv_result) = lo_calculator->calculate( iv_amount = lv_amount
iv_currency = lv_currency
iv_date = sy-datum
iv_rounding = abap_true ).Lines longer than the limit
origami breaks every statement that does not fit into the line width: before AND and OR, and before each SQL clause. ABAP Cleaner's layout rules align lines that are already broken, but they leave a long line as it is.
if lv_amount > 0 and lv_currency is not initial and ls_data-status = 'A' and ls_data-created_by = sy-uname and lv_flag = abap_true.
book( ).
endif.
select carrid, connid, fldate from sflight where carrid = @lv_carrier and fldate >= @sy-datum into table @data(lt_flights).IF lv_amount > 0 AND lv_currency IS NOT INITIAL AND ls_data-status = 'A' AND ls_data-created_by = sy-uname AND lv_flag = abap_true.
book( ).
ENDIF.
SELECT carrid, connid, fldate FROM sflight
WHERE carrid = @lv_carrier AND fldate >= @sy-datum
INTO TABLE @DATA(lt_flights).IF lv_amount > 0
AND lv_currency IS NOT INITIAL
AND ls_data-status = 'A'
AND ls_data-created_by = sy-uname
AND lv_flag = abap_true.
book( ).
ENDIF.
SELECT carrid, connid, fldate
FROM sflight
WHERE carrid = @lv_carrier AND fldate >= @sy-datum
INTO TABLE @DATA(lt_flights).Your own line breaks
origami does not keep line breaks: whatever fits goes on one line, so two authors always get the same result. ABAP Cleaner keeps the author's breaks and aligns around them.
lv_count =
lines( lt_flights ).
lo_service->read(
exporting
iv_id = lv_id ).
mt_items = value #(
( id = 1 name = `Alpha` )
( id = 2 name = `Beta` ) ).lv_count =
lines( lt_flights ).
lo_service->read( EXPORTING iv_id = lv_id ).
mt_items = VALUE #( ( id = 1 name = `Alpha` )
( id = 2 name = `Beta` ) ).lv_count = lines( lt_flights ).
lo_service->read( EXPORTING iv_id = lv_id ).
mt_items = VALUE #( ( id = 1 name = `Alpha` ) ( id = 2 name = `Beta` ) ).Declarations
ABAP Cleaner aligns TYPE across separate DATA statements and puts each item of a chain on its own line. origami aligns only inside a chain it has to break, and keeps a chain that fits on one line.
data lv_count type i.
data lt_flights type standard table of sflight with empty key.
data lo_logger type ref to zcl_logger.
data: lv_a type i, lv_long_name type string.
types: begin of ty_item, id type i, name type string, end of ty_item.DATA lv_count TYPE i.
DATA lt_flights TYPE STANDARD TABLE OF sflight WITH EMPTY KEY.
DATA lo_logger TYPE REF TO zcl_logger.
DATA: lv_a TYPE i,
lv_long_name TYPE string.
TYPES: BEGIN OF ty_item,
id TYPE i,
name TYPE string,
END OF ty_item.DATA lv_count TYPE i.
DATA lt_flights TYPE STANDARD TABLE OF sflight WITH EMPTY KEY.
DATA lo_logger TYPE REF TO zcl_logger.
DATA: lv_a TYPE i, lv_long_name TYPE string.
TYPES: BEGIN OF ty_item,
id TYPE i,
name TYPE string,
END OF ty_item.Method signatures
ABAP Cleaner keeps IMPORTING behind the method name and aligns the types in a table. origami gives each section keyword its own line and does not align types, so renaming one parameter changes one line.
class zcl_rates definition public final create public.
public section.
methods calculate importing iv_amount type p iv_currency type waers iv_date type d returning value(rv_result) type p raising zcx_calc_error.
methods reset.
endclass.CLASS zcl_rates DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
METHODS calculate IMPORTING iv_amount TYPE p
iv_currency TYPE waers
iv_date TYPE d
RETURNING VALUE(rv_result) TYPE p
RAISING zcx_calc_error.
METHODS reset.
ENDCLASS.CLASS zcl_rates DEFINITION PUBLIC FINAL CREATE PUBLIC.
PUBLIC SECTION.
METHODS calculate
IMPORTING
iv_amount TYPE p
iv_currency TYPE waers
iv_date TYPE d
RETURNING
VALUE(rv_result) TYPE p
RAISING
zcx_calc_error.
METHODS reset.
ENDCLASS.Comments and blank lines
origami puts exactly one space before an end-of-line comment and never changes comment text, apart from aligning ABAP Doc. ABAP Cleaner keeps aligned comments, adds a space after " and adds blank lines, for example after declarations.
* Totals per carrier
lv_count = 0. " counter
mv_total = iv_amount. " sum
"tax is added later
lv_tax = mv_total * lv_rate.* Totals per carrier
lv_count = 0. " counter
mv_total = iv_amount. " sum
" tax is added later
lv_tax = mv_total * lv_rate.* Totals per carrier
lv_count = 0. " counter
mv_total = iv_amount. " sum
"tax is added later
lv_tax = mv_total * lv_rate.CALL FUNCTION
Same structure, two details: origami indents the parameter groups by four spaces, ABAP Cleaner by two and also aligns the keywords and = signs across groups.
call function 'Z_FLIGHT_TRAVEL_CREATE' exporting is_travel = ls_travel it_booking = lt_booking importing es_travel = ls_result exceptions not_found = 1 others = 2.CALL FUNCTION 'Z_FLIGHT_TRAVEL_CREATE'
EXPORTING is_travel = ls_travel
it_booking = lt_booking
IMPORTING es_travel = ls_result
EXCEPTIONS not_found = 1
OTHERS = 2.CALL FUNCTION 'Z_FLIGHT_TRAVEL_CREATE'
EXPORTING is_travel = ls_travel
it_booking = lt_booking
IMPORTING es_travel = ls_result
EXCEPTIONS not_found = 1
OTHERS = 2.Letter case
Both write keywords in upper case and identifiers without a lower-case letter in lower case; an identifier in mixed case keeps it. Literals and comments are never changed. The only difference here is the blank line ABAP Cleaner adds after the declarations.
DATA LV_COUNT TYPE I.
DATA lvOffset TYPE I VALUE 2.
LV_COUNT = LINES( MT_ITEMS ) + lvOffset.
MESSAGE |COUNT: { LV_COUNT }| TYPE 'S'. " TotalDATA lv_count TYPE i.
DATA lvOffset TYPE i VALUE 2.
lv_count = lines( mt_items ) + lvOffset.
MESSAGE |COUNT: { lv_count }| TYPE 'S'. " TotalDATA lv_count TYPE i.
DATA lvOffset TYPE i VALUE 2.
lv_count = lines( mt_items ) + lvOffset.
MESSAGE |COUNT: { lv_count }| TYPE 'S'. " TotalCDS view entity
Both put each clause of the header and each element on its own line. ABAP Cleaner also aligns as aliases and adds blank lines between sections; origami lines up names after key and keeps single spaces.
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Travel'
define view entity ZI_Travel as select from /dmo/travel association [0..1] to /DMO/I_Agency as _Agency on $projection.AgencyID = _Agency.AgencyID {
key travel_id as TravelID, agency_id as AgencyID, customer_id as CustomerID,
_Agency
}@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Travel'
define view entity ZI_Travel
as select from /dmo/travel
association [0..1] to /DMO/I_Agency as _Agency on $projection.AgencyID = _Agency.AgencyID
{
key travel_id as TravelID,
agency_id as AgencyID,
customer_id as CustomerID,
_Agency
}@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Travel'
define view entity ZI_Travel
as select from /dmo/travel
association [0..1] to /DMO/I_Agency as _Agency on $projection.AgencyID = _Agency.AgencyID
{
key travel_id as TravelID,
agency_id as AgencyID,
customer_id as CustomerID,
_Agency
}Aligned statements, COND and SELECT lists
Both tools align consecutive ALIASES, REDEFINITION and FOR TESTING declarations, assignments to the same structure, ABAP Doc parameters, the branches of COND and a SELECT list with aliases, and both remove the space before the period. The differences: origami indents the SQL clauses by four spaces and keeps a method signature that fits on one line; ABAP Cleaner indents by two, aligns the signature in a table and adds blank lines.
CLASS lcl_flights DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PUBLIC SECTION.
INTERFACES zif_reader.
ALIASES read FOR zif_reader~read.
ALIASES read_all_entries FOR zif_reader~read_all_entries.
"! Reads one flight
"! @parameter iv_carrier | Airline
"! @parameter iv_connection_number | Flight number
"! @raising zcx_not_found | No such flight
METHODS get_flight IMPORTING iv_carrier TYPE s_carr_id iv_connection_number TYPE s_conn_id RAISING zcx_not_found.
METHODS get_name REDEFINITION.
METHODS get_description REDEFINITION.
PRIVATE SECTION.
METHODS reads_one_flight FOR TESTING.
METHODS fails_without_carrier FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS lcl_flights IMPLEMENTATION.
METHOD reads_one_flight.
ls_flight-carrid = 'LH' .
ls_flight-connid = '0400' .
ls_flight-seats_occupied = 120 .
SELECT carrid, connid, cityfrom AS departure, cityto AS arrival FROM spfli INTO TABLE @DATA(lt_routes) WHERE carrid = @ls_flight-carrid.
DATA(lv_status) = COND #( WHEN ls_flight-seats_occupied = 0 THEN 'empty' WHEN ls_flight-seats_occupied < 200 THEN 'open' ELSE 'full' ).
ENDMETHOD.
ENDCLASS.CLASS lcl_flights DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PUBLIC SECTION.
INTERFACES zif_reader.
ALIASES read FOR zif_reader~read.
ALIASES read_all_entries FOR zif_reader~read_all_entries.
"! Reads one flight
"! @parameter iv_carrier | Airline
"! @parameter iv_connection_number | Flight number
"! @raising zcx_not_found | No such flight
METHODS get_flight IMPORTING iv_carrier TYPE s_carr_id
iv_connection_number TYPE s_conn_id
RAISING zcx_not_found.
METHODS get_name REDEFINITION.
METHODS get_description REDEFINITION.
PRIVATE SECTION.
METHODS reads_one_flight FOR TESTING.
METHODS fails_without_carrier FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS lcl_flights IMPLEMENTATION.
METHOD reads_one_flight.
ls_flight-carrid = 'LH'.
ls_flight-connid = '0400'.
ls_flight-seats_occupied = 120.
SELECT carrid,
connid,
cityfrom AS departure,
cityto AS arrival
FROM spfli
INTO TABLE @DATA(lt_routes)
WHERE carrid = @ls_flight-carrid.
DATA(lv_status) = COND #( WHEN ls_flight-seats_occupied = 0 THEN 'empty'
WHEN ls_flight-seats_occupied < 200 THEN 'open'
ELSE 'full' ).
ENDMETHOD.
ENDCLASS.CLASS lcl_flights DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
PUBLIC SECTION.
INTERFACES zif_reader.
ALIASES read FOR zif_reader~read.
ALIASES read_all_entries FOR zif_reader~read_all_entries.
"! Reads one flight
"! @parameter iv_carrier | Airline
"! @parameter iv_connection_number | Flight number
"! @raising zcx_not_found | No such flight
METHODS get_flight IMPORTING iv_carrier TYPE s_carr_id iv_connection_number TYPE s_conn_id RAISING zcx_not_found.
METHODS get_name REDEFINITION.
METHODS get_description REDEFINITION.
PRIVATE SECTION.
METHODS reads_one_flight FOR TESTING.
METHODS fails_without_carrier FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS lcl_flights IMPLEMENTATION.
METHOD reads_one_flight.
ls_flight-carrid = 'LH'.
ls_flight-connid = '0400'.
ls_flight-seats_occupied = 120.
SELECT carrid,
connid,
cityfrom AS departure,
cityto AS arrival
FROM spfli
INTO TABLE @DATA(lt_routes)
WHERE carrid = @ls_flight-carrid.
DATA(lv_status) = COND #( WHEN ls_flight-seats_occupied = 0 THEN 'empty'
WHEN ls_flight-seats_occupied < 200 THEN 'open'
ELSE 'full' ).
ENDMETHOD.
ENDCLASS.Every ABAP Cleaner rule
ABAP Cleaner 1.29.2 has 100 rules. 53 of them change code, comments or names; origami never does that, it checks its own output token by token. Of the other 47, origami does 20 the same way and covers 23 with its own layout; 4 have no counterpart.
- Same origami does the same: 20
- Own layout origami covers this with its own layout: 23
- No layout rule origami does not have: 4
- Not a goal changes code, comments or names, which origami never does: 53
| ABAP Cleaner rule | Files with changed code or comments | origami | How origami handles it |
|---|---|---|---|
| Empty lines | |||
Standardize empty lines within methodsEMPTY_LINES_WITHIN_METHODS | – | Own layout | ABAP-BLANK-001 Removes blank lines after a block opener and before its closer and keeps at most one in a row; never adds one. |
Separate methods and classes with empty linesEMPTY_LINES_OUTSIDE_METHODS | – | Own layout | ABAP-BLANK-001 Keeps the blank lines between methods and classes (at most one); does not add any. |
Standardize empty lines in class definitionsEMPTY_LINES_IN_CLASS_DEFINITION | 51 | Own layout | ABAP-BLANK-001 Does not add blank lines above sections. |
Standardize test classes for CDS viewsCDS_TEST_CLASS_LINES | – | Not a goal | |
Move commands to own linesONE_COMMAND_PER_LINE | – | Same | ABAP-STMT-001 |
| Spaces | |||
Put spaces around text literalsSPACES_IN_EMPTY_BRACKETS | – | No | Tokens that touch in the input stay together, because in ABAP a space can change the meaning. |
Close brackets at line endCLOSING_BRACKETS_POSITION | 18 | Same | ABAP-CALL-001 ABAP-VALUE-001 |
Remove space before commas and periodSPACE_BEFORE_PERIOD | 17 | Same | ABAP-SPACE-001 Also before commas in SQL lists; a lone period or comma moves up across comment lines. |
Put spaces around " comment signSPACE_AROUND_COMMENT_SIGN | – | Own layout | ABAP-COMMENT-002 One space before an end-of-line comment; the comment text is never changed. |
Remove needless spacesNEEDLESS_SPACES | – | Same | ABAP-COMMENT-002 Single spaces between tokens; hand-aligned end-of-line comments are not kept. |
| Declarations | |||
Unchain into multiple statementsDECLARATION_CHAIN | 716 | Not a goal | |
Remove needless CLEARNEEDLESS_CLEAR | 16 | Not a goal | |
Rearrange local declarationsLOCAL_DECLARATION_ORDER | 707 | Not a goal | |
Report unused parametersUNUSED_PARAMETERS | 84 | Not a goal | |
Delete unused variablesUNUSED_VARIABLES | 293 | Not a goal | |
Simplify a chain with one elementCHAIN_OF_ONE | 674 | Not a goal | |
Make implicit type explicitIMPLICIT_TYPE | 97 | Not a goal | |
Use FINAL for immutable variablesFINAL_VARIABLE | 135 | Not a goal | |
Standardize CLASS ... DEFINITIONCLASS_DEFINITION | 286 | Not a goal | |
Standardize escaping of !parametersESCAPE_CHAR_FOR_PARAMS | 659 | Not a goal | |
Remove empty class definition SECTIONsEMPTY_SECTIONS | 236 | Not a goal | |
Add missing parameters to ABAP DocABAP_DOC_PARAMETERS | 19 | Not a goal | |
Remove lang="en" from ABAP DocABAP_DOC_LANG | 10 | Not a goal | |
| Syntax | |||
Comment with ", not with * (for text)COMMENT_TYPE | 605 | Not a goal | |
Remove end-of commentsEND_OF_COMMENT | 54 | Not a goal | |
Replace obsolete pseudo comments with pragmasPSEUDO_COMMENT | 62 | Not a goal | |
Move pragmas to correct positionPRAGMA_POSITION | – | Not a goal | |
Correct frequent typosTYPO | 75 | Not a goal | |
Resolve equals sign chain into several commandsEQUALS_SIGN_CHAIN | 5 | Not a goal | |
Prefer calculation assignment operators (+=, -= etc.)CALCULATION_ASSIGNMENT | 159 | Not a goal | |
Use consistent set of comparison operatorsCOMPARISON_OPERATOR | 92 | Not a goal | |
Prefer IS NOT to NOT ISNOT_IS | 87 | Not a goal | |
Move AND/OR etc. from line end to next line startLOGICAL_OPERATOR_POSITION | 2 | Same | ABAP-COND-001 AND and OR always start the line. |
Use string templates to assemble textSTRING_TEMPLATE | 207 | Not a goal | |
Remove needless parenthesesNEEDLESS_PARENTHESES | 7 | Not a goal | |
Remove empty commandsEMPTY_COMMAND | 17 | Not a goal | |
Shorten VALUE statementsVALUE_STATEMENT | 28 | Not a goal | |
Remove the self-reference me->SELF_REFERENCE_ME | 48 | Not a goal | |
Omit RECEIVINGRECEIVING_KEYWORD | 20 | Not a goal | |
Omit optional EXPORTINGEXPORTING_KEYWORD | 25 | Not a goal | |
| Commands | |||
Replace EXIT outside loop with RETURNEXIT_OUTSIDE_LOOP | 11 | Not a goal | |
Convert CHECK outside loop to IF NOT ... RETURNCHECK_OUTSIDE_LOOP | 25 | Not a goal | |
Convert CHECK in loop to IF NOT ... CONTINUECHECK_IN_LOOP | 40 | Not a goal | |
Replace long IF blocks at loop endIF_BLOCK_AT_LOOP_END | 36 | Not a goal | |
Replace long IF blocks at method endIF_BLOCK_AT_METHOD_END | 82 | Not a goal | |
Replace CALL METHOD with functional callCALL_METHOD | 73 | Not a goal | |
Replace CREATE OBJECT with NEW constructorCREATE_OBJECT | 523 | Not a goal | |
Replace RAISE ... TYPE with RAISE ... NEWRAISE_TYPE | 137 | Not a goal | |
Replace obsolete ADD ... TO etc. with += etc.ADD_TO_ETC | 24 | Not a goal | |
Replace obsolete MOVE ... TO with =MOVE_TO | 17 | Not a goal | |
Replace TRANSLATE with string functionsTRANSLATE | 13 | Not a goal | |
Replace CONDENSE with string functionCONDENSE | 42 | Not a goal | |
Replace DESCRIBE TABLE ... LINES with lines( )DESCRIBE_TABLE | 9 | Not a goal | |
Replace READ TABLE with table expressionREAD_TABLE | 198 | Not a goal | |
Use assert_true and assert_falseASSERT_EQUALS_BOOLEAN | 63 | Not a goal | |
Use assert_subrc instead of assert_equalsASSERT_EQUALS_SUBRC | 8 | Not a goal | |
Use assert class instead of ASSERTASSERT_CLASS | 287 | Not a goal | |
Standardize assertion parameter orderASSERT_PARAMETER_ORDER | 225 | Not a goal | |
| Pretty printer | |||
Convert upper and lower caseUPPER_AND_LOWER_CASE | – | Same | ABAP-CASE-001 ABAP-CASE-002 Keywords in upper case; identifiers without lower-case letters in lower case, mixed case kept. |
Use CamelCase for known CDS namesCAMEL_CASE_NAME | – | Not a goal | Changes the case of names. |
Use CamelCase in test class for CDS viewCAMEL_CASE_IN_CDS_TEST | – | Not a goal | Changes the case of names. |
Indent linesINSET | – | Same | ABAP-BLOCK-001 ABAP-CLASS-001 |
| Alignment | |||
Align ABAP DocALIGN_ABAP_DOC | – | Same | ABAP-DOC-001 Only the blanks after the tag and before | change; not aligned if a line would exceed the width. |
Align METHODS declarationsALIGN_METHODS_DECLARATION | – | Own layout | ABAP-METHODS-001 Each section keyword on its own line, parameters one level deeper, types not aligned. |
Align METHODS ... FOR TESTINGALIGN_METHODS_FOR_TESTING | – | Same | ABAP-ALIGN-005 Not aligned if a line would exceed the width. |
Align METHODS ... REDEFINITIONALIGN_METHODS_REDEFINITION | – | Same | ABAP-ALIGN-006 Not aligned if a line would exceed the width. |
Align ALIASES ... FOR ...ALIGN_ALIASES_FOR | – | Same | ABAP-ALIGN-007 Not aligned if a line would exceed the width. |
Align declarationsALIGN_DECLARATIONS | – | Own layout | ABAP-DECL-001 ABAP-ALIGN-003 TYPE is aligned inside a broken chain, not across separate DATA statements. |
Align assignments to the same objectALIGN_ASSIGNMENTS | – | Same | ABAP-ALIGN-004 Not across a chain; not aligned if a line would exceed the width. |
Align keywords with second word of first lineALIGN_WITH_SECOND_WORD | – | Own layout | ABAP-INDENT-001 Continuation lines use a fixed indent of two levels. |
Align CLEAR:, FREE:, SORT and CATCHALIGN_CLEAR_FREE_AND_SORT | – | Own layout | ABAP-CHAIN-001 A chain that fits stays on one line; otherwise one item per line, aligned after the colon. |
Align SELECT clausesALIGN_SELECT_CLAUSES | – | Own layout | ABAP-SQL-001 Each clause starts its own line when the statement does not fit. |
Align SELECT ... FROM ... JOINALIGN_SELECT_FROM | – | Own layout | ABAP-SQL-001 A JOIN starts its own clause line; ON conditions are not aligned. |
Align SELECT listsALIGN_SELECT_LISTS | – | Own layout | ABAP-SQL-003 Lists with complex fields one field per line, AS aligned; simple lists on one line if they fit (not derived from the rest of the file). |
Align parameters and componentsALIGN_PARAMETERS | – | Same | ABAP-CALL-001 ABAP-CALL-002 ABAP-ALIGN-001 ABAP-ALIGN-002 ABAP-VALUE-001 With several parameter keywords, origami aligns = per keyword. |
Align logical expressionsALIGN_LOGICAL_EXPRESSIONS | – | Own layout | ABAP-COND-001 Breaks before AND and OR at a fixed indent; operands are not aligned in columns. |
Align conditional expressionsALIGN_COND_EXPRESSIONS | – | Same | ABAP-COND-002 A COND with one WHEN is joined onto one line when it fits. |
Align FORM declarationsALIGN_FORM_DECLARATION | – | Own layout | ABAP-FORM-001 Each section on its own line, parameters one level deeper. |
Align PERFORM parametersALIGN_PERFORM | – | Own layout | A long PERFORM breaks before a section keyword that does not fit. |
| CDS annotations | |||
Standardize annotation layoutDDL_ANNO_LAYOUT | – | Own layout | CDS-ANNO-001 A value goes on one line when it fits, otherwise one item per line as in JSON; not aligned in columns. |
Rearrange annotationsDDL_ANNO_NESTING | 71 | Not a goal | |
| CDS line breaks | |||
Break before DEFINE etc.DDL_POSITION_DEFINE | – | Same | CDS-UNIT-001 |
Break before AS SELECT etc.DDL_POSITION_SELECT | – | Same | CDS-HEAD-001 |
Break before JOINsDDL_POSITION_JOIN | – | Same | CDS-HEAD-001 |
Break before ASSOCIATIONsDDL_POSITION_ASSOCIATION | – | Same | CDS-HEAD-001 |
Break before select list bracesDDL_POSITION_BRACES | – | Same | CDS-UNIT-001 CDS-BLOCK-001 |
Break before WHERE clause etc.DDL_POSITION_CLAUSES | – | Same | CDS-CLAUSE-001 No blank line is added before UNION or INTERSECT. |
| CDS spaces | |||
Standardize spaces around colon, comma etc.DDL_SPACES_AROUND_SIGNS | – | Own layout | CDS-SPACE-001 Runs of spaces shrink to one; no space is added or removed next to a sign. |
Standardize spaces around bracketsDDL_SPACES_AROUND_BRACKETS | – | Own layout | CDS-SPACE-001 Runs of spaces shrink to one; no space is added or removed next to a bracket. |
Use CamelCase for known entity and field namesDDL_CAMEL_CASE_NAME | – | Not a goal | Changes the case of names. |
Correct frequent typos in DDL commentsDDL_TYPO | 2 | Not a goal | |
| CDS alignment | |||
Align view parametersDDL_ALIGN_ENTITY_PARAMETERS | – | Own layout | CDS-HEAD-001 View parameters go one level deeper; they are not aligned in columns. |
Align source parametersDDL_ALIGN_SOURCE_PARAMETERS | – | No | Line breaks inside a header clause are kept as written. |
Align function parameters after =>DDL_ALIGN_FUNCTION_PARAMETERS | – | No | Function parameters are not aligned. |
Align logical expressions in viewsDDL_ALIGN_LOGICAL_EXPRESSIONS | – | Own layout | CDS-HEAD-001 DCL-GRANT-001 A long condition breaks before and / or; operands are not aligned in columns. |
Align name list and GROUP BY listDDL_ALIGN_FIELD_LISTS | – | No | Name lists and GROUP BY lists are not aligned. |
Align JOINs and ASSOCIATIONsDDL_ALIGN_DATA_SOURCES | – | Own layout | CDS-HEAD-001 Each join and association starts its own line one level deeper. |
Align select listDDL_ALIGN_SELECT_LIST | – | Own layout | CDS-KEY-001 CDS-SPACE-001 Names line up after key; aliases are not aligned. |
| CDS empty lines | |||
Standardize empty lines between sectionsDDL_EMPTY_LINES_BETWEEN | – | Own layout | CDS-BLANK-001 Keeps blank lines as written (at most one); does not add any. |
Standardize empty lines within sectionsDDL_EMPTY_LINES_WITHIN | – | Own layout | CDS-BLANK-001 Keeps blank lines as written (at most one); does not add any. |
"Files with changed code or comments": each rule was run alone over the 2,108 ABAP and CDS files of the test corpus; the number counts files where more than whitespace and letter case changed. A rule that changes only names (CamelCase) shows –.