@abaplint/runtime 2.7.59 → 2.7.60

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,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CallFunction = void 0;
4
+ const throw_error_1 = require("../throw_error");
4
5
  const types_1 = require("../types");
5
6
  const receive_1 = require("./receive");
6
7
  class CallFunction {
@@ -17,10 +18,14 @@ class CallFunction {
17
18
  exceptions: options.exceptions,
18
19
  };
19
20
  options.name = options.name.trimEnd();
21
+ // @ts-ignore
22
+ const fm = abap.FunctionModules[options.name];
20
23
  if (options.destination) {
21
24
  if (options.destination.trim() === "") {
22
- // @ts-ignore
23
- await abap.FunctionModules[options.name](param);
25
+ if (fm === undefined) {
26
+ (0, throw_error_1.throwError)("CX_SY_DYN_CALL_ILLEGAL_FUNC");
27
+ }
28
+ await fm(param);
24
29
  return;
25
30
  }
26
31
  const dest = this.context.RFCDestinations[options.destination];
@@ -36,8 +41,10 @@ class CallFunction {
36
41
  });
37
42
  }
38
43
  else if (options.calling) {
39
- // @ts-ignore
40
- await abap.FunctionModules[options.name](param);
44
+ if (fm === undefined) {
45
+ (0, throw_error_1.throwError)("CX_SY_DYN_CALL_ILLEGAL_FUNC");
46
+ }
47
+ await fm(param);
41
48
  // save importing + tables + changing + exception for RECEIVE RESULTS
42
49
  (0, receive_1._receiveSetResult)(param);
43
50
  // call the callback, async
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.7.59",
3
+ "version": "2.7.60",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",