UNPKG

@abaplint/runtime

Version:
25 lines 845 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parametersCall = parametersCall; async function parametersCall(method, parameters) { const input = {}; let receiving = undefined; for (const v of parameters.array()) { const kind = v.get().kind.get(); if (kind === "") { throw new Error("open-abap currently requires KIND to be set in PARAMETER-TABLE calls"); } else if (kind === "R") { receiving = v.get().value; continue; } const name = v.get().name.get().toLowerCase().trimEnd(); const value = v.get().value.dereference(); input[name] = value; } const res = await method(input); if (res !== undefined) { receiving?.set(res); } } //# sourceMappingURL=parameters_call.js.map