All files / output cl_bcs_convert.clas.mjs

33.67% Statements 33/98
100% Branches 2/2
3.7% Functions 1/27
33.67% Lines 33/98

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 981x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x             1x       1x     1x                         1x     1x                 1x     1x                     1x     1x                 1x     1x                 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_bcs_convert.clas.abap
class cl_bcs_convert {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_BCS_CONVERT';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"STRING_TO_SOLI": {"visibility": "U", "parameters": {"ET_SOLI": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "line": new abap.types.Character(255, {"qualifiedName":"SO_TEXT255","ddicName":"SO_TEXT255","description":"SO_TEXT255"})}, "SOLI", "SOLI", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLI_TAB");}, "is_optional": " ", "parm_kind": "R", "type_name": "TableType"}, "IV_STRING": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}}},
  "XSTRING_TO_SOLIX": {"visibility": "U", "parameters": {"ET_SOLIX": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "line": new abap.types.Hex({length: 255, qualifiedName: "SO_RAW255"})}, "SOLIX", "SOLIX", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLIX_TAB");}, "is_optional": " ", "parm_kind": "R", "type_name": "TableType"}, "IV_XSTRING": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "XStringType"}}},
  "RAW_TO_STRING": {"visibility": "U", "parameters": {"EV_STRING": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "IT_SOLI": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "line": new abap.types.Character(255, {"qualifiedName":"SO_TEXT255","ddicName":"SO_TEXT255","description":"SO_TEXT255"})}, "SOLI", "SOLI", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLI_TAB");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}}},
  "SOLIX_TO_XSTRING": {"visibility": "U", "parameters": {"EV_XSTRING": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "XStringType"}, "IT_SOLIX": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "line": new abap.types.Hex({length: 255, qualifiedName: "SO_RAW255"})}, "SOLIX", "SOLIX", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLIX_TAB");}, "is_optional": " ", "parm_kind": "I", "type_name": "TableType"}, "IV_SIZE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}}},
  "STRING_TO_SOLIX": {"visibility": "U", "parameters": {"IV_STRING": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "StringType"}, "IV_CODEPAGE": {"type": () => {return new abap.types.Character(20, {"qualifiedName":"ABAP_ENCOD","ddicName":"ABAP_ENCOD","description":"ABAP_ENCOD"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IV_ADD_BOM": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "ET_SOLIX": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "line": new abap.types.Hex({length: 255, qualifiedName: "SO_RAW255"})}, "SOLIX", "SOLIX", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLIX_TAB");}, "is_optional": " ", "parm_kind": "E", "type_name": "TableType"}, "EV_SIZE": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"SO_OBJ_LEN","ddicName":"SO_OBJ_LEN","description":"Size"});}, "is_optional": " ", "parm_kind": "E", "type_name": "CharacterType"}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async string_to_solix(INPUT) {
    return cl_bcs_convert.string_to_solix(INPUT);
  }
  static async string_to_solix(INPUT) {
    let iv_string = INPUT?.iv_string;
    if (iv_string?.getQualifiedName === undefined || iv_string.getQualifiedName() !== "STRING") { iv_string = undefined; }
    if (iv_string === undefined) { iv_string = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_string); }
    let iv_codepage = new abap.types.Character(20, {"qualifiedName":"ABAP_ENCOD","ddicName":"ABAP_ENCOD","description":"ABAP_ENCOD"});
    if (INPUT && INPUT.iv_codepage) {iv_codepage.set(INPUT.iv_codepage);}
    let iv_add_bom = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.iv_add_bom) {iv_add_bom.set(INPUT.iv_add_bom);}
    let et_solix = INPUT?.et_solix || abap.types.TableFactory.construct(new abap.types.Structure({
    "line": new abap.types.Hex({length: 255, qualifiedName: "SO_RAW255"})}, "SOLIX", "SOLIX", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLIX_TAB");
    let ev_size = INPUT?.ev_size || new abap.types.Character(12, {"qualifiedName":"SO_OBJ_LEN","ddicName":"SO_OBJ_LEN","description":"Size"});
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async string_to_soli(INPUT) {
    return cl_bcs_convert.string_to_soli(INPUT);
  }
  static async string_to_soli(INPUT) {
    let et_soli = abap.types.TableFactory.construct(new abap.types.Structure({
    "line": new abap.types.Character(255, {"qualifiedName":"SO_TEXT255","ddicName":"SO_TEXT255","description":"SO_TEXT255"})}, "SOLI", "SOLI", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLI_TAB");
    let iv_string = INPUT?.iv_string;
    if (iv_string?.getQualifiedName === undefined || iv_string.getQualifiedName() !== "STRING") { iv_string = undefined; }
    if (iv_string === undefined) { iv_string = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_string); }
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
    return et_soli;
  }
  async solix_to_xstring(INPUT) {
    return cl_bcs_convert.solix_to_xstring(INPUT);
  }
  static async solix_to_xstring(INPUT) {
    let ev_xstring = new abap.types.XString({qualifiedName: "XSTRING"});
    let it_solix = INPUT?.it_solix;
    if (it_solix?.getQualifiedName === undefined || it_solix.getQualifiedName() !== "SOLIX_TAB") { it_solix = undefined; }
    if (it_solix === undefined) { it_solix = abap.types.TableFactory.construct(new abap.types.Structure({
    "line": new abap.types.Hex({length: 255, qualifiedName: "SO_RAW255"})}, "SOLIX", "SOLIX", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLIX_TAB").set(INPUT.it_solix); }
    let iv_size = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.iv_size) {iv_size.set(INPUT.iv_size);}
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
    return ev_xstring;
  }
  async xstring_to_solix(INPUT) {
    return cl_bcs_convert.xstring_to_solix(INPUT);
  }
  static async xstring_to_solix(INPUT) {
    let et_solix = abap.types.TableFactory.construct(new abap.types.Structure({
    "line": new abap.types.Hex({length: 255, qualifiedName: "SO_RAW255"})}, "SOLIX", "SOLIX", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLIX_TAB");
    let iv_xstring = INPUT?.iv_xstring;
    if (iv_xstring?.getQualifiedName === undefined || iv_xstring.getQualifiedName() !== "XSTRING") { iv_xstring = undefined; }
    if (iv_xstring === undefined) { iv_xstring = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_xstring); }
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
    return et_solix;
  }
  async raw_to_string(INPUT) {
    return cl_bcs_convert.raw_to_string(INPUT);
  }
  static async raw_to_string(INPUT) {
    let ev_string = new abap.types.String({qualifiedName: "STRING"});
    let it_soli = INPUT?.it_soli;
    if (it_soli?.getQualifiedName === undefined || it_soli.getQualifiedName() !== "SOLI_TAB") { it_soli = undefined; }
    if (it_soli === undefined) { it_soli = abap.types.TableFactory.construct(new abap.types.Structure({
    "line": new abap.types.Character(255, {"qualifiedName":"SO_TEXT255","ddicName":"SO_TEXT255","description":"SO_TEXT255"})}, "SOLI", "SOLI", {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "SOLI_TAB").set(INPUT.it_soli); }
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
    return ev_string;
  }
}
abap.Classes['CL_BCS_CONVERT'] = cl_bcs_convert;
export {cl_bcs_convert};