@abaplint/runtime 2.4.11 → 2.4.13
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.
|
@@ -7,6 +7,18 @@ class CallFunction {
|
|
|
7
7
|
}
|
|
8
8
|
// note: this is only called if DESTINIATION is supplied
|
|
9
9
|
async callFunction(options) {
|
|
10
|
+
if (options.destination === "") {
|
|
11
|
+
const param = {
|
|
12
|
+
exporting: options.exporting,
|
|
13
|
+
importing: options.importing,
|
|
14
|
+
tables: options.tables,
|
|
15
|
+
changing: options.changing,
|
|
16
|
+
exceptions: options.exceptions,
|
|
17
|
+
};
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
await abap.FunctionModules[options.name](param);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
10
22
|
const dest = this.context.RFCDestinations[options.destination];
|
|
11
23
|
if (dest === undefined) {
|
|
12
24
|
throw new Error(`RFC destination ${options.destination} does not exist`);
|
|
@@ -2,8 +2,6 @@ import { INumeric } from "./_numeric";
|
|
|
2
2
|
import { ICharacter } from "./_character";
|
|
3
3
|
import { ABAPObject } from "./abap_object";
|
|
4
4
|
import { Structure } from "./structure";
|
|
5
|
-
import { FieldSymbol } from "./field_symbol";
|
|
6
|
-
import { DataReference } from "./data_reference";
|
|
7
5
|
export declare enum TableAccessType {
|
|
8
6
|
standard = "STANDARD",
|
|
9
7
|
sorted = "SORTED",
|
|
@@ -48,9 +46,9 @@ export declare class Table {
|
|
|
48
46
|
clear(): void;
|
|
49
47
|
set(tab: Table | TableRowType): void;
|
|
50
48
|
getHeader(): TableRowType;
|
|
51
|
-
insertIndex(item: TableRowType, index: number):
|
|
49
|
+
insertIndex(item: TableRowType, index: number): any;
|
|
52
50
|
deleteIndex(index: number): void;
|
|
53
|
-
append(item: TableRowType):
|
|
51
|
+
append(item: TableRowType): any;
|
|
54
52
|
appendInitial(): TableRowType;
|
|
55
53
|
sort(compareFn: (a: TableRowType, b: TableRowType) => number): void;
|
|
56
54
|
private getValue;
|
package/build/src/types/table.js
CHANGED
|
@@ -115,6 +115,14 @@ class Table {
|
|
|
115
115
|
}
|
|
116
116
|
insertIndex(item, index) {
|
|
117
117
|
this.secondaryIndexes = {};
|
|
118
|
+
if (item instanceof field_symbol_1.FieldSymbol) {
|
|
119
|
+
const p = item.getPointer();
|
|
120
|
+
if (p === undefined) {
|
|
121
|
+
throw new Error("insertIndex, fs not assigned");
|
|
122
|
+
}
|
|
123
|
+
this.insertIndex(p, index);
|
|
124
|
+
return p;
|
|
125
|
+
}
|
|
118
126
|
const val = this.getValue(item);
|
|
119
127
|
if (index === 0) {
|
|
120
128
|
this.value.unshift(val);
|
|
@@ -156,23 +164,14 @@ class Table {
|
|
|
156
164
|
if (p === undefined) {
|
|
157
165
|
throw new Error("APPEND, fs not assigned");
|
|
158
166
|
}
|
|
159
|
-
this.
|
|
160
|
-
return
|
|
167
|
+
this.append(p);
|
|
168
|
+
return p;
|
|
161
169
|
}
|
|
162
170
|
else if (item instanceof data_reference_1.DataReference) {
|
|
163
171
|
const ref = new data_reference_1.DataReference(item.getType());
|
|
164
172
|
ref.assign(item.getPointer());
|
|
165
173
|
this.value.push(ref);
|
|
166
174
|
return ref;
|
|
167
|
-
// @ts-ignore
|
|
168
|
-
// eslint-disable-next-line max-len
|
|
169
|
-
}
|
|
170
|
-
else if (this.isStructured === true && item.getQualifiedName && this.rowType.getQualifiedName && item.getQualifiedName() !== "" && item.getQualifiedName() === this.rowType.getQualifiedName()) {
|
|
171
|
-
// hmm, moving this to getValue() should, but does not work
|
|
172
|
-
// types match, so no need to do conversions, just clone the item
|
|
173
|
-
const val = (0, clone_1.clone)(item);
|
|
174
|
-
this.value.push(val);
|
|
175
|
-
return val;
|
|
176
175
|
}
|
|
177
176
|
else {
|
|
178
177
|
const val = this.getValue(item);
|
|
@@ -203,6 +202,13 @@ class Table {
|
|
|
203
202
|
const tmp = (0, clone_1.clone)(this.getRowType());
|
|
204
203
|
tmp.set(new string_1.String().set(item));
|
|
205
204
|
return tmp;
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
// eslint-disable-next-line max-len
|
|
207
|
+
}
|
|
208
|
+
else if (this.isStructured === true && item.getQualifiedName && this.rowType.getQualifiedName && item.getQualifiedName() !== "" && item.getQualifiedName() === this.rowType.getQualifiedName()) {
|
|
209
|
+
// types match, so no need to do conversions, just clone the item
|
|
210
|
+
const val = (0, clone_1.clone)(item);
|
|
211
|
+
return val;
|
|
206
212
|
}
|
|
207
213
|
else {
|
|
208
214
|
const tmp = (0, clone_1.clone)(this.getRowType());
|