@abaplint/runtime 1.7.23 → 1.7.27
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.
- package/build/src/statements/call_function.d.ts +9 -0
- package/build/src/statements/call_function.js +10 -0
- package/build/src/statements/create_data.d.ts +6 -1
- package/build/src/statements/create_data.js +12 -3
- package/build/src/statements/index.d.ts +2 -0
- package/build/src/statements/index.js +2 -0
- package/build/src/types/structure.d.ts +3 -1
- package/build/src/types/structure.js +5 -1
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callFunction = void 0;
|
|
4
|
+
function callFunction(_options) {
|
|
5
|
+
// note: this is only called if DESTNIATION is supplied
|
|
6
|
+
// todo
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
exports.callFunction = callFunction;
|
|
10
|
+
//# sourceMappingURL=call_function.js.map
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { append } from "./append";
|
|
2
2
|
import { assert } from "./assert";
|
|
3
3
|
import { assign } from "./assign";
|
|
4
|
+
import { callFunction } from "./call_function";
|
|
4
5
|
import { clear } from "./clear";
|
|
5
6
|
import { commit } from "./commit";
|
|
6
7
|
import { concatenate } from "./concatenate";
|
|
@@ -44,6 +45,7 @@ export declare class Statements {
|
|
|
44
45
|
describe: typeof describe;
|
|
45
46
|
find: typeof find;
|
|
46
47
|
getBit: typeof getBit;
|
|
48
|
+
callFunction: typeof callFunction;
|
|
47
49
|
getRunTime: typeof getRunTime;
|
|
48
50
|
getTime: typeof getTime;
|
|
49
51
|
insertDatabase: typeof insertDatabase;
|
|
@@ -4,6 +4,7 @@ exports.Statements = void 0;
|
|
|
4
4
|
const append_1 = require("./append");
|
|
5
5
|
const assert_1 = require("./assert");
|
|
6
6
|
const assign_1 = require("./assign");
|
|
7
|
+
const call_function_1 = require("./call_function");
|
|
7
8
|
const clear_1 = require("./clear");
|
|
8
9
|
const commit_1 = require("./commit");
|
|
9
10
|
const concatenate_1 = require("./concatenate");
|
|
@@ -49,6 +50,7 @@ class Statements {
|
|
|
49
50
|
this.describe = describe_1.describe;
|
|
50
51
|
this.find = find_1.find;
|
|
51
52
|
this.getBit = get_bit_1.getBit;
|
|
53
|
+
this.callFunction = call_function_1.callFunction;
|
|
52
54
|
this.getRunTime = get_run_time_1.getRunTime;
|
|
53
55
|
this.getTime = get_time_1.getTime;
|
|
54
56
|
this.insertDatabase = insert_database_1.insertDatabase;
|
|
@@ -4,8 +4,10 @@ import { ICharacter } from "./_character";
|
|
|
4
4
|
import { INumeric } from "./_numeric";
|
|
5
5
|
export declare class Structure {
|
|
6
6
|
private readonly value;
|
|
7
|
-
|
|
7
|
+
private readonly qualifiedName;
|
|
8
|
+
constructor(fields: any, qualifiedName?: string);
|
|
8
9
|
clear(): this;
|
|
10
|
+
getQualifiedName(): string | undefined;
|
|
9
11
|
set(input: Structure | string | INumeric | Table | ICharacter | FieldSymbol | undefined): this | undefined;
|
|
10
12
|
private setCharacter;
|
|
11
13
|
get(): any;
|
|
@@ -5,8 +5,9 @@ const clone_1 = require("../clone");
|
|
|
5
5
|
const field_symbol_1 = require("./field_symbol");
|
|
6
6
|
const table_1 = require("./table");
|
|
7
7
|
class Structure {
|
|
8
|
-
constructor(fields) {
|
|
8
|
+
constructor(fields, qualifiedName) {
|
|
9
9
|
this.value = fields;
|
|
10
|
+
this.qualifiedName = qualifiedName === null || qualifiedName === void 0 ? void 0 : qualifiedName.toUpperCase();
|
|
10
11
|
}
|
|
11
12
|
clear() {
|
|
12
13
|
for (const f in this.value) {
|
|
@@ -15,6 +16,9 @@ class Structure {
|
|
|
15
16
|
}
|
|
16
17
|
return this;
|
|
17
18
|
}
|
|
19
|
+
getQualifiedName() {
|
|
20
|
+
return this.qualifiedName;
|
|
21
|
+
}
|
|
18
22
|
set(input) {
|
|
19
23
|
if (input === undefined) {
|
|
20
24
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.27",
|
|
4
4
|
"description": "Transpiler - Runtime",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"chai": "^4.3.4",
|
|
38
38
|
"mocha": "^9.1.4",
|
|
39
39
|
"source-map-support": "^0.5.21",
|
|
40
|
-
"typescript": "^4.5.
|
|
40
|
+
"typescript": "^4.5.5"
|
|
41
41
|
}
|
|
42
42
|
}
|