@abaplint/runtime 2.1.29 → 2.1.30
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Table } from "../types";
|
|
1
|
+
import { FieldSymbol, Table } from "../types";
|
|
2
2
|
import { INumeric } from "../types/_numeric";
|
|
3
3
|
export interface IDeleteInternalOptions {
|
|
4
4
|
where?: (i: any) => boolean;
|
|
@@ -9,4 +9,4 @@ export interface IDeleteInternalOptions {
|
|
|
9
9
|
from?: any;
|
|
10
10
|
to?: any;
|
|
11
11
|
}
|
|
12
|
-
export declare function deleteInternal(target: Table, options?: IDeleteInternalOptions): void;
|
|
12
|
+
export declare function deleteInternal(target: Table | FieldSymbol, options?: IDeleteInternalOptions): void;
|
|
@@ -7,14 +7,29 @@ const loop_1 = require("./loop");
|
|
|
7
7
|
function deleteInternal(target, options) {
|
|
8
8
|
let prev = undefined;
|
|
9
9
|
let index = 0;
|
|
10
|
+
if (target instanceof types_1.FieldSymbol) {
|
|
11
|
+
target = target.getPointer();
|
|
12
|
+
if (target === undefined) {
|
|
13
|
+
throw "FS not assigned";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
10
16
|
if ((options === null || options === void 0 ? void 0 : options.index)
|
|
11
17
|
&& (options === null || options === void 0 ? void 0 : options.where) === undefined
|
|
12
18
|
&& (options === null || options === void 0 ? void 0 : options.adjacent) === undefined
|
|
13
19
|
&& (options === null || options === void 0 ? void 0 : options.fromValue) === undefined
|
|
14
20
|
&& (options === null || options === void 0 ? void 0 : options.from) === undefined
|
|
15
21
|
&& (options === null || options === void 0 ? void 0 : options.to) === undefined) {
|
|
16
|
-
target.
|
|
17
|
-
|
|
22
|
+
if (target.array()[options.index.get() - 1] === undefined) {
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
target.deleteIndex(options.index.get() - 1);
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
18
33
|
}
|
|
19
34
|
for (const i of (0, loop_1.loop)(target)) {
|
|
20
35
|
// @ts-ignore
|