@abaplint/runtime 2.7.40 → 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.
|
@@ -2,7 +2,7 @@ import { INumeric } from "../types/_numeric";
|
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { Table } from "../types";
|
|
4
4
|
export interface IConcatenateInput {
|
|
5
|
-
source:
|
|
5
|
+
source: (number | string | INumeric | ICharacter | Table)[];
|
|
6
6
|
target: ICharacter;
|
|
7
7
|
separatedBy?: number | string | INumeric | ICharacter;
|
|
8
8
|
respectingBlanks?: boolean;
|
|
@@ -70,6 +70,9 @@ function createData(target, options) {
|
|
|
70
70
|
else if (options.name.trimEnd() === "F") {
|
|
71
71
|
target.assign(new types_1.Float());
|
|
72
72
|
}
|
|
73
|
+
else if (options.name.trimEnd() === "INT8") {
|
|
74
|
+
target.assign(new types_1.Integer8());
|
|
75
|
+
}
|
|
73
76
|
else {
|
|
74
77
|
(0, throw_error_1.throwError)("CX_SY_CREATE_DATA_ERROR");
|
|
75
78
|
}
|
|
@@ -135,6 +138,9 @@ function createData(target, options) {
|
|
|
135
138
|
case "STRING":
|
|
136
139
|
target.assign(new types_1.String());
|
|
137
140
|
break;
|
|
141
|
+
case "INT8":
|
|
142
|
+
target.assign(new types_1.Integer8());
|
|
143
|
+
break;
|
|
138
144
|
case "XSTRING":
|
|
139
145
|
target.assign(new types_1.XString());
|
|
140
146
|
break;
|
|
@@ -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) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.replace = void 0;
|
|
4
4
|
const abap_regex_1 = require("../abap_regex");
|
|
5
|
-
const offset_length_1 = require("../offset_length");
|
|
6
5
|
const types_1 = require("../types");
|
|
6
|
+
const concatenate_1 = require("./concatenate");
|
|
7
7
|
function replace(input) {
|
|
8
8
|
if (input.target instanceof types_1.Table) {
|
|
9
9
|
for (const row of input.target.array()) {
|
|
@@ -34,7 +34,9 @@ function replace(input) {
|
|
|
34
34
|
search = new RegExp(regex, ignoreCase + allOccurrences);
|
|
35
35
|
}
|
|
36
36
|
else if (input.sectionLength && input.sectionOffset) {
|
|
37
|
-
|
|
37
|
+
const before = input.target.getOffset({ length: input.sectionOffset });
|
|
38
|
+
const after = input.target.getOffset({ offset: input.sectionLength.get() + input.sectionOffset.get() });
|
|
39
|
+
(0, concatenate_1.concatenate)({ source: [before, input.with, after], target: input.target });
|
|
38
40
|
// @ts-ignore
|
|
39
41
|
abap.builtin.sy.get().subrc.set(0);
|
|
40
42
|
return;
|