@abaplint/transpiler-cli 2.10.21 → 2.10.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bundle.js CHANGED
@@ -3262,7 +3262,7 @@ class Color extends combi_1.Expression {
3262
3262
  const texts = (0, combi_1.altPrio)("COL_BACKGROUND", "COL_HEADING", "COL_NORMAL", "COL_TOTAL", "COL_KEY", "COL_POSITIVE", "COL_NEGATIVE", "COL_GROUP");
3263
3263
  const value = (0, combi_1.alt)(eq, (0, combi_1.altPrio)("ON", "OFF", (0, combi_1.altPrio)(integers, texts)));
3264
3264
  const toggle = (0, combi_1.altPrio)("ON", "OFF");
3265
- return (0, combi_1.seq)("COLOR", value, (0, combi_1.opt)(toggle));
3265
+ return (0, combi_1.seq)("COLOR", (0, combi_1.opt)((0, combi_1.seq)(value, (0, combi_1.opt)(toggle))));
3266
3266
  }
3267
3267
  }
3268
3268
  exports.Color = Color;
@@ -3753,11 +3753,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
3753
3753
  exports.DataDefinition = void 0;
3754
3754
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
3755
3755
  const Expressions = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
3756
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
3756
3757
  class DataDefinition extends combi_1.Expression {
3757
3758
  getRunnable() {
3758
3759
  const simple = (0, combi_1.opt)((0, combi_1.per)("READ-ONLY", Expressions.Type, Expressions.Length, Expressions.Decimals, Expressions.Value));
3759
3760
  const table = (0, combi_1.seq)(Expressions.TypeTable, (0, combi_1.optPrio)("READ-ONLY"));
3760
- return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure));
3761
+ const boxed = (0, combi_1.ver)(version_1.Version.v702, "BOXED");
3762
+ return (0, combi_1.seq)(Expressions.DefinitionName, (0, combi_1.optPrio)(Expressions.ConstantFieldLength), (0, combi_1.alt)(simple, table, Expressions.TypeStructure), (0, combi_1.optPrio)(boxed));
3761
3763
  }
3762
3764
  }
3763
3765
  exports.DataDefinition = DataDefinition;
@@ -4226,7 +4228,7 @@ class FieldSymbol extends combi_1.Expression {
4226
4228
  getRunnable() {
4227
4229
  // todo, this only allows one dash in the name
4228
4230
  const dashes = (0, combi_1.seq)((0, combi_1.regex)(/^<[\w\/%$\*]+$/), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w\/%$\*]+>$/));
4229
- return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*]+>$/), dashes);
4231
+ return (0, combi_1.altPrio)((0, combi_1.regex)(/^<[\w\/%$\*\?]+>$/), dashes);
4230
4232
  }
4231
4233
  }
4232
4234
  exports.FieldSymbol = FieldSymbol;
@@ -7492,7 +7494,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
7492
7494
  class SQLHints extends combi_1.Expression {
7493
7495
  getRunnable() {
7494
7496
  const type = (0, combi_1.altPrio)("ORACLE", "ADABAS", "AS400", "DB2", "HDB", "MSSQLNT", "SYBASE", "DB6");
7495
- const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, _1.Constant)));
7497
+ const ret = (0, combi_1.seq)("%_HINTS", (0, combi_1.plus)((0, combi_1.seq)(type, (0, combi_1.alt)(_1.Constant, _1.FieldSub))));
7496
7498
  return ret;
7497
7499
  }
7498
7500
  }
@@ -7848,7 +7850,7 @@ class StringTemplateFormatting extends combi_1.Expression {
7848
7850
  getRunnable() {
7849
7851
  // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapcompute_string_format_options.htm
7850
7852
  const alphaOptions = (0, combi_1.altPrio)("OUT", "RAW", "IN", _1.Source);
7851
- const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
7853
+ const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source, dynamic_1.Dynamic);
7852
7854
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
7853
7855
  const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
7854
7856
  const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
@@ -8786,8 +8788,12 @@ class StatementParser {
8786
8788
  else {
8787
8789
  wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(this.tokensToNodes(statement.getTokens()));
8788
8790
  if (statement.concatTokens().toUpperCase().endsWith("ENDMETHOD.")) {
8789
- // yea, this is not completely correct
8790
- wa.statements[i] = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(this.tokensToNodes(statement.getTokens()));
8791
+ const tokens = statement.getTokens();
8792
+ const startTokens = this.tokensToNodes(tokens.slice(tokens.length - 2, tokens.length));
8793
+ const endTokens = this.tokensToNodes(tokens.slice(0, tokens.length - 2));
8794
+ wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(endTokens);
8795
+ const item = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(startTokens);
8796
+ wa.statements.splice(i + 1, 0, item);
8791
8797
  sql = false;
8792
8798
  }
8793
8799
  }
@@ -9654,6 +9660,31 @@ exports.CallSelectionScreen = CallSelectionScreen;
9654
9660
 
9655
9661
  /***/ }),
9656
9662
 
9663
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_subscreen.js":
9664
+ /*!**********************************************************************************************!*\
9665
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_subscreen.js ***!
9666
+ \**********************************************************************************************/
9667
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9668
+
9669
+ "use strict";
9670
+
9671
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9672
+ exports.CallSubscreen = void 0;
9673
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
9674
+ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
9675
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
9676
+ class CallSubscreen {
9677
+ getMatcher() {
9678
+ const including = (0, combi_1.seq)("INCLUDING", expressions_1.Source, expressions_1.Source);
9679
+ const ret = (0, combi_1.seq)("CALL SUBSCREEN", expressions_1.Source, (0, combi_1.optPrio)(including));
9680
+ return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
9681
+ }
9682
+ }
9683
+ exports.CallSubscreen = CallSubscreen;
9684
+ //# sourceMappingURL=call_subscreen.js.map
9685
+
9686
+ /***/ }),
9687
+
9657
9688
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js":
9658
9689
  /*!************************************************************************************************!*\
9659
9690
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js ***!
@@ -9803,6 +9834,28 @@ exports.CatchSystemExceptions = CatchSystemExceptions;
9803
9834
 
9804
9835
  /***/ }),
9805
9836
 
9837
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/chain.js":
9838
+ /*!*************************************************************************************!*\
9839
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/chain.js ***!
9840
+ \*************************************************************************************/
9841
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9842
+
9843
+ "use strict";
9844
+
9845
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9846
+ exports.Chain = void 0;
9847
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
9848
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
9849
+ class Chain {
9850
+ getMatcher() {
9851
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "CHAIN");
9852
+ }
9853
+ }
9854
+ exports.Chain = Chain;
9855
+ //# sourceMappingURL=chain.js.map
9856
+
9857
+ /***/ }),
9858
+
9806
9859
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check.js":
9807
9860
  /*!*************************************************************************************!*\
9808
9861
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check.js ***!
@@ -11115,6 +11168,28 @@ exports.ElseIf = ElseIf;
11115
11168
 
11116
11169
  /***/ }),
11117
11170
 
11171
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_chain.js":
11172
+ /*!*****************************************************************************************!*\
11173
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_chain.js ***!
11174
+ \*****************************************************************************************/
11175
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11176
+
11177
+ "use strict";
11178
+
11179
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
11180
+ exports.EndChain = void 0;
11181
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
11182
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
11183
+ class EndChain {
11184
+ getMatcher() {
11185
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "ENDCHAIN");
11186
+ }
11187
+ }
11188
+ exports.EndChain = EndChain;
11189
+ //# sourceMappingURL=end_chain.js.map
11190
+
11191
+ /***/ }),
11192
+
11118
11193
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement.js":
11119
11194
  /*!***********************************************************************************************!*\
11120
11195
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement.js ***!
@@ -11933,6 +12008,30 @@ exports.FetchNextCursor = FetchNextCursor;
11933
12008
 
11934
12009
  /***/ }),
11935
12010
 
12011
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field.js":
12012
+ /*!*************************************************************************************!*\
12013
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field.js ***!
12014
+ \*************************************************************************************/
12015
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12016
+
12017
+ "use strict";
12018
+
12019
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12020
+ exports.Field = void 0;
12021
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
12022
+ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
12023
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
12024
+ class Field {
12025
+ getMatcher() {
12026
+ const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST")))));
12027
+ return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
12028
+ }
12029
+ }
12030
+ exports.Field = Field;
12031
+ //# sourceMappingURL=field.js.map
12032
+
12033
+ /***/ }),
12034
+
11936
12035
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field_group.js":
11937
12036
  /*!*******************************************************************************************!*\
11938
12037
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field_group.js ***!
@@ -12567,7 +12666,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
12567
12666
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
12568
12667
  class GetProperty {
12569
12668
  getMatcher() {
12570
- const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)(expressions_1.OLEExporting));
12669
+ const ret = (0, combi_1.seq)("GET PROPERTY OF", expressions_1.FieldSub, expressions_1.Source, "=", expressions_1.Source, (0, combi_1.opt)("NO FLUSH"), (0, combi_1.opt)("QUEUEONLY"), (0, combi_1.opt)(expressions_1.OLEExporting));
12571
12670
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
12572
12671
  }
12573
12672
  }
@@ -13130,6 +13229,7 @@ __exportStar(__webpack_require__(/*! ./endfunction */ "./node_modules/@abaplint/
13130
13229
  __exportStar(__webpack_require__(/*! ./retry */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/retry.js"), exports);
13131
13230
  __exportStar(__webpack_require__(/*! ./authority_check */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/authority_check.js"), exports);
13132
13231
  __exportStar(__webpack_require__(/*! ./set_parameter */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_parameter.js"), exports);
13232
+ __exportStar(__webpack_require__(/*! ./field */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field.js"), exports);
13133
13233
  __exportStar(__webpack_require__(/*! ./get_cursor */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_cursor.js"), exports);
13134
13234
  __exportStar(__webpack_require__(/*! ./call_kernel */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_kernel.js"), exports);
13135
13235
  __exportStar(__webpack_require__(/*! ./call_transaction */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js"), exports);
@@ -13139,6 +13239,9 @@ __exportStar(__webpack_require__(/*! ./uline */ "./node_modules/@abaplint/core/b
13139
13239
  __exportStar(__webpack_require__(/*! ./data_begin */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_begin.js"), exports);
13140
13240
  __exportStar(__webpack_require__(/*! ./data_end */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_end.js"), exports);
13141
13241
  __exportStar(__webpack_require__(/*! ./type_begin */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_begin.js"), exports);
13242
+ __exportStar(__webpack_require__(/*! ./process_after_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_after_input.js"), exports);
13243
+ __exportStar(__webpack_require__(/*! ./process_before_output */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_before_output.js"), exports);
13244
+ __exportStar(__webpack_require__(/*! ./process_on_value_request */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_on_value_request.js"), exports);
13142
13245
  __exportStar(__webpack_require__(/*! ./type_end */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_end.js"), exports);
13143
13246
  __exportStar(__webpack_require__(/*! ./raise_event */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise_event.js"), exports);
13144
13247
  __exportStar(__webpack_require__(/*! ./cleanup */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/cleanup.js"), exports);
@@ -13152,6 +13255,9 @@ __exportStar(__webpack_require__(/*! ./end_test_seam */ "./node_modules/@abaplin
13152
13255
  __exportStar(__webpack_require__(/*! ./delete_memory */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_memory.js"), exports);
13153
13256
  __exportStar(__webpack_require__(/*! ./provide */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/provide.js"), exports);
13154
13257
  __exportStar(__webpack_require__(/*! ./endexec */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endexec.js"), exports);
13258
+ __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/chain.js"), exports);
13259
+ __exportStar(__webpack_require__(/*! ./end_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_chain.js"), exports);
13260
+ __exportStar(__webpack_require__(/*! ./call_subscreen */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_subscreen.js"), exports);
13155
13261
  __exportStar(__webpack_require__(/*! ./sort_dataset */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sort_dataset.js"), exports);
13156
13262
  __exportStar(__webpack_require__(/*! ./get_permissions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_permissions.js"), exports);
13157
13263
  __exportStar(__webpack_require__(/*! ./set_locks */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_locks.js"), exports);
@@ -13463,7 +13569,7 @@ class Leave {
13463
13569
  getMatcher() {
13464
13570
  const retu = (0, combi_1.seq)(expressions_1.AndReturn, "TO SCREEN", expressions_1.Source);
13465
13571
  const transaction = (0, combi_1.seq)("TO TRANSACTION", expressions_1.Source, (0, combi_1.opt)("AND SKIP FIRST SCREEN"));
13466
- const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)("TO CURRENT TRANSACTION", (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
13572
+ const ret = (0, combi_1.seq)("LEAVE", (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.seq)("TO CURRENT TRANSACTION", (0, combi_1.opt)("AND SKIP FIRST SCREEN")), (0, combi_1.seq)((0, combi_1.opt)("TO"), "LIST-PROCESSING", (0, combi_1.opt)(retu)), "LIST-PROCESSING", "SCREEN", transaction, "PROGRAM", (0, combi_1.seq)("TO SCREEN", expressions_1.Source))));
13467
13573
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13468
13574
  }
13469
13575
  }
@@ -13770,15 +13876,17 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13770
13876
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13771
13877
  class ModifyEntities {
13772
13878
  getMatcher() {
13773
- const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
13774
- const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.optPrio)("AUTO FILL CID"), fieldsWith));
13879
+ const withh = (0, combi_1.seq)("WITH", expressions_1.Source);
13880
+ const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ")", withh);
13881
+ const by = (0, combi_1.seq)("BY", expressions_1.AssociationName);
13882
+ const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), "FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
13775
13883
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
13776
13884
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
13777
13885
  const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
13778
13886
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
13779
13887
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13780
13888
  const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
13781
- const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, operation)), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
13889
+ const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.plus)(operation))), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
13782
13890
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
13783
13891
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
13784
13892
  }
@@ -13846,8 +13954,9 @@ class ModifyLine {
13846
13954
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
13847
13955
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
13848
13956
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
13849
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", expressions_1.Color));
13850
13957
  const intensified = (0, combi_1.seq)("INTENSIFIED", onOff);
13958
+ const intensifiedOpt = (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff));
13959
+ const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", intensifiedOpt, expressions_1.Color));
13851
13960
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
13852
13961
  const ret = (0, combi_1.seq)("MODIFY", (0, combi_1.altPrio)("CURRENT LINE", (0, combi_1.seq)("LINE", expressions_1.Source)), (0, combi_1.opt)(options));
13853
13962
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
@@ -13897,7 +14006,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13897
14006
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13898
14007
  class Module {
13899
14008
  getMatcher() {
13900
- const ret = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("INPUT", "OUTPUT")));
14009
+ const ret = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("INPUT", "OUTPUT", "ON CHAIN-REQUEST")));
13901
14010
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13902
14011
  }
13903
14012
  }
@@ -14360,6 +14469,72 @@ exports.Private = Private;
14360
14469
 
14361
14470
  /***/ }),
14362
14471
 
14472
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_after_input.js":
14473
+ /*!***************************************************************************************************!*\
14474
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_after_input.js ***!
14475
+ \***************************************************************************************************/
14476
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14477
+
14478
+ "use strict";
14479
+
14480
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14481
+ exports.ProcessAfterInput = void 0;
14482
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
14483
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14484
+ class ProcessAfterInput {
14485
+ getMatcher() {
14486
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "PROCESS AFTER INPUT");
14487
+ }
14488
+ }
14489
+ exports.ProcessAfterInput = ProcessAfterInput;
14490
+ //# sourceMappingURL=process_after_input.js.map
14491
+
14492
+ /***/ }),
14493
+
14494
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_before_output.js":
14495
+ /*!*****************************************************************************************************!*\
14496
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_before_output.js ***!
14497
+ \*****************************************************************************************************/
14498
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14499
+
14500
+ "use strict";
14501
+
14502
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14503
+ exports.ProcessBeforeOutput = void 0;
14504
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
14505
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14506
+ class ProcessBeforeOutput {
14507
+ getMatcher() {
14508
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "PROCESS BEFORE OUTPUT");
14509
+ }
14510
+ }
14511
+ exports.ProcessBeforeOutput = ProcessBeforeOutput;
14512
+ //# sourceMappingURL=process_before_output.js.map
14513
+
14514
+ /***/ }),
14515
+
14516
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_on_value_request.js":
14517
+ /*!********************************************************************************************************!*\
14518
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/process_on_value_request.js ***!
14519
+ \********************************************************************************************************/
14520
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14521
+
14522
+ "use strict";
14523
+
14524
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
14525
+ exports.ProcessOnValueRequest = void 0;
14526
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
14527
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14528
+ class ProcessOnValueRequest {
14529
+ getMatcher() {
14530
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "PROCESS ON VALUE-REQUEST");
14531
+ }
14532
+ }
14533
+ exports.ProcessOnValueRequest = ProcessOnValueRequest;
14534
+ //# sourceMappingURL=process_on_value_request.js.map
14535
+
14536
+ /***/ }),
14537
+
14363
14538
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/program.js":
14364
14539
  /*!***************************************************************************************!*\
14365
14540
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/program.js ***!
@@ -14628,7 +14803,8 @@ class ReadEntities {
14628
14803
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14629
14804
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
14630
14805
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
14631
- const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14806
+ const entity = (0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)));
14807
+ const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14632
14808
  return (0, combi_1.ver)(version_1.Version.v754, s);
14633
14809
  }
14634
14810
  }
@@ -15114,7 +15290,7 @@ class ScrollList {
15114
15290
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
15115
15291
  const column = (0, combi_1.seq)("TO COLUMN", expressions_1.Source);
15116
15292
  const to = (0, combi_1.seq)("TO", (0, combi_1.alt)("FIRST PAGE", "LAST PAGE", (0, combi_1.seq)("PAGE", expressions_1.Source)));
15117
- const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.alt)("LEFT", "RIGHT"), column, line));
15293
+ const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.seq)((0, combi_1.alt)("LEFT", "RIGHT"), (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.Source, "PLACES"))), column, line));
15118
15294
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15119
15295
  }
15120
15296
  }
@@ -16274,7 +16450,7 @@ class SystemCall {
16274
16450
  getMatcher() {
16275
16451
  const anyy = (0, combi_1.regex)(/^.+$/);
16276
16452
  const objmgr = (0, combi_1.seq)("OBJMGR CLONE", source_1.Source, "TO", target_1.Target);
16277
- const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", source_1.Source, source_1.Source, source_1.Source);
16453
+ const did = (0, combi_1.seq)(anyy, "DID", source_1.Source, "PARAMETERS", (0, combi_1.plus)(source_1.Source));
16278
16454
  const ret = (0, combi_1.seq)("SYSTEM-CALL", (0, combi_1.altPrio)(objmgr, did, (0, combi_1.plus)(anyy)));
16279
16455
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16280
16456
  }
@@ -16956,7 +17132,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
16956
17132
  class While {
16957
17133
  getMatcher() {
16958
17134
  const vary = (0, combi_1.seq)("VARY", expressions_1.Target, "FROM", expressions_1.Source, "NEXT", expressions_1.Source);
16959
- return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.opt)(vary));
17135
+ return (0, combi_1.seq)("WHILE", expressions_1.Cond, (0, combi_1.star)(vary));
16960
17136
  }
16961
17137
  }
16962
17138
  exports.While = While;
@@ -17107,6 +17283,9 @@ class StructureParser {
17107
17283
  else if (filename.endsWith(".intf.abap")) {
17108
17284
  return new Structures.InterfaceGlobal();
17109
17285
  }
17286
+ else if (filename.match(/\.screen\_\d+\.abap$/i)) {
17287
+ return new Structures.DynproLogic();
17288
+ }
17110
17289
  else {
17111
17290
  // todo, add a special structure for TYPE-POOLS
17112
17291
  return new Structures.Any();
@@ -17696,6 +17875,28 @@ exports.CatchSystemExceptions = CatchSystemExceptions;
17696
17875
 
17697
17876
  /***/ }),
17698
17877
 
17878
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js":
17879
+ /*!*************************************************************************************!*\
17880
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js ***!
17881
+ \*************************************************************************************/
17882
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
17883
+
17884
+ "use strict";
17885
+
17886
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
17887
+ exports.Chain = void 0;
17888
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
17889
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
17890
+ class Chain {
17891
+ getMatcher() {
17892
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Chain), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.Module))), (0, _combi_1.sta)(Statements.EndChain));
17893
+ }
17894
+ }
17895
+ exports.Chain = Chain;
17896
+ //# sourceMappingURL=chain.js.map
17897
+
17898
+ /***/ }),
17899
+
17699
17900
  /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js":
17700
17901
  /*!******************************************************************************************!*\
17701
17902
  !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js ***!
@@ -17910,6 +18111,32 @@ exports.Do = Do;
17910
18111
 
17911
18112
  /***/ }),
17912
18113
 
18114
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_logic.js":
18115
+ /*!********************************************************************************************!*\
18116
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_logic.js ***!
18117
+ \********************************************************************************************/
18118
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
18119
+
18120
+ "use strict";
18121
+
18122
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
18123
+ exports.DynproLogic = void 0;
18124
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
18125
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
18126
+ const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
18127
+ class DynproLogic {
18128
+ getMatcher() {
18129
+ const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain)));
18130
+ const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen)));
18131
+ const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
18132
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo, (0, _combi_1.sta)(Statements.ProcessAfterInput), pai, (0, _combi_1.opt)((0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessOnValueRequest), pov)));
18133
+ }
18134
+ }
18135
+ exports.DynproLogic = DynproLogic;
18136
+ //# sourceMappingURL=dynpro_logic.js.map
18137
+
18138
+ /***/ }),
18139
+
17913
18140
  /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js":
17914
18141
  /*!************************************************************************************!*\
17915
18142
  !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js ***!
@@ -18125,9 +18352,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18125
18352
  };
18126
18353
  Object.defineProperty(exports, "__esModule", ({ value: true }));
18127
18354
  __exportStar(__webpack_require__(/*! ./any */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/any.js"), exports);
18128
- __exportStar(__webpack_require__(/*! ./at */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at.js"), exports);
18129
18355
  __exportStar(__webpack_require__(/*! ./at_first */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at_first.js"), exports);
18130
18356
  __exportStar(__webpack_require__(/*! ./at_last */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at_last.js"), exports);
18357
+ __exportStar(__webpack_require__(/*! ./at */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at.js"), exports);
18131
18358
  __exportStar(__webpack_require__(/*! ./body */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/body.js"), exports);
18132
18359
  __exportStar(__webpack_require__(/*! ./case_type */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case_type.js"), exports);
18133
18360
  __exportStar(__webpack_require__(/*! ./case */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case.js"), exports);
@@ -18136,13 +18363,14 @@ __exportStar(__webpack_require__(/*! ./catch */ "./node_modules/@abaplint/core/b
18136
18363
  __exportStar(__webpack_require__(/*! ./class_data */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js"), exports);
18137
18364
  __exportStar(__webpack_require__(/*! ./class_definition */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_definition.js"), exports);
18138
18365
  __exportStar(__webpack_require__(/*! ./class_global */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_global.js"), exports);
18366
+ __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js"), exports);
18139
18367
  __exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_implementation.js"), exports);
18140
18368
  __exportStar(__webpack_require__(/*! ./cleanup */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/cleanup.js"), exports);
18141
18369
  __exportStar(__webpack_require__(/*! ./constants */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/constants.js"), exports);
18142
18370
  __exportStar(__webpack_require__(/*! ./data */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/data.js"), exports);
18143
18371
  __exportStar(__webpack_require__(/*! ./define */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/define.js"), exports);
18144
18372
  __exportStar(__webpack_require__(/*! ./do */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/do.js"), exports);
18145
- __exportStar(__webpack_require__(/*! ./type_mesh */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js"), exports);
18373
+ __exportStar(__webpack_require__(/*! ./dynpro_logic */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_logic.js"), exports);
18146
18374
  __exportStar(__webpack_require__(/*! ./else */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js"), exports);
18147
18375
  __exportStar(__webpack_require__(/*! ./elseif */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/elseif.js"), exports);
18148
18376
  __exportStar(__webpack_require__(/*! ./enhancement_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/enhancement_section.js"), exports);
@@ -18170,6 +18398,7 @@ __exportStar(__webpack_require__(/*! ./test_injection */ "./node_modules/@abapli
18170
18398
  __exportStar(__webpack_require__(/*! ./test_seam */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_seam.js"), exports);
18171
18399
  __exportStar(__webpack_require__(/*! ./try */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/try.js"), exports);
18172
18400
  __exportStar(__webpack_require__(/*! ./type_enum */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_enum.js"), exports);
18401
+ __exportStar(__webpack_require__(/*! ./type_mesh */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js"), exports);
18173
18402
  __exportStar(__webpack_require__(/*! ./types */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/types.js"), exports);
18174
18403
  __exportStar(__webpack_require__(/*! ./when_type */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when_type.js"), exports);
18175
18404
  __exportStar(__webpack_require__(/*! ./when */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when.js"), exports);
@@ -24757,6 +24986,7 @@ const component_compare_1 = __webpack_require__(/*! ./component_compare */ "./no
24757
24986
  const inline_data_1 = __webpack_require__(/*! ./inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
24758
24987
  const fstarget_1 = __webpack_require__(/*! ./fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
24759
24988
  const target_1 = __webpack_require__(/*! ./target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
24989
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
24760
24990
  class LoopGroupBy {
24761
24991
  runSyntax(node, input) {
24762
24992
  for (const t of node.findAllExpressions(Expressions.Target)) {
@@ -24771,6 +25001,9 @@ class LoopGroupBy {
24771
25001
  for (const t of node.findAllExpressions(Expressions.FSTarget)) {
24772
25002
  new fstarget_1.FSTarget().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
24773
25003
  }
25004
+ for (const t of node.findDirectExpressions(Expressions.Source)) {
25005
+ new source_1.Source().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
25006
+ }
24774
25007
  for (const c of node.findDirectExpressions(Expressions.LoopGroupByComponent)) {
24775
25008
  for (const t of c.findDirectExpressions(Expressions.ComponentCompareSingle)) {
24776
25009
  new component_compare_1.ComponentCompare().runSyntax(t, input);
@@ -29443,6 +29676,30 @@ exports.DeleteInternal = DeleteInternal;
29443
29676
 
29444
29677
  /***/ }),
29445
29678
 
29679
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js":
29680
+ /*!*****************************************************************************************!*\
29681
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js ***!
29682
+ \*****************************************************************************************/
29683
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
29684
+
29685
+ "use strict";
29686
+
29687
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
29688
+ exports.DeleteMemory = void 0;
29689
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
29690
+ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
29691
+ class DeleteMemory {
29692
+ runSyntax(node, input) {
29693
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
29694
+ new source_1.Source().runSyntax(s, input);
29695
+ }
29696
+ }
29697
+ }
29698
+ exports.DeleteMemory = DeleteMemory;
29699
+ //# sourceMappingURL=delete_memory.js.map
29700
+
29701
+ /***/ }),
29702
+
29446
29703
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js":
29447
29704
  /*!*****************************************************************************************!*\
29448
29705
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js ***!
@@ -33559,6 +33816,7 @@ const statics_1 = __webpack_require__(/*! ./structures/statics */ "./node_module
33559
33816
  const constants_1 = __webpack_require__(/*! ./structures/constants */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js");
33560
33817
  const class_definition_1 = __webpack_require__(/*! ../types/class_definition */ "./node_modules/@abaplint/core/build/src/abap/types/class_definition.js");
33561
33818
  const interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ "./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js");
33819
+ const delete_memory_1 = __webpack_require__(/*! ./statements/delete_memory */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_memory.js");
33562
33820
  const perform_1 = __webpack_require__(/*! ./statements/perform */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js");
33563
33821
  const type_1 = __webpack_require__(/*! ./statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
33564
33822
  const constant_1 = __webpack_require__(/*! ./statements/constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js");
@@ -33813,6 +34071,7 @@ if (Object.keys(map).length === 0) {
33813
34071
  addToMap(new modify_internal_1.ModifyInternal());
33814
34072
  addToMap(new read_textpool_1.ReadTextpool());
33815
34073
  addToMap(new editor_call_1.EditorCall());
34074
+ addToMap(new delete_memory_1.DeleteMemory());
33816
34075
  }
33817
34076
  // -----------------------------------
33818
34077
  class SyntaxLogic {
@@ -34325,13 +34584,13 @@ class FlowGraph {
34325
34584
  this.label = label;
34326
34585
  }
34327
34586
  toDigraph() {
34328
- return `digraph G {
34329
- labelloc="t";
34330
- label="${this.label}";
34331
- graph [fontname = "helvetica"];
34332
- node [fontname = "helvetica", shape="box"];
34333
- edge [fontname = "helvetica"];
34334
- ${this.toTextEdges()}
34587
+ return `digraph G {
34588
+ labelloc="t";
34589
+ label="${this.label}";
34590
+ graph [fontname = "helvetica"];
34591
+ node [fontname = "helvetica", shape="box"];
34592
+ edge [fontname = "helvetica"];
34593
+ ${this.toTextEdges()}
34335
34594
  }`;
34336
34595
  }
34337
34596
  listSources(node) {
@@ -34665,6 +34924,7 @@ class StatementFlow {
34665
34924
  || type instanceof Structures.With
34666
34925
  || type instanceof Structures.Provide
34667
34926
  || type instanceof Structures.Select
34927
+ || type instanceof Structures.EnhancementSection
34668
34928
  || type instanceof Structures.LoopAtScreen
34669
34929
  || type instanceof Structures.Do) {
34670
34930
  const loopName = StatementFlow.buildName(n.getFirstStatement());
@@ -40643,6 +40903,7 @@ class DDIC {
40643
40903
  case "DEC": // 1 <= len <= 31
40644
40904
  case "D16F": // 1 <= len <= 31
40645
40905
  case "D16D":
40906
+ case "D34D":
40646
40907
  case "D34F": // 1 <= len <= 31
40647
40908
  case "DF16_DEC": // 1 <= len <= 31
40648
40909
  case "DF34_DEC": // 1 <= len <= 31
@@ -40665,6 +40926,7 @@ class DDIC {
40665
40926
  return new Types.CharacterType(5, extra);
40666
40927
  case "UNIT": // 2 <= len <= 3
40667
40928
  return new Types.CharacterType(3, extra);
40929
+ case "UTCL":
40668
40930
  case "UTCLONG":
40669
40931
  return new Types.CharacterType(27, extra);
40670
40932
  case "NUMC": // 1 <= len <= 255
@@ -40724,7 +40986,7 @@ class DDIC {
40724
40986
  case "VARC":
40725
40987
  return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
40726
40988
  default:
40727
- return new Types.UnknownType(input.text + " unknown", input.infoText);
40989
+ return new Types.UnknownType(input.text + " unknown basic ddic type", input.infoText);
40728
40990
  }
40729
40991
  }
40730
40992
  }
@@ -42751,13 +43013,13 @@ class Help {
42751
43013
  /////////////////////////////////////////////////
42752
43014
  static dumpABAP(file, reg, textDocument, position) {
42753
43015
  let content = "";
42754
- content = `
42755
- <a href="#_tokens" rel="no-refresh">Tokens</a> |
42756
- <a href="#_statements" rel="no-refresh">Statements</a> |
42757
- <a href="#_structure" rel="no-refresh">Structure</a> |
42758
- <a href="#_files" rel="no-refresh">Files</a> |
42759
- <a href="#_info" rel="no-refresh">Info Dump</a>
42760
- <hr>
43016
+ content = `
43017
+ <a href="#_tokens" rel="no-refresh">Tokens</a> |
43018
+ <a href="#_statements" rel="no-refresh">Statements</a> |
43019
+ <a href="#_structure" rel="no-refresh">Structure</a> |
43020
+ <a href="#_files" rel="no-refresh">Files</a> |
43021
+ <a href="#_info" rel="no-refresh">Info Dump</a>
43022
+ <hr>
42761
43023
  ` +
42762
43024
  "<tt>" + textDocument.uri + " (" +
42763
43025
  (position.line + 1) + ", " +
@@ -42912,9 +43174,9 @@ class Help {
42912
43174
  return ret + "</ul>";
42913
43175
  }
42914
43176
  static tokens(file) {
42915
- let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
42916
- <td><b>Row</b></td><td><b>Column</b></td>
42917
- <td><b>vRow</b></td><td><b>vColumn</b></td>
43177
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43178
+ <td><b>Row</b></td><td><b>Column</b></td>
43179
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
42918
43180
  </tr>`;
42919
43181
  for (const token of file.getTokens()) {
42920
43182
  const tStart = token.getStart();
@@ -45291,6 +45553,37 @@ exports.CDSMetadataExtension = CDSMetadataExtension;
45291
45553
 
45292
45554
  /***/ }),
45293
45555
 
45556
+ /***/ "./node_modules/@abaplint/core/build/src/objects/cds_type.js":
45557
+ /*!*******************************************************************!*\
45558
+ !*** ./node_modules/@abaplint/core/build/src/objects/cds_type.js ***!
45559
+ \*******************************************************************/
45560
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
45561
+
45562
+ "use strict";
45563
+
45564
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
45565
+ exports.CDSType = void 0;
45566
+ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
45567
+ class CDSType extends _abstract_object_1.AbstractObject {
45568
+ getType() {
45569
+ return "DRTY";
45570
+ }
45571
+ getAllowedNaming() {
45572
+ return {
45573
+ maxLength: 30,
45574
+ allowNamespace: true,
45575
+ };
45576
+ }
45577
+ getDescription() {
45578
+ // todo
45579
+ return undefined;
45580
+ }
45581
+ }
45582
+ exports.CDSType = CDSType;
45583
+ //# sourceMappingURL=cds_type.js.map
45584
+
45585
+ /***/ }),
45586
+
45294
45587
  /***/ "./node_modules/@abaplint/core/build/src/objects/change_document.js":
45295
45588
  /*!**************************************************************************!*\
45296
45589
  !*** ./node_modules/@abaplint/core/build/src/objects/change_document.js ***!
@@ -47642,6 +47935,7 @@ __exportStar(__webpack_require__(/*! ./business_function_set_assignment */ "./no
47642
47935
  __exportStar(__webpack_require__(/*! ./business_object_model */ "./node_modules/@abaplint/core/build/src/objects/business_object_model.js"), exports);
47643
47936
  __exportStar(__webpack_require__(/*! ./business_object_type */ "./node_modules/@abaplint/core/build/src/objects/business_object_type.js"), exports);
47644
47937
  __exportStar(__webpack_require__(/*! ./cds_metadata_extension */ "./node_modules/@abaplint/core/build/src/objects/cds_metadata_extension.js"), exports);
47938
+ __exportStar(__webpack_require__(/*! ./cds_type */ "./node_modules/@abaplint/core/build/src/objects/cds_type.js"), exports);
47645
47939
  __exportStar(__webpack_require__(/*! ./change_document */ "./node_modules/@abaplint/core/build/src/objects/change_document.js"), exports);
47646
47940
  __exportStar(__webpack_require__(/*! ./chapter_of_book_structure */ "./node_modules/@abaplint/core/build/src/objects/chapter_of_book_structure.js"), exports);
47647
47941
  __exportStar(__webpack_require__(/*! ./checkpoint_group */ "./node_modules/@abaplint/core/build/src/objects/checkpoint_group.js"), exports);
@@ -49305,6 +49599,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
49305
49599
  exports.Program = void 0;
49306
49600
  const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
49307
49601
  const _dynpros_1 = __webpack_require__(/*! ./_dynpros */ "./node_modules/@abaplint/core/build/src/objects/_dynpros.js");
49602
+ const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
49308
49603
  class Program extends _abap_object_1.ABAPObject {
49309
49604
  getType() {
49310
49605
  return "PROG";
@@ -49317,8 +49612,9 @@ class Program extends _abap_object_1.ABAPObject {
49317
49612
  return [main];
49318
49613
  }
49319
49614
  getDescription() {
49320
- // todo
49321
- return undefined;
49615
+ var _a;
49616
+ this.parseXML();
49617
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
49322
49618
  }
49323
49619
  getAllowedNaming() {
49324
49620
  return {
@@ -49344,6 +49640,7 @@ class Program extends _abap_object_1.ABAPObject {
49344
49640
  }
49345
49641
  ////////////////////////////
49346
49642
  parseXML() {
49643
+ var _a, _b, _c;
49347
49644
  if (this.parsedXML !== undefined) {
49348
49645
  return;
49349
49646
  }
@@ -49353,15 +49650,23 @@ class Program extends _abap_object_1.ABAPObject {
49353
49650
  this.parsedXML = {
49354
49651
  isInclude: false,
49355
49652
  isModulePool: false,
49653
+ description: undefined,
49356
49654
  dynpros: [],
49357
49655
  };
49358
49656
  return;
49359
49657
  }
49658
+ let description = "";
49659
+ for (const t of (0, xml_utils_1.xmlToArray)((_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.TPOOL) === null || _c === void 0 ? void 0 : _c.item)) {
49660
+ if ((t === null || t === void 0 ? void 0 : t.ID) === "R") {
49661
+ description = t.ENTRY ? (0, xml_utils_1.unescape)(t.ENTRY) : "";
49662
+ }
49663
+ }
49360
49664
  const dynpros = (0, _dynpros_1.parseDynpros)(parsed);
49361
49665
  this.parsedXML = {
49362
49666
  isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
49363
49667
  isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
49364
49668
  dynpros: dynpros,
49669
+ description: description,
49365
49670
  };
49366
49671
  }
49367
49672
  }
@@ -51152,6 +51457,11 @@ class Transaction extends _abstract_object_1.AbstractObject {
51152
51457
  allowNamespace: true,
51153
51458
  };
51154
51459
  }
51460
+ getCInfo() {
51461
+ var _a;
51462
+ this.parse();
51463
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.cinfo;
51464
+ }
51155
51465
  getProgramName() {
51156
51466
  var _a;
51157
51467
  this.parse();
@@ -51163,7 +51473,7 @@ class Transaction extends _abstract_object_1.AbstractObject {
51163
51473
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
51164
51474
  }
51165
51475
  parse() {
51166
- var _a, _b;
51476
+ var _a, _b, _c;
51167
51477
  if (this.parsedXML) {
51168
51478
  return { updated: false, runtime: 0 };
51169
51479
  }
@@ -51177,6 +51487,7 @@ class Transaction extends _abstract_object_1.AbstractObject {
51177
51487
  }
51178
51488
  this.parsedXML.description = (_a = parsed.abapGit["asx:abap"]["asx:values"].TSTCT) === null || _a === void 0 ? void 0 : _a.TTEXT;
51179
51489
  this.parsedXML.programName = (_b = parsed.abapGit["asx:abap"]["asx:values"].TSTC) === null || _b === void 0 ? void 0 : _b.PGMNA;
51490
+ this.parsedXML.cinfo = (_c = parsed.abapGit["asx:abap"]["asx:values"].TSTC) === null || _c === void 0 ? void 0 : _c.CINFO;
51180
51491
  const end = Date.now();
51181
51492
  return { updated: true, runtime: end - start };
51182
51493
  }
@@ -51821,6 +52132,7 @@ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ ".
51821
52132
  const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
51822
52133
  const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
51823
52134
  const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
52135
+ const structures_1 = __webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
51824
52136
  // todo, will break if there is multiple statements per line?
51825
52137
  class Indent {
51826
52138
  constructor(options) {
@@ -51849,11 +52161,13 @@ class Indent {
51849
52161
  }
51850
52162
  // returns list of expected indentation for each line/statement?
51851
52163
  getExpectedIndents(file) {
52164
+ var _a;
51852
52165
  const ret = [];
51853
52166
  const init = 1;
51854
52167
  const stack = new Stack();
51855
52168
  let indent = init;
51856
52169
  let parentIsEvent = false;
52170
+ const isDynpro = ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.get()) instanceof structures_1.DynproLogic;
51857
52171
  let previousStatement = undefined;
51858
52172
  for (const statement of file.getStatements()) {
51859
52173
  if (statement.getFirstToken().getStart() instanceof virtual_position_1.VirtualPosition) {
@@ -51891,6 +52205,9 @@ class Indent {
51891
52205
  || type instanceof Statements.AtPF
51892
52206
  || type instanceof Statements.Initialization
51893
52207
  || type instanceof Statements.AtUserCommand
52208
+ || type instanceof Statements.ProcessAfterInput
52209
+ || type instanceof Statements.ProcessBeforeOutput
52210
+ || type instanceof Statements.ProcessOnValueRequest
51894
52211
  || type instanceof Statements.TopOfPage
51895
52212
  || type instanceof Statements.Get
51896
52213
  || type instanceof Statements.EndOfSelection
@@ -51900,7 +52217,7 @@ class Indent {
51900
52217
  }
51901
52218
  else if (type instanceof Statements.Form
51902
52219
  || (type instanceof Statements.Include && parentIsEvent)
51903
- || type instanceof Statements.Module
52220
+ || (type instanceof Statements.Module && isDynpro === false)
51904
52221
  || type instanceof Statements.ClassImplementation
51905
52222
  || type instanceof Statements.ClassDefinition) {
51906
52223
  indent = init;
@@ -51945,7 +52262,7 @@ class Indent {
51945
52262
  ret.push(indent);
51946
52263
  if (type instanceof Statements.If
51947
52264
  || type instanceof Statements.While
51948
- || type instanceof Statements.Module
52265
+ || (type instanceof Statements.Module && isDynpro === false)
51949
52266
  || type instanceof Statements.SelectLoop
51950
52267
  || type instanceof Statements.FunctionModule
51951
52268
  || type instanceof Statements.Interface
@@ -51955,6 +52272,9 @@ class Indent {
51955
52272
  || type instanceof Statements.AtLast
51956
52273
  || type instanceof Statements.ExecSQL
51957
52274
  || type instanceof Statements.Catch
52275
+ || type instanceof Statements.ProcessAfterInput
52276
+ || type instanceof Statements.ProcessBeforeOutput
52277
+ || type instanceof Statements.ProcessOnValueRequest
51958
52278
  || type instanceof Statements.Define
51959
52279
  || type instanceof Statements.When
51960
52280
  || type instanceof Statements.WhenType
@@ -52172,7 +52492,7 @@ class Registry {
52172
52492
  }
52173
52493
  static abaplintVersion() {
52174
52494
  // magic, see build script "version.sh"
52175
- return "2.113.70";
52495
+ return "2.113.79";
52176
52496
  }
52177
52497
  getDDICReferences() {
52178
52498
  return this.ddicReferences;
@@ -52491,10 +52811,10 @@ class SevenBitAscii {
52491
52811
  key: "7bit_ascii",
52492
52812
  title: "Check for 7bit ascii",
52493
52813
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
52494
- extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52495
-
52496
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52497
-
52814
+ extendedInformation: `https://docs.abapopenchecks.org/checks/05/
52815
+
52816
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
52817
+
52498
52818
  Checkes files with extensions ".abap" and ".asddls"`,
52499
52819
  tags: [_irule_1.RuleTag.SingleFile],
52500
52820
  badExample: `WRITE '뽑'.`,
@@ -52700,10 +53020,10 @@ class Abapdoc extends _abap_rule_1.ABAPRule {
52700
53020
  key: "abapdoc",
52701
53021
  title: "Check abapdoc",
52702
53022
  shortDescription: `Various checks regarding abapdoc.`,
52703
- extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
52704
-
52705
- Plus class and interface definitions.
52706
-
53023
+ extendedInformation: `Base rule checks for existence of abapdoc for public class methods and all interface methods.
53024
+
53025
+ Plus class and interface definitions.
53026
+
52707
53027
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-only-for-public-apis`,
52708
53028
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
52709
53029
  };
@@ -52840,27 +53160,27 @@ class AddTestAttributes extends _abap_rule_1.ABAPRule {
52840
53160
  title: "Add test attributes for tests classes with test methods",
52841
53161
  shortDescription: `Add test attributes DURATION and RISK LEVEL for tests classes with test methods`,
52842
53162
  tags: [_irule_1.RuleTag.SingleFile],
52843
- badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
52844
- PUBLIC SECTION.
52845
- PROTECTED SECTION.
52846
- PRIVATE SECTION.
52847
- METHODS test FOR TESTING RAISING cx_static_check.
52848
- ENDCLASS.
52849
-
52850
- CLASS ltcl_test1 IMPLEMENTATION.
52851
- METHOD test.
52852
- ENDMETHOD.
53163
+ badExample: `CLASS ltcl_test1 DEFINITION FINAL FOR TESTING.
53164
+ PUBLIC SECTION.
53165
+ PROTECTED SECTION.
53166
+ PRIVATE SECTION.
53167
+ METHODS test FOR TESTING RAISING cx_static_check.
53168
+ ENDCLASS.
53169
+
53170
+ CLASS ltcl_test1 IMPLEMENTATION.
53171
+ METHOD test.
53172
+ ENDMETHOD.
52853
53173
  ENDCLASS.`,
52854
- goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
52855
- PUBLIC SECTION.
52856
- PROTECTED SECTION.
52857
- PRIVATE SECTION.
52858
- METHODS test FOR TESTING RAISING cx_static_check.
52859
- ENDCLASS.
52860
-
52861
- CLASS ltcl_test2 IMPLEMENTATION.
52862
- METHOD test.
52863
- ENDMETHOD.
53174
+ goodExample: `CLASS ltcl_test2 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
53175
+ PUBLIC SECTION.
53176
+ PROTECTED SECTION.
53177
+ PRIVATE SECTION.
53178
+ METHODS test FOR TESTING RAISING cx_static_check.
53179
+ ENDCLASS.
53180
+
53181
+ CLASS ltcl_test2 IMPLEMENTATION.
53182
+ METHOD test.
53183
+ ENDMETHOD.
52864
53184
  ENDCLASS.`,
52865
53185
  };
52866
53186
  }
@@ -52946,49 +53266,49 @@ class AlignParameters extends _abap_rule_1.ABAPRule {
52946
53266
  key: "align_parameters",
52947
53267
  title: "Align Parameters",
52948
53268
  shortDescription: `Checks for vertially aligned parameters`,
52949
- extendedInformation: `Checks:
52950
- * function module calls
52951
- * method calls
52952
- * VALUE constructors
52953
- * NEW constructors
52954
- * RAISE EXCEPTION statements
52955
- * CREATE OBJECT statements
52956
- * RAISE EVENT statements
52957
-
52958
- https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
52959
-
52960
- Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
52961
-
52962
- If parameters are on the same row, no issues are reported, see
53269
+ extendedInformation: `Checks:
53270
+ * function module calls
53271
+ * method calls
53272
+ * VALUE constructors
53273
+ * NEW constructors
53274
+ * RAISE EXCEPTION statements
53275
+ * CREATE OBJECT statements
53276
+ * RAISE EVENT statements
53277
+
53278
+ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters
53279
+
53280
+ Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
53281
+
53282
+ If parameters are on the same row, no issues are reported, see
52963
53283
  https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
52964
53284
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
52965
- badExample: `CALL FUNCTION 'FOOBAR'
52966
- EXPORTING
52967
- foo = 2
52968
- parameter = 3.
52969
-
52970
- foobar( moo = 1
52971
- param = 1 ).
52972
-
52973
- foo = VALUE #(
52974
- foo = bar
53285
+ badExample: `CALL FUNCTION 'FOOBAR'
53286
+ EXPORTING
53287
+ foo = 2
53288
+ parameter = 3.
53289
+
53290
+ foobar( moo = 1
53291
+ param = 1 ).
53292
+
53293
+ foo = VALUE #(
53294
+ foo = bar
52975
53295
  moo = 2 ).`,
52976
- goodExample: `CALL FUNCTION 'FOOBAR'
52977
- EXPORTING
52978
- foo = 2
52979
- parameter = 3.
52980
-
52981
- foobar( moo = 1
52982
- param = 1 ).
52983
-
52984
- foo = VALUE #(
52985
- foo = bar
52986
- moo = 2 ).
52987
-
52988
- DATA(sdf) = VALUE type(
52989
- common_val = 2
52990
- another_common = 5
52991
- ( row_value = 4
53296
+ goodExample: `CALL FUNCTION 'FOOBAR'
53297
+ EXPORTING
53298
+ foo = 2
53299
+ parameter = 3.
53300
+
53301
+ foobar( moo = 1
53302
+ param = 1 ).
53303
+
53304
+ foo = VALUE #(
53305
+ foo = bar
53306
+ moo = 2 ).
53307
+
53308
+ DATA(sdf) = VALUE type(
53309
+ common_val = 2
53310
+ another_common = 5
53311
+ ( row_value = 4
52992
53312
  value_foo = 5 ) ).`,
52993
53313
  };
52994
53314
  }
@@ -53422,37 +53742,37 @@ class AlignTypeExpressions extends _abap_rule_1.ABAPRule {
53422
53742
  key: "align_type_expressions",
53423
53743
  title: "Align TYPE expressions",
53424
53744
  shortDescription: `Align TYPE expressions in statements`,
53425
- extendedInformation: `
53426
- Currently works for METHODS + BEGIN OF
53427
-
53428
- If BEGIN OF has an INCLUDE TYPE its ignored
53429
-
53430
- Also note that clean ABAP does not recommend aligning TYPE clauses:
53745
+ extendedInformation: `
53746
+ Currently works for METHODS + BEGIN OF
53747
+
53748
+ If BEGIN OF has an INCLUDE TYPE its ignored
53749
+
53750
+ Also note that clean ABAP does not recommend aligning TYPE clauses:
53431
53751
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-align-type-clauses`,
53432
53752
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix],
53433
- badExample: `
53434
- TYPES: BEGIN OF foo,
53435
- bar TYPE i,
53436
- foobar TYPE i,
53437
- END OF foo.
53438
-
53439
- INTERFACE lif.
53440
- METHODS bar
53441
- IMPORTING
53442
- foo TYPE i
53443
- foobar TYPE i.
53753
+ badExample: `
53754
+ TYPES: BEGIN OF foo,
53755
+ bar TYPE i,
53756
+ foobar TYPE i,
53757
+ END OF foo.
53758
+
53759
+ INTERFACE lif.
53760
+ METHODS bar
53761
+ IMPORTING
53762
+ foo TYPE i
53763
+ foobar TYPE i.
53444
53764
  ENDINTERFACE.`,
53445
- goodExample: `
53446
- TYPES: BEGIN OF foo,
53447
- bar TYPE i,
53448
- foobar TYPE i,
53449
- END OF foo.
53450
-
53451
- INTERFACE lif.
53452
- METHODS bar
53453
- IMPORTING
53454
- foo TYPE i
53455
- foobar TYPE i.
53765
+ goodExample: `
53766
+ TYPES: BEGIN OF foo,
53767
+ bar TYPE i,
53768
+ foobar TYPE i,
53769
+ END OF foo.
53770
+
53771
+ INTERFACE lif.
53772
+ METHODS bar
53773
+ IMPORTING
53774
+ foo TYPE i
53775
+ foobar TYPE i.
53456
53776
  ENDINTERFACE.`,
53457
53777
  };
53458
53778
  }
@@ -53731,16 +54051,16 @@ class AmbiguousStatement extends _abap_rule_1.ABAPRule {
53731
54051
  return {
53732
54052
  key: "ambiguous_statement",
53733
54053
  title: "Check for ambigious statements",
53734
- shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
53735
- Add "TABLE" keyword or "@" for escaping SQL variables
53736
-
54054
+ shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table
54055
+ Add "TABLE" keyword or "@" for escaping SQL variables
54056
+
53737
54057
  Only works if the target version is 740sp05 or above`,
53738
54058
  tags: [_irule_1.RuleTag.SingleFile],
53739
- badExample: `DELETE foo FROM bar.
54059
+ badExample: `DELETE foo FROM bar.
53740
54060
  MODIFY foo FROM bar.`,
53741
- goodExample: `DELETE foo FROM @bar.
53742
- DELETE TABLE itab FROM 2.
53743
- MODIFY zfoo FROM @wa.
54061
+ goodExample: `DELETE foo FROM @bar.
54062
+ DELETE TABLE itab FROM 2.
54063
+ MODIFY zfoo FROM @wa.
53744
54064
  MODIFY TABLE foo FROM bar.`,
53745
54065
  };
53746
54066
  }
@@ -53845,16 +54165,16 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
53845
54165
  key: "avoid_use",
53846
54166
  title: "Avoid use of certain statements",
53847
54167
  shortDescription: `Detects usage of certain statements.`,
53848
- extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
53849
-
53850
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
53851
-
53852
- STATICS: use CLASS-DATA instead
53853
-
53854
- DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
53855
-
53856
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
53857
-
54168
+ extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
54169
+
54170
+ Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
54171
+
54172
+ STATICS: use CLASS-DATA instead
54173
+
54174
+ DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
54175
+
54176
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
54177
+
53858
54178
  BREAK points`,
53859
54179
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
53860
54180
  };
@@ -53986,11 +54306,11 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
53986
54306
  title: "Check BEGIN END names",
53987
54307
  shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,
53988
54308
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
53989
- badExample: `DATA: BEGIN OF stru,
53990
- field TYPE i,
54309
+ badExample: `DATA: BEGIN OF stru,
54310
+ field TYPE i,
53991
54311
  END OF structure_not_the_same.`,
53992
- goodExample: `DATA: BEGIN OF stru,
53993
- field TYPE i,
54312
+ goodExample: `DATA: BEGIN OF stru,
54313
+ field TYPE i,
53994
54314
  END OF stru.`,
53995
54315
  };
53996
54316
  }
@@ -54087,20 +54407,20 @@ class BeginSingleInclude extends _abap_rule_1.ABAPRule {
54087
54407
  title: "BEGIN contains single INCLUDE",
54088
54408
  shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,
54089
54409
  tags: [_irule_1.RuleTag.SingleFile],
54090
- badExample: `TYPES: BEGIN OF dummy1.
54091
- INCLUDE TYPE dselc.
54092
- TYPES: END OF dummy1.
54093
-
54094
- DATA BEGIN OF foo.
54095
- INCLUDE STRUCTURE syst.
54096
- DATA END OF foo.
54097
-
54098
- STATICS BEGIN OF bar.
54099
- INCLUDE STRUCTURE syst.
54410
+ badExample: `TYPES: BEGIN OF dummy1.
54411
+ INCLUDE TYPE dselc.
54412
+ TYPES: END OF dummy1.
54413
+
54414
+ DATA BEGIN OF foo.
54415
+ INCLUDE STRUCTURE syst.
54416
+ DATA END OF foo.
54417
+
54418
+ STATICS BEGIN OF bar.
54419
+ INCLUDE STRUCTURE syst.
54100
54420
  STATICS END OF bar.`,
54101
- goodExample: `DATA BEGIN OF foo.
54102
- DATA field TYPE i.
54103
- INCLUDE STRUCTURE dselc.
54421
+ goodExample: `DATA BEGIN OF foo.
54422
+ DATA field TYPE i.
54423
+ INCLUDE STRUCTURE dselc.
54104
54424
  DATA END OF foo.`,
54105
54425
  };
54106
54426
  }
@@ -54190,9 +54510,9 @@ class CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {
54190
54510
  extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,
54191
54511
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
54192
54512
  badExample: `CALL TRANSACTION 'FOO'.`,
54193
- goodExample: `TRY.
54194
- CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54195
- CATCH cx_sy_authorization_error.
54513
+ goodExample: `TRY.
54514
+ CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.
54515
+ CATCH cx_sy_authorization_error.
54196
54516
  ENDTRY.`,
54197
54517
  };
54198
54518
  }
@@ -54257,10 +54577,10 @@ class CDSCommentStyle {
54257
54577
  key: "cds_comment_style",
54258
54578
  title: "CDS Comment Style",
54259
54579
  shortDescription: `Check for obsolete comment style`,
54260
- extendedInformation: `Check for obsolete comment style
54261
-
54262
- Comments starting with "--" are considered obsolete
54263
-
54580
+ extendedInformation: `Check for obsolete comment style
54581
+
54582
+ Comments starting with "--" are considered obsolete
54583
+
54264
54584
  https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
54265
54585
  tags: [_irule_1.RuleTag.SingleFile],
54266
54586
  badExample: "-- this is a comment",
@@ -54326,10 +54646,10 @@ class CDSLegacyView {
54326
54646
  key: "cds_legacy_view",
54327
54647
  title: "CDS Legacy View",
54328
54648
  shortDescription: `Identify CDS Legacy Views`,
54329
- extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54330
-
54331
- https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54332
-
54649
+ extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
54650
+
54651
+ https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
54652
+
54333
54653
  v755 and up`,
54334
54654
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Upport],
54335
54655
  };
@@ -54484,10 +54804,10 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
54484
54804
  key: "chain_mainly_declarations",
54485
54805
  title: "Chain mainly declarations",
54486
54806
  shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,
54487
- extendedInformation: `
54488
- https://docs.abapopenchecks.org/checks/23/
54489
-
54490
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
54807
+ extendedInformation: `
54808
+ https://docs.abapopenchecks.org/checks/23/
54809
+
54810
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
54491
54811
  `,
54492
54812
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
54493
54813
  badExample: `CALL METHOD: bar.`,
@@ -54663,17 +54983,17 @@ class ChangeIfToCase extends _abap_rule_1.ABAPRule {
54663
54983
  title: "Change IF to CASE",
54664
54984
  shortDescription: `Finds IF constructs that can be changed to CASE`,
54665
54985
  // eslint-disable-next-line max-len
54666
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54667
-
54986
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions
54987
+
54668
54988
  If the first comparison is a boolean compare, no issue is reported.`,
54669
54989
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54670
- badExample: `IF l_fcat-fieldname EQ 'FOO'.
54671
- ELSEIF l_fcat-fieldname = 'BAR'
54672
- OR l_fcat-fieldname = 'MOO'.
54990
+ badExample: `IF l_fcat-fieldname EQ 'FOO'.
54991
+ ELSEIF l_fcat-fieldname = 'BAR'
54992
+ OR l_fcat-fieldname = 'MOO'.
54673
54993
  ENDIF.`,
54674
- goodExample: `CASE l_fcat-fieldname.
54675
- WHEN 'FOO'.
54676
- WHEN 'BAR' OR 'MOO'.
54994
+ goodExample: `CASE l_fcat-fieldname.
54995
+ WHEN 'FOO'.
54996
+ WHEN 'BAR' OR 'MOO'.
54677
54997
  ENDCASE.`,
54678
54998
  };
54679
54999
  }
@@ -54810,8 +55130,8 @@ class CheckAbstract extends _abap_rule_1.ABAPRule {
54810
55130
  return {
54811
55131
  key: "check_abstract",
54812
55132
  title: "Check abstract methods and classes",
54813
- shortDescription: `Checks abstract methods and classes:
54814
- - class defined as abstract and final,
55133
+ shortDescription: `Checks abstract methods and classes:
55134
+ - class defined as abstract and final,
54815
55135
  - non-abstract class contains abstract methods`,
54816
55136
  extendedInformation: `If a class defines only constants, use an interface instead`,
54817
55137
  tags: [_irule_1.RuleTag.SingleFile],
@@ -54892,11 +55212,11 @@ class CheckComments extends _abap_rule_1.ABAPRule {
54892
55212
  return {
54893
55213
  key: "check_comments",
54894
55214
  title: "Check Comments",
54895
- shortDescription: `
55215
+ shortDescription: `
54896
55216
  Various checks for comment usage.`,
54897
- extendedInformation: `
54898
- Detects end of line comments. Comments starting with "#EC" or "##" are ignored
54899
-
55217
+ extendedInformation: `
55218
+ Detects end of line comments. Comments starting with "#EC" or "##" are ignored
55219
+
54900
55220
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
54901
55221
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
54902
55222
  badExample: `WRITE 2. " descriptive comment`,
@@ -55058,9 +55378,9 @@ class CheckInclude {
55058
55378
  key: "check_include",
55059
55379
  title: "Check INCLUDEs",
55060
55380
  shortDescription: `Checks INCLUDE statements`,
55061
- extendedInformation: `
55062
- * Reports unused includes
55063
- * Errors if the includes are not found
55381
+ extendedInformation: `
55382
+ * Reports unused includes
55383
+ * Errors if the includes are not found
55064
55384
  * Error if including a main program`,
55065
55385
  tags: [_irule_1.RuleTag.Syntax],
55066
55386
  };
@@ -55136,14 +55456,14 @@ class CheckSubrc extends _abap_rule_1.ABAPRule {
55136
55456
  key: "check_subrc",
55137
55457
  title: "Check sy-subrc",
55138
55458
  shortDescription: `Check sy-subrc`,
55139
- extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55140
-
55141
- If sy-dbcnt is checked after database statements, it is considered okay.
55142
-
55143
- "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55144
-
55145
- If IS ASSIGNED is checked after assigning, it is considered okay.
55146
-
55459
+ extendedInformation: `Pseudo comment "#EC CI_SUBRC can be added to suppress findings
55460
+
55461
+ If sy-dbcnt is checked after database statements, it is considered okay.
55462
+
55463
+ "SELECT SINGLE @abap_true FROM " is considered as an existence check, also "SELECT COUNT( * )" is considered okay
55464
+
55465
+ If IS ASSIGNED is checked after assigning, it is considered okay.
55466
+
55147
55467
  FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
55148
55468
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
55149
55469
  pseudoComment: "EC CI_SUBRC",
@@ -55713,17 +56033,17 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
55713
56033
  shortDescription: `Find overlapping classic exceptions`,
55714
56034
  extendedInformation: `When debugging its typically good to know exactly which exception is caught`,
55715
56035
  tags: [_irule_1.RuleTag.SingleFile],
55716
- badExample: `CALL FUNCTION 'SOMETHING'
55717
- EXCEPTIONS
55718
- system_failure = 1 MESSAGE lv_message
55719
- communication_failure = 1 MESSAGE lv_message
55720
- resource_failure = 1
56036
+ badExample: `CALL FUNCTION 'SOMETHING'
56037
+ EXCEPTIONS
56038
+ system_failure = 1 MESSAGE lv_message
56039
+ communication_failure = 1 MESSAGE lv_message
56040
+ resource_failure = 1
55721
56041
  OTHERS = 1.`,
55722
- goodExample: `CALL FUNCTION 'SOMETHING'
55723
- EXCEPTIONS
55724
- system_failure = 1 MESSAGE lv_message
55725
- communication_failure = 2 MESSAGE lv_message
55726
- resource_failure = 3
56042
+ goodExample: `CALL FUNCTION 'SOMETHING'
56043
+ EXCEPTIONS
56044
+ system_failure = 1 MESSAGE lv_message
56045
+ communication_failure = 2 MESSAGE lv_message
56046
+ resource_failure = 3
55727
56047
  OTHERS = 4.`,
55728
56048
  };
55729
56049
  }
@@ -55981,7 +56301,7 @@ class CommentedCode extends _abap_rule_1.ABAPRule {
55981
56301
  key: "commented_code",
55982
56302
  title: "Find commented code",
55983
56303
  shortDescription: `Detects usage of commented out code.`,
55984
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
56304
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it
55985
56305
  https://docs.abapopenchecks.org/checks/14/`,
55986
56306
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
55987
56307
  badExample: `* WRITE 'hello world'.`,
@@ -56214,10 +56534,10 @@ class ConstructorVisibilityPublic {
56214
56534
  key: "constructor_visibility_public",
56215
56535
  title: "Check constructor visibility is public",
56216
56536
  shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,
56217
- extendedInformation: `
56218
- This only applies to global classes.
56219
-
56220
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56537
+ extendedInformation: `
56538
+ This only applies to global classes.
56539
+
56540
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
56221
56541
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
56222
56542
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56223
56543
  };
@@ -56292,8 +56612,8 @@ class ContainsTab extends _abap_rule_1.ABAPRule {
56292
56612
  key: "contains_tab",
56293
56613
  title: "Code contains tab",
56294
56614
  shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,
56295
- extendedInformation: `
56296
- https://docs.abapopenchecks.org/checks/09/
56615
+ extendedInformation: `
56616
+ https://docs.abapopenchecks.org/checks/09/
56297
56617
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
56298
56618
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
56299
56619
  badExample: `\tWRITE 'hello world'.`,
@@ -56380,10 +56700,10 @@ class CyclicOO {
56380
56700
  key: "cyclic_oo",
56381
56701
  title: "Cyclic OO",
56382
56702
  shortDescription: `Finds cyclic/circular OO references`,
56383
- extendedInformation: `Runs for global INTF + CLAS objects
56384
-
56385
- Objects must be without syntax errors for this rule to take effect
56386
-
56703
+ extendedInformation: `Runs for global INTF + CLAS objects
56704
+
56705
+ Objects must be without syntax errors for this rule to take effect
56706
+
56387
56707
  References in testclass includes are ignored`,
56388
56708
  };
56389
56709
  }
@@ -56626,7 +56946,7 @@ class DangerousStatement extends _abap_rule_1.ABAPRule {
56626
56946
  key: "dangerous_statement",
56627
56947
  title: "Dangerous statement",
56628
56948
  shortDescription: `Detects potentially dangerous statements`,
56629
- extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56949
+ extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,
56630
56950
  dynamic SQL can potentially create SQL injection problems`,
56631
56951
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],
56632
56952
  };
@@ -56833,13 +57153,13 @@ class DefinitionsTop extends _abap_rule_1.ABAPRule {
56833
57153
  shortDescription: `Checks that definitions are placed at the beginning of METHODs, FORMs and FUNCTIONs.`,
56834
57154
  extendedInformation: `https://docs.abapopenchecks.org/checks/17/`,
56835
57155
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
56836
- badExample: `FROM foo.
56837
- WRITE 'hello'.
56838
- DATA int TYPE i.
57156
+ badExample: `FROM foo.
57157
+ WRITE 'hello'.
57158
+ DATA int TYPE i.
56839
57159
  ENDFORM.`,
56840
- goodExample: `FROM foo.
56841
- DATA int TYPE i.
56842
- WRITE 'hello'.
57160
+ goodExample: `FROM foo.
57161
+ DATA int TYPE i.
57162
+ WRITE 'hello'.
56843
57163
  ENDFORM.`,
56844
57164
  };
56845
57165
  }
@@ -57381,39 +57701,39 @@ class Downport {
57381
57701
  key: "downport",
57382
57702
  title: "Downport statement",
57383
57703
  shortDescription: `Downport functionality`,
57384
- extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57385
- a higher level language version. If successful, various rules are applied to downport the statement.
57386
- Target downport version is always v702, thus rule is only enabled if target version is v702.
57387
-
57388
- Current rules:
57389
- * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57390
- * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57391
- * FIELD-SYMBOL() definitions are outlined
57392
- * CONV is outlined
57393
- * COND is outlined
57394
- * REDUCE is outlined
57395
- * SWITCH is outlined
57396
- * FILTER is outlined
57397
- * APPEND expression is outlined
57398
- * INSERT expression is outlined
57399
- * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57400
- * CAST changed to ?=
57401
- * LOOP AT method_call( ) is outlined
57402
- * VALUE # with structure fields
57403
- * VALUE # with internal table lines
57404
- * Table Expressions are outlined
57405
- * SELECT INTO @DATA definitions are outlined
57406
- * Some occurrences of string template formatting option ALPHA changed to function module call
57407
- * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57408
- * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57409
- * RAISE EXCEPTION ... MESSAGE
57410
- * Moving with +=, -=, /=, *=, &&= is expanded
57411
- * line_exists and line_index is downported to READ TABLE
57412
- * ENUMs, but does not nessesarily give the correct type and value
57413
- * MESSAGE with non simple source
57414
-
57415
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57416
-
57704
+ extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with
57705
+ a higher level language version. If successful, various rules are applied to downport the statement.
57706
+ Target downport version is always v702, thus rule is only enabled if target version is v702.
57707
+
57708
+ Current rules:
57709
+ * NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/
57710
+ * DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/
57711
+ * FIELD-SYMBOL() definitions are outlined
57712
+ * CONV is outlined
57713
+ * COND is outlined
57714
+ * REDUCE is outlined
57715
+ * SWITCH is outlined
57716
+ * FILTER is outlined
57717
+ * APPEND expression is outlined
57718
+ * INSERT expression is outlined
57719
+ * EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/
57720
+ * CAST changed to ?=
57721
+ * LOOP AT method_call( ) is outlined
57722
+ * VALUE # with structure fields
57723
+ * VALUE # with internal table lines
57724
+ * Table Expressions are outlined
57725
+ * SELECT INTO @DATA definitions are outlined
57726
+ * Some occurrences of string template formatting option ALPHA changed to function module call
57727
+ * SELECT/INSERT/MODIFY/DELETE/UPDATE "," in field list removed, "@" in source/targets removed
57728
+ * PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods
57729
+ * RAISE EXCEPTION ... MESSAGE
57730
+ * Moving with +=, -=, /=, *=, &&= is expanded
57731
+ * line_exists and line_index is downported to READ TABLE
57732
+ * ENUMs, but does not nessesarily give the correct type and value
57733
+ * MESSAGE with non simple source
57734
+
57735
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
57736
+
57417
57737
  Make sure to test the downported code, it might not always be completely correct.`,
57418
57738
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
57419
57739
  };
@@ -57991,10 +58311,10 @@ Make sure to test the downported code, it might not always be completely correct
57991
58311
  const fieldName = f.concatTokens();
57992
58312
  fieldDefinition += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
57993
58313
  }
57994
- fieldDefinition = `DATA: BEGIN OF ${name},
58314
+ fieldDefinition = `DATA: BEGIN OF ${name},
57995
58315
  ${fieldDefinition}${indentation} END OF ${name}.`;
57996
58316
  }
57997
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
58317
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}
57998
58318
  ${indentation}`);
57999
58319
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
58000
58320
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58053,12 +58373,12 @@ ${indentation}`);
58053
58373
  }
58054
58374
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58055
58375
  const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
58056
- let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58057
- ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58058
- ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58376
+ let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58377
+ ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58378
+ ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
58059
58379
  ${indentation}`);
58060
58380
  if (fieldDefinitions === "") {
58061
- fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58381
+ fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.
58062
58382
  ${indentation}`);
58063
58383
  }
58064
58384
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);
@@ -58126,7 +58446,7 @@ ${indentation}`);
58126
58446
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58127
58447
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58128
58448
  const firstToken = high.getFirstToken();
58129
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58449
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58130
58450
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58131
58451
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58132
58452
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58180,7 +58500,7 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58180
58500
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58181
58501
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58182
58502
  const firstToken = high.getFirstToken();
58183
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58503
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.
58184
58504
  ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58185
58505
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
58186
58506
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58222,14 +58542,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
58222
58542
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58223
58543
  const firstToken = high.getFirstToken();
58224
58544
  // note that the tabix restore should be done before throwing the exception
58225
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58226
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58227
- ${indentation}${tabixBackup} = sy-tabix.
58228
- ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58229
- ${indentation}sy-tabix = ${tabixBackup}.
58230
- ${indentation}IF sy-subrc <> 0.
58231
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58232
- ${indentation}ENDIF.
58545
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.
58546
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58547
+ ${indentation}${tabixBackup} = sy-tabix.
58548
+ ${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.
58549
+ ${indentation}sy-tabix = ${tabixBackup}.
58550
+ ${indentation}IF sy-subrc <> 0.
58551
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58552
+ ${indentation}ENDIF.
58233
58553
  ${indentation}`);
58234
58554
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);
58235
58555
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
@@ -58286,7 +58606,7 @@ ${indentation}`);
58286
58606
  const className = classNames[0].concatTokens();
58287
58607
  const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58288
58608
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58289
- const code = ` DATA ${targetName} TYPE REF TO ${className}.
58609
+ const code = ` DATA ${targetName} TYPE REF TO ${className}.
58290
58610
  ${indentation}CATCH ${className} INTO ${targetName}.`;
58291
58611
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
58292
58612
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
@@ -58448,16 +58768,16 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
58448
58768
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58449
58769
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58450
58770
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
58451
- let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58452
- ${indentation}${uniqueName1}-msgid = ${id}.
58771
+ let abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.
58772
+ ${indentation}${uniqueName1}-msgid = ${id}.
58453
58773
  ${indentation}${uniqueName1}-msgno = ${number}.\n`;
58454
58774
  if (withs.length > 0) {
58455
- abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
58456
- ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
58457
- ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
58775
+ abap += `${indentation}${uniqueName1}-attr1 = 'IF_T100_DYN_MSG~MSGV1'.
58776
+ ${indentation}${uniqueName1}-attr2 = 'IF_T100_DYN_MSG~MSGV2'.
58777
+ ${indentation}${uniqueName1}-attr3 = 'IF_T100_DYN_MSG~MSGV3'.
58458
58778
  ${indentation}${uniqueName1}-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\n`;
58459
58779
  }
58460
- abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
58780
+ abap += `${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.
58461
58781
  ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`;
58462
58782
  if (withs.length > 0) {
58463
58783
  abap += `${indentation}${uniqueName2}->if_t100_dyn_msg~msgty = 'E'.\n`;
@@ -58569,10 +58889,10 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
58569
58889
  let code = "";
58570
58890
  if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
58571
58891
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58572
- code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58573
- IF sy-subrc <> 0.
58574
- RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58575
- ENDIF.
58892
+ code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
58893
+ IF sy-subrc <> 0.
58894
+ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58895
+ ENDIF.
58576
58896
  GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58577
58897
  }
58578
58898
  else {
@@ -58661,20 +58981,20 @@ GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
58661
58981
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58662
58982
  const uniqueFS = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58663
58983
  const uniqueNameIndex = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58664
- code += ` items LIKE ${loopSourceName},
58665
- END OF ${groupTargetName}type.
58666
- DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58667
- DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58984
+ code += ` items LIKE ${loopSourceName},
58985
+ END OF ${groupTargetName}type.
58986
+ DATA ${groupTargetName}tab TYPE STANDARD TABLE OF ${groupTargetName}type WITH DEFAULT KEY.
58987
+ DATA ${uniqueName} LIKE LINE OF ${groupTargetName}tab.
58668
58988
  LOOP AT ${loopSourceName} ${(_l = high.findFirstExpression(Expressions.LoopTarget)) === null || _l === void 0 ? void 0 : _l.concatTokens()}.\n`;
58669
58989
  if (groupIndexName !== undefined) {
58670
58990
  code += `DATA(${uniqueNameIndex}) = sy-tabix.\n`;
58671
58991
  }
58672
- code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58992
+ code += `READ TABLE ${groupTargetName}tab ASSIGNING FIELD-SYMBOL(<${uniqueFS}>) WITH KEY ${condition}.
58673
58993
  IF sy-subrc = 0.\n`;
58674
58994
  if (groupCountName !== undefined) {
58675
58995
  code += ` <${uniqueFS}>-${groupCountName} = <${uniqueFS}>-${groupCountName} + 1.\n`;
58676
58996
  }
58677
- code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58997
+ code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE <${uniqueFS}>-items.
58678
58998
  ELSE.\n`;
58679
58999
  code += ` CLEAR ${uniqueName}.\n`;
58680
59000
  for (const c of group.findAllExpressions(Expressions.LoopGroupByComponent)) {
@@ -58695,8 +59015,8 @@ ELSE.\n`;
58695
59015
  }
58696
59016
  code += ` INSERT ${loopTargetName}${isReference ? "->*" : ""} INTO TABLE ${uniqueName}-items.\n`;
58697
59017
  code += ` INSERT ${uniqueName} INTO TABLE ${groupTargetName}tab.\n`;
58698
- code += `ENDIF.
58699
- ENDLOOP.
59018
+ code += `ENDIF.
59019
+ ENDLOOP.
58700
59020
  LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58701
59021
  let fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
58702
59022
  for (const l of ((_m = highFile.getStructure()) === null || _m === void 0 ? void 0 : _m.findAllStructures(Structures.Loop)) || []) {
@@ -58868,7 +59188,7 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
58868
59188
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
58869
59189
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
58870
59190
  // all ENUMS are char like?
58871
- let code = `TYPES ${enumName} TYPE string.
59191
+ let code = `TYPES ${enumName} TYPE string.
58872
59192
  CONSTANTS: BEGIN OF ${structureName},\n`;
58873
59193
  let count = 1;
58874
59194
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
@@ -58912,14 +59232,14 @@ CONSTANTS: BEGIN OF ${structureName},\n`;
58912
59232
  const tabixBackup = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58913
59233
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58914
59234
  // restore tabix before exeption
58915
- const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
58916
- ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
58917
- ${indentation}${tabixBackup} = sy-tabix.
58918
- ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
58919
- ${indentation}sy-tabix = ${tabixBackup}.
58920
- ${indentation}IF sy-subrc <> 0.
58921
- ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
58922
- ${indentation}ENDIF.
59235
+ const code = `FIELD-SYMBOLS ${uniqueName} LIKE LINE OF ${tName}.
59236
+ ${indentation}DATA ${tabixBackup} LIKE sy-tabix.
59237
+ ${indentation}${tabixBackup} = sy-tabix.
59238
+ ${indentation}READ TABLE ${tName} ${condition}ASSIGNING ${uniqueName}.
59239
+ ${indentation}sy-tabix = ${tabixBackup}.
59240
+ ${indentation}IF sy-subrc <> 0.
59241
+ ${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.
59242
+ ${indentation}ENDIF.
58923
59243
  ${indentation}${uniqueName}`;
58924
59244
  const start = target.getFirstToken().getStart();
58925
59245
  const end = (_a = tableExpression.findDirectTokenByText("]")) === null || _a === void 0 ? void 0 : _a.getEnd();
@@ -58999,11 +59319,11 @@ ${indentation}${uniqueName}`;
58999
59319
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
59000
59320
  const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59001
59321
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
59002
- const code = `DATA ${uniqueName} TYPE string.
59003
- ${indentation}CALL FUNCTION '${functionName}'
59004
- ${indentation} EXPORTING
59005
- ${indentation} input = ${source}
59006
- ${indentation} IMPORTING
59322
+ const code = `DATA ${uniqueName} TYPE string.
59323
+ ${indentation}CALL FUNCTION '${functionName}'
59324
+ ${indentation} EXPORTING
59325
+ ${indentation} input = ${source}
59326
+ ${indentation} IMPORTING
59007
59327
  ${indentation} output = ${uniqueName}.\n`;
59008
59328
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
59009
59329
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, child.getFirstToken().getStart(), child.getLastToken().getEnd(), uniqueName);
@@ -60315,12 +60635,12 @@ class EasyToFindMessages {
60315
60635
  key: "easy_to_find_messages",
60316
60636
  title: "Easy to find messages",
60317
60637
  shortDescription: `Make messages easy to find`,
60318
- extendedInformation: `All messages must be statically referenced exactly once
60319
-
60320
- Only MESSAGE and RAISE statments are counted as static references
60321
-
60322
- Also see rule "message_exists"
60323
-
60638
+ extendedInformation: `All messages must be statically referenced exactly once
60639
+
60640
+ Only MESSAGE and RAISE statments are counted as static references
60641
+
60642
+ Also see rule "message_exists"
60643
+
60324
60644
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#make-messages-easy-to-find`,
60325
60645
  tags: [_irule_1.RuleTag.Styleguide],
60326
60646
  };
@@ -60401,13 +60721,13 @@ class EmptyEvent extends _abap_rule_1.ABAPRule {
60401
60721
  shortDescription: `Empty selection screen or list processing event block`,
60402
60722
  extendedInformation: ``,
60403
60723
  tags: [_irule_1.RuleTag.SingleFile],
60404
- badExample: `
60405
- INITIALIZATION.
60406
- WRITE 'hello'.
60724
+ badExample: `
60725
+ INITIALIZATION.
60726
+ WRITE 'hello'.
60407
60727
  END-OF-SELECTION.`,
60408
- goodExample: `
60409
- START-OF-SELECTION.
60410
- PERFORM sdf.
60728
+ goodExample: `
60729
+ START-OF-SELECTION.
60730
+ PERFORM sdf.
60411
60731
  COMMIT WORK.`,
60412
60732
  };
60413
60733
  }
@@ -60499,8 +60819,8 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
60499
60819
  key: "empty_line_in_statement",
60500
60820
  title: "Find empty lines in statements",
60501
60821
  shortDescription: `Checks that statements do not contain empty lines.`,
60502
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
60503
-
60822
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
60823
+
60504
60824
  https://docs.abapopenchecks.org/checks/41/`,
60505
60825
  tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
60506
60826
  badExample: `WRITE\n\nhello.`,
@@ -60676,13 +60996,13 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
60676
60996
  shortDescription: `Checks that the code does not contain empty blocks.`,
60677
60997
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-empty-if-branches`,
60678
60998
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
60679
- badExample: `IF foo = bar.
60680
- ENDIF.
60681
-
60682
- DO 2 TIMES.
60999
+ badExample: `IF foo = bar.
61000
+ ENDIF.
61001
+
61002
+ DO 2 TIMES.
60683
61003
  ENDDO.`,
60684
- goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
60685
- ENDLOOP.
61004
+ goodExample: `LOOP AT itab WHERE qty = 0 OR date > sy-datum.
61005
+ ENDLOOP.
60686
61006
  result = xsdbool( sy-subrc = 0 ).`,
60687
61007
  };
60688
61008
  }
@@ -60824,10 +61144,10 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
60824
61144
  return {
60825
61145
  key: "exit_or_check",
60826
61146
  title: "Find EXIT or CHECK outside loops",
60827
- shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
61147
+ shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
60828
61148
  Use RETURN to leave procesing blocks instead.`,
60829
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
60830
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
61149
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
61150
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
60831
61151
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
60832
61152
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
60833
61153
  };
@@ -60910,12 +61230,12 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
60910
61230
  key: "expand_macros",
60911
61231
  title: "Expand Macros",
60912
61232
  shortDescription: `Allows expanding macro calls with quick fixes`,
60913
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
60914
-
61233
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
61234
+
60915
61235
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
60916
- badExample: `DEFINE _hello.
60917
- WRITE 'hello'.
60918
- END-OF-DEFINITION.
61236
+ badExample: `DEFINE _hello.
61237
+ WRITE 'hello'.
61238
+ END-OF-DEFINITION.
60919
61239
  _hello.`,
60920
61240
  goodExample: `WRITE 'hello'.`,
60921
61241
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
@@ -61002,7 +61322,7 @@ class Exporting extends _abap_rule_1.ABAPRule {
61002
61322
  shortDescription: `Detects EXPORTING statements which can be omitted.`,
61003
61323
  badExample: `call_method( EXPORTING foo = bar ).`,
61004
61324
  goodExample: `call_method( foo = bar ).`,
61005
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61325
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting
61006
61326
  https://docs.abapopenchecks.org/checks/30/`,
61007
61327
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61008
61328
  };
@@ -61100,7 +61420,7 @@ class ForbiddenIdentifier extends _abap_rule_1.ABAPRule {
61100
61420
  key: "forbidden_identifier",
61101
61421
  title: "Forbidden Identifier",
61102
61422
  shortDescription: `Forbid use of specified identifiers, list of regex.`,
61103
- extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61423
+ extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,
61104
61424
  https://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,
61105
61425
  tags: [_irule_1.RuleTag.SingleFile],
61106
61426
  };
@@ -61342,8 +61662,8 @@ class ForbiddenVoidType {
61342
61662
  key: "forbidden_void_type",
61343
61663
  title: "Forbidden Void Types",
61344
61664
  shortDescription: `Avoid usage of specified void types.`,
61345
- extendedInformation: `Inspiration:
61346
- BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61665
+ extendedInformation: `Inspiration:
61666
+ BOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,
61347
61667
  DATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,
61348
61668
  };
61349
61669
  }
@@ -61586,9 +61906,9 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
61586
61906
  key: "fully_type_itabs",
61587
61907
  title: "Fully type internal tables",
61588
61908
  shortDescription: `No implict table types or table keys`,
61589
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
61909
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
61590
61910
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
61591
- badExample: `DATA lt_foo TYPE TABLE OF ty.
61911
+ badExample: `DATA lt_foo TYPE TABLE OF ty.
61592
61912
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
61593
61913
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
61594
61914
  tags: [_irule_1.RuleTag.SingleFile],
@@ -61773,26 +62093,26 @@ class FunctionalWriting extends _abap_rule_1.ABAPRule {
61773
62093
  key: "functional_writing",
61774
62094
  title: "Use functional writing",
61775
62095
  shortDescription: `Detects usage of call method when functional style calls can be used.`,
61776
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
62096
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls
61777
62097
  https://docs.abapopenchecks.org/checks/07/`,
61778
62098
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
61779
- badExample: `CALL METHOD zcl_class=>method( ).
61780
- CALL METHOD cl_abap_typedescr=>describe_by_name
61781
- EXPORTING
61782
- p_name = 'NAME'
61783
- RECEIVING
61784
- p_descr_ref = lr_typedescr
61785
- EXCEPTIONS
61786
- type_not_found = 1
62099
+ badExample: `CALL METHOD zcl_class=>method( ).
62100
+ CALL METHOD cl_abap_typedescr=>describe_by_name
62101
+ EXPORTING
62102
+ p_name = 'NAME'
62103
+ RECEIVING
62104
+ p_descr_ref = lr_typedescr
62105
+ EXCEPTIONS
62106
+ type_not_found = 1
61787
62107
  OTHERS = 2.`,
61788
- goodExample: `zcl_class=>method( ).
61789
- cl_abap_typedescr=>describe_by_name(
61790
- EXPORTING
61791
- p_name = 'NAME'
61792
- RECEIVING
61793
- p_descr_ref = lr_typedescr
61794
- EXCEPTIONS
61795
- type_not_found = 1
62108
+ goodExample: `zcl_class=>method( ).
62109
+ cl_abap_typedescr=>describe_by_name(
62110
+ EXPORTING
62111
+ p_name = 'NAME'
62112
+ RECEIVING
62113
+ p_descr_ref = lr_typedescr
62114
+ EXCEPTIONS
62115
+ type_not_found = 1
61796
62116
  OTHERS = 2 ).`,
61797
62117
  };
61798
62118
  }
@@ -61903,14 +62223,14 @@ class GlobalClass extends _abap_rule_1.ABAPRule {
61903
62223
  key: "global_class",
61904
62224
  title: "Global class checks",
61905
62225
  shortDescription: `Checks related to global classes`,
61906
- extendedInformation: `* global classes must be in own files
61907
-
61908
- * file names must match class name
61909
-
61910
- * file names must match interface name
61911
-
61912
- * global classes must be global definitions
61913
-
62226
+ extendedInformation: `* global classes must be in own files
62227
+
62228
+ * file names must match class name
62229
+
62230
+ * file names must match interface name
62231
+
62232
+ * global classes must be global definitions
62233
+
61914
62234
  * global interfaces must be global definitions`,
61915
62235
  tags: [_irule_1.RuleTag.Syntax],
61916
62236
  };
@@ -62009,21 +62329,21 @@ class IdenticalConditions extends _abap_rule_1.ABAPRule {
62009
62329
  return {
62010
62330
  key: "identical_conditions",
62011
62331
  title: "Identical conditions",
62012
- shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62013
-
62332
+ shortDescription: `Find identical conditions in IF + CASE + WHILE etc
62333
+
62014
62334
  Prerequsites: code is pretty printed with identical cAsE`,
62015
62335
  tags: [_irule_1.RuleTag.SingleFile],
62016
- badExample: `IF foo = bar OR 1 = a OR foo = bar.
62017
- ENDIF.
62018
- CASE bar.
62019
- WHEN '1'.
62020
- WHEN 'A' OR '1'.
62336
+ badExample: `IF foo = bar OR 1 = a OR foo = bar.
62337
+ ENDIF.
62338
+ CASE bar.
62339
+ WHEN '1'.
62340
+ WHEN 'A' OR '1'.
62021
62341
  ENDCASE.`,
62022
- goodExample: `IF foo = bar OR 1 = a.
62023
- ENDIF.
62024
- CASE bar.
62025
- WHEN '1'.
62026
- WHEN 'A'.
62342
+ goodExample: `IF foo = bar OR 1 = a.
62343
+ ENDIF.
62344
+ CASE bar.
62345
+ WHEN '1'.
62346
+ WHEN 'A'.
62027
62347
  ENDCASE.`,
62028
62348
  };
62029
62349
  }
@@ -62157,23 +62477,23 @@ class IdenticalContents extends _abap_rule_1.ABAPRule {
62157
62477
  key: "identical_contents",
62158
62478
  title: "Identical contents",
62159
62479
  shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.`,
62160
- extendedInformation: `
62161
- Prerequsites: code is pretty printed with identical cAsE
62162
-
62480
+ extendedInformation: `
62481
+ Prerequsites: code is pretty printed with identical cAsE
62482
+
62163
62483
  Chained statments are ignored`,
62164
62484
  tags: [_irule_1.RuleTag.SingleFile],
62165
- badExample: `IF foo = bar.
62166
- WRITE 'bar'.
62167
- WRITE 'world'.
62168
- ELSE.
62169
- WRITE 'foo'.
62170
- WRITE 'world'.
62485
+ badExample: `IF foo = bar.
62486
+ WRITE 'bar'.
62487
+ WRITE 'world'.
62488
+ ELSE.
62489
+ WRITE 'foo'.
62490
+ WRITE 'world'.
62171
62491
  ENDIF.`,
62172
- goodExample: `IF foo = bar.
62173
- WRITE 'bar'.
62174
- ELSE.
62175
- WRITE 'foo'.
62176
- ENDIF.
62492
+ goodExample: `IF foo = bar.
62493
+ WRITE 'bar'.
62494
+ ELSE.
62495
+ WRITE 'foo'.
62496
+ ENDIF.
62177
62497
  WRITE 'world'.`,
62178
62498
  };
62179
62499
  }
@@ -62281,12 +62601,12 @@ class IdenticalDescriptions {
62281
62601
  key: "identical_descriptions",
62282
62602
  title: "Identical descriptions",
62283
62603
  shortDescription: `Searches for objects with the same type and same description`,
62284
- extendedInformation: `Case insensitive
62285
-
62286
- Only checks the master language descriptions
62287
-
62288
- Dependencies are skipped
62289
-
62604
+ extendedInformation: `Case insensitive
62605
+
62606
+ Only checks the master language descriptions
62607
+
62608
+ Dependencies are skipped
62609
+
62290
62610
  Works for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,
62291
62611
  tags: [],
62292
62612
  };
@@ -62460,43 +62780,43 @@ class IfInIf extends _abap_rule_1.ABAPRule {
62460
62780
  key: "if_in_if",
62461
62781
  title: "IF in IF",
62462
62782
  shortDescription: `Detects nested ifs which can be refactored.`,
62463
- extendedInformation: `
62464
- Directly nested IFs without ELSE can be refactored to a single condition using AND.
62465
-
62466
- ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
62467
-
62468
- https://docs.abapopenchecks.org/checks/01/
62783
+ extendedInformation: `
62784
+ Directly nested IFs without ELSE can be refactored to a single condition using AND.
62785
+
62786
+ ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.
62787
+
62788
+ https://docs.abapopenchecks.org/checks/01/
62469
62789
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,
62470
- badExample: `IF condition1.
62471
- IF condition2.
62472
- ...
62473
- ENDIF.
62474
- ENDIF.
62475
-
62476
- IF condition1.
62477
- ...
62478
- ELSE.
62479
- IF condition2.
62480
- ...
62481
- ENDIF.
62790
+ badExample: `IF condition1.
62791
+ IF condition2.
62792
+ ...
62793
+ ENDIF.
62794
+ ENDIF.
62795
+
62796
+ IF condition1.
62797
+ ...
62798
+ ELSE.
62799
+ IF condition2.
62800
+ ...
62801
+ ENDIF.
62482
62802
  ENDIF.`,
62483
- goodExample: `IF ( condition1 ) AND ( condition2 ).
62484
- ...
62485
- ENDIF.
62486
-
62487
- IF condition1.
62488
- ...
62489
- ELSEIF condition2.
62490
- ...
62491
- ENDIF.
62492
-
62493
- CASE variable.
62494
- WHEN value1.
62495
- ...
62496
- WHEN value2.
62497
- IF condition2.
62498
- ...
62499
- ENDIF.
62803
+ goodExample: `IF ( condition1 ) AND ( condition2 ).
62804
+ ...
62805
+ ENDIF.
62806
+
62807
+ IF condition1.
62808
+ ...
62809
+ ELSEIF condition2.
62810
+ ...
62811
+ ENDIF.
62812
+
62813
+ CASE variable.
62814
+ WHEN value1.
62815
+ ...
62816
+ WHEN value2.
62817
+ IF condition2.
62818
+ ...
62819
+ ENDIF.
62500
62820
  ENDCASE.`,
62501
62821
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
62502
62822
  };
@@ -62681,9 +63001,9 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
62681
63001
  for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {
62682
63002
  const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();
62683
63003
  if (name === impl.identifier.getName().toUpperCase()) {
62684
- return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
62685
- METHOD ${methodName.toLowerCase()}.
62686
- RETURN. " todo, implement method
63004
+ return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `
63005
+ METHOD ${methodName.toLowerCase()}.
63006
+ RETURN. " todo, implement method
62687
63007
  ENDMETHOD.`);
62688
63008
  }
62689
63009
  }
@@ -62862,14 +63182,14 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
62862
63182
  key: "implicit_start_of_selection",
62863
63183
  title: "Implicit START-OF-SELECTION",
62864
63184
  shortDescription: `Add explicit selection screen event handling`,
62865
- extendedInformation: `Only runs for executable programs
62866
-
63185
+ extendedInformation: `Only runs for executable programs
63186
+
62867
63187
  https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
62868
63188
  tags: [_irule_1.RuleTag.SingleFile],
62869
- badExample: `REPORT zfoo.
63189
+ badExample: `REPORT zfoo.
62870
63190
  WRITE 'hello'.`,
62871
- goodExample: `
62872
- START-OF-SELECTION.
63191
+ goodExample: `
63192
+ START-OF-SELECTION.
62873
63193
  WRITE 'hello'.`,
62874
63194
  };
62875
63195
  }
@@ -62974,19 +63294,19 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
62974
63294
  key: "in_statement_indentation",
62975
63295
  title: "In-statement indentation",
62976
63296
  shortDescription: "Checks alignment within statements which span multiple lines.",
62977
- extendedInformation: `Lines following the first line should be indented once (2 spaces).
62978
-
62979
- For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
63297
+ extendedInformation: `Lines following the first line should be indented once (2 spaces).
63298
+
63299
+ For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
62980
63300
  to distinguish them better from code within the block.`,
62981
- badExample: `IF 1 = 1
62982
- AND 2 = 2.
62983
- WRITE 'hello' &&
62984
- 'world'.
63301
+ badExample: `IF 1 = 1
63302
+ AND 2 = 2.
63303
+ WRITE 'hello' &&
63304
+ 'world'.
62985
63305
  ENDIF.`,
62986
- goodExample: `IF 1 = 1
62987
- AND 2 = 2.
62988
- WRITE 'hello' &&
62989
- 'world'.
63306
+ goodExample: `IF 1 = 1
63307
+ AND 2 = 2.
63308
+ WRITE 'hello' &&
63309
+ 'world'.
62990
63310
  ENDIF.`,
62991
63311
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
62992
63312
  };
@@ -63013,7 +63333,9 @@ ENDIF.`,
63013
63333
  }
63014
63334
  }
63015
63335
  for (const s of file.getStatements()) {
63016
- if (s.get() instanceof _statement_1.Comment || s.get() instanceof _statement_1.Unknown) {
63336
+ if (s.get() instanceof _statement_1.Comment
63337
+ || s.get() instanceof _statement_1.Unknown
63338
+ || s.get() instanceof _statement_1.NativeSQL) {
63017
63339
  continue;
63018
63340
  }
63019
63341
  const tokens = s.getTokens();
@@ -63110,23 +63432,23 @@ class Indentation extends _abap_rule_1.ABAPRule {
63110
63432
  title: "Indentation",
63111
63433
  shortDescription: `Checks indentation`,
63112
63434
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
63113
- badExample: `CLASS lcl DEFINITION.
63114
- PRIVATE SECTION.
63115
- METHODS constructor.
63116
- ENDCLASS.
63117
-
63118
- CLASS lcl IMPLEMENTATION.
63119
- METHOD constructor.
63120
- ENDMETHOD.
63435
+ badExample: `CLASS lcl DEFINITION.
63436
+ PRIVATE SECTION.
63437
+ METHODS constructor.
63438
+ ENDCLASS.
63439
+
63440
+ CLASS lcl IMPLEMENTATION.
63441
+ METHOD constructor.
63442
+ ENDMETHOD.
63121
63443
  ENDCLASS.`,
63122
- goodExample: `CLASS lcl DEFINITION.
63123
- PRIVATE SECTION.
63124
- METHODS constructor.
63125
- ENDCLASS.
63126
-
63127
- CLASS lcl IMPLEMENTATION.
63128
- METHOD constructor.
63129
- ENDMETHOD.
63444
+ goodExample: `CLASS lcl DEFINITION.
63445
+ PRIVATE SECTION.
63446
+ METHODS constructor.
63447
+ ENDCLASS.
63448
+
63449
+ CLASS lcl IMPLEMENTATION.
63450
+ METHOD constructor.
63451
+ ENDMETHOD.
63130
63452
  ENDCLASS.`,
63131
63453
  };
63132
63454
  }
@@ -63530,9 +63852,9 @@ class IntfReferencingClas {
63530
63852
  key: "intf_referencing_clas",
63531
63853
  title: "INTF referencing CLAS",
63532
63854
  shortDescription: `Interface contains references to class`,
63533
- extendedInformation: `Only global interfaces are checked.
63534
- Only first level references are checked.
63535
- Exception class references are ignored.
63855
+ extendedInformation: `Only global interfaces are checked.
63856
+ Only first level references are checked.
63857
+ Exception class references are ignored.
63536
63858
  Void references are ignored.`,
63537
63859
  };
63538
63860
  }
@@ -63617,9 +63939,9 @@ class InvalidTableIndex extends _abap_rule_1.ABAPRule {
63617
63939
  title: "Invalid Table Index",
63618
63940
  shortDescription: `Issues error for constant table index zero, as ABAP starts from 1`,
63619
63941
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
63620
- badExample: `DATA(first) = table[ 0 ].
63942
+ badExample: `DATA(first) = table[ 0 ].
63621
63943
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 0.`,
63622
- goodExample: `DATA(first) = table[ 1 ].
63944
+ goodExample: `DATA(first) = table[ 1 ].
63623
63945
  READ TABLE gt_stack ASSIGNING <ls_stack> INDEX 1.`,
63624
63946
  };
63625
63947
  }
@@ -64221,8 +64543,8 @@ class LineBreakStyle {
64221
64543
  return {
64222
64544
  key: "line_break_style",
64223
64545
  title: "Makes sure line breaks are consistent in the ABAP code",
64224
- shortDescription: `Enforces LF as newlines in ABAP files
64225
-
64546
+ shortDescription: `Enforces LF as newlines in ABAP files
64547
+
64226
64548
  abapGit does not work with CRLF`,
64227
64549
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
64228
64550
  };
@@ -64291,7 +64613,7 @@ class LineLength extends _abap_rule_1.ABAPRule {
64291
64613
  key: "line_length",
64292
64614
  title: "Line length",
64293
64615
  shortDescription: `Detects lines exceeding the provided maximum length.`,
64294
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64616
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length
64295
64617
  https://docs.abapopenchecks.org/checks/04/`,
64296
64618
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
64297
64619
  };
@@ -64362,7 +64684,7 @@ class LineOnlyPunc extends _abap_rule_1.ABAPRule {
64362
64684
  key: "line_only_punc",
64363
64685
  title: "Line containing only punctuation",
64364
64686
  shortDescription: `Detects lines containing only punctuation.`,
64365
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64687
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end
64366
64688
  https://docs.abapopenchecks.org/checks/16/`,
64367
64689
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
64368
64690
  badExample: "zcl_class=>method(\n).",
@@ -64625,15 +64947,15 @@ class LocalVariableNames extends _abap_rule_1.ABAPRule {
64625
64947
  return {
64626
64948
  key: "local_variable_names",
64627
64949
  title: "Local variable naming conventions",
64628
- shortDescription: `
64629
- Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
64950
+ shortDescription: `
64951
+ Allows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.
64630
64952
  Regexes are case-insensitive.`,
64631
64953
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64632
- badExample: `FORM bar.
64633
- DATA foo.
64954
+ badExample: `FORM bar.
64955
+ DATA foo.
64634
64956
  ENDFORM.`,
64635
- goodExample: `FORM bar.
64636
- DATA lv_foo.
64957
+ goodExample: `FORM bar.
64958
+ DATA lv_foo.
64637
64959
  ENDFORM.`,
64638
64960
  };
64639
64961
  }
@@ -64785,9 +65107,9 @@ class MacroNaming extends _abap_rule_1.ABAPRule {
64785
65107
  shortDescription: `Allows you to enforce a pattern for macro definitions`,
64786
65108
  extendedInformation: `Use rule "avoid_use" to avoid macros altogether.`,
64787
65109
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],
64788
- badExample: `DEFINE something.
65110
+ badExample: `DEFINE something.
64789
65111
  END-OF-DEFINITION.`,
64790
- goodExample: `DEFINE _something.
65112
+ goodExample: `DEFINE _something.
64791
65113
  END-OF-DEFINITION.`,
64792
65114
  };
64793
65115
  }
@@ -64860,10 +65182,10 @@ class MainFileContents {
64860
65182
  key: "main_file_contents",
64861
65183
  title: "Main file contents",
64862
65184
  shortDescription: `Checks related to report declarations.`,
64863
- extendedInformation: `Does not run if the target version is Cloud
64864
-
64865
- * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
64866
- * TYPEs must begin with "TYPE-POOL <name>."
65185
+ extendedInformation: `Does not run if the target version is Cloud
65186
+
65187
+ * PROGs must begin with "REPORT <name>." or "PROGRAM <name>.
65188
+ * TYPEs must begin with "TYPE-POOL <name>."
64867
65189
  `,
64868
65190
  };
64869
65191
  }
@@ -64979,17 +65301,17 @@ class ManyParentheses extends _abap_rule_1.ABAPRule {
64979
65301
  title: "Too many parentheses",
64980
65302
  shortDescription: `Searches for expressions where extra parentheses can safely be removed`,
64981
65303
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
64982
- badExample: `
64983
- IF ( destination IS INITIAL ).
64984
- ENDIF.
64985
- IF foo = boo AND ( bar = lar AND moo = loo ).
64986
- ENDIF.
65304
+ badExample: `
65305
+ IF ( destination IS INITIAL ).
65306
+ ENDIF.
65307
+ IF foo = boo AND ( bar = lar AND moo = loo ).
65308
+ ENDIF.
64987
65309
  `,
64988
- goodExample: `
64989
- IF destination IS INITIAL.
64990
- ENDIF.
64991
- IF foo = boo AND bar = lar AND moo = loo.
64992
- ENDIF.
65310
+ goodExample: `
65311
+ IF destination IS INITIAL.
65312
+ ENDIF.
65313
+ IF foo = boo AND bar = lar AND moo = loo.
65314
+ ENDIF.
64993
65315
  `,
64994
65316
  };
64995
65317
  }
@@ -65163,14 +65485,14 @@ class MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {
65163
65485
  title: "Max one method parameter definition per line",
65164
65486
  shortDescription: `Keep max one method parameter description per line`,
65165
65487
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],
65166
- badExample: `
65167
- METHODS apps_scope_token
65168
- IMPORTING
65488
+ badExample: `
65489
+ METHODS apps_scope_token
65490
+ IMPORTING
65169
65491
  body TYPE bodyapps_scope_token client_id TYPE str.`,
65170
- goodExample: `
65171
- METHODS apps_scope_token
65172
- IMPORTING
65173
- body TYPE bodyapps_scope_token
65492
+ goodExample: `
65493
+ METHODS apps_scope_token
65494
+ IMPORTING
65495
+ body TYPE bodyapps_scope_token
65174
65496
  client_id TYPE str.`,
65175
65497
  };
65176
65498
  }
@@ -65235,11 +65557,11 @@ class MaxOneStatement extends _abap_rule_1.ABAPRule {
65235
65557
  key: "max_one_statement",
65236
65558
  title: "Max one statement per line",
65237
65559
  shortDescription: `Checks that each line contains only a single statement.`,
65238
- extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65239
-
65240
- Does not report anything for chained statements.
65241
-
65242
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65560
+ extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.
65561
+
65562
+ Does not report anything for chained statements.
65563
+
65564
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line
65243
65565
  https://docs.abapopenchecks.org/checks/11/`,
65244
65566
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
65245
65567
  badExample: `WRITE foo. WRITE bar.`,
@@ -65577,8 +65899,8 @@ class MethodLength {
65577
65899
  key: "method_length",
65578
65900
  title: "Method/Form Length",
65579
65901
  shortDescription: `Checks relating to method/form length.`,
65580
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
65581
-
65902
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small
65903
+
65582
65904
  Abstract methods without statements are considered okay.`,
65583
65905
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65584
65906
  };
@@ -65683,20 +66005,20 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
65683
66005
  key: "method_overwrites_builtin",
65684
66006
  title: "Method name overwrites builtin function",
65685
66007
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
65686
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
65687
-
65688
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
65689
-
66008
+ extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
66009
+
66010
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
66011
+
65690
66012
  Interface method names are ignored`,
65691
66013
  tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
65692
- badExample: `CLASS lcl DEFINITION.
65693
- PUBLIC SECTION.
65694
- METHODS matches.
65695
- ENDCLASS.
65696
-
65697
- CLASS lcl IMPLEMENTATION.
65698
- METHOD matches.
65699
- ENDMETHOD.
66014
+ badExample: `CLASS lcl DEFINITION.
66015
+ PUBLIC SECTION.
66016
+ METHODS matches.
66017
+ ENDCLASS.
66018
+
66019
+ CLASS lcl IMPLEMENTATION.
66020
+ METHOD matches.
66021
+ ENDMETHOD.
65700
66022
  ENDCLASS.`,
65701
66023
  };
65702
66024
  }
@@ -65887,12 +66209,12 @@ class MixReturning extends _abap_rule_1.ABAPRule {
65887
66209
  // eslint-disable-next-line max-len
65888
66210
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
65889
66211
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
65890
- badExample: `CLASS lcl DEFINITION.
65891
- PUBLIC SECTION.
65892
- METHODS
65893
- foobar
65894
- EXPORTING foo TYPE i
65895
- RETURNING VALUE(rv_string) TYPE string.
66212
+ badExample: `CLASS lcl DEFINITION.
66213
+ PUBLIC SECTION.
66214
+ METHODS
66215
+ foobar
66216
+ EXPORTING foo TYPE i
66217
+ RETURNING VALUE(rv_string) TYPE string.
65896
66218
  ENDCLASS.`,
65897
66219
  };
65898
66220
  }
@@ -66272,7 +66594,7 @@ class Nesting extends _abap_rule_1.ABAPRule {
66272
66594
  key: "nesting",
66273
66595
  title: "Check nesting depth",
66274
66596
  shortDescription: `Checks for methods exceeding a maximum nesting depth`,
66275
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66597
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low
66276
66598
  https://docs.abapopenchecks.org/checks/74/`,
66277
66599
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66278
66600
  };
@@ -66515,7 +66837,7 @@ class NoChainedAssignment extends _abap_rule_1.ABAPRule {
66515
66837
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,
66516
66838
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66517
66839
  badExample: `var1 = var2 = var3.`,
66518
- goodExample: `var2 = var3.
66840
+ goodExample: `var2 = var3.
66519
66841
  var1 = var2.`,
66520
66842
  };
66521
66843
  }
@@ -66574,8 +66896,8 @@ class NoExternalFormCalls extends _abap_rule_1.ABAPRule {
66574
66896
  key: "no_external_form_calls",
66575
66897
  title: "No external FORM calls",
66576
66898
  shortDescription: `Detect external form calls`,
66577
- badExample: `PERFORM foo IN PROGRAM bar.
66578
-
66899
+ badExample: `PERFORM foo IN PROGRAM bar.
66900
+
66579
66901
  PERFORM foo(bar).`,
66580
66902
  tags: [_irule_1.RuleTag.SingleFile],
66581
66903
  };
@@ -66636,17 +66958,17 @@ class NoInlineInOptionalBranches extends _abap_rule_1.ABAPRule {
66636
66958
  key: "no_inline_in_optional_branches",
66637
66959
  title: "Don't declare inline in optional branches",
66638
66960
  shortDescription: `Don't declare inline in optional branches`,
66639
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
66640
-
66641
- Considered optional branches:
66642
- * inside IF/ELSEIF/ELSE
66643
- * inside LOOP
66644
- * inside WHILE
66645
- * inside CASE/WHEN, CASE TYPE OF
66646
- * inside DO
66647
- * inside SELECT loops
66648
-
66649
- Not considered optional branches:
66961
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-declare-inline-in-optional-branches
66962
+
66963
+ Considered optional branches:
66964
+ * inside IF/ELSEIF/ELSE
66965
+ * inside LOOP
66966
+ * inside WHILE
66967
+ * inside CASE/WHEN, CASE TYPE OF
66968
+ * inside DO
66969
+ * inside SELECT loops
66970
+
66971
+ Not considered optional branches:
66650
66972
  * TRY/CATCH/CLEANUP`,
66651
66973
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
66652
66974
  };
@@ -66746,12 +67068,12 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
66746
67068
  key: "no_prefixes",
66747
67069
  title: "No Prefixes",
66748
67070
  shortDescription: `Dont use hungarian notation`,
66749
- extendedInformation: `
66750
- Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
66751
- allowing all types to become voided, abaplint will then provide less precise syntax errors.
66752
-
66753
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
66754
-
67071
+ extendedInformation: `
67072
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
67073
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
67074
+
67075
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
67076
+
66755
67077
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
66756
67078
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66757
67079
  badExample: `DATA lv_foo TYPE i.`,
@@ -66930,7 +67252,7 @@ class NoPublicAttributes extends _abap_rule_1.ABAPRule {
66930
67252
  return {
66931
67253
  key: "no_public_attributes",
66932
67254
  title: "No public attributes",
66933
- shortDescription: `Checks that classes and interfaces don't contain any public attributes.
67255
+ shortDescription: `Checks that classes and interfaces don't contain any public attributes.
66934
67256
  Exceptions are excluded from this rule.`,
66935
67257
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,
66936
67258
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
@@ -67031,13 +67353,13 @@ class NoYodaConditions extends _abap_rule_1.ABAPRule {
67031
67353
  key: "no_yoda_conditions",
67032
67354
  title: "No Yoda conditions",
67033
67355
  shortDescription: `Finds Yoda conditions and reports issues`,
67034
- extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67035
-
67356
+ extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions
67357
+
67036
67358
  Conditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,
67037
67359
  tags: [_irule_1.RuleTag.SingleFile],
67038
- badExample: `IF 0 <> sy-subrc.
67360
+ badExample: `IF 0 <> sy-subrc.
67039
67361
  ENDIF.`,
67040
- goodExample: `IF sy-subrc <> 0.
67362
+ goodExample: `IF sy-subrc <> 0.
67041
67363
  ENDIF.`,
67042
67364
  };
67043
67365
  }
@@ -67138,8 +67460,8 @@ class NROBConsistency {
67138
67460
  key: "nrob_consistency",
67139
67461
  title: "Number range consistency",
67140
67462
  shortDescription: `Consistency checks for number ranges`,
67141
- extendedInformation: `Issue reported if percentage warning is over 50%
67142
-
67463
+ extendedInformation: `Issue reported if percentage warning is over 50%
67464
+
67143
67465
  Issue reported if the referenced domain is not found(taking error namespace into account)`,
67144
67466
  tags: [_irule_1.RuleTag.SingleFile],
67145
67467
  };
@@ -67416,58 +67738,58 @@ class ObsoleteStatement extends _abap_rule_1.ABAPRule {
67416
67738
  title: "Obsolete statements",
67417
67739
  shortDescription: `Checks for usages of certain obsolete statements`,
67418
67740
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67419
- extendedInformation: `
67420
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67421
-
67422
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67423
-
67424
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67425
-
67426
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67427
-
67428
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67429
-
67430
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67431
-
67432
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67433
-
67434
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67435
-
67436
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67437
-
67438
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67439
-
67440
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67441
-
67442
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67443
-
67444
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67445
-
67446
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67447
-
67448
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67449
- SELECT COUNT(*) is considered okay
67450
-
67451
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67452
-
67453
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67454
-
67455
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67456
-
67457
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
67458
-
67459
- OCCURENCES: check for OCCURENCES vs OCCURRENCES
67460
-
67741
+ extendedInformation: `
67742
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs
67743
+
67744
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
67745
+
67746
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
67747
+
67748
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
67749
+
67750
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
67751
+
67752
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
67753
+
67754
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67755
+
67756
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
67757
+
67758
+ COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
67759
+
67760
+ OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
67761
+
67762
+ PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
67763
+
67764
+ RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
67765
+
67766
+ PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
67767
+
67768
+ MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
67769
+
67770
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
67771
+ SELECT COUNT(*) is considered okay
67772
+
67773
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
67774
+
67775
+ SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
67776
+
67777
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
67778
+
67779
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
67780
+
67781
+ OCCURENCES: check for OCCURENCES vs OCCURRENCES
67782
+
67461
67783
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
67462
- badExample: `REFRESH itab.
67463
-
67464
- COMPUTE foo = 2 + 2.
67465
-
67466
- MULTIPLY lv_foo BY 2.
67467
-
67468
- INTERFACE intf LOAD.
67469
-
67470
- IF foo IS SUPPLIED.
67784
+ badExample: `REFRESH itab.
67785
+
67786
+ COMPUTE foo = 2 + 2.
67787
+
67788
+ MULTIPLY lv_foo BY 2.
67789
+
67790
+ INTERFACE intf LOAD.
67791
+
67792
+ IF foo IS SUPPLIED.
67471
67793
  ENDIF.`,
67472
67794
  };
67473
67795
  }
@@ -67807,9 +68129,9 @@ class OmitParameterName {
67807
68129
  key: "omit_parameter_name",
67808
68130
  title: "Omit parameter name",
67809
68131
  shortDescription: `Omit the parameter name in single parameter calls`,
67810
- extendedInformation: `
67811
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
67812
-
68132
+ extendedInformation: `
68133
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls
68134
+
67813
68135
  EXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,
67814
68136
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
67815
68137
  badExample: `method( param = 2 ).`,
@@ -68015,20 +68337,20 @@ class OmitReceiving extends _abap_rule_1.ABAPRule {
68015
68337
  shortDescription: `Omit RECEIVING`,
68016
68338
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,
68017
68339
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68018
- badExample: `
68019
- upload_pack(
68020
- EXPORTING
68021
- io_client = lo_client
68022
- iv_url = iv_url
68023
- iv_deepen_level = iv_deepen_level
68024
- it_hashes = lt_hashes
68025
- RECEIVING
68340
+ badExample: `
68341
+ upload_pack(
68342
+ EXPORTING
68343
+ io_client = lo_client
68344
+ iv_url = iv_url
68345
+ iv_deepen_level = iv_deepen_level
68346
+ it_hashes = lt_hashes
68347
+ RECEIVING
68026
68348
  rt_objects = et_objects ).`,
68027
- goodExample: `
68028
- et_objects = upload_pack(
68029
- io_client = lo_client
68030
- iv_url = iv_url
68031
- iv_deepen_level = iv_deepen_level
68349
+ goodExample: `
68350
+ et_objects = upload_pack(
68351
+ io_client = lo_client
68352
+ iv_url = iv_url
68353
+ iv_deepen_level = iv_deepen_level
68032
68354
  it_hashes = lt_hashes ).`,
68033
68355
  };
68034
68356
  }
@@ -68092,8 +68414,8 @@ class Parser702Chaining extends _abap_rule_1.ABAPRule {
68092
68414
  return {
68093
68415
  key: "parser_702_chaining",
68094
68416
  title: "Parser Error, bad chanining on 702",
68095
- shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68096
- this rule finds these and reports errors.
68417
+ shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,
68418
+ this rule finds these and reports errors.
68097
68419
  Only active on target version 702 and below.`,
68098
68420
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68099
68421
  };
@@ -68173,8 +68495,8 @@ class ParserError {
68173
68495
  return {
68174
68496
  key: "parser_error",
68175
68497
  title: "Parser error",
68176
- shortDescription: `Checks for syntax not recognized by abaplint.
68177
-
68498
+ shortDescription: `Checks for syntax not recognized by abaplint.
68499
+
68178
68500
  See recognized syntax at https://syntax.abaplint.org`,
68179
68501
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
68180
68502
  };
@@ -68259,7 +68581,7 @@ class ParserMissingSpace extends _abap_rule_1.ABAPRule {
68259
68581
  return {
68260
68582
  key: "parser_missing_space",
68261
68583
  title: "Parser Error, missing space",
68262
- shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68584
+ shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.
68263
68585
  This rule makes sure the spaces are consistently required across the language.`,
68264
68586
  tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
68265
68587
  badExample: `IF ( foo = 'bar').`,
@@ -68682,25 +69004,25 @@ class PreferInline {
68682
69004
  key: "prefer_inline",
68683
69005
  title: "Prefer Inline Declarations",
68684
69006
  shortDescription: `Prefer inline to up-front declarations.`,
68685
- extendedInformation: `EXPERIMENTAL
68686
-
68687
- Activates if language version is v740sp02 or above.
68688
-
68689
- Variables must be local(METHOD or FORM).
68690
-
68691
- No generic or void typed variables. No syntax errors.
68692
-
68693
- First position used must be a full/pure write.
68694
-
68695
- Move statment is not a cast(?=)
68696
-
69007
+ extendedInformation: `EXPERIMENTAL
69008
+
69009
+ Activates if language version is v740sp02 or above.
69010
+
69011
+ Variables must be local(METHOD or FORM).
69012
+
69013
+ No generic or void typed variables. No syntax errors.
69014
+
69015
+ First position used must be a full/pure write.
69016
+
69017
+ Move statment is not a cast(?=)
69018
+
68697
69019
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,
68698
69020
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],
68699
- badExample: `DATA foo TYPE i.
68700
- foo = 2.
68701
- DATA percentage TYPE decfloat34.
69021
+ badExample: `DATA foo TYPE i.
69022
+ foo = 2.
69023
+ DATA percentage TYPE decfloat34.
68702
69024
  percentage = ( comment_number / abs_statement_number ) * 100.`,
68703
- goodExample: `DATA(foo) = 2.
69025
+ goodExample: `DATA(foo) = 2.
68704
69026
  DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,
68705
69027
  };
68706
69028
  }
@@ -68914,18 +69236,18 @@ class PreferIsNot extends _abap_rule_1.ABAPRule {
68914
69236
  key: "prefer_is_not",
68915
69237
  title: "Prefer IS NOT to NOT IS",
68916
69238
  shortDescription: `Prefer IS NOT to NOT IS`,
68917
- extendedInformation: `
68918
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
68919
-
69239
+ extendedInformation: `
69240
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is
69241
+
68920
69242
  "if not is_valid( )." examples are skipped`,
68921
69243
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
68922
- goodExample: `IF variable IS NOT INITIAL.
68923
- IF variable NP 'TODO*'.
68924
- IF variable <> 42.
69244
+ goodExample: `IF variable IS NOT INITIAL.
69245
+ IF variable NP 'TODO*'.
69246
+ IF variable <> 42.
68925
69247
  IF variable CO 'hello'.`,
68926
- badExample: `IF NOT variable IS INITIAL.
68927
- IF NOT variable CP 'TODO*'.
68928
- IF NOT variable = 42.
69248
+ badExample: `IF NOT variable IS INITIAL.
69249
+ IF NOT variable CP 'TODO*'.
69250
+ IF NOT variable = 42.
68929
69251
  IF NOT variable CA 'hello'.`,
68930
69252
  };
68931
69253
  }
@@ -69113,14 +69435,14 @@ class PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {
69113
69435
  key: "prefer_raise_exception_new",
69114
69436
  title: "Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE",
69115
69437
  shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,
69116
- extendedInformation: `
69117
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69118
-
69438
+ extendedInformation: `
69439
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type
69440
+
69119
69441
  From 752 and up`,
69120
69442
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Upport],
69121
69443
  goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,
69122
- badExample: `RAISE EXCEPTION TYPE cx_generation_error
69123
- EXPORTING
69444
+ badExample: `RAISE EXCEPTION TYPE cx_generation_error
69445
+ EXPORTING
69124
69446
  previous = exception.`,
69125
69447
  };
69126
69448
  }
@@ -69198,12 +69520,12 @@ class PreferReturningToExporting extends _abap_rule_1.ABAPRule {
69198
69520
  key: "prefer_returning_to_exporting",
69199
69521
  title: "Prefer RETURNING to EXPORTING",
69200
69522
  shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,
69201
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69523
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting
69202
69524
  https://docs.abapopenchecks.org/checks/44/`,
69203
69525
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
69204
- badExample: `CLASS lcl DEFINITION.
69205
- PUBLIC SECTION.
69206
- METHODS test EXPORTING ev_foo TYPE i.
69526
+ badExample: `CLASS lcl DEFINITION.
69527
+ PUBLIC SECTION.
69528
+ METHODS test EXPORTING ev_foo TYPE i.
69207
69529
  ENDCLASS.`,
69208
69530
  };
69209
69531
  }
@@ -69299,8 +69621,8 @@ class PreferXsdbool extends _abap_rule_1.ABAPRule {
69299
69621
  key: "prefer_xsdbool",
69300
69622
  title: "Prefer xsdbool over boolc",
69301
69623
  shortDescription: `Prefer xsdbool over boolc`,
69302
- extendedInformation: `Activates if language version is v740sp08 or above.
69303
-
69624
+ extendedInformation: `Activates if language version is v740sp08 or above.
69625
+
69304
69626
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
69305
69627
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
69306
69628
  badExample: `DATA(sdf) = boolc( 1 = 2 ).`,
@@ -69372,9 +69694,9 @@ class PreferredCompareOperator extends _abap_rule_1.ABAPRule {
69372
69694
  title: "Preferred compare operator",
69373
69695
  shortDescription: `Configure undesired operator variants`,
69374
69696
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
69375
- badExample: `IF foo EQ bar.
69697
+ badExample: `IF foo EQ bar.
69376
69698
  ENDIF.`,
69377
- goodExample: `IF foo = bar.
69699
+ goodExample: `IF foo = bar.
69378
69700
  ENDIF.`,
69379
69701
  };
69380
69702
  }
@@ -69598,26 +69920,26 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
69598
69920
  key: "reduce_procedural_code",
69599
69921
  title: "Reduce procedural code",
69600
69922
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
69601
- extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
69602
-
69603
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
69604
-
69923
+ extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
69924
+
69925
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
69926
+
69605
69927
  Comments are not counted as statements.`,
69606
69928
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
69607
- badExample: `FORM foo.
69608
- DATA lv_bar TYPE i.
69609
- lv_bar = 2 + 2.
69610
- IF lv_bar = 4.
69611
- WRITE 'hello world'.
69612
- ENDIF.
69613
- DATA lv_bar TYPE i.
69614
- lv_bar = 2 + 2.
69615
- IF lv_bar = 4.
69616
- WRITE 'hello world'.
69617
- ENDIF.
69929
+ badExample: `FORM foo.
69930
+ DATA lv_bar TYPE i.
69931
+ lv_bar = 2 + 2.
69932
+ IF lv_bar = 4.
69933
+ WRITE 'hello world'.
69934
+ ENDIF.
69935
+ DATA lv_bar TYPE i.
69936
+ lv_bar = 2 + 2.
69937
+ IF lv_bar = 4.
69938
+ WRITE 'hello world'.
69939
+ ENDIF.
69618
69940
  ENDFORM.`,
69619
- goodExample: `FORM foo.
69620
- NEW zcl_global_class( )->run_logic( ).
69941
+ goodExample: `FORM foo.
69942
+ NEW zcl_global_class( )->run_logic( ).
69621
69943
  ENDFORM.`,
69622
69944
  };
69623
69945
  }
@@ -69861,10 +70183,10 @@ class RemoveDescriptions {
69861
70183
  return {
69862
70184
  key: "remove_descriptions",
69863
70185
  title: "Remove descriptions",
69864
- shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
69865
-
69866
- Class descriptions are required, see rule description_empty.
69867
-
70186
+ shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.
70187
+
70188
+ Class descriptions are required, see rule description_empty.
70189
+
69868
70190
  Consider using ABAP Doc for documentation.`,
69869
70191
  tags: [],
69870
70192
  };
@@ -69989,14 +70311,14 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
69989
70311
  tags: [_irule_1.RuleTag.SingleFile],
69990
70312
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
69991
70313
  extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
69992
- badExample: `CALL FUNCTION 'ZRFC'
70314
+ badExample: `CALL FUNCTION 'ZRFC'
69993
70315
  DESTINATION lv_rfc.`,
69994
- goodExample: `CALL FUNCTION 'ZRFC'
69995
- DESTINATION lv_rfc
69996
- EXCEPTIONS
69997
- system_failure = 1 MESSAGE msg
69998
- communication_failure = 2 MESSAGE msg
69999
- resource_failure = 3
70316
+ goodExample: `CALL FUNCTION 'ZRFC'
70317
+ DESTINATION lv_rfc
70318
+ EXCEPTIONS
70319
+ system_failure = 1 MESSAGE msg
70320
+ communication_failure = 2 MESSAGE msg
70321
+ resource_failure = 3
70000
70322
  OTHERS = 4.`,
70001
70323
  };
70002
70324
  }
@@ -70080,11 +70402,11 @@ class SelectAddOrderBy {
70080
70402
  key: "select_add_order_by",
70081
70403
  title: "SELECT add ORDER BY",
70082
70404
  shortDescription: `SELECTs add ORDER BY clause`,
70083
- extendedInformation: `
70084
- This will make sure that the SELECT statement returns results in the same sequence on different databases
70085
-
70086
- add ORDER BY PRIMARY KEY if in doubt
70087
-
70405
+ extendedInformation: `
70406
+ This will make sure that the SELECT statement returns results in the same sequence on different databases
70407
+
70408
+ add ORDER BY PRIMARY KEY if in doubt
70409
+
70088
70410
  If the target is a sorted/hashed table, no issue is reported`,
70089
70411
  tags: [_irule_1.RuleTag.SingleFile],
70090
70412
  badExample: `SELECT * FROM db INTO TABLE @DATA(tab).`,
@@ -70215,14 +70537,14 @@ class SelectPerformance {
70215
70537
  key: "select_performance",
70216
70538
  title: "SELECT performance",
70217
70539
  shortDescription: `Various checks regarding SELECT performance.`,
70218
- extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70219
-
70540
+ extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE
70541
+
70220
70542
  SELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,
70221
70543
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],
70222
- badExample: `SELECT field1, field2 FROM table
70223
- INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70544
+ badExample: `SELECT field1, field2 FROM table
70545
+ INTO @DATA(structure) UP TO 1 ROWS ORDER BY field3 DESCENDING.
70224
70546
  ENDSELECT.`,
70225
- goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70547
+ goodExample: `SELECT field1, field2 FROM table UP TO 1 ROWS
70226
70548
  INTO TABLE @DATA(table) ORDER BY field3 DESCENDING`,
70227
70549
  };
70228
70550
  }
@@ -70336,8 +70658,8 @@ class SelectSingleFullKey {
70336
70658
  key: "select_single_full_key",
70337
70659
  title: "Detect SELECT SINGLE which are possibily not unique",
70338
70660
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
70339
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70340
-
70661
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
70662
+
70341
70663
  If the statement contains a JOIN it is not checked`,
70342
70664
  pseudoComment: "EC CI_NOORDER",
70343
70665
  tags: [_irule_1.RuleTag.Quickfix],
@@ -70765,8 +71087,8 @@ class SICFConsistency {
70765
71087
  key: "sicf_consistency",
70766
71088
  title: "SICF consistency",
70767
71089
  shortDescription: `Checks the validity of ICF services`,
70768
- extendedInformation: `* Class defined in handler must exist
70769
- * Class must not have any syntax errors
71090
+ extendedInformation: `* Class defined in handler must exist
71091
+ * Class must not have any syntax errors
70770
71092
  * Class must implement interface IF_HTTP_EXTENSION`,
70771
71093
  };
70772
71094
  }
@@ -70878,23 +71200,23 @@ class SlowParameterPassing {
70878
71200
  shortDescription: `Detects slow pass by value passing for methods where parameter is not changed`,
70879
71201
  extendedInformation: `Method parameters defined in interfaces is not checked`,
70880
71202
  tags: [_irule_1.RuleTag.Performance],
70881
- badExample: `CLASS lcl DEFINITION.
70882
- PUBLIC SECTION.
70883
- METHODS bar IMPORTING VALUE(sdf) TYPE string.
70884
- ENDCLASS.
70885
- CLASS lcl IMPLEMENTATION.
70886
- METHOD bar.
70887
- WRITE sdf.
70888
- ENDMETHOD.
71203
+ badExample: `CLASS lcl DEFINITION.
71204
+ PUBLIC SECTION.
71205
+ METHODS bar IMPORTING VALUE(sdf) TYPE string.
71206
+ ENDCLASS.
71207
+ CLASS lcl IMPLEMENTATION.
71208
+ METHOD bar.
71209
+ WRITE sdf.
71210
+ ENDMETHOD.
70889
71211
  ENDCLASS.`,
70890
- goodExample: `CLASS lcl DEFINITION.
70891
- PUBLIC SECTION.
70892
- METHODS bar IMPORTING sdf TYPE string.
70893
- ENDCLASS.
70894
- CLASS lcl IMPLEMENTATION.
70895
- METHOD bar.
70896
- WRITE sdf.
70897
- ENDMETHOD.
71212
+ goodExample: `CLASS lcl DEFINITION.
71213
+ PUBLIC SECTION.
71214
+ METHODS bar IMPORTING sdf TYPE string.
71215
+ ENDCLASS.
71216
+ CLASS lcl IMPLEMENTATION.
71217
+ METHOD bar.
71218
+ WRITE sdf.
71219
+ ENDMETHOD.
70898
71220
  ENDCLASS.`,
70899
71221
  };
70900
71222
  }
@@ -71165,8 +71487,8 @@ class SpaceBeforeDot extends _abap_rule_1.ABAPRule {
71165
71487
  key: "space_before_dot",
71166
71488
  title: "Space before dot",
71167
71489
  shortDescription: `Checks for extra spaces before dots at the ends of statements`,
71168
- extendedInformation: `
71169
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71490
+ extendedInformation: `
71491
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent
71170
71492
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,
71171
71493
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71172
71494
  badExample: `WRITE bar .`,
@@ -71352,12 +71674,12 @@ class SQLValueConversion {
71352
71674
  key: "sql_value_conversion",
71353
71675
  title: "Implicit SQL Value Conversion",
71354
71676
  shortDescription: `Ensure types match when selecting from database`,
71355
- extendedInformation: `
71356
- * Integer to CHAR conversion
71357
- * Integer to NUMC conversion
71358
- * NUMC to Integer conversion
71359
- * CHAR to Integer conversion
71360
- * Source field longer than database field, CHAR -> CHAR
71677
+ extendedInformation: `
71678
+ * Integer to CHAR conversion
71679
+ * Integer to NUMC conversion
71680
+ * NUMC to Integer conversion
71681
+ * CHAR to Integer conversion
71682
+ * Source field longer than database field, CHAR -> CHAR
71361
71683
  * Source field longer than database field, NUMC -> NUMC`,
71362
71684
  tags: [],
71363
71685
  };
@@ -71429,7 +71751,7 @@ class StartAtTab extends _abap_rule_1.ABAPRule {
71429
71751
  key: "start_at_tab",
71430
71752
  title: "Start at tab",
71431
71753
  shortDescription: `Checks that statements start at tabstops.`,
71432
- extendedInformation: `Reports max 100 issues per file
71754
+ extendedInformation: `Reports max 100 issues per file
71433
71755
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,
71434
71756
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
71435
71757
  badExample: ` WRITE a.`,
@@ -71606,12 +71928,12 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
71606
71928
  key: "strict_sql",
71607
71929
  title: "Strict SQL",
71608
71930
  shortDescription: `Strict SQL`,
71609
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
71610
-
71611
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
71612
-
71613
- Also see separate rule sql_escape_host_variables
71614
-
71931
+ extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
71932
+
71933
+ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
71934
+
71935
+ Also see separate rule sql_escape_host_variables
71936
+
71615
71937
  Activates from v750 and up`,
71616
71938
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix],
71617
71939
  badExample: `SELECT * FROM ztabl INTO TABLE @rt_content WHERE type = @iv_type ORDER BY PRIMARY KEY.`,
@@ -71865,11 +72187,11 @@ class SyModification extends _abap_rule_1.ABAPRule {
71865
72187
  key: "sy_modification",
71866
72188
  title: "Modification of SY fields",
71867
72189
  shortDescription: `Finds modification of sy fields`,
71868
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
71869
-
72190
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
72191
+
71870
72192
  Changes to SY-TVAR* fields are not reported`,
71871
72193
  tags: [_irule_1.RuleTag.SingleFile],
71872
- badExample: `sy-uname = 2.
72194
+ badExample: `sy-uname = 2.
71873
72195
  sy = sy.`,
71874
72196
  };
71875
72197
  }
@@ -71931,8 +72253,8 @@ class TABLEnhancementCategory {
71931
72253
  key: "tabl_enhancement_category",
71932
72254
  title: "TABL enhancement category must be set",
71933
72255
  shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,
71934
- extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
71935
-
72256
+ extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.
72257
+
71936
72258
  You may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,
71937
72259
  tags: [],
71938
72260
  };
@@ -71997,8 +72319,8 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
71997
72319
  shortDescription: `TABLES are always global, so declare them globally`,
71998
72320
  extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
71999
72321
  tags: [_irule_1.RuleTag.SingleFile],
72000
- badExample: `FORM foo.
72001
- TABLES t100.
72322
+ badExample: `FORM foo.
72323
+ TABLES t100.
72002
72324
  ENDFORM.`,
72003
72325
  goodExample: `TABLES t000.`,
72004
72326
  };
@@ -72126,9 +72448,9 @@ class TypeFormParameters extends _abap_rule_1.ABAPRule {
72126
72448
  title: "Type FORM parameters",
72127
72449
  shortDescription: `Checks for untyped FORM parameters`,
72128
72450
  tags: [_irule_1.RuleTag.SingleFile],
72129
- badExample: `FORM foo USING bar.
72451
+ badExample: `FORM foo USING bar.
72130
72452
  ENDFORM.`,
72131
- goodExample: `FORM foo USING bar TYPE string.
72453
+ goodExample: `FORM foo USING bar TYPE string.
72132
72454
  ENDFORM.`,
72133
72455
  };
72134
72456
  }
@@ -72801,38 +73123,38 @@ class UnnecessaryPragma extends _abap_rule_1.ABAPRule {
72801
73123
  key: "unnecessary_pragma",
72802
73124
  title: "Unnecessary Pragma",
72803
73125
  shortDescription: `Finds pragmas which can be removed`,
72804
- extendedInformation: `* NO_HANDLER with handler
72805
-
72806
- * NEEDED without definition
72807
-
72808
- * NO_TEXT without texts
72809
-
72810
- * SUBRC_OK where sy-subrc is checked
72811
-
73126
+ extendedInformation: `* NO_HANDLER with handler
73127
+
73128
+ * NEEDED without definition
73129
+
73130
+ * NO_TEXT without texts
73131
+
73132
+ * SUBRC_OK where sy-subrc is checked
73133
+
72812
73134
  NO_HANDLER inside macros are not checked`,
72813
73135
  tags: [_irule_1.RuleTag.SingleFile],
72814
- badExample: `TRY.
72815
- ...
72816
- CATCH zcx_abapgit_exception ##NO_HANDLER.
72817
- RETURN. " it has a handler
72818
- ENDTRY.
72819
- MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
72820
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
72821
- IF sy-subrc <> 0.
73136
+ badExample: `TRY.
73137
+ ...
73138
+ CATCH zcx_abapgit_exception ##NO_HANDLER.
73139
+ RETURN. " it has a handler
73140
+ ENDTRY.
73141
+ MESSAGE w125(zbar) WITH c_foo INTO message ##NEEDED ##NO_TEXT.
73142
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs) ##SUBRC_OK.
73143
+ IF sy-subrc <> 0.
72822
73144
  ENDIF.`,
72823
- goodExample: `TRY.
72824
- ...
72825
- CATCH zcx_abapgit_exception.
72826
- RETURN.
72827
- ENDTRY.
72828
- MESSAGE w125(zbar) WITH c_foo INTO message.
72829
- SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
72830
- IF sy-subrc <> 0.
72831
- ENDIF.
72832
-
72833
- DATA: BEGIN OF blah ##NEEDED,
72834
- test1 TYPE string,
72835
- test2 TYPE string,
73145
+ goodExample: `TRY.
73146
+ ...
73147
+ CATCH zcx_abapgit_exception.
73148
+ RETURN.
73149
+ ENDTRY.
73150
+ MESSAGE w125(zbar) WITH c_foo INTO message.
73151
+ SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
73152
+ IF sy-subrc <> 0.
73153
+ ENDIF.
73154
+
73155
+ DATA: BEGIN OF blah ##NEEDED,
73156
+ test1 TYPE string,
73157
+ test2 TYPE string,
72836
73158
  END OF blah.`,
72837
73159
  };
72838
73160
  }
@@ -72999,18 +73321,18 @@ class UnnecessaryReturn extends _abap_rule_1.ABAPRule {
72999
73321
  shortDescription: `Finds unnecessary RETURN statements`,
73000
73322
  extendedInformation: `Finds unnecessary RETURN statements`,
73001
73323
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
73002
- badExample: `FORM hello1.
73003
- WRITE 'world'.
73004
- RETURN.
73005
- ENDFORM.
73006
-
73007
- FORM foo.
73008
- IF 1 = 2.
73009
- RETURN.
73010
- ENDIF.
73324
+ badExample: `FORM hello1.
73325
+ WRITE 'world'.
73326
+ RETURN.
73327
+ ENDFORM.
73328
+
73329
+ FORM foo.
73330
+ IF 1 = 2.
73331
+ RETURN.
73332
+ ENDIF.
73011
73333
  ENDFORM.`,
73012
- goodExample: `FORM hello2.
73013
- WRITE 'world'.
73334
+ goodExample: `FORM hello2.
73335
+ WRITE 'world'.
73014
73336
  ENDFORM.`,
73015
73337
  };
73016
73338
  }
@@ -73361,13 +73683,13 @@ class UnusedMacros {
73361
73683
  title: "Unused macros",
73362
73684
  shortDescription: `Checks for unused macro definitions definitions`,
73363
73685
  tags: [_irule_1.RuleTag.Quickfix],
73364
- badExample: `DEFINE foobar1.
73365
- WRITE 'hello'.
73686
+ badExample: `DEFINE foobar1.
73687
+ WRITE 'hello'.
73366
73688
  END-OF-DEFINITION.`,
73367
- goodExample: `DEFINE foobar2.
73368
- WRITE 'hello'.
73369
- END-OF-DEFINITION.
73370
-
73689
+ goodExample: `DEFINE foobar2.
73690
+ WRITE 'hello'.
73691
+ END-OF-DEFINITION.
73692
+
73371
73693
  foobar2.`,
73372
73694
  };
73373
73695
  }
@@ -73479,18 +73801,18 @@ class UnusedMethods {
73479
73801
  key: "unused_methods",
73480
73802
  title: "Unused methods",
73481
73803
  shortDescription: `Checks for unused methods`,
73482
- extendedInformation: `Checks private and protected methods.
73483
-
73484
- Unused methods are not reported if the object contains parser or syntax errors.
73485
- Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
73486
-
73487
- Skips:
73488
- * methods FOR TESTING
73489
- * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
73490
- * class_constructor + constructor methods
73491
- * event handlers
73492
- * methods that are redefined
73493
- * INCLUDEs
73804
+ extendedInformation: `Checks private and protected methods.
73805
+
73806
+ Unused methods are not reported if the object contains parser or syntax errors.
73807
+ Quick fixes only appears for private methods or projected methods where the class doesnt have any subclasses.
73808
+
73809
+ Skips:
73810
+ * methods FOR TESTING
73811
+ * methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses
73812
+ * class_constructor + constructor methods
73813
+ * event handlers
73814
+ * methods that are redefined
73815
+ * INCLUDEs
73494
73816
  `,
73495
73817
  tags: [_irule_1.RuleTag.Quickfix],
73496
73818
  pragma: "##CALLED",
@@ -73966,23 +74288,23 @@ class UnusedVariables {
73966
74288
  key: "unused_variables",
73967
74289
  title: "Unused variables",
73968
74290
  shortDescription: `Checks for unused variables and constants`,
73969
- extendedInformation: `Skips event parameters.
73970
-
73971
- Note that this currently does not work if the source code uses macros.
73972
-
73973
- Unused variables are not reported if the object contains parser or syntax errors.
73974
-
74291
+ extendedInformation: `Skips event parameters.
74292
+
74293
+ Note that this currently does not work if the source code uses macros.
74294
+
74295
+ Unused variables are not reported if the object contains parser or syntax errors.
74296
+
73975
74297
  Errors found in INCLUDES are reported for the main program.`,
73976
74298
  tags: [_irule_1.RuleTag.Quickfix],
73977
74299
  pragma: "##NEEDED",
73978
74300
  pseudoComment: "EC NEEDED",
73979
- badExample: `DATA: BEGIN OF blah1,
73980
- test TYPE string,
73981
- test2 TYPE string,
74301
+ badExample: `DATA: BEGIN OF blah1,
74302
+ test TYPE string,
74303
+ test2 TYPE string,
73982
74304
  END OF blah1.`,
73983
- goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
73984
- test TYPE string,
73985
- test2 TYPE string,
74305
+ goodExample: `DATA: BEGIN OF blah2 ##NEEDED,
74306
+ test TYPE string,
74307
+ test2 TYPE string,
73986
74308
  END OF blah2.`,
73987
74309
  };
73988
74310
  }
@@ -74201,15 +74523,15 @@ class UseBoolExpression extends _abap_rule_1.ABAPRule {
74201
74523
  shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,
74202
74524
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,
74203
74525
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
74204
- badExample: `IF line IS INITIAL.
74205
- has_entries = abap_false.
74206
- ELSE.
74207
- has_entries = abap_true.
74208
- ENDIF.
74209
-
74526
+ badExample: `IF line IS INITIAL.
74527
+ has_entries = abap_false.
74528
+ ELSE.
74529
+ has_entries = abap_true.
74530
+ ENDIF.
74531
+
74210
74532
  DATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,
74211
- goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74212
-
74533
+ goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).
74534
+
74213
74535
  DATA(fsdf) = xsdbool( foo <> bar ).`,
74214
74536
  };
74215
74537
  }
@@ -74327,15 +74649,15 @@ class UseClassBasedExceptions extends _abap_rule_1.ABAPRule {
74327
74649
  shortDescription: `Use class based exceptions, checks interface and class definitions`,
74328
74650
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-class-based-exceptions`,
74329
74651
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74330
- badExample: `INTERFACE lif.
74331
- METHODS load_data
74332
- EXCEPTIONS
74333
- invalid_parameter.
74652
+ badExample: `INTERFACE lif.
74653
+ METHODS load_data
74654
+ EXCEPTIONS
74655
+ invalid_parameter.
74334
74656
  ENDINTERFACE.`,
74335
- goodExample: `INTERFACE lif.
74336
- METHODS load_data
74337
- RAISING
74338
- cx_something.
74657
+ goodExample: `INTERFACE lif.
74658
+ METHODS load_data
74659
+ RAISING
74660
+ cx_something.
74339
74661
  ENDINTERFACE.`,
74340
74662
  };
74341
74663
  }
@@ -74395,15 +74717,15 @@ class UseLineExists extends _abap_rule_1.ABAPRule {
74395
74717
  key: "use_line_exists",
74396
74718
  title: "Use line_exists",
74397
74719
  shortDescription: `Use line_exists, from 740sp02 and up`,
74398
- extendedInformation: `
74399
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74400
-
74720
+ extendedInformation: `
74721
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at
74722
+
74401
74723
  Not reported if the READ TABLE statement contains BINARY SEARCH.`,
74402
74724
  tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
74403
- badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74404
- IF sy-subrc = 0.
74725
+ badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.
74726
+ IF sy-subrc = 0.
74405
74727
  ENDIF.`,
74406
- goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74728
+ goodExample: `IF line_exists( my_table[ key = 'A' ] ).
74407
74729
  ENDIF.`,
74408
74730
  };
74409
74731
  }
@@ -74513,10 +74835,10 @@ class UseNew extends _abap_rule_1.ABAPRule {
74513
74835
  key: "use_new",
74514
74836
  title: "Use NEW",
74515
74837
  shortDescription: `Checks for deprecated CREATE OBJECT statements.`,
74516
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
74517
-
74518
- If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
74519
-
74838
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object
74839
+
74840
+ If the target variable is referenced in the CREATE OBJECT statement, no errors are issued
74841
+
74520
74842
  Applicable from v740sp02 and up`,
74521
74843
  badExample: `CREATE OBJECT ref.`,
74522
74844
  goodExample: `ref = NEW #( ).`,
@@ -74614,13 +74936,13 @@ class WhenOthersLast extends _abap_rule_1.ABAPRule {
74614
74936
  title: "WHEN OTHERS last",
74615
74937
  shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,
74616
74938
  tags: [_irule_1.RuleTag.SingleFile],
74617
- badExample: `CASE bar.
74618
- WHEN OTHERS.
74619
- WHEN 2.
74939
+ badExample: `CASE bar.
74940
+ WHEN OTHERS.
74941
+ WHEN 2.
74620
74942
  ENDCASE.`,
74621
- goodExample: `CASE bar.
74622
- WHEN 2.
74623
- WHEN OTHERS.
74943
+ goodExample: `CASE bar.
74944
+ WHEN 2.
74945
+ WHEN OTHERS.
74624
74946
  ENDCASE.`,
74625
74947
  };
74626
74948
  }
@@ -77361,6 +77683,7 @@ class FieldSymbolTranspiler {
77361
77683
  let name = node.concatTokens();
77362
77684
  name = name.replace("<", "fs_");
77363
77685
  name = name.replace(">", "_");
77686
+ name = name.replace("[]", "");
77364
77687
  return new chunk_1.Chunk().append(name, node, traversal);
77365
77688
  }
77366
77689
  }
@@ -79401,11 +79724,11 @@ class HandleDataElement {
79401
79724
  fixedValues = doma.getFixedValues();
79402
79725
  }
79403
79726
  }
79404
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79405
- "objectType": "DTEL",
79406
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79407
- "domain": ${JSON.stringify(obj.getDomainName())},
79408
- "fixedValues": ${JSON.stringify(fixedValues)},
79727
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79728
+ "objectType": "DTEL",
79729
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79730
+ "domain": ${JSON.stringify(obj.getDomainName())},
79731
+ "fixedValues": ${JSON.stringify(fixedValues)},
79409
79732
  };`);
79410
79733
  const output = {
79411
79734
  object: {
@@ -79443,20 +79766,20 @@ class HandleEnqu {
79443
79766
  if (filename === undefined) {
79444
79767
  return [];
79445
79768
  }
79446
- const chunk = new chunk_1.Chunk().appendString(`// enqueue object
79447
- abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79448
- const lookup = abap.Classes["KERNEL_LOCK"];
79449
- if (lookup === undefined) {
79450
- throw new Error("Lock, kernel class missing");
79451
- }
79452
- await lookup.enqueue(INPUT);
79453
- };
79454
- abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79455
- const lookup = abap.Classes["KERNEL_LOCK"];
79456
- if (lookup === undefined) {
79457
- throw new Error("Lock, kernel class missing");
79458
- }
79459
- await lookup.dequeue(INPUT);
79769
+ const chunk = new chunk_1.Chunk().appendString(`// enqueue object
79770
+ abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79771
+ const lookup = abap.Classes["KERNEL_LOCK"];
79772
+ if (lookup === undefined) {
79773
+ throw new Error("Lock, kernel class missing");
79774
+ }
79775
+ await lookup.enqueue(INPUT);
79776
+ };
79777
+ abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79778
+ const lookup = abap.Classes["KERNEL_LOCK"];
79779
+ if (lookup === undefined) {
79780
+ throw new Error("Lock, kernel class missing");
79781
+ }
79782
+ await lookup.dequeue(INPUT);
79460
79783
  };`);
79461
79784
  const output = {
79462
79785
  object: {
@@ -79624,11 +79947,11 @@ class HandleSMIM {
79624
79947
  }
79625
79948
  obj.parse();
79626
79949
  const dataFile = obj.getDataFile();
79627
- const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
79628
- "objectType": "SMIM",
79629
- "filename": ${JSON.stringify(dataFile?.getFilename())},
79630
- "url": ${JSON.stringify(obj.getURL())},
79631
- "class": ${JSON.stringify(obj.getClass())},
79950
+ const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
79951
+ "objectType": "SMIM",
79952
+ "filename": ${JSON.stringify(dataFile?.getFilename())},
79953
+ "url": ${JSON.stringify(obj.getURL())},
79954
+ "class": ${JSON.stringify(obj.getClass())},
79632
79955
  };`);
79633
79956
  const output = {
79634
79957
  object: {
@@ -79682,10 +80005,10 @@ class HandleTable {
79682
80005
  return [];
79683
80006
  }
79684
80007
  const type = obj.parseType(reg);
79685
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79686
- "objectType": "TABL",
79687
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79688
- "keyFields": ${JSON.stringify(obj.listKeys(reg))},
80008
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
80009
+ "objectType": "TABL",
80010
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
80011
+ "keyFields": ${JSON.stringify(obj.listKeys(reg))},
79689
80012
  };`);
79690
80013
  const output = {
79691
80014
  object: {
@@ -79724,9 +80047,9 @@ class HandleTableType {
79724
80047
  return [];
79725
80048
  }
79726
80049
  const type = obj.parseType(reg);
79727
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79728
- "objectType": "TTYP",
79729
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
80050
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
80051
+ "objectType": "TTYP",
80052
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79730
80053
  };`);
79731
80054
  const output = {
79732
80055
  object: {
@@ -79814,9 +80137,9 @@ class HandleView {
79814
80137
  return [];
79815
80138
  }
79816
80139
  const type = obj.parseType(reg);
79817
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79818
- "objectType": "VIEW",
79819
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
80140
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
80141
+ "objectType": "VIEW",
80142
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79820
80143
  };`);
79821
80144
  // todo, "keyFields": ${JSON.stringify(obj.listKeys())},
79822
80145
  const output = {
@@ -79856,9 +80179,9 @@ class HandleW3MI {
79856
80179
  }
79857
80180
  obj.parse();
79858
80181
  const dataFile = obj.getDataFile();
79859
- const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
79860
- "objectType": "W3MI",
79861
- "filename": ${JSON.stringify(dataFile?.getFilename())},
80182
+ const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
80183
+ "objectType": "W3MI",
80184
+ "filename": ${JSON.stringify(dataFile?.getFilename())},
79862
80185
  };`);
79863
80186
  const output = {
79864
80187
  object: {
@@ -80490,26 +80813,26 @@ class AssignTranspiler {
80490
80813
  const firstFirst = first.getChildren()[1];
80491
80814
  if (firstFirst?.get() instanceof abaplint.Expressions.Constant) {
80492
80815
  const s = firstFirst.getFirstToken().getStr().toLowerCase().match(/\w+/)?.toString();
80493
- options.push(`dynamicSource: (() => {
80494
- try { return ${s}; } catch {}
80495
- try { return this.${s}; } catch {}
80816
+ options.push(`dynamicSource: (() => {
80817
+ try { return ${s}; } catch {}
80818
+ try { return this.${s}; } catch {}
80496
80819
  })()`);
80497
80820
  }
80498
80821
  else if (firstFirst?.get() instanceof abaplint.Expressions.FieldChain && firstFirst instanceof abaplint.Nodes.ExpressionNode) {
80499
80822
  const code = new expressions_1.FieldChainTranspiler(true).transpile(firstFirst, traversal).getCode();
80500
- options.push(`dynamicSource: (() => {
80501
- const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
80502
- try { return eval(name); } catch {}
80503
- try { return eval("this." + name); } catch {}
80823
+ options.push(`dynamicSource: (() => {
80824
+ const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
80825
+ try { return eval(name); } catch {}
80826
+ try { return eval("this." + name); } catch {}
80504
80827
  })()`);
80505
80828
  }
80506
80829
  }
80507
80830
  else if (first?.get() instanceof abaplint.Expressions.Source && first instanceof abaplint.Nodes.ExpressionNode) {
80508
80831
  // const name = first.concatTokens().toLowerCase();
80509
80832
  const name = new expressions_1.SourceTranspiler().transpile(first, traversal).getCode();
80510
- options.push(`dynamicSource: (() => {
80511
- try { return ${name}; } catch {}
80512
- try { return this.${name}; } catch {}
80833
+ options.push(`dynamicSource: (() => {
80834
+ try { return ${name}; } catch {}
80835
+ try { return this.${name}; } catch {}
80513
80836
  })()`);
80514
80837
  }
80515
80838
  }
@@ -80717,9 +81040,9 @@ class CallTranspiler {
80717
81040
  let pre = "";
80718
81041
  let post = "";
80719
81042
  pre = "try {\n" + pre;
80720
- post += `\nabap.builtin.sy.get().subrc.set(0);
80721
- } catch (e) {
80722
- if (e.classic) {
81043
+ post += `\nabap.builtin.sy.get().subrc.set(0);
81044
+ } catch (e) {
81045
+ if (e.classic) {
80723
81046
  switch (e.classic.toUpperCase()) {\n`;
80724
81047
  for (const e of node.findAllExpressions(abaplint.Expressions.ParameterException)) {
80725
81048
  const name = e.getFirstToken().getStr().toUpperCase();
@@ -80735,10 +81058,10 @@ if (e.classic) {
80735
81058
  post += `case "${name}": abap.builtin.sy.get().subrc.set(${value}); break;\n`;
80736
81059
  }
80737
81060
  }
80738
- post += ` }
80739
- } else {
80740
- throw e;
80741
- }
81061
+ post += ` }
81062
+ } else {
81063
+ throw e;
81064
+ }
80742
81065
  }`;
80743
81066
  return { pre, post };
80744
81067
  }
@@ -81073,11 +81396,11 @@ class ClassImplementationTranspiler {
81073
81396
  ret += " extends " + traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase());
81074
81397
  }
81075
81398
  const scope = traversal.findCurrentScopeByToken(token);
81076
- return new chunk_1.Chunk().append(ret + ` {
81077
- static INTERNAL_TYPE = 'CLAS';
81078
- static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
81079
- static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
81080
- static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
81399
+ return new chunk_1.Chunk().append(ret + ` {
81400
+ static INTERNAL_TYPE = 'CLAS';
81401
+ static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
81402
+ static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
81403
+ static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
81081
81404
  static METHODS = {${traversal.buildMethods(def, scope).join(",\n")}};`, node, traversal);
81082
81405
  }
81083
81406
  findImplementedInterface(traversal, def, scope) {
@@ -81976,16 +82299,16 @@ class DoTranspiler {
81976
82299
  const source = new expressions_1.SourceTranspiler(true).transpile(found, traversal).getCode();
81977
82300
  const idSource = unique_identifier_1.UniqueIdentifier.get();
81978
82301
  const id = unique_identifier_1.UniqueIdentifier.get();
81979
- return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81980
- const ${idSource} = ${source};
81981
- for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
82302
+ return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
82303
+ const ${idSource} = ${source};
82304
+ for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
81982
82305
  abap.builtin.sy.get().index.set(${id} + 1);`);
81983
82306
  }
81984
82307
  else {
81985
82308
  const unique = unique_identifier_1.UniqueIdentifier.get();
81986
- return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81987
- let ${unique} = 1;
81988
- while (true) {
82309
+ return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
82310
+ let ${unique} = 1;
82311
+ while (true) {
81989
82312
  abap.builtin.sy.get().index.set(${unique}++);`);
81990
82313
  }
81991
82314
  }
@@ -82145,7 +82468,7 @@ class EndDoTranspiler {
82145
82468
  this.syIndexBackup = syIndexBackup;
82146
82469
  }
82147
82470
  transpile(node, traversal) {
82148
- return new chunk_1.Chunk().append(`}
82471
+ return new chunk_1.Chunk().append(`}
82149
82472
  abap.builtin.sy.get().index.set(${this.syIndexBackup});\n`, node, traversal);
82150
82473
  }
82151
82474
  }
@@ -82344,7 +82667,7 @@ class EndWhileTranspiler {
82344
82667
  this.syIndexBackup = syIndexBackup;
82345
82668
  }
82346
82669
  transpile(node, traversal) {
82347
- return new chunk_1.Chunk().append(`}
82670
+ return new chunk_1.Chunk().append(`}
82348
82671
  abap.builtin.sy.get().index.set(${this.syIndexBackup});\n`, node, traversal);
82349
82672
  }
82350
82673
  }
@@ -83749,9 +84072,9 @@ class MethodImplementationTranspiler {
83749
84072
  after += `let ${varPrefixed} = ${unique}?.${varName};\n`;
83750
84073
  }
83751
84074
  if (type instanceof abaplint.BasicTypes.NumericGenericType) {
83752
- after += `if (${varPrefixed}.constructor.name === "Character") {
83753
- ${varPrefixed} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
83754
- ${varPrefixed}.set(${unique}?.${varName});
84075
+ after += `if (${varPrefixed}.constructor.name === "Character") {
84076
+ ${varPrefixed} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
84077
+ ${varPrefixed}.set(${unique}?.${varName});
83755
84078
  }\n`;
83756
84079
  }
83757
84080
  }
@@ -84314,8 +84637,8 @@ class RaiseTranspiler {
84314
84637
  const extra = `{"INTERNAL_FILENAME": "${traversal.getFilename()}","INTERNAL_LINE": ${node.getStart().getRow()}}`;
84315
84638
  const lookup = traversal.lookupClassOrInterface(classNameToken?.getStr(), classNameToken);
84316
84639
  const id = unique_identifier_1.UniqueIdentifier.get();
84317
- return new chunk_1.Chunk().append(`const ${id} = await (new ${lookup}()).constructor_(${p});
84318
- ${id}.EXTRA_CX = ${extra};
84640
+ return new chunk_1.Chunk().append(`const ${id} = await (new ${lookup}()).constructor_(${p});
84641
+ ${id}.EXTRA_CX = ${extra};
84319
84642
  throw ${id};`, node, traversal);
84320
84643
  }
84321
84644
  }
@@ -84967,19 +85290,19 @@ class SelectTranspiler {
84967
85290
  if (keys.length > 0) {
84968
85291
  by = JSON.stringify(keys);
84969
85292
  }
84970
- const code = `if (${faeTranspiled}.array().length === 0) {
84971
- throw new Error("FAE, todo, empty table");
84972
- } else {
84973
- const ${unique2} = ${faeTranspiled}.array();
84974
- abap.statements.clear(${target});
84975
- for await (const ${unique} of ${unique2}) {
84976
- await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
84977
- }
84978
- if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
84979
- abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
84980
- await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
84981
- }
84982
- abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
85293
+ const code = `if (${faeTranspiled}.array().length === 0) {
85294
+ throw new Error("FAE, todo, empty table");
85295
+ } else {
85296
+ const ${unique2} = ${faeTranspiled}.array();
85297
+ abap.statements.clear(${target});
85298
+ for await (const ${unique} of ${unique2}) {
85299
+ await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
85300
+ }
85301
+ if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
85302
+ abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
85303
+ await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
85304
+ }
85305
+ abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
84983
85306
  }`;
84984
85307
  return new chunk_1.Chunk().append(code, node, traversal);
84985
85308
  }
@@ -85918,11 +86241,11 @@ class WhileTranspiler {
85918
86241
  const cond = new expressions_1.CondTranspiler().transpile(node.findFirstExpression(abaplint.Expressions.Cond), traversal);
85919
86242
  const unique = unique_identifier_1.UniqueIdentifier.get();
85920
86243
  return new chunk_1.Chunk()
85921
- .append(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
85922
- let ${unique} = 1;
86244
+ .append(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
86245
+ let ${unique} = 1;
85923
86246
  while (`, node, traversal)
85924
86247
  .appendChunk(cond)
85925
- .appendString(`) {
86248
+ .appendString(`) {
85926
86249
  abap.builtin.sy.get().index.set(${unique}++);`);
85927
86250
  }
85928
86251
  }
@@ -86269,17 +86592,17 @@ class ClassDefinitionTranspiler {
86269
86592
  }
86270
86593
  else {
86271
86594
  // its an abstract class with only abstract methods
86272
- return new chunk_1.Chunk(`
86273
- class ${className?.toLowerCase()} {
86274
- static INTERNAL_TYPE = 'CLAS';
86275
- static IMPLEMENTED_INTERFACES = [];
86276
- static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
86277
- static ATTRIBUTES = {};
86278
- async constructor_() {
86279
- this.me = new abap.types.ABAPObject();
86280
- this.me.set(this);
86281
- return this;
86282
- }
86595
+ return new chunk_1.Chunk(`
86596
+ class ${className?.toLowerCase()} {
86597
+ static INTERNAL_TYPE = 'CLAS';
86598
+ static IMPLEMENTED_INTERFACES = [];
86599
+ static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
86600
+ static ATTRIBUTES = {};
86601
+ async constructor_() {
86602
+ this.me = new abap.types.ABAPObject();
86603
+ this.me.set(this);
86604
+ return this;
86605
+ }
86283
86606
  }`);
86284
86607
  }
86285
86608
  }
@@ -86659,8 +86982,8 @@ class FunctionModuleTranspiler {
86659
86982
  const type = scope?.findVariable(name)?.getType();
86660
86983
  if (type !== undefined && p.optional === true) {
86661
86984
  // todo, set DEFAULT value
86662
- ret += `if (${name} === undefined) {
86663
- ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
86985
+ ret += `if (${name} === undefined) {
86986
+ ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
86664
86987
  }\n`;
86665
86988
  }
86666
86989
  }
@@ -86972,10 +87295,10 @@ class SelectTranspiler {
86972
87295
  const packageSize = node.findFirstExpression(abaplint.Expressions.SelectLoop)?.findExpressionAfterToken("SIZE");
86973
87296
  if (packageSize) {
86974
87297
  const getSize = new expressions_1.SQLSourceTranspiler().transpile(packageSize, traversal).getCode() + ".get()";
86975
- ret.appendString(`if (${targetName}.array().length > ${getSize}) {
86976
- throw new Error("PACKAGE SIZED loop larger than package size not supported");
86977
- };
86978
- abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
87298
+ ret.appendString(`if (${targetName}.array().length > ${getSize}) {
87299
+ throw new Error("PACKAGE SIZED loop larger than package size not supported");
87300
+ };
87301
+ abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
86979
87302
  {\n`);
86980
87303
  }
86981
87304
  else if (concat.includes(" INTO CORRESPONDING FIELDS OF ")) {
@@ -88125,16 +88448,16 @@ class UnitTest {
88125
88448
  initializationScript(reg, dbSetup, extraSetup, useImport) {
88126
88449
  let ret = "";
88127
88450
  if (useImport === true) {
88128
- ret = `/* eslint-disable import/newline-after-import */
88451
+ ret = `/* eslint-disable import/newline-after-import */
88129
88452
  import "./_top.mjs";\n`;
88130
88453
  }
88131
88454
  else {
88132
- ret = `/* eslint-disable import/newline-after-import */
88133
- import runtime from "@abaplint/runtime";
88455
+ ret = `/* eslint-disable import/newline-after-import */
88456
+ import runtime from "@abaplint/runtime";
88134
88457
  globalThis.abap = new runtime.ABAP();\n`;
88135
88458
  }
88136
- ret += `${this.buildImports(reg, useImport)}
88137
-
88459
+ ret += `${this.buildImports(reg, useImport)}
88460
+
88138
88461
  export async function initializeABAP() {\n`;
88139
88462
  ret += ` const sqlite = [];\n`;
88140
88463
  for (const i of dbSetup.schemas.sqlite) {
@@ -88171,19 +88494,19 @@ export async function initializeABAP() {\n`;
88171
88494
  return filename.replace(/\//g, "%23");
88172
88495
  }
88173
88496
  unitTestScriptOpen(reg, _skip) {
88174
- let ret = `/* eslint-disable curly */
88175
- import fs from "fs";
88176
- import path from "path";
88177
- import {fileURLToPath} from "url";
88178
- import {initializeABAP} from "./init.mjs";
88179
-
88180
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
88181
-
88182
- async function run() {
88183
- await initializeABAP();
88184
- let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
88185
- let ls_input = new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)});
88186
- let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String(), console: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
88497
+ let ret = `/* eslint-disable curly */
88498
+ import fs from "fs";
88499
+ import path from "path";
88500
+ import {fileURLToPath} from "url";
88501
+ import {initializeABAP} from "./init.mjs";
88502
+
88503
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
88504
+
88505
+ async function run() {
88506
+ await initializeABAP();
88507
+ let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
88508
+ let ls_input = new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)});
88509
+ let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String(), console: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
88187
88510
  `;
88188
88511
  for (const obj of reg.getObjects()) {
88189
88512
  if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
@@ -88203,25 +88526,25 @@ async function run() {
88203
88526
  if (m.isForTesting === false) {
88204
88527
  continue;
88205
88528
  }
88206
- ret += ` ls_input.get().class_name.set("${obj.getName()}");
88207
- ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
88208
- ls_input.get().method_name.set("${m.name.toUpperCase()}");
88529
+ ret += ` ls_input.get().class_name.set("${obj.getName()}");
88530
+ ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
88531
+ ls_input.get().method_name.set("${m.name.toUpperCase()}");
88209
88532
  abap.statements.append({source: ls_input, target: lt_input});\n`;
88210
88533
  }
88211
88534
  }
88212
88535
  }
88213
88536
  }
88214
- ret += `
88215
-
88216
- ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
88217
- fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
88218
- }
88219
-
88220
- run().then(() => {
88221
- process.exit(0);
88222
- }).catch((err) => {
88223
- console.log(err);
88224
- process.exit(1);
88537
+ ret += `
88538
+
88539
+ ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
88540
+ fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
88541
+ }
88542
+
88543
+ run().then(() => {
88544
+ process.exit(0);
88545
+ }).catch((err) => {
88546
+ console.log(err);
88547
+ process.exit(1);
88225
88548
  });`;
88226
88549
  return ret;
88227
88550
  }
@@ -88309,29 +88632,29 @@ run().then(() => {
88309
88632
  return tests;
88310
88633
  }
88311
88634
  unitTestScript(reg, skip) {
88312
- let ret = `/* eslint-disable curly */
88313
- import fs from "fs";
88314
- import path from "path";
88315
- import {fileURLToPath} from "url";
88316
- import {initializeABAP} from "./init.mjs";
88317
- import runtime from "@abaplint/runtime";
88318
-
88319
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
88320
-
88321
- async function run() {
88322
- await initializeABAP();
88323
- const unit = new runtime.UnitTestResult();
88324
- let clas;
88325
- let locl;
88326
- let meth;
88635
+ let ret = `/* eslint-disable curly */
88636
+ import fs from "fs";
88637
+ import path from "path";
88638
+ import {fileURLToPath} from "url";
88639
+ import {initializeABAP} from "./init.mjs";
88640
+ import runtime from "@abaplint/runtime";
88641
+
88642
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
88643
+
88644
+ async function run() {
88645
+ await initializeABAP();
88646
+ const unit = new runtime.UnitTestResult();
88647
+ let clas;
88648
+ let locl;
88649
+ let meth;
88327
88650
  try {\n`;
88328
88651
  for (const st of this.getSortedTests(reg)) {
88329
88652
  ret += `// --------------------------------------------\n`;
88330
88653
  ret += ` clas = unit.addObject("${st.obj.getName()}");\n`;
88331
88654
  const lc = st.localClass.toLowerCase();
88332
- ret += ` {
88333
- const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
88334
- locl = clas.addTestClass("${lc}");
88655
+ ret += ` {
88656
+ const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
88657
+ locl = clas.addTestClass("${lc}");
88335
88658
  if (${lc}.class_setup) await ${lc}.class_setup();\n`;
88336
88659
  for (const m of st.methods) {
88337
88660
  const skipThis = (skip || []).some(a => a.object === st.obj.getName() && a.class === lc && a.method === m);
@@ -88406,22 +88729,22 @@ async function run() {
88406
88729
  }
88407
88730
  }
88408
88731
  */
88409
- ret += `// -------------------END-------------------
88410
- fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88411
- } catch (e) {
88412
- if (meth) {
88413
- meth.fail();
88414
- }
88415
- fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88416
- throw e;
88417
- }
88418
- }
88419
-
88420
- run().then(() => {
88421
- process.exit(0);
88422
- }).catch((err) => {
88423
- console.log(err);
88424
- process.exit(1);
88732
+ ret += `// -------------------END-------------------
88733
+ fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88734
+ } catch (e) {
88735
+ if (meth) {
88736
+ meth.fail();
88737
+ }
88738
+ fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88739
+ throw e;
88740
+ }
88741
+ }
88742
+
88743
+ run().then(() => {
88744
+ process.exit(0);
88745
+ }).catch((err) => {
88746
+ console.log(err);
88747
+ process.exit(1);
88425
88748
  });`;
88426
88749
  return ret;
88427
88750
  }
@@ -101830,7 +102153,7 @@ async function run() {
101830
102153
  fs.writeFileSync(outputFolder + path.sep + "init.mjs", output.initializationScript);
101831
102154
  // new static referenced imports,
101832
102155
  fs.writeFileSync(outputFolder + path.sep + "_init.mjs", output.initializationScript2);
101833
- fs.writeFileSync(outputFolder + path.sep + "_top.mjs", `import runtime from "@abaplint/runtime";
102156
+ fs.writeFileSync(outputFolder + path.sep + "_top.mjs", `import runtime from "@abaplint/runtime";
101834
102157
  globalThis.abap = new runtime.ABAP();`);
101835
102158
  }
101836
102159
  run().then(() => {