@abaplint/runtime 2.7.41 → 2.7.42
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.
|
@@ -3,5 +3,7 @@ import { INumeric } from "../types/_numeric";
|
|
|
3
3
|
export interface IModifyInternalOptions {
|
|
4
4
|
index: INumeric;
|
|
5
5
|
from: any;
|
|
6
|
+
where?: (i: any) => boolean;
|
|
7
|
+
transporting?: string[];
|
|
6
8
|
}
|
|
7
9
|
export declare function modifyInternal(table: Table, options: IModifyInternalOptions): void;
|
|
@@ -15,6 +15,25 @@ function modifyInternal(table, options) {
|
|
|
15
15
|
table.insertIndex(options.from, index);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
else if (options.where && options.transporting && options.from) {
|
|
19
|
+
let index = 1;
|
|
20
|
+
const fs = new types_1.FieldSymbol();
|
|
21
|
+
while (index <= table.array().length) {
|
|
22
|
+
const currentIndex = new types_1.Integer().set(index);
|
|
23
|
+
const readResult = (0, read_table_1.readTable)(table, {
|
|
24
|
+
withKey: options.where,
|
|
25
|
+
assigning: fs,
|
|
26
|
+
index: currentIndex
|
|
27
|
+
});
|
|
28
|
+
if (readResult.subrc === 0) {
|
|
29
|
+
found = true;
|
|
30
|
+
for (const t of options.transporting) {
|
|
31
|
+
fs.get()[t].set(options.from.get()[t]);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
index++;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
18
37
|
else if (options.from) {
|
|
19
38
|
const readResult = (0, read_table_1.readTable)(table, { from: options.from });
|
|
20
39
|
if (readResult.subrc === 0) {
|