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 | 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_abap_datfm.clas.abap
class cl_abap_datfm {
static STATIC_SUPER = undefined;
static INTERNAL_TYPE = 'CLAS';
static INTERNAL_NAME = 'CL_ABAP_DATFM';
static IMPLEMENTED_INTERFACES = [];
static ATTRIBUTES = {"DDMMYYYY_DOT_SEPERATED": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"},
"YYYYMMDD_DOT_SEPERATED": {"type": () => {return new abap.types.Character(1, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"}};
static METHODS = {"CONV_DATE_EXT_TO_INT": {"visibility": "U", "parameters": {"IM_DATEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CSequenceType"}, "IM_DATFMDES": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"CHAR1","ddicName":"CHAR1","description":"CHAR1"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "EX_DATINT": {"type": () => {return new abap.types.Date({qualifiedName: "D"});}, "is_optional": " ", "parm_kind": "E", "type_name": "DateType"}, "EX_DATFMUSED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"CHAR1","ddicName":"CHAR1","description":"CHAR1"});}, "is_optional": " ", "parm_kind": "E", "type_name": "CharacterType"}}},
"GET_DATE_FORMAT_DES": {"visibility": "U", "parameters": {"IM_DATFM": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"CHAR1","ddicName":"CHAR1","description":"CHAR1"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IM_LANGU": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IM_PLAIN": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IM_LONG": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "EX_DATEFORMAT": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "E", "type_name": "CSequenceType"}}},
"CONV_PERIOD_EXT_TO_INT": {"visibility": "U", "parameters": {"IM_PERIODEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "I", "type_name": "CSequenceType"}, "EX_PERIODINT": {"type": () => {return new abap.types.Character();}, "is_optional": " ", "parm_kind": "E", "type_name": "CSequenceType"}}}};
constructor() {
this.me = new abap.types.ABAPObject();
this.me.set(this);
this.INTERNAL_ID = abap.internalIdCounter++;
this.FRIENDS_ACCESS_INSTANCE = {
};
this.ddmmyyyy_dot_seperated = cl_abap_datfm.ddmmyyyy_dot_seperated;
this.yyyymmdd_dot_seperated = cl_abap_datfm.yyyymmdd_dot_seperated;
}
async constructor_(INPUT) {
if (super.constructor_) { await super.constructor_(INPUT); }
return this;
}
async conv_period_ext_to_int(INPUT) {
return cl_abap_datfm.conv_period_ext_to_int(INPUT);
}
static async conv_period_ext_to_int(INPUT) {
let im_periodext = INPUT?.im_periodext;
let ex_periodint = INPUT?.ex_periodint || new abap.types.Character();
abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
}
async conv_date_ext_to_int(INPUT) {
return cl_abap_datfm.conv_date_ext_to_int(INPUT);
}
static async conv_date_ext_to_int(INPUT) {
let im_datext = INPUT?.im_datext;
let im_datfmdes = new abap.types.Character(1, {"qualifiedName":"CHAR1","ddicName":"CHAR1","description":"CHAR1"});
if (INPUT && INPUT.im_datfmdes) {im_datfmdes.set(INPUT.im_datfmdes);}
let ex_datint = INPUT?.ex_datint || new abap.types.Date({qualifiedName: "D"});
let ex_datfmused = INPUT?.ex_datfmused || new abap.types.Character(1, {"qualifiedName":"CHAR1","ddicName":"CHAR1","description":"CHAR1"});
let regex_ddmmyyyy_dot_seperated = new abap.types.String({qualifiedName: "STRING"});
regex_ddmmyyyy_dot_seperated.set('^(0[0-9]|[12][0-9]|3[01])[- \\..](0[0-9]|1[012])[- \\..]\\d\\d\\d\\d$');
let regex_yyyymmdd_dot_seperated = new abap.types.String({qualifiedName: "STRING"});
regex_yyyymmdd_dot_seperated.set('^\\d\\d\\d\\d[- \\..](0[0-9]|1[012])[- \\..](0[0-9]|[12][0-9]|3[01])$');
let regex_yyyymmdd_no_dot = new abap.types.String({qualifiedName: "STRING"});
regex_yyyymmdd_no_dot.set('^(\\d{4})(0[0-9]|1[012])(0[0-9]|[12][0-9]|3[01])$');
if (abap.compare.ne(im_datfmdes, cl_abap_datfm.ddmmyyyy_dot_seperated) && abap.compare.ne(im_datfmdes, cl_abap_datfm.yyyymmdd_dot_seperated)) {
const unique1396 = await (new abap.Classes['CX_ABAP_DATFM']()).constructor_();
unique1396.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_datfm.clas.abap","INTERNAL_LINE": 50};
throw unique1396;
}
abap.statements.find(im_datext, {regex: regex_ddmmyyyy_dot_seperated, first: false});
if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
ex_datint.set(abap.operators.concat(im_datext.getOffset({offset: 6, length: 4}),abap.operators.concat(im_datext.getOffset({offset: 3, length: 2}),im_datext.getOffset({length: 2}))));
ex_datfmused.set(cl_abap_datfm.ddmmyyyy_dot_seperated);
return;
}
abap.statements.find(im_datext, {regex: regex_yyyymmdd_dot_seperated, first: false});
if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
ex_datint.set(abap.operators.concat(im_datext.getOffset({length: 4}),abap.operators.concat(im_datext.getOffset({offset: 5, length: 2}),im_datext.getOffset({offset: 8, length: 2}))));
ex_datfmused.set(cl_abap_datfm.yyyymmdd_dot_seperated);
return;
}
abap.statements.find(im_datext, {regex: regex_yyyymmdd_no_dot, first: false});
if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
ex_datint.set(im_datext);
ex_datfmused.set(cl_abap_datfm.yyyymmdd_dot_seperated);
return;
}
const unique1397 = await (new abap.Classes['CX_ABAP_DATFM']()).constructor_();
unique1397.EXTRA_CX = {"INTERNAL_FILENAME": "cl_abap_datfm.clas.abap","INTERNAL_LINE": 74};
throw unique1397;
}
async get_date_format_des(INPUT) {
return cl_abap_datfm.get_date_format_des(INPUT);
}
static async get_date_format_des(INPUT) {
let im_datfm = new abap.types.Character(1, {"qualifiedName":"CHAR1","ddicName":"CHAR1","description":"CHAR1"});
if (INPUT && INPUT.im_datfm) {im_datfm.set(INPUT.im_datfm);}
let im_langu = new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"});
if (INPUT && INPUT.im_langu) {im_langu.set(INPUT.im_langu);}
if (INPUT === undefined || INPUT.im_langu === undefined) {im_langu = abap.builtin.sy.get().langu;}
let im_plain = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
if (INPUT && INPUT.im_plain) {im_plain.set(INPUT.im_plain);}
if (INPUT === undefined || INPUT.im_plain === undefined) {im_plain = abap.builtin.abap_false;}
let im_long = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
if (INPUT && INPUT.im_long) {im_long.set(INPUT.im_long);}
if (INPUT === undefined || INPUT.im_long === undefined) {im_long = abap.builtin.abap_false;}
let ex_dateformat = INPUT?.ex_dateformat || new abap.types.Character();
abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
}
}
abap.Classes['CL_ABAP_DATFM'] = cl_abap_datfm;
cl_abap_datfm.ddmmyyyy_dot_seperated = new abap.types.Character(1, {});
cl_abap_datfm.ddmmyyyy_dot_seperated.set('1');
cl_abap_datfm.yyyymmdd_dot_seperated = new abap.types.Character(1, {});
cl_abap_datfm.yyyymmdd_dot_seperated.set('4');
export {cl_abap_datfm}; |