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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | 1x 1x 1x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 1x 1x 1x 1x 1x 1x 1x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 611x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 611x 611x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 611x 611x 611x 611x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 590x 376x 590x 195x 214x 19x 19x 590x 590x 590x 590x 316x 316x 541x 541x 541x 541x 316x 5x 5x 590x 274x 274x 186x 186x 186x 1038x 1038x 1038x 1038x 186x 274x 590x 590x 611x 567x 567x 567x 567x 611x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | const {cl_abap_datadescr} = await import("./cl_abap_datadescr.clas.mjs"); const {cx_root} = await import("./cx_root.clas.mjs"); // cl_abap_tabledescr.clas.abap class cl_abap_tabledescr extends cl_abap_datadescr { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'CL_ABAP_TABLEDESCR'; static IMPLEMENTED_INTERFACES = []; static ATTRIBUTES = {"HAS_UNIQUE_KEY": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "U", "is_constant": " ", "is_class": " "}, "KEY": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.Character(255, {"qualifiedName":"abap_keyname"})}, "abap_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "abap_keydescr_tab");}, "visibility": "U", "is_constant": " ", "is_class": " "}, "KEY_DEFKIND": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"abap_keydefkind"});}, "visibility": "U", "is_constant": " ", "is_class": " "}, "TABLE_KIND": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"abap_tablekind"});}, "visibility": "U", "is_constant": " ", "is_class": " "}, "INITIAL_SIZE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": " ", "is_class": " "}, "MO_LINE_TYPE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TYPEDESCR", RTTIName: "\\CLASS=CL_ABAP_TYPEDESCR"});}, "visibility": "I", "is_constant": " ", "is_class": " "}, "MT_KEYS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr_tab");}, "visibility": "I", "is_constant": " ", "is_class": " "}, "TABLEKIND_ANY": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "TABLEKIND_STD": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "TABLEKIND_INDEX": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "TABLEKIND_HASHED": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "TABLEKIND_SORTED": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "KEYDEFKIND_DEFAULT": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "KEYDEFKIND_TABLELINE": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "KEYDEFKIND_USER": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "KEYDEFKIND_EMPTY": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}}; static METHODS = {"CONSTRUCT_FROM_DATA": {"visibility": "U", "parameters": {"DESCR": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"});}, "is_optional": " "}, "DATA": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}}}, "GET_TABLE_LINE_TYPE": {"visibility": "U", "parameters": {"TYPE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}}}, "GET": {"visibility": "U", "parameters": {"VAL": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"});}, "is_optional": " "}, "TYPE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}}}, "GET_WITH_KEYS": {"visibility": "U", "parameters": {"P_RESULT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"});}, "is_optional": " "}, "P_LINE_TYPE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}, "P_KEYS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr_tab");}, "is_optional": " "}}}, "CREATE": {"visibility": "U", "parameters": {"REF": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"});}, "is_optional": " "}, "P_LINE_TYPE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TYPEDESCR", RTTIName: "\\CLASS=CL_ABAP_TYPEDESCR"});}, "is_optional": " "}, "P_TABLE_KIND": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"abap_tablekind"});}, "is_optional": " "}, "P_UNIQUE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "P_KEY": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.Character(255, {"qualifiedName":"abap_keyname"})}, "abap_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "abap_keydescr_tab");}, "is_optional": " "}, "P_KEY_KIND": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"abap_keydefkind"});}, "is_optional": " "}}}, "GET_KEYS": {"visibility": "U", "parameters": {"P_KEYS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr_tab");}, "is_optional": " "}}}}; #mo_line_type; #mt_keys; constructor() { const sup = super(); this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "SUPER": sup.FRIENDS_ACCESS_INSTANCE, "get_table_line_type": this.get_table_line_type.bind(this), "get_keys": this.get_keys.bind(this), }; this.has_unique_key = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); this.key = abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.Character(255, {"qualifiedName":"abap_keyname"})}, "abap_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "abap_keydescr_tab"); this.key_defkind = new abap.types.Character(1, {"qualifiedName":"abap_keydefkind"}); this.table_kind = new abap.types.Character(1, {"qualifiedName":"abap_tablekind"}); this.initial_size = new abap.types.Integer({qualifiedName: "I"}); this.#mo_line_type = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TYPEDESCR", RTTIName: "\\CLASS=CL_ABAP_TYPEDESCR"}); this.FRIENDS_ACCESS_INSTANCE["mo_line_type"] = this.#mo_line_type; this.#mt_keys = abap.types.TableFactory.construct(new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr_tab"); this.FRIENDS_ACCESS_INSTANCE["mt_keys"] = this.#mt_keys; this.tablekind_any = cl_abap_tabledescr.tablekind_any; this.tablekind_std = cl_abap_tabledescr.tablekind_std; this.tablekind_index = cl_abap_tabledescr.tablekind_index; this.tablekind_hashed = cl_abap_tabledescr.tablekind_hashed; this.tablekind_sorted = cl_abap_tabledescr.tablekind_sorted; this.keydefkind_default = cl_abap_tabledescr.keydefkind_default; this.keydefkind_tableline = cl_abap_tabledescr.keydefkind_tableline; this.keydefkind_user = cl_abap_tabledescr.keydefkind_user; this.keydefkind_empty = cl_abap_tabledescr.keydefkind_empty; } async constructor_(INPUT) { if (super.constructor_) { await super.constructor_(INPUT); } return this; } async create(INPUT) { return cl_abap_tabledescr.create(INPUT); } static async create(INPUT) { let ref = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"}); let p_line_type = INPUT?.p_line_type; if (p_line_type?.getQualifiedName === undefined || p_line_type.getQualifiedName() !== "CL_ABAP_TYPEDESCR") { p_line_type = undefined; } if (p_line_type === undefined) { p_line_type = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TYPEDESCR", RTTIName: "\\CLASS=CL_ABAP_TYPEDESCR"}).set(INPUT.p_line_type); } let p_table_kind = new abap.types.Character(1, {"qualifiedName":"abap_tablekind"}); if (INPUT && INPUT.p_table_kind) {p_table_kind.set(INPUT.p_table_kind);} if (INPUT === undefined || INPUT.p_table_kind === undefined) {p_table_kind = this.tablekind_std;} let p_unique = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); if (INPUT && INPUT.p_unique) {p_unique.set(INPUT.p_unique);} if (INPUT === undefined || INPUT.p_unique === undefined) {p_unique = abap.builtin.abap_false;} let p_key = abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.Character(255, {"qualifiedName":"abap_keyname"})}, "abap_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "abap_keydescr_tab"); if (INPUT && INPUT.p_key) {p_key.set(INPUT.p_key);} let p_key_kind = new abap.types.Character(1, {"qualifiedName":"abap_keydefkind"}); if (INPUT && INPUT.p_key_kind) {p_key_kind.set(INPUT.p_key_kind);} if (INPUT === undefined || INPUT.p_key_kind === undefined) {p_key_kind = this.keydefkind_default;} ref.set(await (new abap.Classes['CL_ABAP_TABLEDESCR']()).constructor_()); ref.get().has_unique_key.set(p_unique); ref.get().FRIENDS_ACCESS_INSTANCE["mo_line_type"].set(p_line_type); ref.get().key.set(p_key); ref.get().key_defkind.set(p_key_kind); ref.get().table_kind.set(p_table_kind); ref.get().type_kind.set(cl_abap_tabledescr.typekind_table); ref.get().kind.set(cl_abap_tabledescr.kind_table); return ref; } async get_keys() { let p_keys = abap.types.TableFactory.construct(new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr_tab"); p_keys.set(this.#mt_keys); return p_keys; } async get_with_keys(INPUT) { return cl_abap_tabledescr.get_with_keys(INPUT); } static async get_with_keys(INPUT) { let p_result = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"}); let p_line_type = INPUT?.p_line_type; if (p_line_type?.getQualifiedName === undefined || p_line_type.getQualifiedName() !== "CL_ABAP_DATADESCR") { p_line_type = undefined; } if (p_line_type === undefined) { p_line_type = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.p_line_type); } let p_keys = INPUT?.p_keys; if (p_keys?.getQualifiedName === undefined || p_keys.getQualifiedName() !== "ABAP_TABLE_KEYDESCR_TAB") { p_keys = undefined; } if (p_keys === undefined) { p_keys = abap.types.TableFactory.construct(new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr_tab").set(INPUT.p_keys); } let ls_key = new abap.types.Structure({ "components": abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"})}, "abap_table_keycompdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_table_keydescr-components"), "name": new abap.types.String({qualifiedName: "NAME"}), "is_primary": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "access_kind": new abap.types.String({qualifiedName: "ACCESS_KIND"}), "is_unique": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "key_kind": new abap.types.String({qualifiedName: "KEY_KIND"})}, "abap_table_keydescr", undefined, {}, {}); if (abap.compare.ne(abap.builtin.lines({val: p_keys}), abap.IntegerFactory.get(1))) { abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo'))); } abap.statements.readTable(p_keys,{index: abap.IntegerFactory.get(1), into: ls_key}); abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))); p_result.set(await (new abap.Classes['CL_ABAP_TABLEDESCR']()).constructor_()); p_result.get().has_unique_key.set(ls_key.get().is_unique); p_result.get().FRIENDS_ACCESS_INSTANCE["mo_line_type"].set(p_line_type); p_result.get().key_defkind.set(ls_key.get().key_kind); p_result.get().table_kind.set(ls_key.get().access_kind); p_result.get().FRIENDS_ACCESS_INSTANCE["mt_keys"].set(p_keys); p_result.get().type_kind.set(cl_abap_tabledescr.typekind_table); p_result.get().kind.set(cl_abap_tabledescr.kind_table); return p_result; } async get(INPUT) { return cl_abap_tabledescr.get(INPUT); } static async get(INPUT) { let val = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"}); let type = INPUT?.type; if (type?.getQualifiedName === undefined || type.getQualifiedName() !== "CL_ABAP_DATADESCR") { type = undefined; } if (type === undefined) { type = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.type); } abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo'))); return val; } async construct_from_data(INPUT) { return cl_abap_tabledescr.construct_from_data(INPUT); } static async construct_from_data(INPUT) { let descr = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"}); let data = INPUT?.data; let lv_dummy = new abap.types.Integer({qualifiedName: "I"}); let lv_flag = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); let lv_str = new abap.types.String({qualifiedName: "STRING"}); let lv_type = new abap.types.String({qualifiedName: "STRING"}); let lo_struct = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_STRUCTDESCR", RTTIName: "\\CLASS=CL_ABAP_STRUCTDESCR"}); let lt_components = abap.types.TableFactory.construct(new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"}), "type": new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}), "as_include": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "suffix": new abap.types.String({qualifiedName: "SUFFIX"})}, "abap_componentdescr", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "abap_component_tab"); let ls_component = new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "NAME"}), "type": new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}), "as_include": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "suffix": new abap.types.String({qualifiedName: "SUFFIX"})}, "abap_componentdescr", undefined, {}, {}); let ls_key = new abap.types.Structure({ "name": new abap.types.Character(255, {"qualifiedName":"abap_keyname"})}, "abap_keydescr", undefined, {}, {}); descr.set(await (new abap.Classes['CL_ABAP_TABLEDESCR']()).constructor_()); lv_flag.set(data.getOptions()?.primaryKey?.isUnique === true ? "X" : ""); descr.get().has_unique_key.set(lv_flag); lv_type.set(data.getOptions()?.primaryKey?.type || ""); let unique1235 = lv_type; if (abap.compare.eq(unique1235, abap.CharacterFactory.get(8, 'STANDARD'))) { descr.get().table_kind.set(cl_abap_tabledescr.tablekind_std); } else if (abap.compare.eq(unique1235, abap.CharacterFactory.get(6, 'SORTED'))) { descr.get().table_kind.set(cl_abap_tabledescr.tablekind_sorted); } else if (abap.compare.eq(unique1235, abap.CharacterFactory.get(6, 'HASHED'))) { descr.get().table_kind.set(cl_abap_tabledescr.tablekind_hashed); } else { descr.get().table_kind.set(cl_abap_tabledescr.tablekind_std); } lv_dummy = data.getRowType(); descr.get().FRIENDS_ACCESS_INSTANCE["mo_line_type"].set((await abap.Classes['CL_ABAP_TYPEDESCR'].describe_by_data({p_data: lv_dummy}))); lv_flag.set(data.getOptions()?.primaryKey?.keyFields.length > 0 ? "X" : ""); if (abap.compare.eq(lv_flag, abap.builtin.abap_true)) { descr.get().key_defkind.set(cl_abap_tabledescr.keydefkind_user); for (const k of data.getOptions()?.primaryKey?.keyFields) { lv_str.set(k); ls_key.get().name.set(lv_str); abap.statements.append({source: ls_key, target: descr.get().key}); } if (abap.compare.eq(abap.builtin.lines({val: descr.get().key}), abap.IntegerFactory.get(1)) && abap.compare.eq(ls_key.get().name, abap.CharacterFactory.get(10, 'TABLE_LINE'))) { descr.get().key_defkind.set(cl_abap_tabledescr.keydefkind_tableline); } } else { descr.get().key_defkind.set(cl_abap_tabledescr.keydefkind_default); if (abap.compare.eq(((await descr.get().get_table_line_type())).get().kind, cl_abap_tabledescr.kind_struct)) { await abap.statements.cast(lo_struct, (await descr.get().get_table_line_type())); lt_components.set((await lo_struct.get().get_components())); for await (const unique1236 of abap.statements.loop(lt_components)) { ls_component.set(unique1236); ls_key.get().name.set(ls_component.get().name); abap.statements.append({source: ls_key, target: descr.get().key}); } } } return descr; } async get_table_line_type() { let type = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}); await abap.statements.cast(type, this.#mo_line_type); return type; } } abap.Classes['CL_ABAP_TABLEDESCR'] = cl_abap_tabledescr; cl_abap_tabledescr.tablekind_any = new abap.types.Character(1, {}); cl_abap_tabledescr.tablekind_any.set('A'); cl_abap_tabledescr.tablekind_std = new abap.types.Character(1, {}); cl_abap_tabledescr.tablekind_std.set('S'); cl_abap_tabledescr.tablekind_index = new abap.types.Character(1, {}); cl_abap_tabledescr.tablekind_index.set('I'); cl_abap_tabledescr.tablekind_hashed = new abap.types.Character(1, {}); cl_abap_tabledescr.tablekind_hashed.set('H'); cl_abap_tabledescr.tablekind_sorted = new abap.types.Character(1, {}); cl_abap_tabledescr.tablekind_sorted.set('O'); cl_abap_tabledescr.keydefkind_default = new abap.types.Character(1, {}); cl_abap_tabledescr.keydefkind_default.set('D'); cl_abap_tabledescr.keydefkind_tableline = new abap.types.Character(1, {}); cl_abap_tabledescr.keydefkind_tableline.set('L'); cl_abap_tabledescr.keydefkind_user = new abap.types.Character(1, {}); cl_abap_tabledescr.keydefkind_user.set('U'); cl_abap_tabledescr.keydefkind_empty = new abap.types.Character(1, {}); cl_abap_tabledescr.keydefkind_empty.set('E'); export {cl_abap_tabledescr}; |