@abaplint/runtime 2.13.47 → 2.13.49

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.
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function acos(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.acos = acos;
4
+ const types_1 = require("../types");
5
+ function acos(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.acos(num_in);
20
+ }
21
+ //# sourceMappingURL=acos.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function asin(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asin = asin;
4
+ const types_1 = require("../types");
5
+ function asin(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.asin(num_in);
20
+ }
21
+ //# sourceMappingURL=asin.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function atan(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.atan = atan;
4
+ const types_1 = require("../types");
5
+ function atan(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.atan(num_in);
20
+ }
21
+ //# sourceMappingURL=atan.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function cosh(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cosh = cosh;
4
+ const types_1 = require("../types");
5
+ function cosh(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.cosh(num_in);
20
+ }
21
+ //# sourceMappingURL=cosh.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function exp(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exp = exp;
4
+ const types_1 = require("../types");
5
+ function exp(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.exp(num_in);
20
+ }
21
+ //# sourceMappingURL=exp.js.map
@@ -1,14 +1,19 @@
1
1
  import { Character } from "../types";
2
2
  export * from "./abs";
3
+ export * from "./acos";
4
+ export * from "./asin";
5
+ export * from "./atan";
3
6
  export * from "./boolc";
4
7
  export * from "./ceil";
5
8
  export * from "./concat_lines_of";
6
9
  export * from "./condense";
7
10
  export * from "./contains";
8
11
  export * from "./cos";
12
+ export * from "./cosh";
9
13
  export * from "./count_any_of";
10
14
  export * from "./count";
11
15
  export * from "./escape";
16
+ export * from "./exp";
12
17
  export * from "./find";
13
18
  export * from "./floor";
14
19
  export * from "./frac";
@@ -18,6 +23,8 @@ export * from "./ipow";
18
23
  export * from "./line_exists";
19
24
  export * from "./line_index";
20
25
  export * from "./lines";
26
+ export * from "./log";
27
+ export * from "./log10";
21
28
  export * from "./match";
22
29
  export * from "./matches";
23
30
  export * from "./nmax";
@@ -32,6 +39,7 @@ export * from "./shift_left";
32
39
  export * from "./shift_right";
33
40
  export * from "./sign";
34
41
  export * from "./sin";
42
+ export * from "./sinh";
35
43
  export * from "./sqrt";
36
44
  export * from "./strlen";
37
45
  export * from "./substring_after";
@@ -39,6 +47,7 @@ export * from "./substring_before";
39
47
  export * from "./substring";
40
48
  export * from "./sy";
41
49
  export * from "./tan";
50
+ export * from "./tanh";
42
51
  export * from "./to_lower";
43
52
  export * from "./to_mixed";
44
53
  export * from "./to_upper";
@@ -17,15 +17,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.$_vertical_tab = exports.$_newline = exports.$_horizontal_tab = exports.$_formfeed = exports.$_cr_lf = exports.$_backspace = exports.space = exports.abap_undefined = exports.abap_false = exports.abap_true = void 0;
18
18
  const types_1 = require("../types");
19
19
  __exportStar(require("./abs"), exports);
20
+ __exportStar(require("./acos"), exports);
21
+ __exportStar(require("./asin"), exports);
22
+ __exportStar(require("./atan"), exports);
20
23
  __exportStar(require("./boolc"), exports);
21
24
  __exportStar(require("./ceil"), exports);
22
25
  __exportStar(require("./concat_lines_of"), exports);
23
26
  __exportStar(require("./condense"), exports);
24
27
  __exportStar(require("./contains"), exports);
25
28
  __exportStar(require("./cos"), exports);
29
+ __exportStar(require("./cosh"), exports);
26
30
  __exportStar(require("./count_any_of"), exports);
27
31
  __exportStar(require("./count"), exports);
28
32
  __exportStar(require("./escape"), exports);
33
+ __exportStar(require("./exp"), exports);
29
34
  __exportStar(require("./find"), exports);
30
35
  __exportStar(require("./floor"), exports);
31
36
  __exportStar(require("./frac"), exports);
@@ -35,6 +40,8 @@ __exportStar(require("./ipow"), exports);
35
40
  __exportStar(require("./line_exists"), exports);
36
41
  __exportStar(require("./line_index"), exports);
37
42
  __exportStar(require("./lines"), exports);
43
+ __exportStar(require("./log"), exports);
44
+ __exportStar(require("./log10"), exports);
38
45
  __exportStar(require("./match"), exports);
39
46
  __exportStar(require("./matches"), exports);
40
47
  __exportStar(require("./nmax"), exports);
@@ -49,6 +56,7 @@ __exportStar(require("./shift_left"), exports);
49
56
  __exportStar(require("./shift_right"), exports);
50
57
  __exportStar(require("./sign"), exports);
51
58
  __exportStar(require("./sin"), exports);
59
+ __exportStar(require("./sinh"), exports);
52
60
  __exportStar(require("./sqrt"), exports);
53
61
  __exportStar(require("./strlen"), exports);
54
62
  __exportStar(require("./substring_after"), exports);
@@ -56,6 +64,7 @@ __exportStar(require("./substring_before"), exports);
56
64
  __exportStar(require("./substring"), exports);
57
65
  __exportStar(require("./sy"), exports);
58
66
  __exportStar(require("./tan"), exports);
67
+ __exportStar(require("./tanh"), exports);
59
68
  __exportStar(require("./to_lower"), exports);
60
69
  __exportStar(require("./to_mixed"), exports);
61
70
  __exportStar(require("./to_upper"), exports);
@@ -76,5 +85,5 @@ exports.$_vertical_tab = new types_1.Character(1).set("\v").setConstant();
76
85
  /*
77
86
  export const $_maxchar = new Character(1).set(Buffer.from("FDFF", "hex").toString()).setConstant();
78
87
  export const $_minchar = new Character(1).set(Buffer.from("0000", "hex").toString()).setConstant();
79
- */
88
+ */
80
89
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function log(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.log = log;
4
+ const types_1 = require("../types");
5
+ function log(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.log(num_in);
20
+ }
21
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function log10(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.log10 = log10;
4
+ const types_1 = require("../types");
5
+ function log10(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.log10(num_in);
20
+ }
21
+ //# sourceMappingURL=log10.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function sinh(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sinh = sinh;
4
+ const types_1 = require("../types");
5
+ function sinh(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.sinh(num_in);
20
+ }
21
+ //# sourceMappingURL=sinh.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function tanh(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tanh = tanh;
4
+ const types_1 = require("../types");
5
+ function tanh(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.tanh(num_in);
20
+ }
21
+ //# sourceMappingURL=tanh.js.map
@@ -1,4 +1,4 @@
1
- import { ABAPObject, FieldSymbol, Float, HashedTable, String, Hex, Structure, Table, Integer8 } from "../types";
1
+ import { ABAPObject, DecFloat34, FieldSymbol, Float, HashedTable, String, Hex, Structure, Table, Integer8 } from "../types";
2
2
  import { ICharacter } from "../types/_character";
3
3
  import { INumeric } from "../types/_numeric";
4
- export declare function eq(left: number | string | ICharacter | Integer8 | INumeric | Float | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol, right: number | string | ICharacter | Integer8 | INumeric | Float | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol): boolean;
4
+ export declare function eq(left: number | string | ICharacter | Integer8 | INumeric | Float | DecFloat34 | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol, right: number | string | ICharacter | Integer8 | INumeric | Float | DecFloat34 | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol): boolean;
@@ -45,6 +45,7 @@ const DateC = types_1.Date;
45
45
  const TimeC = types_1.Time;
46
46
  const PackedC = types_1.Packed;
47
47
  const FloatC = types_1.Float;
48
+ const DecFloat34C = types_1.DecFloat34;
48
49
  const TableC = types_1.Table;
49
50
  const HashedTableC = types_1.HashedTable;
50
51
  const StructureC = types_1.Structure;
@@ -92,6 +93,9 @@ function eq(left, right) {
92
93
  else if (leftConstructor === FloatC) {
93
94
  return left.getRaw() === right.getRaw();
94
95
  }
96
+ else if (leftConstructor === DecFloat34C) {
97
+ return left.getRaw() === right.getRaw();
98
+ }
95
99
  else if (leftConstructor === TableC || leftConstructor === HashedTableC) {
96
100
  return compareTables(left, right);
97
101
  }
@@ -252,6 +256,9 @@ function eq(left, right) {
252
256
  else if (left instanceof types_1.Integer) {
253
257
  return right.get() === left.get();
254
258
  }
259
+ else if (left instanceof types_1.DecFloat34) {
260
+ return right.get() === left.getRaw();
261
+ }
255
262
  }
256
263
  else if (right instanceof types_1.Integer8) {
257
264
  if (left instanceof types_1.Integer
@@ -272,6 +279,14 @@ function eq(left, right) {
272
279
  return right.getRaw() === left.get();
273
280
  }
274
281
  }
282
+ else if (right instanceof types_1.DecFloat34) {
283
+ if (left instanceof types_1.Float || left instanceof types_1.DecFloat34) {
284
+ return right.getRaw() === left.getRaw();
285
+ }
286
+ else if (left instanceof types_1.Integer || left instanceof types_1.Packed) {
287
+ return right.getRaw() === left.get();
288
+ }
289
+ }
275
290
  if (left instanceof types_1.Structure || right instanceof types_1.Structure) {
276
291
  if (!(right instanceof types_1.Structure)) {
277
292
  return eq(left.getCharacter(), right);
@@ -12,12 +12,18 @@ async function modifyDatabase(table, options, context) {
12
12
  options.values = options.values.getPointer();
13
13
  }
14
14
  if (options.table) {
15
+ let subrc = 0;
16
+ let dbcnt = 0;
15
17
  for (const row of options.table.array()) {
16
- const subrc = await (0, insert_database_1.insertDatabase)(table, { values: row }, context);
17
- if (subrc !== 0) {
18
+ const insertSubrc = await (0, insert_database_1.insertDatabase)(table, { values: row }, context);
19
+ if (insertSubrc !== 0) {
18
20
  await (0, update_database_1.updateDatabase)(table, { from: row }, context);
19
21
  }
22
+ subrc = Math.max(subrc, abap.builtin.sy.get().subrc.get());
23
+ dbcnt += abap.builtin.sy.get().dbcnt.get();
20
24
  }
25
+ abap.builtin.sy.get().subrc.set(subrc);
26
+ abap.builtin.sy.get().dbcnt.set(dbcnt);
21
27
  }
22
28
  else if (options.values) {
23
29
  const subrc = await (0, insert_database_1.insertDatabase)(table, { values: options.values }, context);
@@ -59,7 +59,12 @@ function rowsToTarget(target, rows) {
59
59
  }
60
60
  else {
61
61
  const columnName = Object.keys(row)[0];
62
- targetRow.set(row[columnName]);
62
+ if (row[columnName] === null) {
63
+ targetRow.clear();
64
+ }
65
+ else {
66
+ targetRow.set(row[columnName]);
67
+ }
63
68
  }
64
69
  abap.statements.insertInternal({ table: target, data: targetRow, noClone: true });
65
70
  }
@@ -67,12 +72,24 @@ function rowsToTarget(target, rows) {
67
72
  else if (Array.isArray(target)) {
68
73
  for (let index = 0; index < target.length; index++) {
69
74
  const element = target[index];
70
- element.set(rows[0][Object.keys(rows[0])[index]]);
75
+ const value = rows[0][Object.keys(rows[0])[index]];
76
+ if (value === null) {
77
+ element.clear();
78
+ }
79
+ else {
80
+ element.set(value);
81
+ }
71
82
  }
72
83
  }
73
84
  else if (target !== undefined) {
74
85
  // its a simple type
75
- target.set(rows[0][Object.keys(rows[0])[0]]);
86
+ const value = rows[0][Object.keys(rows[0])[0]];
87
+ if (value === null) {
88
+ target.clear();
89
+ }
90
+ else {
91
+ target.set(value);
92
+ }
76
93
  }
77
94
  }
78
95
  //# sourceMappingURL=select.js.map
@@ -23,7 +23,7 @@ export declare class DataReference {
23
23
  get(): any;
24
24
  array(): any;
25
25
  getArrayLength(): any;
26
- set(value: any): void | Table | Structure | ABAPObject | Float | Integer8 | this | DecFloat34;
26
+ set(value: any): void | Table | Structure | ABAPObject | Float | Integer8 | DecFloat34 | this;
27
27
  getOffset(input: {
28
28
  offset?: number | INumeric | Hex;
29
29
  length?: number | INumeric | Hex;
@@ -5,7 +5,7 @@ export declare class DecFloat34 {
5
5
  private value;
6
6
  constructor();
7
7
  clone(): DecFloat34;
8
- set(value: INumeric | ICharacter | Hex | string | number): this;
8
+ set(value: INumeric | ICharacter | Hex | string | number | DecFloat34): this;
9
9
  clear(): void;
10
10
  getRaw(): number;
11
11
  get(): string;
@@ -24,6 +24,9 @@ class DecFloat34 {
24
24
  else if (typeof value === "string") {
25
25
  this.value = parseFloat(value);
26
26
  }
27
+ else if (value instanceof DecFloat34) {
28
+ this.value = value.getRaw();
29
+ }
27
30
  else if (value instanceof _1.Float) {
28
31
  this.value = value.getRaw();
29
32
  }
@@ -4,6 +4,7 @@ exports.Float = void 0;
4
4
  const hex_1 = require("./hex");
5
5
  const xstring_1 = require("./xstring");
6
6
  const integer8_1 = require("./integer8");
7
+ const decfloat34_1 = require("./decfloat34");
7
8
  /*
8
9
  function getNumberParts(x: number) {
9
10
  if(isNaN(x)) {
@@ -63,7 +64,7 @@ class Float {
63
64
  else if (value instanceof integer8_1.Integer8) {
64
65
  this.value = Number(value.get());
65
66
  }
66
- else if (value instanceof Float) {
67
+ else if (value instanceof Float || value instanceof decfloat34_1.DecFloat34) {
67
68
  this.value = value.getRaw();
68
69
  }
69
70
  else if (value instanceof hex_1.Hex || value instanceof xstring_1.XString) {
@@ -2,6 +2,7 @@ import { Float } from "./float";
2
2
  import { Hex } from "./hex";
3
3
  import { ICharacter } from "./_character";
4
4
  import { INumeric } from "./_numeric";
5
+ import { DecFloat34 } from "./decfloat34";
5
6
  export declare const DIGITS: RegExp;
6
7
  export declare const MAX_INTEGER = 2147483647;
7
8
  export declare const MIN_INTEGER = -2147483648;
@@ -21,7 +22,7 @@ export declare class Integer implements INumeric {
21
22
  getQualifiedName(): string | undefined;
22
23
  clone(): Integer;
23
24
  setConstant(): this;
24
- set(value: INumeric | ICharacter | Hex | string | number | Integer | Float): this;
25
+ set(value: INumeric | ICharacter | Hex | string | number | Integer | Float | DecFloat34): this;
25
26
  clear(): void;
26
27
  get(): number;
27
28
  }
@@ -10,6 +10,7 @@ const integer8_1 = require("./integer8");
10
10
  const hex_uint8_1 = require("./hex_uint8");
11
11
  const character_1 = require("./character");
12
12
  const string_1 = require("./string");
13
+ const decfloat34_1 = require("./decfloat34");
13
14
  exports.DIGITS = new RegExp(/^\s*-?\+?\d+\.?\d* *$/i);
14
15
  exports.MAX_INTEGER = 2147483647;
15
16
  exports.MIN_INTEGER = -2147483648;
@@ -80,7 +81,7 @@ class Integer {
80
81
  else if (value instanceof integer8_1.Integer8) {
81
82
  this.set(Number(value.get()));
82
83
  }
83
- else if (value instanceof float_1.Float) {
84
+ else if (value instanceof float_1.Float || value instanceof decfloat34_1.DecFloat34) {
84
85
  this.set(Math.round(value.getRaw()));
85
86
  }
86
87
  else if (value instanceof hex_1.Hex || value instanceof xstring_1.XString || value instanceof hex_uint8_1.HexUInt8) {
@@ -3,6 +3,7 @@ import { Hex } from "./hex";
3
3
  import { ICharacter } from "./_character";
4
4
  import { INumeric } from "./_numeric";
5
5
  import { Integer } from "./integer";
6
+ import { DecFloat34 } from "./decfloat34";
6
7
  export declare class Integer8 {
7
8
  private value;
8
9
  private readonly qualifiedName;
@@ -11,7 +12,7 @@ export declare class Integer8 {
11
12
  });
12
13
  clone(): Integer8;
13
14
  getQualifiedName(): string | undefined;
14
- set(value: INumeric | ICharacter | Hex | string | number | bigint | Integer8 | Integer | Float): this;
15
+ set(value: INumeric | ICharacter | Hex | string | number | bigint | Integer8 | Integer | Float | DecFloat34): this;
15
16
  clear(): void;
16
17
  get(): bigint;
17
18
  }
@@ -9,6 +9,7 @@ const integer_1 = require("./integer");
9
9
  const get_bit_1 = require("../statements/get_bit");
10
10
  const character_1 = require("./character");
11
11
  const hex_uint8_1 = require("./hex_uint8");
12
+ const decfloat34_1 = require("./decfloat34");
12
13
  const digits = new RegExp(/^\s*-?\+?\d+\.?\d* *$/i);
13
14
  class Integer8 {
14
15
  value;
@@ -45,7 +46,7 @@ class Integer8 {
45
46
  }
46
47
  this.value = BigInt(value);
47
48
  }
48
- else if (value instanceof float_1.Float) {
49
+ else if (value instanceof float_1.Float || value instanceof decfloat34_1.DecFloat34) {
49
50
  this.set(Math.round(value.getRaw()));
50
51
  }
51
52
  else if (value instanceof hex_1.Hex || value instanceof xstring_1.XString || value instanceof hex_uint8_1.HexUInt8) {
@@ -4,6 +4,7 @@ exports.Packed = void 0;
4
4
  const float_1 = require("./float");
5
5
  const throw_error_1 = require("../throw_error");
6
6
  const integer8_1 = require("./integer8");
7
+ const decfloat34_1 = require("./decfloat34");
7
8
  const digits = new RegExp(/^\s*-?\+?\d*\.?\d*(?:E[+-]?\d+)? *$/i);
8
9
  function pow10(exp) {
9
10
  return 10n ** BigInt(exp);
@@ -110,7 +111,7 @@ class Packed {
110
111
  else if (value instanceof integer8_1.Integer8) {
111
112
  this.value = value.get() * pow10(this.decimals);
112
113
  }
113
- else if (value instanceof float_1.Float) {
114
+ else if (value instanceof float_1.Float || value instanceof decfloat34_1.DecFloat34) {
114
115
  this.value = this.numberToScaled(value.getRaw());
115
116
  }
116
117
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.13.47",
3
+ "version": "2.13.49",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "devDependencies": {
32
32
  "@types/chai": "^4.3.20",
33
33
  "@types/mocha": "^10.0.10",
34
- "@types/node": "^24.13.2",
34
+ "@types/node": "^24.13.3",
35
35
  "chai": "^4.5.0",
36
36
  "mocha": "^11.7.6",
37
37
  "source-map-support": "^0.5.21",