@abaplint/runtime 1.7.25 → 1.7.26
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,6 +1,11 @@
|
|
|
1
|
-
import { DataReference } from "../types";
|
|
1
|
+
import { ABAPObject, DataReference, Structure, Table } from "../types";
|
|
2
|
+
import { ICharacter } from "../types/_character";
|
|
3
|
+
import { INumeric } from "../types/_numeric";
|
|
4
|
+
declare type PointerType = INumeric | Table | ICharacter | ABAPObject | undefined | Structure;
|
|
2
5
|
export interface ICreateDataOptions {
|
|
3
6
|
table?: boolean;
|
|
4
7
|
name?: string;
|
|
8
|
+
type?: PointerType;
|
|
5
9
|
}
|
|
6
10
|
export declare function createData(target: DataReference, options?: ICreateDataOptions): void;
|
|
11
|
+
export {};
|
|
@@ -6,7 +6,7 @@ function createData(target, options) {
|
|
|
6
6
|
if ((options === null || options === void 0 ? void 0 : options.name) && (options === null || options === void 0 ? void 0 : options.table)) {
|
|
7
7
|
// @ts-ignore
|
|
8
8
|
if (abap.DDIC[options.name] === undefined) {
|
|
9
|
-
// todo, throw exception
|
|
9
|
+
// todo, throw exception CX_SY_CREATE_DATA_ERROR
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
// @ts-ignore
|
|
@@ -15,12 +15,21 @@ function createData(target, options) {
|
|
|
15
15
|
else if (options === null || options === void 0 ? void 0 : options.name) {
|
|
16
16
|
// @ts-ignore
|
|
17
17
|
if (abap.DDIC[options.name] === undefined) {
|
|
18
|
-
//
|
|
19
|
-
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
if (abap.Classes["CX_SY_CREATE_DATA_ERROR"] !== undefined) {
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
throw new abap.Classes["CX_SY_CREATE_DATA_ERROR"]();
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw "Global class CX_SY_CREATE_DATA_ERROR not found";
|
|
25
|
+
}
|
|
20
26
|
}
|
|
21
27
|
// @ts-ignore
|
|
22
28
|
target.assign((0, clone_1.clone)(abap.DDIC[options.name].type));
|
|
23
29
|
}
|
|
30
|
+
else if (options === null || options === void 0 ? void 0 : options.type) {
|
|
31
|
+
target.assign((0, clone_1.clone)(options.type));
|
|
32
|
+
}
|
|
24
33
|
else {
|
|
25
34
|
target.assign((0, clone_1.clone)(target.getType()));
|
|
26
35
|
}
|