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 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 170x 170x 170x 170x 170x 170x 170x 170x 170x 112x 170x 34x 58x 24x 24x 170x 1x 1x 1x 1x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 113x 113x 113x 113x 113x 113x 113x 34x 34x 1x 1x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 24x 21x 21x 21x 21x 21x 21x 21x 21x 21x 55x 55x 55x 21x 24x 24x 1x 1x 112x 112x 112x 112x 112x 112x 112x 112x 112x 10x 112x 102x 2x 102x 100x 100x 100x 100x 100x 100x 100x 100x 112x 1x 1x 1x | const {cx_root} = await import("./cx_root.clas.mjs"); // kernel_create_data_handle.clas.abap class kernel_create_data_handle { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'KERNEL_CREATE_DATA_HANDLE'; static IMPLEMENTED_INTERFACES = []; static ATTRIBUTES = {}; static METHODS = {"ELEM": {"visibility": "I", "parameters": {"HANDLE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}, "DREF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}}, "STRUCT": {"visibility": "I", "parameters": {"HANDLE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}, "DREF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}}, "TABLE": {"visibility": "I", "parameters": {"HANDLE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}, "DREF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}}, "REF": {"visibility": "I", "parameters": {"HANDLE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}, "DREF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}}, "CALL": {"visibility": "U", "parameters": {"HANDLE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"});}, "is_optional": " "}, "DREF": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}}}; 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 call(INPUT) { return kernel_create_data_handle.call(INPUT); } static async call(INPUT) { let handle = INPUT?.handle; if (handle?.getQualifiedName === undefined || handle.getQualifiedName() !== "CL_ABAP_DATADESCR") { handle = undefined; } if (handle === undefined) { handle = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.handle); } let dref = new abap.types.DataReference(new abap.types.Character(4)); if (INPUT && INPUT.dref) {dref = INPUT.dref;} if (abap.compare.initial(handle)) { const unique1202 = await (new abap.Classes['CX_SY_REF_IS_INITIAL']()).constructor_(); unique1202.EXTRA_CX = {"INTERNAL_FILENAME": "kernel_create_data_handle.clas.abap","INTERNAL_LINE": 35}; throw unique1202; } if (dref.constructor.name === "FieldSymbol") { dref = dref.getPointer(); } let unique1203 = handle.get().kind; if (abap.compare.eq(unique1203, abap.Classes['CL_ABAP_TYPEDESCR'].kind_elem)) { await this.elem({handle: handle, dref: dref}); } else if (abap.compare.eq(unique1203, abap.Classes['CL_ABAP_TYPEDESCR'].kind_struct)) { await this.struct({handle: handle, dref: dref}); } else if (abap.compare.eq(unique1203, abap.Classes['CL_ABAP_TYPEDESCR'].kind_table)) { await this.table({handle: handle, dref: dref}); } else if (abap.compare.eq(unique1203, abap.Classes['CL_ABAP_TYPEDESCR'].kind_ref)) { await this.ref({handle: handle, dref: dref}); } else { console.dir(handle); abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo'))); } } async ref(INPUT) { return kernel_create_data_handle.ref(INPUT); } static async ref(INPUT) { let handle = INPUT?.handle; if (handle?.getQualifiedName === undefined || handle.getQualifiedName() !== "CL_ABAP_DATADESCR") { handle = undefined; } if (handle === undefined) { handle = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.handle); } let dref = new abap.types.DataReference(new abap.types.Character(4)); if (INPUT && INPUT.dref) {dref = INPUT.dref;} let lo_ref = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_REFDESCR", RTTIName: "\\CLASS=CL_ABAP_REFDESCR"}); let lo_data = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}); let field = new abap.types.DataReference(new abap.types.Character(4)); await abap.statements.cast(lo_ref, handle); await abap.statements.cast(lo_data, (await lo_ref.get().get_referenced_type())); await this.call({handle: lo_data, dref: field}); dref.assign(new abap.types.DataReference(field.getPointer())); } async struct(INPUT) { return kernel_create_data_handle.struct(INPUT); } static async struct(INPUT) { let handle = INPUT?.handle; if (handle?.getQualifiedName === undefined || handle.getQualifiedName() !== "CL_ABAP_DATADESCR") { handle = undefined; } if (handle === undefined) { handle = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.handle); } let dref = new abap.types.DataReference(new abap.types.Character(4)); if (INPUT && INPUT.dref) {dref = INPUT.dref;} 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 field = new abap.types.DataReference(new abap.types.Character(4)); let lv_name = new abap.types.String({qualifiedName: "STRING"}); let lv_suffix = new abap.types.String({qualifiedName: "STRING"}); let fs_ls_component_ = new abap.types.FieldSymbol(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, {}, {})); await abap.statements.cast(lo_struct, handle); lt_components.set((await lo_struct.get().get_components())); let obj = {}; let suffix = {}; let asInclude = {}; for await (const unique1204 of abap.statements.loop(lt_components)) { fs_ls_component_.assign(unique1204); await this.call({handle: (await lo_struct.get().get_component_type({p_name: fs_ls_component_.get().name})), dref: field}); lv_name.set(abap.builtin.to_lower({val: fs_ls_component_.get().name})); obj[lv_name.get()] = field.getPointer(); if (abap.compare.eq(fs_ls_component_.get().as_include, abap.builtin.abap_true)) { asInclude[lv_name.get()] = true; } if (abap.compare.initial(fs_ls_component_.get().suffix) === false) { lv_suffix.set(abap.builtin.to_lower({val: fs_ls_component_.get().suffix})); suffix[lv_name.get()] = lv_suffix.get(); } } dref.assign(new abap.types.Structure(obj, lo_struct.get().internal_qualified_name.get(), lo_struct.get().internal_ddic_name.get(), suffix, asInclude)); } async table(INPUT) { return kernel_create_data_handle.table(INPUT); } static async table(INPUT) { let handle = INPUT?.handle; if (handle?.getQualifiedName === undefined || handle.getQualifiedName() !== "CL_ABAP_DATADESCR") { handle = undefined; } if (handle === undefined) { handle = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.handle); } let dref = new abap.types.DataReference(new abap.types.Character(4)); if (INPUT && INPUT.dref) {dref = INPUT.dref;} let lo_table = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_TABLEDESCR", RTTIName: "\\CLASS=CL_ABAP_TABLEDESCR"}); let lt_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"); let lv_component = new abap.types.String({qualifiedName: "STRING"}); let field = new abap.types.DataReference(new abap.types.Character(4)); let fs_ls_key_ = new abap.types.FieldSymbol(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, {}, {})); await abap.statements.cast(lo_table, handle); await this.call({handle: (await lo_table.get().get_table_line_type()), dref: field}); let options = {primaryKey: undefined, keyType: "DEFAULT", withHeader: false}; options.primaryKey = {name: "primary_key", type: "STANDARD", keyFields: [], isUnique: false}; lt_keys.set((await lo_table.get().get_keys())); for await (const unique1205 of abap.statements.loop(lt_keys,{where: async (I) => {return abap.compare.eq(I.is_primary, abap.builtin.abap_true);},topEquals: {"is_primary": abap.builtin.abap_true}})) { fs_ls_key_.assign(unique1205); if (abap.compare.eq(fs_ls_key_.get().access_kind, abap.Classes['CL_ABAP_TABLEDESCR'].tablekind_sorted)) { options.primaryKey.type = "SORTED"; } else if (abap.compare.eq(fs_ls_key_.get().access_kind, abap.Classes['CL_ABAP_TABLEDESCR'].tablekind_hashed)) { options.primaryKey.type = "HASHED"; } if (abap.compare.eq(fs_ls_key_.get().is_unique, abap.builtin.abap_true)) { options.primaryKey.isUnique = true; } for await (const unique1206 of abap.statements.loop(fs_ls_key_.get().components)) { lv_component.set(unique1206); options.primaryKey.keyFields.push(lv_component.get().toLowerCase()); } } dref.assign(abap.types.TableFactory.construct(field.getPointer(), options)); } async elem(INPUT) { return kernel_create_data_handle.elem(INPUT); } static async elem(INPUT) { let handle = INPUT?.handle; if (handle?.getQualifiedName === undefined || handle.getQualifiedName() !== "CL_ABAP_DATADESCR") { handle = undefined; } if (handle === undefined) { handle = new abap.types.ABAPObject({qualifiedName: "CL_ABAP_DATADESCR", RTTIName: "\\CLASS=CL_ABAP_DATADESCR"}).set(INPUT.handle); } let dref = new abap.types.DataReference(new abap.types.Character(4)); if (INPUT && INPUT.dref) {dref = INPUT.dref;} let lv_half = new abap.types.Integer({qualifiedName: "I"}); let unique1207 = handle.get().type_kind; if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_float)) { abap.statements.createData(dref,{"typeName": "F"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_string)) { abap.statements.createData(dref,{"typeName": "STRING"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_xstring)) { abap.statements.createData(dref,{"typeName": "XSTRING"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_int)) { abap.statements.createData(dref,{"typeName": "I"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_utclong)) { abap.statements.createData(dref,{"typeName": "UTCLONG"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_date)) { abap.statements.createData(dref,{"typeName": "D"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_hex)) { abap.statements.createData(dref,{"typeName": "X","length": handle.get().length}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_packed)) { abap.statements.createData(dref,{"typeName": "P","length": handle.get().length,"decimals": handle.get().decimals}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_char)) { lv_half.set(abap.operators.divide(handle.get().length,abap.IntegerFactory.get(2))); abap.statements.createData(dref,{"typeName": "C","length": lv_half}); dref.getPointer().extra = {"qualifiedName": handle.get().internal_qualified_name}; } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_num)) { lv_half.set(abap.operators.divide(handle.get().length,abap.IntegerFactory.get(2))); abap.statements.createData(dref,{"typeName": "N","length": lv_half}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_time)) { abap.statements.createData(dref,{"typeName": "T"}); } else if (abap.compare.eq(unique1207, abap.Classes['CL_ABAP_TYPEDESCR'].typekind_int8)) { abap.statements.createData(dref,{"typeName": "INT8"}); } else { console.dir(handle); abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo'))); } } } abap.Classes['KERNEL_CREATE_DATA_HANDLE'] = kernel_create_data_handle; export {kernel_create_data_handle}; |