From 6a27dcfd4e71f64b22cc0f219d17fcf78c2dbb5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 17 Feb 2025 19:58:06 +0000 Subject: [PATCH] Downport changes --- src/00/z2ui5_cl_demo_app_135.clas.abap | 22 +- ...z2ui5_cl_demo_app_135.clas.locals_imp.abap | 21 +- src/00/z2ui5_cl_demo_app_137.clas.abap | 19 +- src/00/z2ui5_cl_demo_app_304.clas.abap | 8 +- src/01/z2ui5_cl_demo_app_lp_01.clas.abap | 15 +- src/01/z2ui5_cl_demo_app_lp_02.clas.abap | 15 +- src/01/z2ui5_cl_demo_app_lp_03.clas.abap | 26 +- src/01/z2ui5_cl_demo_app_lp_04.clas.abap | 30 +- src/z2ui5_cl_demo_app_000.clas.abap | 26 +- src/z2ui5_cl_demo_app_001.clas.abap | 7 +- src/z2ui5_cl_demo_app_002.clas.abap | 119 +- src/z2ui5_cl_demo_app_003.clas.abap | 66 +- src/z2ui5_cl_demo_app_004.clas.abap | 23 +- src/z2ui5_cl_demo_app_005.clas.abap | 13 +- src/z2ui5_cl_demo_app_006.clas.abap | 16 +- src/z2ui5_cl_demo_app_008.clas.abap | 6 +- src/z2ui5_cl_demo_app_009.clas.abap | 448 ++++-- src/z2ui5_cl_demo_app_010.clas.abap | 10 +- src/z2ui5_cl_demo_app_011.clas.abap | 74 +- src/z2ui5_cl_demo_app_012.clas.abap | 24 +- src/z2ui5_cl_demo_app_013.clas.abap | 52 +- src/z2ui5_cl_demo_app_014.clas.abap | 15 +- src/z2ui5_cl_demo_app_015.clas.abap | 7 +- src/z2ui5_cl_demo_app_016.clas.abap | 16 +- src/z2ui5_cl_demo_app_017.clas.abap | 18 +- src/z2ui5_cl_demo_app_018.clas.abap | 17 +- src/z2ui5_cl_demo_app_019.clas.abap | 42 +- src/z2ui5_cl_demo_app_020.clas.abap | 2 +- src/z2ui5_cl_demo_app_021.clas.abap | 10 +- src/z2ui5_cl_demo_app_022.clas.abap | 10 +- src/z2ui5_cl_demo_app_024.clas.abap | 29 +- src/z2ui5_cl_demo_app_025.clas.abap | 23 +- src/z2ui5_cl_demo_app_026.clas.abap | 10 +- src/z2ui5_cl_demo_app_027.clas.abap | 10 +- src/z2ui5_cl_demo_app_028.clas.abap | 32 +- src/z2ui5_cl_demo_app_029.clas.abap | 9 +- src/z2ui5_cl_demo_app_030.clas.abap | 142 +- src/z2ui5_cl_demo_app_031.clas.abap | 9 +- src/z2ui5_cl_demo_app_032.clas.abap | 16 +- src/z2ui5_cl_demo_app_033.clas.abap | 6 +- src/z2ui5_cl_demo_app_034.clas.abap | 57 +- src/z2ui5_cl_demo_app_035.clas.abap | 66 +- ...z2ui5_cl_demo_app_035.clas.locals_imp.abap | 2 +- src/z2ui5_cl_demo_app_036.clas.abap | 16 +- src/z2ui5_cl_demo_app_037.clas.abap | 6 +- src/z2ui5_cl_demo_app_038.clas.abap | 47 +- src/z2ui5_cl_demo_app_039.clas.abap | 3 +- src/z2ui5_cl_demo_app_040.clas.abap | 3 +- src/z2ui5_cl_demo_app_041.clas.abap | 10 +- src/z2ui5_cl_demo_app_042.clas.abap | 18 +- src/z2ui5_cl_demo_app_045.clas.abap | 31 +- src/z2ui5_cl_demo_app_046.clas.abap | 49 +- src/z2ui5_cl_demo_app_047.clas.abap | 21 +- src/z2ui5_cl_demo_app_048.clas.abap | 148 +- src/z2ui5_cl_demo_app_049.clas.abap | 32 +- src/z2ui5_cl_demo_app_050.clas.abap | 4 +- src/z2ui5_cl_demo_app_051.clas.abap | 10 +- src/z2ui5_cl_demo_app_052.clas.abap | 374 ++++- src/z2ui5_cl_demo_app_053.clas.abap | 71 +- src/z2ui5_cl_demo_app_054.clas.abap | 20 +- src/z2ui5_cl_demo_app_055.clas.abap | 20 +- src/z2ui5_cl_demo_app_056.clas.abap | 84 +- src/z2ui5_cl_demo_app_057.clas.abap | 99 +- src/z2ui5_cl_demo_app_058.clas.abap | 181 ++- src/z2ui5_cl_demo_app_059.clas.abap | 83 +- src/z2ui5_cl_demo_app_060.clas.abap | 1296 +++++++++++++--- src/z2ui5_cl_demo_app_061.clas.abap | 34 +- src/z2ui5_cl_demo_app_062.clas.abap | 10 +- src/z2ui5_cl_demo_app_063.clas.abap | 10 +- src/z2ui5_cl_demo_app_064.clas.abap | 4 +- src/z2ui5_cl_demo_app_065.clas.abap | 14 +- src/z2ui5_cl_demo_app_067.clas.abap | 4 +- src/z2ui5_cl_demo_app_068.clas.abap | 72 +- src/z2ui5_cl_demo_app_069.clas.abap | 107 +- src/z2ui5_cl_demo_app_070.clas.abap | 197 ++- src/z2ui5_cl_demo_app_071.clas.abap | 28 +- src/z2ui5_cl_demo_app_072.clas.abap | 166 ++- src/z2ui5_cl_demo_app_073.clas.abap | 16 +- src/z2ui5_cl_demo_app_074.clas.abap | 50 +- src/z2ui5_cl_demo_app_075.clas.abap | 23 +- src/z2ui5_cl_demo_app_076.clas.abap | 66 +- src/z2ui5_cl_demo_app_078.clas.abap | 30 +- src/z2ui5_cl_demo_app_079.clas.abap | 21 +- src/z2ui5_cl_demo_app_080.clas.abap | 173 ++- src/z2ui5_cl_demo_app_081.clas.abap | 40 +- src/z2ui5_cl_demo_app_082.clas.abap | 32 +- src/z2ui5_cl_demo_app_083.clas.abap | 213 ++- src/z2ui5_cl_demo_app_084.clas.abap | 80 +- src/z2ui5_cl_demo_app_085.clas.abap | 491 +++++-- src/z2ui5_cl_demo_app_086.clas.abap | 6 +- src/z2ui5_cl_demo_app_087.clas.abap | 16 +- src/z2ui5_cl_demo_app_088.clas.abap | 16 +- src/z2ui5_cl_demo_app_090.clas.abap | 392 +++-- src/z2ui5_cl_demo_app_091.clas.abap | 149 +- src/z2ui5_cl_demo_app_093.clas.abap | 7 +- src/z2ui5_cl_demo_app_094.clas.abap | 8 +- src/z2ui5_cl_demo_app_095.clas.abap | 8 +- src/z2ui5_cl_demo_app_096.clas.abap | 3 +- src/z2ui5_cl_demo_app_097.clas.abap | 86 +- src/z2ui5_cl_demo_app_098.clas.abap | 95 +- src/z2ui5_cl_demo_app_099.clas.abap | 201 ++- src/z2ui5_cl_demo_app_100.clas.abap | 116 +- src/z2ui5_cl_demo_app_101.clas.abap | 48 +- src/z2ui5_cl_demo_app_103.clas.abap | 3 +- src/z2ui5_cl_demo_app_104.clas.abap | 48 +- src/z2ui5_cl_demo_app_106.clas.abap | 10 +- src/z2ui5_cl_demo_app_107.clas.abap | 15 +- src/z2ui5_cl_demo_app_108.clas.abap | 6 +- src/z2ui5_cl_demo_app_109.clas.abap | 10 +- src/z2ui5_cl_demo_app_110.clas.abap | 7 +- src/z2ui5_cl_demo_app_111.clas.abap | 93 +- src/z2ui5_cl_demo_app_113.clas.abap | 117 +- src/z2ui5_cl_demo_app_114.clas.abap | 45 +- src/z2ui5_cl_demo_app_115.clas.abap | 7 +- src/z2ui5_cl_demo_app_116.clas.abap | 133 +- src/z2ui5_cl_demo_app_117.clas.abap | 32 +- src/z2ui5_cl_demo_app_118.clas.abap | 90 +- src/z2ui5_cl_demo_app_120.clas.abap | 26 +- src/z2ui5_cl_demo_app_121.clas.abap | 7 +- src/z2ui5_cl_demo_app_122.clas.abap | 7 +- src/z2ui5_cl_demo_app_123.clas.abap | 88 +- src/z2ui5_cl_demo_app_124.clas.abap | 37 +- src/z2ui5_cl_demo_app_125.clas.abap | 10 +- src/z2ui5_cl_demo_app_126.clas.abap | 47 +- src/z2ui5_cl_demo_app_129.clas.abap | 70 +- src/z2ui5_cl_demo_app_130.clas.abap | 489 +++++-- src/z2ui5_cl_demo_app_131.clas.abap | 37 +- src/z2ui5_cl_demo_app_132.clas.abap | 36 +- src/z2ui5_cl_demo_app_133.clas.abap | 7 +- src/z2ui5_cl_demo_app_134.clas.abap | 84 +- src/z2ui5_cl_demo_app_136.clas.abap | 50 +- src/z2ui5_cl_demo_app_138.clas.abap | 7 +- src/z2ui5_cl_demo_app_139.clas.abap | 10 +- src/z2ui5_cl_demo_app_140.clas.abap | 47 +- src/z2ui5_cl_demo_app_141.clas.abap | 82 +- src/z2ui5_cl_demo_app_143.clas.abap | 61 +- src/z2ui5_cl_demo_app_144.clas.abap | 77 +- src/z2ui5_cl_demo_app_149.clas.abap | 18 +- src/z2ui5_cl_demo_app_150.clas.abap | 18 +- src/z2ui5_cl_demo_app_151.clas.abap | 18 +- src/z2ui5_cl_demo_app_152.clas.abap | 78 +- src/z2ui5_cl_demo_app_153.clas.abap | 28 +- src/z2ui5_cl_demo_app_154.clas.abap | 58 +- src/z2ui5_cl_demo_app_155.clas.abap | 18 +- src/z2ui5_cl_demo_app_156.clas.abap | 18 +- src/z2ui5_cl_demo_app_157.clas.abap | 18 +- src/z2ui5_cl_demo_app_158.clas.abap | 21 +- src/z2ui5_cl_demo_app_159.clas.abap | 21 +- src/z2ui5_cl_demo_app_160.clas.abap | 79 +- src/z2ui5_cl_demo_app_161.clas.abap | 25 +- src/z2ui5_cl_demo_app_162.clas.abap | 73 +- src/z2ui5_cl_demo_app_163.clas.abap | 19 +- src/z2ui5_cl_demo_app_164.clas.abap | 73 +- src/z2ui5_cl_demo_app_166.clas.abap | 10 +- src/z2ui5_cl_demo_app_167.clas.abap | 55 +- src/z2ui5_cl_demo_app_168.clas.abap | 17 +- src/z2ui5_cl_demo_app_169.clas.abap | 53 +- src/z2ui5_cl_demo_app_170.clas.abap | 31 +- src/z2ui5_cl_demo_app_171.clas.abap | 13 +- src/z2ui5_cl_demo_app_172.clas.abap | 127 +- src/z2ui5_cl_demo_app_173.clas.abap | 46 +- src/z2ui5_cl_demo_app_174.clas.abap | 66 +- src/z2ui5_cl_demo_app_175.clas.abap | 22 +- src/z2ui5_cl_demo_app_176.clas.abap | 57 +- src/z2ui5_cl_demo_app_177.clas.abap | 16 +- src/z2ui5_cl_demo_app_178.clas.abap | 81 +- src/z2ui5_cl_demo_app_179.clas.abap | 52 +- src/z2ui5_cl_demo_app_180.clas.abap | 15 +- src/z2ui5_cl_demo_app_181.clas.abap | 110 +- src/z2ui5_cl_demo_app_182.clas.abap | 211 ++- src/z2ui5_cl_demo_app_183.clas.abap | 26 +- src/z2ui5_cl_demo_app_184.clas.abap | 53 +- src/z2ui5_cl_demo_app_185.clas.abap | 39 +- src/z2ui5_cl_demo_app_186.clas.abap | 20 +- src/z2ui5_cl_demo_app_187.clas.abap | 15 +- src/z2ui5_cl_demo_app_189.clas.abap | 7 +- src/z2ui5_cl_demo_app_190.clas.abap | 70 +- src/z2ui5_cl_demo_app_191.clas.abap | 51 +- src/z2ui5_cl_demo_app_192.clas.abap | 39 +- ...z2ui5_cl_demo_app_192.clas.locals_imp.abap | 2 +- src/z2ui5_cl_demo_app_193.clas.abap | 8 +- ...z2ui5_cl_demo_app_193.clas.locals_imp.abap | 2 +- src/z2ui5_cl_demo_app_194.clas.abap | 77 +- src/z2ui5_cl_demo_app_195.clas.abap | 51 +- src/z2ui5_cl_demo_app_196.clas.abap | 226 ++- src/z2ui5_cl_demo_app_197.clas.abap | 409 +++++- src/z2ui5_cl_demo_app_199.clas.abap | 26 +- src/z2ui5_cl_demo_app_201.clas.abap | 1300 ++++++++++++++--- src/z2ui5_cl_demo_app_202.clas.abap | 25 +- src/z2ui5_cl_demo_app_205.clas.abap | 10 +- src/z2ui5_cl_demo_app_206.clas.abap | 10 +- src/z2ui5_cl_demo_app_207.clas.abap | 10 +- src/z2ui5_cl_demo_app_208.clas.abap | 10 +- src/z2ui5_cl_demo_app_209.clas.abap | 10 +- src/z2ui5_cl_demo_app_210.clas.abap | 10 +- src/z2ui5_cl_demo_app_211.clas.abap | 52 +- src/z2ui5_cl_demo_app_212.clas.abap | 75 +- src/z2ui5_cl_demo_app_213.clas.abap | 10 +- src/z2ui5_cl_demo_app_214.clas.abap | 10 +- src/z2ui5_cl_demo_app_215.clas.abap | 10 +- src/z2ui5_cl_demo_app_216.clas.abap | 10 +- src/z2ui5_cl_demo_app_217.clas.abap | 10 +- src/z2ui5_cl_demo_app_218.clas.abap | 10 +- src/z2ui5_cl_demo_app_219.clas.abap | 10 +- src/z2ui5_cl_demo_app_220.clas.abap | 10 +- src/z2ui5_cl_demo_app_221.clas.abap | 10 +- src/z2ui5_cl_demo_app_222.clas.abap | 10 +- src/z2ui5_cl_demo_app_223.clas.abap | 10 +- src/z2ui5_cl_demo_app_224.clas.abap | 10 +- src/z2ui5_cl_demo_app_225.clas.abap | 10 +- src/z2ui5_cl_demo_app_226.clas.abap | 10 +- src/z2ui5_cl_demo_app_227.clas.abap | 10 +- src/z2ui5_cl_demo_app_228.clas.abap | 10 +- src/z2ui5_cl_demo_app_229.clas.abap | 10 +- src/z2ui5_cl_demo_app_230.clas.abap | 10 +- src/z2ui5_cl_demo_app_231.clas.abap | 75 +- src/z2ui5_cl_demo_app_232.clas.abap | 10 +- src/z2ui5_cl_demo_app_233.clas.abap | 10 +- src/z2ui5_cl_demo_app_234.clas.abap | 10 +- src/z2ui5_cl_demo_app_235.clas.abap | 10 +- src/z2ui5_cl_demo_app_236.clas.abap | 10 +- src/z2ui5_cl_demo_app_237.clas.abap | 13 +- src/z2ui5_cl_demo_app_238.clas.abap | 13 +- src/z2ui5_cl_demo_app_239.clas.abap | 13 +- src/z2ui5_cl_demo_app_240.clas.abap | 13 +- src/z2ui5_cl_demo_app_241.clas.abap | 13 +- src/z2ui5_cl_demo_app_242.clas.abap | 13 +- src/z2ui5_cl_demo_app_243.clas.abap | 10 +- src/z2ui5_cl_demo_app_244.clas.abap | 19 +- src/z2ui5_cl_demo_app_245.clas.abap | 13 +- src/z2ui5_cl_demo_app_246.clas.abap | 13 +- src/z2ui5_cl_demo_app_247.clas.abap | 13 +- src/z2ui5_cl_demo_app_248.clas.abap | 13 +- src/z2ui5_cl_demo_app_249.clas.abap | 13 +- src/z2ui5_cl_demo_app_250.clas.abap | 13 +- src/z2ui5_cl_demo_app_251.clas.abap | 13 +- src/z2ui5_cl_demo_app_252.clas.abap | 13 +- src/z2ui5_cl_demo_app_253.clas.abap | 19 +- src/z2ui5_cl_demo_app_254.clas.abap | 19 +- src/z2ui5_cl_demo_app_255.clas.abap | 19 +- src/z2ui5_cl_demo_app_256.clas.abap | 19 +- src/z2ui5_cl_demo_app_257.clas.abap | 13 +- src/z2ui5_cl_demo_app_258.clas.abap | 19 +- src/z2ui5_cl_demo_app_259.clas.abap | 73 +- src/z2ui5_cl_demo_app_260.clas.abap | 13 +- src/z2ui5_cl_demo_app_261.clas.abap | 10 +- src/z2ui5_cl_demo_app_262.clas.abap | 10 +- src/z2ui5_cl_demo_app_263.clas.abap | 10 +- src/z2ui5_cl_demo_app_264.clas.abap | 35 +- src/z2ui5_cl_demo_app_265.clas.abap | 10 +- src/z2ui5_cl_demo_app_266.clas.abap | 73 +- src/z2ui5_cl_demo_app_267.clas.abap | 10 +- src/z2ui5_cl_demo_app_268.clas.abap | 16 +- src/z2ui5_cl_demo_app_269.clas.abap | 10 +- src/z2ui5_cl_demo_app_270.clas.abap | 4 +- src/z2ui5_cl_demo_app_271.clas.abap | 10 +- src/z2ui5_cl_demo_app_272.clas.abap | 10 +- src/z2ui5_cl_demo_app_273.clas.abap | 10 +- src/z2ui5_cl_demo_app_274.clas.abap | 10 +- src/z2ui5_cl_demo_app_275.clas.abap | 10 +- src/z2ui5_cl_demo_app_276.clas.abap | 13 +- src/z2ui5_cl_demo_app_277.clas.abap | 16 +- src/z2ui5_cl_demo_app_278.clas.abap | 13 +- src/z2ui5_cl_demo_app_279.clas.abap | 22 +- src/z2ui5_cl_demo_app_280.clas.abap | 10 +- src/z2ui5_cl_demo_app_281.clas.abap | 13 +- src/z2ui5_cl_demo_app_282.clas.abap | 73 +- src/z2ui5_cl_demo_app_283.clas.abap | 45 +- src/z2ui5_cl_demo_app_284.clas.abap | 13 +- src/z2ui5_cl_demo_app_285.clas.abap | 13 +- src/z2ui5_cl_demo_app_286.clas.abap | 51 +- src/z2ui5_cl_demo_app_287.clas.abap | 74 +- src/z2ui5_cl_demo_app_288.clas.abap | 94 +- src/z2ui5_cl_demo_app_289.clas.abap | 65 +- src/z2ui5_cl_demo_app_290.clas.abap | 30 +- src/z2ui5_cl_demo_app_291.clas.abap | 10 +- src/z2ui5_cl_demo_app_292.clas.abap | 45 +- src/z2ui5_cl_demo_app_293.clas.abap | 10 +- src/z2ui5_cl_demo_app_294.clas.abap | 59 +- src/z2ui5_cl_demo_app_295.clas.abap | 42 +- src/z2ui5_cl_demo_app_296.clas.abap | 10 +- src/z2ui5_cl_demo_app_297.clas.abap | 68 +- src/z2ui5_cl_demo_app_298.clas.abap | 82 +- src/z2ui5_cl_demo_app_299.clas.abap | 66 +- src/z2ui5_cl_demo_app_300.clas.abap | 15 +- src/z2ui5_cl_demo_app_301.clas.abap | 78 +- src/z2ui5_cl_demo_app_302.clas.abap | 58 +- src/z2ui5_cl_demo_app_303.clas.abap | 15 +- src/z2ui5_cl_demo_app_305.clas.abap | 42 +- src/z2ui5_cl_demo_app_306.clas.abap | 72 +- src/z2ui5_cl_demo_app_307.clas.abap | 352 +++-- src/z2ui5_cl_demo_app_308.clas.abap | 14 +- src/z2ui5_cl_demo_app_309.clas.abap | 10 +- src/z2ui5_cl_demo_app_310.clas.abap | 6 +- src/z2ui5_cl_demo_app_311.clas.abap | 47 +- src/z2ui5_cl_demo_app_312.clas.abap | 236 +-- src/z2ui5_cl_demo_app_313.clas.abap | 15 +- src/z2ui5_cl_demo_app_314.clas.abap | 18 +- src/z2ui5_cl_demo_app_315.clas.abap | 33 +- src/z2ui5_cl_demo_app_316.clas.abap | 74 +- src/z2ui5_cl_demo_app_317.clas.abap | 117 +- src/z2ui5_cl_demo_app_318.clas.abap | 45 +- src/z2ui5_cl_demo_app_319.clas.abap | 23 +- src/z2ui5_cl_demo_app_320.clas.abap | 290 +++- src/z2ui5_cl_demo_app_321.clas.abap | 5 +- src/z2ui5_cl_demo_app_322.clas.abap | 7 +- src/z2ui5_cl_demo_app_323.clas.abap | 5 +- src/z2ui5_cl_demo_app_324.clas.abap | 8 +- 308 files changed, 12778 insertions(+), 4031 deletions(-) diff --git a/src/00/z2ui5_cl_demo_app_135.clas.abap b/src/00/z2ui5_cl_demo_app_135.clas.abap index 5707b070..b7f88a7a 100644 --- a/src/00/z2ui5_cl_demo_app_135.clas.abap +++ b/src/00/z2ui5_cl_demo_app_135.clas.abap @@ -45,21 +45,27 @@ CLASS z2ui5_cl_demo_app_135 IMPLEMENTATION. set_session_stateful( client = client stateful = abap_true ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Sticky Session with locks - (ABAP Standard Only)` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->message_strip( text = client->_bind( error-text ) type = 'Error' visible = client->_bind( error-flag ) ). - DATA(vbox) = page->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = page->vbox( ). - DATA(hbox) = vbox->hbox( alignitems = 'Center' ). + DATA hbox TYPE REF TO z2ui5_cl_xml_view. + hbox = vbox->hbox( alignitems = 'Center' ). hbox->info_label( text = client->_bind( session_text ) ). @@ -146,13 +152,15 @@ CLASS z2ui5_cl_demo_app_135 IMPLEMENTATION. TRY. on_event( client ). - CATCH z2ui5_cx_util_error INTO DATA(x_error). + DATA x_error TYPE REF TO z2ui5_cx_util_error. + CATCH z2ui5_cx_util_error INTO x_error. error-text = x_error->get_text( ). error-flag = abap_true. client->view_model_update( ). ENDTRY. - CATCH cx_root INTO DATA(lx). + DATA lx TYPE REF TO cx_root. + CATCH cx_root INTO lx. client->message_box_display( lx->get_text( ) ). ENDTRY. ENDMETHOD. diff --git a/src/00/z2ui5_cl_demo_app_135.clas.locals_imp.abap b/src/00/z2ui5_cl_demo_app_135.clas.locals_imp.abap index 66a75f6d..1ea9f4bd 100644 --- a/src/00/z2ui5_cl_demo_app_135.clas.locals_imp.abap +++ b/src/00/z2ui5_cl_demo_app_135.clas.locals_imp.abap @@ -41,7 +41,8 @@ CLASS lcl_locking IMPLEMENTATION. METHOD acquire_lock. - DATA(lv_fm) = 'ENQUEUE_E_TABLE'. + DATA lv_fm TYPE c LENGTH 15. + lv_fm = 'ENQUEUE_E_TABLE'. CALL FUNCTION lv_fm EXPORTING tabname = 'ZTEST' @@ -51,7 +52,8 @@ CLASS lcl_locking IMPLEMENTATION. system_failure = 2 OTHERS = 3. IF sy-subrc <> 0. - MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO DATA(error_text). + DATA error_text TYPE string. + MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO error_text. RAISE EXCEPTION TYPE z2ui5_cx_util_error EXPORTING val = error_text. ENDIF. @@ -64,7 +66,8 @@ CLASS lcl_locking IMPLEMENTATION. DATA argument TYPE c LENGTH 150. argument = |ZTEST Z100*|. - DATA(lv_fm) = 'ENQUEUE_READ'. + DATA lv_fm TYPE c LENGTH 12. + lv_fm = 'ENQUEUE_READ'. CALL FUNCTION lv_fm EXPORTING garg = argument @@ -76,11 +79,19 @@ CLASS lcl_locking IMPLEMENTATION. system_failure = 2 OTHERS = 3. IF sy-subrc <> 0. - MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO DATA(error_text). + DATA error_text TYPE string. + MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO error_text. RAISE EXCEPTION TYPE z2ui5_cx_util_error EXPORTING val = error_text. ENDIF. - result = VALUE #( enqueue_table[ 1 ]-gusevb OPTIONAL ). + DATA temp1 TYPE i. + CLEAR temp1. + DATA temp2 TYPE lcl_locking=>ty_seqg3. + READ TABLE enqueue_table INTO temp2 INDEX 1. + IF sy-subrc = 0. + temp1 = temp2-gusevb. + ENDIF. + result = temp1. ENDMETHOD. diff --git a/src/00/z2ui5_cl_demo_app_137.clas.abap b/src/00/z2ui5_cl_demo_app_137.clas.abap index 60c07197..f47d1139 100644 --- a/src/00/z2ui5_cl_demo_app_137.clas.abap +++ b/src/00/z2ui5_cl_demo_app_137.clas.abap @@ -39,7 +39,8 @@ CLASS z2ui5_cl_demo_app_137 IMPLEMENTATION. on_event( client ). - CATCH cx_root INTO DATA(lx). + DATA lx TYPE REF TO cx_root. + CATCH cx_root INTO lx. client->message_box_display( lx->get_text( ) ). ENDTRY. ENDMETHOD. @@ -48,17 +49,23 @@ CLASS z2ui5_cl_demo_app_137 IMPLEMENTATION. set_session_stateful( client = client stateful = abap_true ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Sticky Session` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(vbox) = page->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = page->vbox( ). vbox->info_label( text = client->_bind( session_text ) ). - DATA(hbox) = vbox->hbox( alignitems = 'Center' ). + DATA hbox TYPE REF TO z2ui5_cl_xml_view. + hbox = vbox->hbox( alignitems = 'Center' ). hbox->label( text = 'press button to increment counter in backend session' class = 'sapUiTinyMarginEnd' ). hbox->button( diff --git a/src/00/z2ui5_cl_demo_app_304.clas.abap b/src/00/z2ui5_cl_demo_app_304.clas.abap index 82b469f1..7eebf557 100644 --- a/src/00/z2ui5_cl_demo_app_304.clas.abap +++ b/src/00/z2ui5_cl_demo_app_304.clas.abap @@ -27,7 +27,7 @@ CLASS z2ui5_cl_demo_app_304 IMPLEMENTATION. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. view_display( ). ENDIF. @@ -38,7 +38,8 @@ CLASS z2ui5_cl_demo_app_304 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). " Note, these are demo sounds and are part of the abap2UI5 sample repo. " They are NOT meant to use in production. @@ -47,7 +48,8 @@ CLASS z2ui5_cl_demo_app_304 IMPLEMENTATION. |function playSuccess() \{ new Audio("/SAP/PUBLIC/BC/ABAP/mime_demo/z2ui5_demo_success.mp3").play(); \}| && |function playError() \{ new Audio("/SAP/PUBLIC/BC/ABAP/mime_demo/z2ui5_demo_error.mp3").play(); \}| ). - DATA(vbox) = view->page( title = `Play success and error sounds` )->vbox( class = `sapUiSmallMargin` ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = view->page( title = `Play success and error sounds` )->vbox( class = `sapUiSmallMargin` ). vbox->message_strip( text = client->_bind( message-text ) type = client->_bind( message-type ) diff --git a/src/01/z2ui5_cl_demo_app_lp_01.clas.abap b/src/01/z2ui5_cl_demo_app_lp_01.clas.abap index ed0b15b1..1b2f05e3 100644 --- a/src/01/z2ui5_cl_demo_app_lp_01.clas.abap +++ b/src/01/z2ui5_cl_demo_app_lp_01.clas.abap @@ -19,8 +19,10 @@ CLASS z2ui5_cl_demo_app_lp_01 IMPLEMENTATION. client->message_box_display( `No Launchpad Active, Sample not working!` ). ENDIF. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( showheader = abap_false ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( showheader = abap_false ). client->view_display( page->simple_form( title = 'Laucnhpad I - Read Startup Parameters' editable = abap_true )->content( 'form' )->label( `` @@ -35,9 +37,12 @@ CLASS z2ui5_cl_demo_app_lp_01 IMPLEMENTATION. CASE client->get( )-event. WHEN 'READ_PARAMS'. - DATA(lv_text) = `Start Parameter: `. - DATA(lt_params) = client->get( )-t_comp_params. - LOOP AT lt_params INTO DATA(ls_param). + DATA lv_text TYPE string. + lv_text = `Start Parameter: `. + DATA lt_params TYPE z2ui5_if_types=>ty_t_name_value. + lt_params = client->get( )-t_comp_params. + DATA ls_param LIKE LINE OF lt_params. + LOOP AT lt_params INTO ls_param. lv_text = |{ lv_text } / { ls_param-n } = { ls_param-v }|. ENDLOOP. client->message_box_display( lv_text ). diff --git a/src/01/z2ui5_cl_demo_app_lp_02.clas.abap b/src/01/z2ui5_cl_demo_app_lp_02.clas.abap index b28d3324..221d5772 100644 --- a/src/01/z2ui5_cl_demo_app_lp_02.clas.abap +++ b/src/01/z2ui5_cl_demo_app_lp_02.clas.abap @@ -24,9 +24,11 @@ CLASS Z2UI5_CL_DEMO_APP_LP_02 IMPLEMENTATION. client->message_box_display( `No Launchpad Active, Sample not working!` ). ENDIF. - DATA(shell) = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA shell TYPE REF TO z2ui5_cl_xml_view. + shell = z2ui5_cl_xml_view=>factory( )->shell( ). IF client->get( )-check_launchpad_active = abap_true. - DATA(page) = shell->page( showheader = abap_false ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = shell->page( showheader = abap_false ). page->_z2ui5( )->lp_title( client->_bind_edit( mv_title ) ). ELSE. page = shell->page( title = client->_bind_edit( mv_title ) ). @@ -45,9 +47,12 @@ CLASS Z2UI5_CL_DEMO_APP_LP_02 IMPLEMENTATION. CASE client->get( )-event. WHEN 'READ_PARAMS'. - DATA(lv_text) = `Start Parameter: `. - DATA(lt_params) = client->get( )-t_comp_params. - LOOP AT lt_params INTO DATA(ls_param). + DATA lv_text TYPE string. + lv_text = `Start Parameter: `. + DATA lt_params TYPE z2ui5_if_types=>ty_t_name_value. + lt_params = client->get( )-t_comp_params. + DATA ls_param LIKE LINE OF lt_params. + LOOP AT lt_params INTO ls_param. lv_text = |{ lv_text } / { ls_param-n } = { ls_param-v }|. ENDLOOP. client->message_box_display( lv_text ). diff --git a/src/01/z2ui5_cl_demo_app_lp_03.clas.abap b/src/01/z2ui5_cl_demo_app_lp_03.clas.abap index ad4dfb85..c5b4c571 100644 --- a/src/01/z2ui5_cl_demo_app_lp_03.clas.abap +++ b/src/01/z2ui5_cl_demo_app_lp_03.clas.abap @@ -25,7 +25,8 @@ CLASS z2ui5_cl_demo_app_lp_03 IMPLEMENTATION. METHOD z2ui5_if_app~main. - DATA(lt_startup_params) = client->get( )-s_config-t_startup_params. + DATA lt_startup_params TYPE z2ui5_if_types=>ty_t_name_value. + lt_startup_params = client->get( )-s_config-t_startup_params. IF check_initialized = abap_false. check_initialized = abap_true. @@ -36,13 +37,24 @@ CLASS z2ui5_cl_demo_app_lp_03 IMPLEMENTATION. client->message_box_display( `No Launchpad Active, Sample not working!` ). ENDIF. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_04", action: "display" }` INTO TABLE temp1. + DATA temp2 LIKE LINE OF temp1. + temp2 = `$` && client->_bind_edit( nav_params ). + INSERT temp2 INTO TABLE temp1. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp4 TYPE xsdboolean. + temp4 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp3 title = 'abap2UI5 - Cross App Navigation App 127 - This App only works when started via Launchpad' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp4 )->header_content( )->link( text = 'Source_Code' @@ -58,11 +70,7 @@ CLASS z2ui5_cl_demo_app_lp_03 IMPLEMENTATION. text = 'go to app 128' press = client->_event_client( val = client->cs_event-cross_app_nav_to_ext - t_arg = VALUE #( - ( `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_04", action: "display" }` ) -* ( `{ "Product" : "102343333" }` ) - ( `$` && client->_bind_edit( nav_params ) ) - ) + t_arg = temp1 ) )->stringify( ) ). diff --git a/src/01/z2ui5_cl_demo_app_lp_04.clas.abap b/src/01/z2ui5_cl_demo_app_lp_04.clas.abap index 5d9f5cf2..e466a2ed 100644 --- a/src/01/z2ui5_cl_demo_app_lp_04.clas.abap +++ b/src/01/z2ui5_cl_demo_app_lp_04.clas.abap @@ -21,15 +21,25 @@ CLASS z2ui5_cl_demo_app_lp_04 IMPLEMENTATION. METHOD z2ui5_if_app~main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). product_url = z2ui5_cl_util=>url_param_get( val = `product` url = client->get( )-s_config-search ). check_launchpad_active = client->get( )-check_launchpad_active. - data(lt_params) = client->get( )-t_comp_params. + DATA lt_params TYPE z2ui5_if_types=>ty_t_name_value. + lt_params = client->get( )-t_comp_params. try. - product = lt_params[ n = `PRODUCT` ]-v. + DATA temp1 LIKE LINE OF lt_params. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_params WITH KEY n = `PRODUCT` INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + product = temp1-v. catch cx_root. endtry. IF check_initialized = abap_false. @@ -37,12 +47,20 @@ CLASS z2ui5_cl_demo_app_lp_04 IMPLEMENTATION. quantity = '500'. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_03", action: "display" }` INTO TABLE temp3. + INSERT `{ ProductID : "123234" }` INTO TABLE temp3. + DATA temp4 TYPE xsdboolean. + temp4 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp5 TYPE xsdboolean. + temp5 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp4 title = 'abap2UI5 - Cross App Navigation App 128' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp5 )->header_content( )->link( text = 'Source_Code' @@ -62,7 +80,7 @@ CLASS z2ui5_cl_demo_app_lp_04 IMPLEMENTATION. text = 'go to app 127' press = client->_event_client( val = client->cs_event-cross_app_nav_to_ext - t_arg = VALUE #( ( `{ semanticObject: "Z2UI5_CL_LP_SAMPLE_03", action: "display" }` ) ( `{ ProductID : "123234" }`) ) + t_arg = temp3 ) )->stringify( ) ). diff --git a/src/z2ui5_cl_demo_app_000.clas.abap b/src/z2ui5_cl_demo_app_000.clas.abap index 09666239..289285c3 100644 --- a/src/z2ui5_cl_demo_app_000.clas.abap +++ b/src/z2ui5_cl_demo_app_000.clas.abap @@ -37,7 +37,12 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. IF client->get( )-check_on_navigated = abap_true. IF mt_scroll IS INITIAL. - mt_scroll = VALUE #( ( n = `page` ) ). + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = `page`. + INSERT temp2 INTO TABLE temp1. + mt_scroll = temp1. ENDIF. mv_set_scroll = abap_true. ENDIF. @@ -53,7 +58,8 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. CLEAR ms_check_expanded. WHEN OTHERS. TRY. - DATA(lv_classname) = to_upper( client->get( )-event ). + DATA lv_classname TYPE string. + lv_classname = to_upper( client->get( )-event ). DATA li_app TYPE REF TO z2ui5_if_app. CREATE OBJECT li_app TYPE (lv_classname). client->nav_app_call( li_app ). @@ -62,11 +68,14 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. ENDTRY. ENDCASE. - DATA(page) = z2ui5_cl_xml_view=>factory( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( id = `page` title = c_title navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp3 )->header_content( )->toolbar_spacer( )->link( text = 'Install with abapGit from GitHub' @@ -98,13 +107,15 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. )->button( press = client->_event( 'collapse-all' ) icon = 'sap-icon://collapse-all' ). - DATA(page2) = page. + DATA page2 LIKE page. + page2 = page. page = page->panel( expandable = abap_true expanded = client->_bind_edit( ms_check_expanded-basics ) headertext = `General` ). - DATA(panel) = page->panel( expandable = abap_false + DATA panel TYPE REF TO z2ui5_cl_xml_view. + panel = page->panel( expandable = abap_false expanded = abap_true headertext = `Binding` ). @@ -2024,7 +2035,8 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. METHOD expand_all. DO. - ASSIGN COMPONENT sy-index OF STRUCTURE ms_check_expanded TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT sy-index OF STRUCTURE ms_check_expanded TO . IF sy-subrc <> 0. EXIT. ENDIF. diff --git a/src/z2ui5_cl_demo_app_001.clas.abap b/src/z2ui5_cl_demo_app_001.clas.abap index 3cb408f6..868b8cd8 100644 --- a/src/z2ui5_cl_demo_app_001.clas.abap +++ b/src/z2ui5_cl_demo_app_001.clas.abap @@ -46,12 +46,15 @@ CLASS z2ui5_cl_demo_app_001 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( val = view->shell( )->page( title = 'abap2UI5 - First Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' )->title( 'Input' diff --git a/src/z2ui5_cl_demo_app_002.clas.abap b/src/z2ui5_cl_demo_app_002.clas.abap index 6f0c9292..0e89c99b 100644 --- a/src/z2ui5_cl_demo_app_002.clas.abap +++ b/src/z2ui5_cl_demo_app_002.clas.abap @@ -24,7 +24,8 @@ CLASS z2ui5_cl_demo_app_002 DEFINITION PUBLIC. value TYPE string, descr TYPE string, END OF s_suggestion_items. - DATA mt_suggestion TYPE STANDARD TABLE OF s_suggestion_items WITH EMPTY KEY. + TYPES temp1_1f6edbe174 TYPE STANDARD TABLE OF s_suggestion_items WITH DEFAULT KEY. +DATA mt_suggestion TYPE temp1_1f6edbe174. TYPES: BEGIN OF s_combobox, @@ -32,7 +33,7 @@ CLASS z2ui5_cl_demo_app_002 DEFINITION PUBLIC. text TYPE string, END OF s_combobox. - TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY. + TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH DEFAULT KEY. DATA check_initialized TYPE abap_bool. DATA client TYPE REF TO z2ui5_if_client. @@ -105,38 +106,60 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION. METHOD z2ui5_on_init. - screen = VALUE #( - check_is_active = abap_true - colour = 'BLUE' - combo_key = 'GRAY' - segment_key = 'GREEN' - date = '07.12.22' - date_time = '23.12.2022, 19:27:20' - time_start = '05:24:00' - time_end = '17:23:57' ). - - mt_suggestion = VALUE #( - ( descr = 'Green' value = 'GREEN' ) - ( descr = 'Blue' value = 'BLUE' ) - ( descr = 'Black' value = 'BLACK' ) - ( descr = 'Gray' value = 'GRAY' ) - ( descr = 'Blue2' value = 'BLUE2' ) - ( descr = 'Blue3' value = 'BLUE3' ) ). + CLEAR screen. + screen-check_is_active = abap_true. + screen-colour = 'BLUE'. + screen-combo_key = 'GRAY'. + screen-segment_key = 'GREEN'. + screen-date = '07.12.22'. + screen-date_time = '23.12.2022, 19:27:20'. + screen-time_start = '05:24:00'. + screen-time_end = '17:23:57'. + + DATA temp1 LIKE mt_suggestion. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-descr = 'Green'. + temp2-value = 'GREEN'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Blue'. + temp2-value = 'BLUE'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Black'. + temp2-value = 'BLACK'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Gray'. + temp2-value = 'GRAY'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Blue2'. + temp2-value = 'BLUE2'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Blue3'. + temp2-value = 'BLUE3'. + INSERT temp2 INTO TABLE temp1. + mt_suggestion = temp1. ENDMETHOD. METHOD z2ui5_on_rendering. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp1 title = 'abap2UI5 - Selection-Screen Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). - DATA(grid) = page->grid( 'L6 M12 S12' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). grid->simple_form( title = 'Input' @@ -166,39 +189,63 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION. )->time_picker( client->_bind_edit( screen-time_end ) ). - DATA(form) = grid->get_parent( )->get_parent( )->grid( 'L12 M12 S12' + DATA form TYPE REF TO z2ui5_cl_xml_view. + form = grid->get_parent( )->get_parent( )->grid( 'L12 M12 S12' )->content( 'layout' )->simple_form( title = 'Input with select options' editable = abap_true )->content( 'form' ). - DATA(lv_test) = form->label( 'Checkbox' + DATA lv_test TYPE REF TO z2ui5_cl_xml_view. + lv_test = form->label( 'Checkbox' )->checkbox( selected = client->_bind_edit( screen-check_is_active ) text = 'this is a checkbox' enabled = abap_true ). + DATA temp3 TYPE ty_t_combo. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-key = 'BLUE'. + temp4-text = 'green'. + INSERT temp4 INTO TABLE temp3. + temp4-key = 'GREEN'. + temp4-text = 'blue'. + INSERT temp4 INTO TABLE temp3. + temp4-key = 'BLACK'. + temp4-text = 'red'. + INSERT temp4 INTO TABLE temp3. + temp4-key = 'GRAY'. + temp4-text = 'gray'. + INSERT temp4 INTO TABLE temp3. lv_test->label( 'Combobox' )->combobox( selectedkey = client->_bind_edit( screen-combo_key ) - items = client->_bind_local( VALUE ty_t_combo( - ( key = 'BLUE' text = 'green' ) - ( key = 'GREEN' text = 'blue' ) - ( key = 'BLACK' text = 'red' ) - ( key = 'GRAY' text = 'gray' ) ) ) + items = client->_bind_local( temp3 ) )->item( key = '{KEY}' text = '{TEXT}' )->get_parent( )->get_parent( ). + DATA temp5 TYPE ty_t_combo. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-key = 'BLUE'. + temp6-text = 'green'. + INSERT temp6 INTO TABLE temp5. + temp6-key = 'GREEN'. + temp6-text = 'blue'. + INSERT temp6 INTO TABLE temp5. + temp6-key = 'BLACK'. + temp6-text = 'red'. + INSERT temp6 INTO TABLE temp5. + temp6-key = 'GRAY'. + temp6-text = 'gray'. + INSERT temp6 INTO TABLE temp5. lv_test->label( 'Combobox2' )->combobox( selectedkey = client->_bind_edit( screen-combo_key2 ) - items = client->_bind_local( VALUE ty_t_combo( - ( key = 'BLUE' text = 'green' ) - ( key = 'GREEN' text = 'blue' ) - ( key = 'BLACK' text = 'red' ) - ( key = 'GRAY' text = 'gray' ) ) ) + items = client->_bind_local( temp5 ) )->item( key = '{KEY}' text = '{TEXT}' diff --git a/src/z2ui5_cl_demo_app_003.clas.abap b/src/z2ui5_cl_demo_app_003.clas.abap index d57d8b03..152877f3 100644 --- a/src/z2ui5_cl_demo_app_003.clas.abap +++ b/src/z2ui5_cl_demo_app_003.clas.abap @@ -15,7 +15,8 @@ CLASS z2ui5_cl_demo_app_003 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_dd5da6e718 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_dd5da6e718. DATA check_initialized TYPE abap_bool. PROTECTED SECTION. @@ -32,20 +33,51 @@ CLASS Z2UI5_CL_DEMO_APP_003 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_tab = VALUE #( - ( title = 'row_01' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_02' info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_03' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_04' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_05' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_06' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). - - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'row_01'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_02'. + temp2-info = 'incompleted'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_03'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_04'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_05'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_06'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. + + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp5 TYPE xsdboolean. + temp5 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp5 ). page->list( headertext = 'List Ouput' @@ -67,7 +99,15 @@ CLASS Z2UI5_CL_DEMO_APP_003 IMPLEMENTATION. CASE client->get( )-event. WHEN 'SELCHANGE'. - client->message_box_display( `go to details for item ` && t_tab[ selected = abap_true ]-title ). + DATA temp3 LIKE LINE OF t_tab. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE t_tab WITH KEY selected = abap_true INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_box_display( `go to details for item ` && temp3-title ). WHEN 'BACK'. client->nav_app_leave( ). diff --git a/src/z2ui5_cl_demo_app_004.clas.abap b/src/z2ui5_cl_demo_app_004.clas.abap index 84dc3ffe..316411df 100644 --- a/src/z2ui5_cl_demo_app_004.clas.abap +++ b/src/z2ui5_cl_demo_app_004.clas.abap @@ -37,7 +37,9 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION. client->message_box_display( 'server-client roundtrip, method on_event of the abap controller was called' ). WHEN 'BUTTON_RESTART'. - client->nav_app_leave( NEW z2ui5_cl_demo_app_004( ) ). + DATA temp1 TYPE REF TO z2ui5_cl_demo_app_004. + CREATE OBJECT temp1 TYPE z2ui5_cl_demo_app_004. + client->nav_app_leave( temp1 ). WHEN 'BUTTON_CHANGE_VIEW'. CASE mv_view_main. @@ -48,7 +50,8 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION. ENDCASE. WHEN 'BUTTON_ERROR'. - DATA(lv_dummy) = 1 / 0. + DATA lv_dummy TYPE i. + lv_dummy = 1 / 0. WHEN 'BACK'. client->nav_app_leave( ). @@ -62,12 +65,16 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION. mv_view_main = 'MAIN'. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Controller' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->grid( 'L6 M12 S12' )->content( 'layout' )->simple_form( title = 'Controller' @@ -98,8 +105,10 @@ CLASS z2ui5_cl_demo_app_004 IMPLEMENTATION. mv_view_main = 'SECOND'. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Controller' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true ). diff --git a/src/z2ui5_cl_demo_app_005.clas.abap b/src/z2ui5_cl_demo_app_005.clas.abap index a813b80e..4c7e3b7a 100644 --- a/src/z2ui5_cl_demo_app_005.clas.abap +++ b/src/z2ui5_cl_demo_app_005.clas.abap @@ -36,14 +36,19 @@ CLASS z2ui5_cl_demo_app_005 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Range Slider Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(grid) = page->grid( 'L12 M12 S12' )->content( 'layout' ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L12 M12 S12' )->content( 'layout' ). grid->simple_form( title = 'More Controls' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_006.clas.abap b/src/z2ui5_cl_demo_app_006.clas.abap index ddd6dc65..be396f7b 100644 --- a/src/z2ui5_cl_demo_app_006.clas.abap +++ b/src/z2ui5_cl_demo_app_006.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_006 DEFINITION PUBLIC. valuecolor TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_9d87ec7b26 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_9d87ec7b26. DATA check_initialized TYPE abap_bool. DATA check_ui5 TYPE abap_bool. DATA mv_key TYPE string. @@ -67,14 +68,19 @@ CLASS z2ui5_cl_demo_app_006 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Scroll Container with Table and Toolbar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(tab) = page->scroll_container( height = '70%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->scroll_container( height = '70%' vertical = abap_true )->table( growing = abap_true diff --git a/src/z2ui5_cl_demo_app_008.clas.abap b/src/z2ui5_cl_demo_app_008.clas.abap index 7f485bc8..37e4bee7 100644 --- a/src/z2ui5_cl_demo_app_008.clas.abap +++ b/src/z2ui5_cl_demo_app_008.clas.abap @@ -70,9 +70,11 @@ CLASS z2ui5_cl_demo_app_008 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Messages' navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_009.clas.abap b/src/z2ui5_cl_demo_app_009.clas.abap index e56a4c02..565d8a5b 100644 --- a/src/z2ui5_cl_demo_app_009.clas.abap +++ b/src/z2ui5_cl_demo_app_009.clas.abap @@ -22,15 +22,18 @@ CLASS z2ui5_cl_demo_app_009 DEFINITION PUBLIC. value TYPE string, descr TYPE string, END OF s_suggestion_items. - DATA mt_suggestion TYPE STANDARD TABLE OF s_suggestion_items WITH EMPTY KEY. - DATA mt_suggestion_sel TYPE STANDARD TABLE OF s_suggestion_items WITH EMPTY KEY. + TYPES temp1_eec7b95dcf TYPE STANDARD TABLE OF s_suggestion_items WITH DEFAULT KEY. +DATA mt_suggestion TYPE temp1_eec7b95dcf. + TYPES temp2_eec7b95dcf TYPE STANDARD TABLE OF s_suggestion_items WITH DEFAULT KEY. +DATA mt_suggestion_sel TYPE temp2_eec7b95dcf. TYPES: BEGIN OF s_suggestion_items_city, value TYPE string, descr TYPE string, END OF s_suggestion_items_city. - DATA mt_suggestion_city TYPE STANDARD TABLE OF s_suggestion_items_city WITH EMPTY KEY. + TYPES temp3_eec7b95dcf TYPE STANDARD TABLE OF s_suggestion_items_city WITH DEFAULT KEY. +DATA mt_suggestion_city TYPE temp3_eec7b95dcf. TYPES: BEGIN OF s_employee, @@ -40,8 +43,10 @@ CLASS z2ui5_cl_demo_app_009 DEFINITION PUBLIC. name TYPE string, lastname TYPE string, END OF s_employee. - DATA mt_employees_sel TYPE STANDARD TABLE OF s_employee WITH EMPTY KEY. - DATA mt_employees TYPE STANDARD TABLE OF s_employee WITH EMPTY KEY. + TYPES temp4_eec7b95dcf TYPE STANDARD TABLE OF s_employee WITH DEFAULT KEY. +DATA mt_employees_sel TYPE temp4_eec7b95dcf. + TYPES temp5_eec7b95dcf TYPE STANDARD TABLE OF s_employee WITH DEFAULT KEY. +DATA mt_employees TYPE temp5_eec7b95dcf. DATA check_initialized TYPE abap_bool. @@ -74,7 +79,8 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. METHOD popup_f4_table. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup->dialog( 'abap2UI5 - F4 Value Help' )->table( @@ -104,7 +110,8 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. METHOD popup_f4_table_custom. - DATA(popup2) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup2 TYPE REF TO z2ui5_cl_xml_view. + popup2 = z2ui5_cl_xml_view=>factory_popup( ). popup2 = popup2->dialog( 'abap2UI5 - F4 Value Help' ). @@ -123,7 +130,8 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. text = 'search...' press = client->_event( 'SEARCH' ) ). - DATA(tab) = popup2->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = popup2->table( headertext = 'Employees' mode = 'SingleSelectLeft' items = client->_bind_edit( mt_employees_sel ) ). @@ -179,8 +187,12 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. popup_f4_table( client ). WHEN 'POPUP_TABLE_F4_CUSTOM'. - mt_employees_sel = VALUE #( ). - mt_employees_sel = VALUE #( ). + DATA temp1 LIKE mt_employees_sel. + CLEAR temp1. + mt_employees_sel = temp1. + DATA temp2 LIKE mt_employees_sel. + CLEAR temp2. + mt_employees_sel = temp2. popup_f4_table_custom( client ). WHEN 'SEARCH'. @@ -193,8 +205,24 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. WHEN 'POPUP_TABLE_F4_CUSTOM_CONTINUE'. DELETE mt_employees_sel WHERE selkz = abap_false. IF lines( mt_employees_sel ) = 1. - screen-name = mt_employees_sel[ 1 ]-name. - screen-lastname = mt_employees_sel[ 1 ]-lastname. + DATA temp3 LIKE LINE OF mt_employees_sel. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE mt_employees_sel INDEX 1 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + screen-name = temp3-name. + DATA temp5 LIKE LINE OF mt_employees_sel. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE mt_employees_sel INDEX 1 INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + screen-lastname = temp5-lastname. client->message_toast_display( 'f4 value selected' ). client->popup_destroy( ). ENDIF. @@ -202,7 +230,15 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. WHEN 'POPUP_TABLE_F4_CONTINUE'. DELETE mt_suggestion_sel WHERE selkz = abap_false. IF lines( mt_suggestion_sel ) = 1. - screen-color_02 = mt_suggestion_sel[ 1 ]-value. + DATA temp7 LIKE LINE OF mt_suggestion_sel. + DATA temp8 LIKE sy-tabix. + temp8 = sy-tabix. + READ TABLE mt_suggestion_sel INDEX 1 INTO temp7. + sy-tabix = temp8. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + screen-color_02 = temp7-value. client->message_toast_display( 'f4 value selected' ). client->popup_destroy( ). ENDIF. @@ -222,87 +258,331 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION. METHOD z2ui5_on_init. - mt_suggestion = VALUE #( - ( descr = 'this is the color Green' value = 'GREEN' ) - ( descr = 'this is the color Blue' value = 'BLUE' ) - ( descr = 'this is the color Black' value = 'BLACK' ) - ( descr = 'this is the color Grey' value = 'GREY' ) - ( descr = 'this is the color Blue2' value = 'BLUE2' ) - ( descr = 'this is the color Blue3' value = 'BLUE3' ) ). - - mt_suggestion_city = VALUE #( - ( value = 'London' descr = 'London' ) - ( value = 'Paris' descr = 'Paris' ) - ( value = 'Rome' descr = 'Rome' ) ). - - mt_employees = VALUE #( - ( city = 'London' name = 'Tom' lastname = 'lastname1' nr = '00001' ) - ( city = 'London' name = 'Tom2' lastname = 'lastname2' nr = '00002' ) - ( city = 'London' name = 'Tom3' lastname = 'lastname3' nr = '00003' ) - ( city = 'London' name = 'Tom4' lastname = 'lastname4' nr = '00004' ) - ( city = 'Rome' name = 'Michaela1' lastname = 'lastname5' nr = '00005' ) - ( city = 'Rome' name = 'Michaela2' lastname = 'lastname6' nr = '00006' ) - ( city = 'Rome' name = 'Michaela3' lastname = 'lastname7' nr = '00007' ) - ( city = 'Rome' name = 'Michaela4' lastname = 'lastname8' nr = '00008' ) - ( city = 'Paris' name = 'Hermine1' lastname = 'lastname9' nr = '00009' ) - ( city = 'Paris' name = 'Hermine2' lastname = 'lastname10' nr = '00010' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) - ( city = 'Paris' name = 'Hermine3' lastname = 'lastname11' nr = '00011' ) ). + DATA temp9 LIKE mt_suggestion. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-descr = 'this is the color Green'. + temp10-value = 'GREEN'. + INSERT temp10 INTO TABLE temp9. + temp10-descr = 'this is the color Blue'. + temp10-value = 'BLUE'. + INSERT temp10 INTO TABLE temp9. + temp10-descr = 'this is the color Black'. + temp10-value = 'BLACK'. + INSERT temp10 INTO TABLE temp9. + temp10-descr = 'this is the color Grey'. + temp10-value = 'GREY'. + INSERT temp10 INTO TABLE temp9. + temp10-descr = 'this is the color Blue2'. + temp10-value = 'BLUE2'. + INSERT temp10 INTO TABLE temp9. + temp10-descr = 'this is the color Blue3'. + temp10-value = 'BLUE3'. + INSERT temp10 INTO TABLE temp9. + mt_suggestion = temp9. + + DATA temp11 LIKE mt_suggestion_city. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-value = 'London'. + temp12-descr = 'London'. + INSERT temp12 INTO TABLE temp11. + temp12-value = 'Paris'. + temp12-descr = 'Paris'. + INSERT temp12 INTO TABLE temp11. + temp12-value = 'Rome'. + temp12-descr = 'Rome'. + INSERT temp12 INTO TABLE temp11. + mt_suggestion_city = temp11. + + DATA temp13 LIKE mt_employees. + CLEAR temp13. + DATA temp14 LIKE LINE OF temp13. + temp14-city = 'London'. + temp14-name = 'Tom'. + temp14-lastname = 'lastname1'. + temp14-nr = '00001'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'London'. + temp14-name = 'Tom2'. + temp14-lastname = 'lastname2'. + temp14-nr = '00002'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'London'. + temp14-name = 'Tom3'. + temp14-lastname = 'lastname3'. + temp14-nr = '00003'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'London'. + temp14-name = 'Tom4'. + temp14-lastname = 'lastname4'. + temp14-nr = '00004'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Rome'. + temp14-name = 'Michaela1'. + temp14-lastname = 'lastname5'. + temp14-nr = '00005'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Rome'. + temp14-name = 'Michaela2'. + temp14-lastname = 'lastname6'. + temp14-nr = '00006'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Rome'. + temp14-name = 'Michaela3'. + temp14-lastname = 'lastname7'. + temp14-nr = '00007'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Rome'. + temp14-name = 'Michaela4'. + temp14-lastname = 'lastname8'. + temp14-nr = '00008'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine1'. + temp14-lastname = 'lastname9'. + temp14-nr = '00009'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine2'. + temp14-lastname = 'lastname10'. + temp14-nr = '00010'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + temp14-city = 'Paris'. + temp14-name = 'Hermine3'. + temp14-lastname = 'lastname11'. + temp14-nr = '00011'. + INSERT temp14 INTO TABLE temp13. + mt_employees = temp13. ENDMETHOD. METHOD z2ui5_on_rendering. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Value Help Examples' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(form) = page->grid( 'L7 M7 S7' + DATA form TYPE REF TO z2ui5_cl_xml_view. + form = page->grid( 'L7 M7 S7' )->content( 'layout' )->simple_form( 'Input with Value Help' )->content( 'form' ). diff --git a/src/z2ui5_cl_demo_app_010.clas.abap b/src/z2ui5_cl_demo_app_010.clas.abap index e5c8b2ae..5793f613 100644 --- a/src/z2ui5_cl_demo_app_010.clas.abap +++ b/src/z2ui5_cl_demo_app_010.clas.abap @@ -19,11 +19,14 @@ CLASS Z2UI5_CL_DEMO_APP_010 IMPLEMENTATION. client->nav_app_leave( ). ENDCASE. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Demo Layout' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( text = 'button' ). @@ -42,7 +45,8 @@ CLASS Z2UI5_CL_DEMO_APP_010 IMPLEMENTATION. )->link( text = 'link' href = 'https://twitter.com/abap2UI5' ). - DATA(grid) = page->grid( 'L4 M4 S4' )->content( 'layout' ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L4 M4 S4' )->content( 'layout' ). grid->simple_form( 'Grid width 33%' )->content( 'form' )->button( text = 'button' diff --git a/src/z2ui5_cl_demo_app_011.clas.abap b/src/z2ui5_cl_demo_app_011.clas.abap index 8d53fc46..4feda3e7 100644 --- a/src/z2ui5_cl_demo_app_011.clas.abap +++ b/src/z2ui5_cl_demo_app_011.clas.abap @@ -16,7 +16,7 @@ CLASS z2ui5_cl_demo_app_011 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA check_editable_active TYPE abap_bool. DATA check_initialized TYPE abap_bool. @@ -34,14 +34,24 @@ CLASS z2ui5_cl_demo_app_011 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Tables and editable' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true ). - DATA(tab) = page->table( + DATA temp1 TYPE string. + CASE check_editable_active. + WHEN abap_true. + temp1 = |display|. + WHEN OTHERS. + temp1 = |edit|. + ENDCASE. + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( items = client->_bind_edit( t_tab ) mode = 'MultiSelect' )->header_toolbar( @@ -61,7 +71,7 @@ CLASS z2ui5_cl_demo_app_011 IMPLEMENTATION. press = client->_event( 'BUTTON_ADD' ) )->button( icon = 'sap-icon://edit' - text = SWITCH #( check_editable_active WHEN abap_true THEN |display| ELSE |edit| ) + text = temp1 press = client->_event( 'BUTTON_EDIT' ) )->get_parent( )->get_parent( ). @@ -103,13 +113,41 @@ CLASS z2ui5_cl_demo_app_011 IMPLEMENTATION. check_initialized = abap_true. check_editable_active = abap_false. - t_tab = VALUE #( - ( title = 'entry 01' value = 'red' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( title = 'entry 02' value = 'blue' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( title = 'entry 03' value = 'green' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( title = 'entry 04' value = 'orange' info = 'completed' descr = '' checkbox = abap_true ) - ( title = 'entry 05' value = 'grey' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( ) ). + DATA temp2 LIKE t_tab. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-title = 'entry 01'. + temp3-value = 'red'. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-checkbox = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-title = 'entry 02'. + temp3-value = 'blue'. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-checkbox = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-title = 'entry 03'. + temp3-value = 'green'. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-checkbox = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-title = 'entry 04'. + temp3-value = 'orange'. + temp3-info = 'completed'. + temp3-descr = ''. + temp3-checkbox = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-title = 'entry 05'. + temp3-value = 'grey'. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-checkbox = abap_true. + INSERT temp3 INTO TABLE temp2. + INSERT temp3 INTO TABLE temp2. + t_tab = temp2. set_view( ). RETURN. @@ -120,8 +158,12 @@ CLASS z2ui5_cl_demo_app_011 IMPLEMENTATION. CASE client->get( )-event. WHEN 'BUTTON_EDIT'. - check_editable_active = xsdbool( check_editable_active = abap_false ). - LOOP AT t_tab REFERENCE INTO DATA(lr_tab). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( check_editable_active = abap_false ). + check_editable_active = temp1. + DATA temp4 LIKE LINE OF t_tab. + DATA lr_tab LIKE REF TO temp4. + LOOP AT t_tab REFERENCE INTO lr_tab. lr_tab->editable = check_editable_active. ENDLOOP. client->view_model_update( ). @@ -129,7 +171,9 @@ CLASS z2ui5_cl_demo_app_011 IMPLEMENTATION. DELETE t_tab WHERE selkz = abap_true. client->view_model_update( ). WHEN 'BUTTON_ADD'. - INSERT VALUE #( ) INTO TABLE t_tab. + DATA temp5 TYPE z2ui5_cl_demo_app_011=>ty_row. + CLEAR temp5. + INSERT temp5 INTO TABLE t_tab. client->view_model_update( ). WHEN 'BACK'. client->nav_app_leave( ). diff --git a/src/z2ui5_cl_demo_app_012.clas.abap b/src/z2ui5_cl_demo_app_012.clas.abap index 1ecd2750..30e640d9 100644 --- a/src/z2ui5_cl_demo_app_012.clas.abap +++ b/src/z2ui5_cl_demo_app_012.clas.abap @@ -22,7 +22,8 @@ CLASS Z2UI5_CL_DEMO_APP_012 IMPLEMENTATION. METHOD ui5_popup_decide. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup->dialog( 'Popup - Decide' )->vbox( )->text( 'this is a popup to decide, you have to make a decision now...' @@ -43,7 +44,8 @@ CLASS Z2UI5_CL_DEMO_APP_012 IMPLEMENTATION. METHOD ui5_popup_info_frontend_close. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup->dialog( 'Popup - Info' )->vbox( )->text( 'this is an information, press close to go back to the main view without a server roundtrip' @@ -61,13 +63,18 @@ CLASS Z2UI5_CL_DEMO_APP_012 IMPLEMENTATION. METHOD ui5_view_display. - DATA(lo_main) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = lo_main->page( + DATA lo_main TYPE REF TO z2ui5_cl_xml_view. + lo_main = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_main->page( title = 'abap2UI5 - Popups' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(grid) = page->grid( 'L7 M12 S12' )->content( 'layout' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L7 M12 S12' )->content( 'layout' )->simple_form( 'Popup in same App' )->content( 'form' )->label( 'Demo' )->button( @@ -112,7 +119,10 @@ CLASS Z2UI5_CL_DEMO_APP_012 IMPLEMENTATION. IF mv_check_popup = abap_true. mv_check_popup = abap_false. - DATA(app) = CAST z2ui5_cl_demo_app_020( client->get_app( client->get( )-s_draft-id_prev_app ) ). + DATA temp1 TYPE REF TO z2ui5_cl_demo_app_020. + temp1 ?= client->get_app( client->get( )-s_draft-id_prev_app ). + DATA app LIKE temp1. + app = temp1. client->message_toast_display( app->mv_event && ` pressed` ). ENDIF. diff --git a/src/z2ui5_cl_demo_app_013.clas.abap b/src/z2ui5_cl_demo_app_013.clas.abap index 0795e9c9..748487bd 100644 --- a/src/z2ui5_cl_demo_app_013.clas.abap +++ b/src/z2ui5_cl_demo_app_013.clas.abap @@ -19,7 +19,7 @@ CLASS z2ui5_cl_demo_app_013 DEFINITION PUBLIC. percent TYPE p LENGTH 3 DECIMALS 2, END OF ty_chart. - DATA counts TYPE STANDARD TABLE OF ty_chart WITH EMPTY KEY. + DATA counts TYPE STANDARD TABLE OF ty_chart WITH DEFAULT KEY. METHODS render_tab_donut. DATA client TYPE REF TO z2ui5_if_client. @@ -35,7 +35,8 @@ CLASS Z2UI5_CL_DEMO_APP_013 IMPLEMENTATION. METHOD render_tab_donut. - DATA(container) = z2ui5_cl_xml_view=>factory( + DATA container TYPE REF TO z2ui5_cl_xml_view. + container = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Visualization' @@ -43,7 +44,8 @@ CLASS Z2UI5_CL_DEMO_APP_013 IMPLEMENTATION. shownavbutton = abap_true )->tab_container( ). - DATA(grid) = container->tab( + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = container->tab( text = 'Donut Chart' selected = client->_bind( mv_tab_donut_active ) )->grid( 'XL6 L6 M6 S12' ). @@ -59,7 +61,8 @@ CLASS Z2UI5_CL_DEMO_APP_013 IMPLEMENTATION. )->grid_data( 'XL12 L12 M12 S12' ). - DATA(seg) = grid->flex_box( + DATA seg TYPE REF TO z2ui5_cl_xml_view. + seg = grid->flex_box( width = '22rem' height = '13rem' alignitems = 'Start' @@ -142,7 +145,8 @@ CLASS Z2UI5_CL_DEMO_APP_013 IMPLEMENTATION. )->get( )->layout_data( )->grid_data( 'XL12 L12 M12 S12' ). - DATA(donut_chart) = grid->button( text = `update chart` + DATA donut_chart TYPE REF TO z2ui5_cl_xml_view. + donut_chart = grid->button( text = `update chart` press = client->_event( 'UPDATE_CHART_DATA' ) )->get_parent( )->flex_box( width = '30rem' @@ -172,10 +176,19 @@ CLASS Z2UI5_CL_DEMO_APP_013 IMPLEMENTATION. check_initialized = abap_true. - counts = VALUE #( - ( text = '1st' percent = '10.0' ) - ( text = '2nd' percent = '60.0' ) - ( text = '3rd' percent = '30.0' ) ). + DATA temp1 LIKE counts. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-text = '1st'. + temp2-percent = '10.0'. + INSERT temp2 INTO TABLE temp1. + temp2-text = '2nd'. + temp2-percent = '60.0'. + INSERT temp2 INTO TABLE temp1. + temp2-text = '3rd'. + temp2-percent = '30.0'. + INSERT temp2 INTO TABLE temp1. + counts = temp1. total_count = lines( counts ). @@ -187,11 +200,22 @@ CLASS Z2UI5_CL_DEMO_APP_013 IMPLEMENTATION. CASE client->get( )-event. WHEN 'UPDATE_CHART_DATA'. CLEAR counts. - counts = VALUE #( - ( text = '1st' percent = '60.0' ) - ( text = '2nd' percent = '10.0' ) - ( text = '3rd' percent = '15.0' ) - ( text = '4th' percent = '15.0' ) ). + DATA temp3 LIKE counts. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-text = '1st'. + temp4-percent = '60.0'. + INSERT temp4 INTO TABLE temp3. + temp4-text = '2nd'. + temp4-percent = '10.0'. + INSERT temp4 INTO TABLE temp3. + temp4-text = '3rd'. + temp4-percent = '15.0'. + INSERT temp4 INTO TABLE temp3. + temp4-text = '4th'. + temp4-percent = '15.0'. + INSERT temp4 INTO TABLE temp3. + counts = temp3. total_count = lines( counts ). diff --git a/src/z2ui5_cl_demo_app_014.clas.abap b/src/z2ui5_cl_demo_app_014.clas.abap index 5e522733..739579d1 100644 --- a/src/z2ui5_cl_demo_app_014.clas.abap +++ b/src/z2ui5_cl_demo_app_014.clas.abap @@ -28,18 +28,22 @@ CLASS Z2UI5_CL_DEMO_APP_014 IMPLEMENTATION. METHOD render_tab_line. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(container) = view->shell( + DATA container TYPE REF TO z2ui5_cl_xml_view. + container = view->shell( )->page( title = 'abap2UI5 - Visualization' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true )->tab_container( ). - DATA(tab) = container->tab( text = 'Line Chart' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = container->tab( text = 'Line Chart' selected = client->_bind( mv_tab_line_active ) ). - DATA(grid) = tab->grid( 'XL6 L6 M6 S12' ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = tab->grid( 'XL6 L6 M6 S12' ). grid->link( text = 'Go to the SAP Demos for Interactive Line Charts here...' @@ -53,7 +57,8 @@ CLASS Z2UI5_CL_DEMO_APP_014 IMPLEMENTATION. )->layout_data( )->grid_data( 'XL12 L12 M12 S12' ). - DATA(point) = grid->flex_box( + DATA point TYPE REF TO z2ui5_cl_xml_view. + point = grid->flex_box( width = '22rem' height = '13rem' alignitems = 'Center' diff --git a/src/z2ui5_cl_demo_app_015.clas.abap b/src/z2ui5_cl_demo_app_015.clas.abap index 228deda1..70d81d70 100644 --- a/src/z2ui5_cl_demo_app_015.clas.abap +++ b/src/z2ui5_cl_demo_app_015.clas.abap @@ -34,12 +34,15 @@ CLASS Z2UI5_CL_DEMO_APP_015 IMPLEMENTATION. ENDCASE. - data(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Formatted Text' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->header_content( )->toolbar_spacer( )->link( diff --git a/src/z2ui5_cl_demo_app_016.clas.abap b/src/z2ui5_cl_demo_app_016.clas.abap index 7ac7eeb1..6247a445 100644 --- a/src/z2ui5_cl_demo_app_016.clas.abap +++ b/src/z2ui5_cl_demo_app_016.clas.abap @@ -27,17 +27,22 @@ CLASS Z2UI5_CL_DEMO_APP_016 IMPLEMENTATION. METHOD render_tab_bar. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(container) = view->shell( + DATA container TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( abap_false = client->get( )-check_launchpad_active ). + container = view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp1 title = 'abap2UI5 - Visualization' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true )->tab_container( ). - DATA(grid) = container->tab( + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = container->tab( text = 'Bar Chart' selected = client->_bind( mv_tab_bar_active ) )->grid( 'XL6 L6 M6 S12' ). @@ -52,7 +57,8 @@ CLASS Z2UI5_CL_DEMO_APP_016 IMPLEMENTATION. )->get( )->layout_data( )->grid_data( 'XL12 L12 M12 S12' ). - DATA(bar) = grid->flex_box( + DATA bar TYPE REF TO z2ui5_cl_xml_view. + bar = grid->flex_box( width = '22rem' height = '13rem' alignitems = 'Center' diff --git a/src/z2ui5_cl_demo_app_017.clas.abap b/src/z2ui5_cl_demo_app_017.clas.abap index a9e46f0a..6cadd1bd 100644 --- a/src/z2ui5_cl_demo_app_017.clas.abap +++ b/src/z2ui5_cl_demo_app_017.clas.abap @@ -25,7 +25,8 @@ CLASS Z2UI5_CL_DEMO_APP_017 IMPLEMENTATION. CASE client->get( )-event. WHEN 'BUTTON_ROUNDTRIP'. - DATA(lv_dummy) = 'user pressed a button, your custom implementation can be called here'. + DATA lv_dummy TYPE c LENGTH 68. + lv_dummy = 'user pressed a button, your custom implementation can be called here'. WHEN 'BUTTON_MSG_BOX'. client->message_box_display( @@ -37,16 +38,19 @@ CLASS Z2UI5_CL_DEMO_APP_017 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->object_page_layout( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->object_page_layout( showtitleinheadercontent = abap_true showeditheaderbutton = abap_true editheaderbuttonpress = client->_event( 'EDIT_HEADER_PRESS' ) uppercaseanchorbar = abap_false ). - DATA(header_title) = page->header_title( )->object_page_dyn_header_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->header_title( )->object_page_dyn_header_title( ). header_title->expanded_heading( )->hbox( @@ -84,7 +88,8 @@ CLASS Z2UI5_CL_DEMO_APP_017 IMPLEMENTATION. text = 'Go Back' press = client->_event( 'BACK' ) ). - DATA(header_content) = page->header_content( ns = 'uxap' ). + DATA header_content TYPE REF TO z2ui5_cl_xml_view. + header_content = page->header_content( ns = 'uxap' ). header_content->flex_box( wrap = 'Wrap' )->avatar( src = lcl_help=>get_avatar( ) @@ -111,7 +116,8 @@ CLASS Z2UI5_CL_DEMO_APP_017 IMPLEMENTATION. )->get_parent( ). - DATA(sections) = page->sections( ). + DATA sections TYPE REF TO z2ui5_cl_xml_view. + sections = page->sections( ). sections->object_page_section( titleuppercase = abap_false id = 'goalsSectionSS1' diff --git a/src/z2ui5_cl_demo_app_018.clas.abap b/src/z2ui5_cl_demo_app_018.clas.abap index d4ea9622..0d25150f 100644 --- a/src/z2ui5_cl_demo_app_018.clas.abap +++ b/src/z2ui5_cl_demo_app_018.clas.abap @@ -29,7 +29,8 @@ CLASS Z2UI5_CL_DEMO_APP_018 IMPLEMENTATION. METHOD z2ui5_display_popup_input. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->dialog( title = 'Title' icon = 'sap-icon://edit' @@ -63,12 +64,15 @@ CLASS Z2UI5_CL_DEMO_APP_018 IMPLEMENTATION. METHOD z2ui5_display_view_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Template' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'VIEW_MAIN' editable = abap_true )->content( 'form' @@ -101,12 +105,15 @@ CLASS Z2UI5_CL_DEMO_APP_018 IMPLEMENTATION. METHOD z2ui5_display_view_second. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Template' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp2 )->simple_form( 'VIEW_SECOND' )->content( 'form' )->get_parent( )->get_parent( )->footer( diff --git a/src/z2ui5_cl_demo_app_019.clas.abap b/src/z2ui5_cl_demo_app_019.clas.abap index 014e3afa..6b1012aa 100644 --- a/src/z2ui5_cl_demo_app_019.clas.abap +++ b/src/z2ui5_cl_demo_app_019.clas.abap @@ -12,8 +12,10 @@ CLASS z2ui5_cl_demo_app_019 DEFINITION PUBLIC. descr TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. - DATA t_tab_sel TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_d0f24c1b70 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_d0f24c1b70. + TYPES temp2_d0f24c1b70 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab_sel TYPE temp2_d0f24c1b70. DATA mv_sel_mode TYPE string. DATA check_initialized TYPE abap_bool. @@ -32,12 +34,26 @@ CLASS Z2UI5_CL_DEMO_APP_019 IMPLEMENTATION. check_initialized = abap_true. mv_sel_mode = 'None'. - t_tab = VALUE #( descr = 'this is a description' - ( title = 'title_01' value = 'value_01' ) - ( title = 'title_02' value = 'value_02' ) - ( title = 'title_03' value = 'value_03' ) - ( title = 'title_04' value = 'value_04' ) - ( title = 'title_05' value = 'value_05' ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-descr = 'this is a description'. + temp2-title = 'title_01'. + temp2-value = 'value_01'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'title_02'. + temp2-value = 'value_02'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'title_03'. + temp2-value = 'value_03'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'title_04'. + temp2-value = 'value_04'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'title_05'. + temp2-value = 'value_05'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. ENDIF. @@ -54,12 +70,16 @@ CLASS Z2UI5_CL_DEMO_APP_019 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Table with different Selection Modes' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp3 ). page->segmented_button( selected_key = client->_bind_edit( mv_sel_mode ) diff --git a/src/z2ui5_cl_demo_app_020.clas.abap b/src/z2ui5_cl_demo_app_020.clas.abap index 0c7cd476..c95cf791 100644 --- a/src/z2ui5_cl_demo_app_020.clas.abap +++ b/src/z2ui5_cl_demo_app_020.clas.abap @@ -34,7 +34,7 @@ CLASS Z2UI5_CL_DEMO_APP_020 IMPLEMENTATION. METHOD factory. - result = NEW #( ). + CREATE OBJECT result. result->mv_text = i_text. result->mv_cancel_text = i_cancel_text. diff --git a/src/z2ui5_cl_demo_app_021.clas.abap b/src/z2ui5_cl_demo_app_021.clas.abap index 04f4b844..eeced076 100644 --- a/src/z2ui5_cl_demo_app_021.clas.abap +++ b/src/z2ui5_cl_demo_app_021.clas.abap @@ -29,13 +29,17 @@ CLASS z2ui5_cl_demo_app_021 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Text Area Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( 'text area' )->text_area( diff --git a/src/z2ui5_cl_demo_app_022.clas.abap b/src/z2ui5_cl_demo_app_022.clas.abap index 8b82b328..ab229b08 100644 --- a/src/z2ui5_cl_demo_app_022.clas.abap +++ b/src/z2ui5_cl_demo_app_022.clas.abap @@ -31,13 +31,17 @@ CLASS z2ui5_cl_demo_app_022 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Progress Indicator Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( 'ProgressIndicator' )->progress_indicator( diff --git a/src/z2ui5_cl_demo_app_024.clas.abap b/src/z2ui5_cl_demo_app_024.clas.abap index ca49d806..87a970d2 100644 --- a/src/z2ui5_cl_demo_app_024.clas.abap +++ b/src/z2ui5_cl_demo_app_024.clas.abap @@ -24,11 +24,14 @@ CLASS z2ui5_cl_demo_app_024 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - flow logic - APP 01' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->grid( 'L6 M12 S12' )->content( 'layout' )->simple_form( 'Controller' )->content( 'form' )->label( 'Demo' @@ -54,7 +57,7 @@ CLASS z2ui5_cl_demo_app_024 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_navigated( ). + IF client->check_on_navigated( ) IS NOT INITIAL. display_view( client ). RETURN. ENDIF. @@ -62,32 +65,40 @@ CLASS z2ui5_cl_demo_app_024 IMPLEMENTATION. CASE client->get( )-event. WHEN 'CALL_NEW_APP'. - client->nav_app_call( NEW z2ui5_cl_demo_app_025( ) ). + DATA temp1 TYPE REF TO z2ui5_cl_demo_app_025. + CREATE OBJECT temp1 TYPE z2ui5_cl_demo_app_025. + client->nav_app_call( temp1 ). WHEN 'CALL_NEW_APP_VIEW'. - DATA(lo_app) = NEW z2ui5_cl_demo_app_025( ). + DATA lo_app TYPE REF TO z2ui5_cl_demo_app_025. + CREATE OBJECT lo_app TYPE z2ui5_cl_demo_app_025. lo_app->mv_show_view = 'SECOND'. client->nav_app_call( lo_app ). WHEN 'CALL_NEW_APP_READ'. - DATA(lo_app_next) = NEW z2ui5_cl_demo_app_025( ). + DATA lo_app_next TYPE REF TO z2ui5_cl_demo_app_025. + CREATE OBJECT lo_app_next TYPE z2ui5_cl_demo_app_025. lo_app_next->mv_input_previous_set = mv_input. client->nav_app_call( lo_app_next ). WHEN 'CALL_NEW_APP_EVENT'. - lo_app_next = NEW z2ui5_cl_demo_app_025( ). + CREATE OBJECT lo_app_next TYPE z2ui5_cl_demo_app_025. lo_app_next->mv_event_backend = 'NEW_APP_EVENT'. client->nav_app_call( lo_app_next ). WHEN 'BACK'. - DATA(lo_prev_stack_app) = client->get_app( client->get( )-s_draft-id_prev_app_stack ). + DATA lo_prev_stack_app TYPE REF TO z2ui5_if_app. + lo_prev_stack_app = client->get_app( client->get( )-s_draft-id_prev_app_stack ). client->nav_app_leave( lo_prev_stack_app ). WHEN OTHERS. CASE mv_backend_event. WHEN 'CALL_PREVIOUS_APP_INPUT_RETURN'. - DATA(lo_called_app) = CAST z2ui5_cl_demo_app_025( client->get_app_prev( ) ). + DATA temp2 TYPE REF TO z2ui5_cl_demo_app_025. + temp2 ?= client->get_app_prev( ). + DATA lo_called_app LIKE temp2. + lo_called_app = temp2. CLEAR mv_backend_event. client->message_box_display( `Input made in the previous app:` && lo_called_app->mv_input ). ENDCASE. diff --git a/src/z2ui5_cl_demo_app_025.clas.abap b/src/z2ui5_cl_demo_app_025.clas.abap index 4bd1a94a..3011a8d8 100644 --- a/src/z2ui5_cl_demo_app_025.clas.abap +++ b/src/z2ui5_cl_demo_app_025.clas.abap @@ -27,13 +27,20 @@ CLASS Z2UI5_CL_DEMO_APP_025 IMPLEMENTATION. client->message_box_display( 'server-client roundtrip, method on_event of the abap controller was called' ). WHEN 'BUTTON_RESTART'. - client->nav_app_call( NEW z2ui5_cl_demo_app_025( ) ). + DATA temp1 TYPE REF TO z2ui5_cl_demo_app_025. + CREATE OBJECT temp1 TYPE z2ui5_cl_demo_app_025. + client->nav_app_call( temp1 ). WHEN 'BUTTON_CHANGE_APP'. - client->nav_app_call( NEW z2ui5_cl_demo_app_001( ) ). + DATA temp2 TYPE REF TO z2ui5_cl_demo_app_001. + CREATE OBJECT temp2 TYPE z2ui5_cl_demo_app_001. + client->nav_app_call( temp2 ). WHEN 'BUTTON_READ_PREVIOUS'. - DATA(lo_previous_app) = CAST z2ui5_cl_demo_app_024( client->get_app( client->get( )-s_draft-id_prev_app ) ). + DATA temp3 TYPE REF TO z2ui5_cl_demo_app_024. + temp3 ?= client->get_app( client->get( )-s_draft-id_prev_app ). + DATA lo_previous_app LIKE temp3. + lo_previous_app = temp3. mv_input_previous = lo_previous_app->mv_input2. client->message_toast_display( `data of previous app read` ). @@ -41,7 +48,9 @@ CLASS Z2UI5_CL_DEMO_APP_025 IMPLEMENTATION. mv_show_view = 'MAIN'. WHEN 'BACK_WITH_EVENT'. - lo_previous_app = CAST z2ui5_cl_demo_app_024( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). + DATA temp4 TYPE REF TO z2ui5_cl_demo_app_024. + temp4 ?= client->get_app( client->get( )-s_draft-id_prev_app_stack ). + lo_previous_app = temp4. lo_previous_app->mv_backend_event = 'CALL_PREVIOUS_APP_INPUT_RETURN'. client->nav_app_leave( lo_previous_app ). @@ -64,8 +73,10 @@ CLASS Z2UI5_CL_DEMO_APP_025 IMPLEMENTATION. WHEN 'MAIN' OR ''. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - flow logic - APP 02' navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_026.clas.abap b/src/z2ui5_cl_demo_app_026.clas.abap index 35552871..cb1eb805 100644 --- a/src/z2ui5_cl_demo_app_026.clas.abap +++ b/src/z2ui5_cl_demo_app_026.clas.abap @@ -30,7 +30,8 @@ CLASS Z2UI5_CL_DEMO_APP_026 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->popover( title = 'Popover Title' placement = mv_placement @@ -56,12 +57,15 @@ CLASS Z2UI5_CL_DEMO_APP_026 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popover Examples' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( 'Popover' )->content( 'form' )->title( 'Input' diff --git a/src/z2ui5_cl_demo_app_027.clas.abap b/src/z2ui5_cl_demo_app_027.clas.abap index 8d01a430..6068955a 100644 --- a/src/z2ui5_cl_demo_app_027.clas.abap +++ b/src/z2ui5_cl_demo_app_027.clas.abap @@ -82,12 +82,16 @@ CLASS z2ui5_cl_demo_app_027 IMPLEMENTATION. METHOD z2ui5_on_render. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(lv_xml) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA lv_xml TYPE string. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + lv_xml = view->shell( )->page( title = 'abap2UI5 - Binding Syntax' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Binding Syntax' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_028.clas.abap b/src/z2ui5_cl_demo_app_028.clas.abap index e967f980..ef5112f0 100644 --- a/src/z2ui5_cl_demo_app_028.clas.abap +++ b/src/z2ui5_cl_demo_app_028.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_028 DEFINITION PUBLIC. info TYPE string, checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_35f4bb9be9 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_35f4bb9be9. DATA mv_counter TYPE i. DATA mv_check_active TYPE abap_bool. @@ -57,7 +58,13 @@ CLASS z2ui5_cl_demo_app_028 IMPLEMENTATION. WHEN 'TIMER_FINISHED'. mv_counter = mv_counter + 1. - INSERT VALUE #( title = 'entry' && mv_counter info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) + DATA temp1 TYPE z2ui5_cl_demo_app_028=>ty_row. + CLEAR temp1. + temp1-title = 'entry' && mv_counter. + temp1-info = 'completed'. + temp1-descr = 'this is a description'. + temp1-icon = 'sap-icon://account'. + INSERT temp1 INTO TABLE t_tab. IF mv_counter = 3. @@ -80,25 +87,36 @@ CLASS z2ui5_cl_demo_app_028 IMPLEMENTATION. mv_counter = 1. mv_check_active = abap_true. - t_tab = VALUE #( - ( title = 'entry' && mv_counter info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp2 LIKE t_tab. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-title = 'entry' && mv_counter. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-icon = 'sap-icon://account'. + INSERT temp3 INTO TABLE temp2. + t_tab = temp2. ENDMETHOD. METHOD z2ui5_view_display. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). lo_view->_z2ui5( )->timer( finished = client->_event( 'TIMER_FINISHED' ) delayms = `2000` checkactive = client->_bind( mv_check_active ) ). - DATA(page) = lo_view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = 'abap2UI5 - CL_GUI_TIMER - Monitor' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->list( headertext = 'Data auto refresh (2 sec)' diff --git a/src/z2ui5_cl_demo_app_029.clas.abap b/src/z2ui5_cl_demo_app_029.clas.abap index 3db58f66..942cec58 100644 --- a/src/z2ui5_cl_demo_app_029.clas.abap +++ b/src/z2ui5_cl_demo_app_029.clas.abap @@ -23,16 +23,19 @@ CLASS Z2UI5_CL_DEMO_APP_029 IMPLEMENTATION. METHOD render_tab_radial. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(container) = view->shell( + DATA container TYPE REF TO z2ui5_cl_xml_view. + container = view->shell( )->page( title = 'abap2UI5 - Visualization' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true )->tab_container( ). - DATA(grid) = container->tab( + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = container->tab( text = 'Radial Chart' selected = client->_bind( mv_tab_radial_active ) )->grid( 'XL12 L12 M12 S12' ). diff --git a/src/z2ui5_cl_demo_app_030.clas.abap b/src/z2ui5_cl_demo_app_030.clas.abap index 5ea0c99d..8e9b6412 100644 --- a/src/z2ui5_cl_demo_app_030.clas.abap +++ b/src/z2ui5_cl_demo_app_030.clas.abap @@ -15,7 +15,7 @@ CLASS z2ui5_cl_demo_app_030 DEFINITION PUBLIC. END OF ty_row. DATA check_initialized TYPE abap_bool. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. @@ -30,27 +30,110 @@ CLASS Z2UI5_CL_DEMO_APP_030 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_tab = VALUE #( - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'incompleted'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. ENDIF. @@ -58,7 +141,8 @@ CLASS Z2UI5_CL_DEMO_APP_030 IMPLEMENTATION. CASE client->get( )-event. WHEN 'BUTTON_ROUNDTRIP'. - DATA(lv_dummy) = 'user pressed a button, your custom implementation can be called here'. + DATA lv_dummy TYPE c LENGTH 68. + lv_dummy = 'user pressed a button, your custom implementation can be called here'. WHEN 'BUTTON_MSG_BOX'. client->message_box_display( @@ -70,17 +154,20 @@ CLASS Z2UI5_CL_DEMO_APP_030 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->dynamic_page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->dynamic_page( showfooter = abap_true " headerExpanded = abap_true " toggleHeaderOnTitleClick = client->_event( 'ON_TITLE' ) ). - DATA(header_title) = page->title( ns = 'f' )->get( )->dynamic_page_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). header_title->heading( ns = 'f' )->title( 'Header Title' ). @@ -145,7 +232,8 @@ CLASS Z2UI5_CL_DEMO_APP_030 IMPLEMENTATION. text = '34' ). - DATA(cont) = page->content( ns = 'f' ). + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->content( ns = 'f' ). cont->list( headertext = 'List Ouput' diff --git a/src/z2ui5_cl_demo_app_031.clas.abap b/src/z2ui5_cl_demo_app_031.clas.abap index 659dab38..39ffc264 100644 --- a/src/z2ui5_cl_demo_app_031.clas.abap +++ b/src/z2ui5_cl_demo_app_031.clas.abap @@ -76,9 +76,11 @@ CLASS z2ui5_cl_demo_app_031 IMPLEMENTATION. METHOD z2ui5_on_render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(lv_xml) = `` && |\n| && ` ` && |\n| && @@ -167,7 +169,8 @@ CLASS z2ui5_cl_demo_app_031 IMPLEMENTATION. METHOD z2ui5_on_render_popup. IF app-popup = `TEST`. - DATA(lv_xml) = `` && |\n| && ` message_toast_display( app-get-t_event_arg[ 1 ] ). + DATA temp1 LIKE LINE OF app-get-t_event_arg. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE app-get-t_event_arg INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_toast_display( temp1 ). WHEN 'MYCC'. client->message_toast_display( 'MYCC event ' && mv_value ). @@ -79,9 +87,11 @@ CLASS Z2UI5_CL_DEMO_APP_032 IMPLEMENTATION. METHOD z2ui5_on_render. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). - DATA(lv_xml) = `factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Illustrated Messages' navbuttonpress = client->_event( val = 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_034.clas.abap b/src/z2ui5_cl_demo_app_034.clas.abap index 887efa20..a69f459c 100644 --- a/src/z2ui5_cl_demo_app_034.clas.abap +++ b/src/z2ui5_cl_demo_app_034.clas.abap @@ -28,14 +28,19 @@ CLASS Z2UI5_CL_DEMO_APP_034 IMPLEMENTATION. METHOD view_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Popups' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'layout' ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L8 M12 S12' )->content( 'layout' ). grid->simple_form( 'Tables' )->content( 'form' )->label( '01' @@ -50,7 +55,8 @@ CLASS Z2UI5_CL_DEMO_APP_034 IMPLEMENTATION. METHOD view_popup_bal. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( )->dialog( 'abap2ui5 - Popup Message Log' )->table( client->_bind( t_bapiret ) )->columns( @@ -88,13 +94,40 @@ CLASS Z2UI5_CL_DEMO_APP_034 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_bapiret = VALUE #( - ( message = 'An empty Report field causes an empty XML Message to be sent' type = 'E' id = 'MSG1' number = '001' ) - ( message = 'Check was executed for wrong Scenario' type = 'E' id = 'MSG1' number = '002' ) - ( message = 'Request was handled without errors' type = 'S' id = 'MSG1' number = '003' ) - ( message = 'product activated' type = 'S' id = 'MSG4' number = '375' ) - ( message = 'check the input values' type = 'W' id = 'MSG2' number = '375' ) - ( message = 'product already in use' type = 'I' id = 'MSG2' number = '375' ) ). + DATA temp1 TYPE bapirettab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-message = 'An empty Report field causes an empty XML Message to be sent'. + temp2-type = 'E'. + temp2-id = 'MSG1'. + temp2-number = '001'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'Check was executed for wrong Scenario'. + temp2-type = 'E'. + temp2-id = 'MSG1'. + temp2-number = '002'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'Request was handled without errors'. + temp2-type = 'S'. + temp2-id = 'MSG1'. + temp2-number = '003'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'product activated'. + temp2-type = 'S'. + temp2-id = 'MSG4'. + temp2-number = '375'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'check the input values'. + temp2-type = 'W'. + temp2-id = 'MSG2'. + temp2-number = '375'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'product already in use'. + temp2-type = 'I'. + temp2-id = 'MSG2'. + temp2-number = '375'. + INSERT temp2 INTO TABLE temp1. + t_bapiret = temp1. ENDIF. diff --git a/src/z2ui5_cl_demo_app_035.clas.abap b/src/z2ui5_cl_demo_app_035.clas.abap index 46d9357c..c5d0e8a9 100644 --- a/src/z2ui5_cl_demo_app_035.clas.abap +++ b/src/z2ui5_cl_demo_app_035.clas.abap @@ -23,24 +23,41 @@ ENDCLASS. CLASS z2ui5_cl_demo_app_035 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( title = 'abap2UI5 - File Editor' + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp6 TYPE xsdboolean. + temp6 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - File Editor' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp6 ). - DATA(temp) = page->simple_form( title = 'File' + DATA temp TYPE REF TO z2ui5_cl_xml_view. + temp = page->simple_form( title = 'File' editable = abap_true )->content( `form` )->label( 'path' )->input( client->_bind_edit( mv_path ) )->label( 'Option' ). - lt_types = VALUE z2ui5_if_types=>ty_t_name_value( ). - LT_TYPES = VALUE #( FOR row IN z2ui5_cl_util=>source_get_file_types( ) ( - n = shift_right( shift_left( row ) ) - v = shift_right( shift_left( row ) ) ) ). - - DATA(temp3) = temp->input( value = client->_bind_edit( mv_type ) + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + lt_types = temp1. + DATA temp2 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp2. + DATA temp5 TYPE string_table. + temp5 = z2ui5_cl_util=>source_get_file_types( ). + DATA row LIKE LINE OF temp5. + LOOP AT temp5 INTO row. + DATA temp4 LIKE LINE OF temp2. + temp4-n = shift_right( shift_left( row ) ). + temp4-v = shift_right( shift_left( row ) ). + INSERT temp4 INTO TABLE temp2. + ENDLOOP. + LT_TYPES = temp2. + + DATA temp3 TYPE REF TO z2ui5_cl_xml_view. + temp3 = temp->input( value = client->_bind_edit( mv_type ) suggestionitems = client->_bind_local( LT_TYPES ) )->get( ). @@ -56,6 +73,8 @@ CLASS z2ui5_cl_demo_app_035 IMPLEMENTATION. editable = client->_bind( mv_check_editable ) value = client->_bind( mv_editor ) ). + DATA temp7 TYPE xsdboolean. + temp7 = boolc( mv_editor IS NOT INITIAL ). page->footer( )->overflow_toolbar( )->button( text = 'Clear' press = client->_event( 'CLEAR' ) @@ -68,7 +87,7 @@ CLASS z2ui5_cl_demo_app_035 IMPLEMENTATION. press = client->_event( 'DB_SAVE' ) type = 'Emphasized' icon = 'sap-icon://upload-to-cloud' - enabled = xsdbool( mv_editor IS NOT INITIAL ) ). + enabled = temp7 ). client->view_display( page->stringify( ) ). ENDMETHOD. @@ -87,12 +106,21 @@ CLASS z2ui5_cl_demo_app_035 IMPLEMENTATION. WHEN 'DB_LOAD'. - mv_editor = COND #( - WHEN mv_path CS 'abap' THEN lcl_file_api=>read_abap( ) - WHEN mv_path CS 'json' THEN lcl_file_api=>read_json( ) - WHEN mv_path CS 'yaml' THEN lcl_file_api=>read_yaml( ) - WHEN mv_path CS 'text' THEN lcl_file_api=>read_text( ) - WHEN mv_path CS 'js' THEN lcl_file_api=>read_js( ) ). + DATA temp5 TYPE string. + IF mv_path CS 'abap'. + temp5 = lcl_file_api=>read_abap( ). + ELSEIF mv_path CS 'json'. + temp5 = lcl_file_api=>read_json( ). + ELSEIF mv_path CS 'yaml'. + temp5 = lcl_file_api=>read_yaml( ). + ELSEIF mv_path CS 'text'. + temp5 = lcl_file_api=>read_text( ). + ELSEIF mv_path CS 'js'. + temp5 = lcl_file_api=>read_js( ). + ELSE. + CLEAR temp5. + ENDIF. + mv_editor = temp5. client->message_toast_display( 'Download successfull' ). @@ -102,7 +130,9 @@ CLASS z2ui5_cl_demo_app_035 IMPLEMENTATION. client->message_box_display( text = 'Upload successfull. File saved!' type = 'success' ). WHEN 'EDIT'. - mv_check_editable = xsdbool( mv_check_editable = abap_false ). + DATA temp8 TYPE xsdboolean. + temp8 = boolc( mv_check_editable = abap_false ). + mv_check_editable = temp8. client->view_model_update( ). WHEN 'CLEAR'. diff --git a/src/z2ui5_cl_demo_app_035.clas.locals_imp.abap b/src/z2ui5_cl_demo_app_035.clas.locals_imp.abap index 3cdaec25..f29b5b67 100644 --- a/src/z2ui5_cl_demo_app_035.clas.locals_imp.abap +++ b/src/z2ui5_cl_demo_app_035.clas.locals_imp.abap @@ -23,7 +23,7 @@ CLASS lcl_file_api DEFINITION FINAL. name TYPE string, value TYPE string, END OF ty_s_suggest. - TYPES ty_t_suggest TYPE STANDARD TABLE OF ty_s_suggest WITH EMPTY KEY. + TYPES ty_t_suggest TYPE STANDARD TABLE OF ty_s_suggest WITH DEFAULT KEY. PROTECTED SECTION. diff --git a/src/z2ui5_cl_demo_app_036.clas.abap b/src/z2ui5_cl_demo_app_036.clas.abap index 6bc2e51a..4d11788f 100644 --- a/src/z2ui5_cl_demo_app_036.clas.abap +++ b/src/z2ui5_cl_demo_app_036.clas.abap @@ -56,7 +56,15 @@ CLASS Z2UI5_CL_DEMO_APP_036 IMPLEMENTATION. CASE app-get-event. WHEN 'POST'. - client->message_toast_display( app-get-t_event_arg[ 1 ] ). + DATA temp1 LIKE LINE OF app-get-t_event_arg. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE app-get-t_event_arg INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_toast_display( temp1 ). WHEN 'MYCC'. client->message_toast_display( 'MYCC event ' && mv_value ). @@ -79,8 +87,10 @@ CLASS Z2UI5_CL_DEMO_APP_036 IMPLEMENTATION. METHOD z2ui5_on_render. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(lv_xml) = `factory( ). + DATA lv_xml TYPE string. + lv_xml = `factory( ). - DATA(lv_xml) = `factory( ). + DATA lv_xml TYPE string. + lv_xml = `factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup->message_popover( items = client->_bind( t_msg ) @@ -59,7 +60,8 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. METHOD z2ui5_display_popup. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup = popup->dialog( title = `Messages` @@ -94,8 +96,10 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( val = 'BACK' ) @@ -136,11 +140,34 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_msg = VALUE #( - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Error' group = 'group 01' ) - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Information' group = 'group 01' ) - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Information' group = 'group 02' ) - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Success' group = 'group 03' ) ). + DATA temp1 LIKE t_msg. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Error'. + temp2-group = 'group 01'. + INSERT temp2 INTO TABLE temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Information'. + temp2-group = 'group 01'. + INSERT temp2 INTO TABLE temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Information'. + temp2-group = 'group 02'. + INSERT temp2 INTO TABLE temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Success'. + temp2-group = 'group 03'. + INSERT temp2 INTO TABLE temp1. + t_msg = temp1. z2ui5_display_view( ). diff --git a/src/z2ui5_cl_demo_app_039.clas.abap b/src/z2ui5_cl_demo_app_039.clas.abap index cdd36e83..4e7d6ff4 100644 --- a/src/z2ui5_cl_demo_app_039.clas.abap +++ b/src/z2ui5_cl_demo_app_039.clas.abap @@ -73,7 +73,8 @@ CLASS Z2UI5_CL_DEMO_APP_039 IMPLEMENTATION. METHOD z2ui5_on_render_main. - DATA(lv_xml) = `` && |\n| && ` ` && |\n| && diff --git a/src/z2ui5_cl_demo_app_040.clas.abap b/src/z2ui5_cl_demo_app_040.clas.abap index f1994d13..3860f618 100644 --- a/src/z2ui5_cl_demo_app_040.clas.abap +++ b/src/z2ui5_cl_demo_app_040.clas.abap @@ -64,7 +64,8 @@ CLASS Z2UI5_CL_DEMO_APP_040 IMPLEMENTATION. METHOD z2ui5_on_render. - DATA(lv_xml) = `factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Step Input Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( 'StepInput' )->step_input( diff --git a/src/z2ui5_cl_demo_app_042.clas.abap b/src/z2ui5_cl_demo_app_042.clas.abap index 086bc629..0eac8401 100644 --- a/src/z2ui5_cl_demo_app_042.clas.abap +++ b/src/z2ui5_cl_demo_app_042.clas.abap @@ -25,7 +25,8 @@ CLASS Z2UI5_CL_DEMO_APP_042 IMPLEMENTATION. CASE client->get( )-event. WHEN 'BUTTON_ROUNDTRIP'. - DATA(lv_dummy) = 'user pressed a button, your custom implementation can be called here'. + DATA lv_dummy TYPE c LENGTH 68. + lv_dummy = 'user pressed a button, your custom implementation can be called here'. WHEN 'BUTTON_MSG_BOX'. client->message_box_display( @@ -37,16 +38,19 @@ CLASS Z2UI5_CL_DEMO_APP_042 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->object_page_layout( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->object_page_layout( showtitleinheadercontent = abap_true showeditheaderbutton = abap_true editheaderbuttonpress = client->_event( 'EDIT_HEADER_PRESS' ) uppercaseanchorbar = abap_false ). - DATA(header_title) = page->header_title( )->object_page_dyn_header_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->header_title( )->object_page_dyn_header_title( ). header_title->expanded_heading( )->hbox( @@ -84,7 +88,8 @@ CLASS Z2UI5_CL_DEMO_APP_042 IMPLEMENTATION. text = 'Go Back' press = client->_event( 'BACK' ) ). - DATA(header_content) = page->header_content( ns = 'uxap' ). + DATA header_content TYPE REF TO z2ui5_cl_xml_view. + header_content = page->header_content( ns = 'uxap' ). header_content->flex_box( wrap = 'Wrap' )->avatar( src = lcl_help=>get_avatar( ) @@ -110,7 +115,8 @@ CLASS Z2UI5_CL_DEMO_APP_042 IMPLEMENTATION. )->get_parent( ). - DATA(sections) = page->sections( ). + DATA sections TYPE REF TO z2ui5_cl_xml_view. + sections = page->sections( ). sections->object_page_section( titleuppercase = abap_false id = 'goalsSectionSS1' diff --git a/src/z2ui5_cl_demo_app_045.clas.abap b/src/z2ui5_cl_demo_app_045.clas.abap index 575cb35c..ebc7f9d0 100644 --- a/src/z2ui5_cl_demo_app_045.clas.abap +++ b/src/z2ui5_cl_demo_app_045.clas.abap @@ -14,7 +14,8 @@ CLASS z2ui5_cl_demo_app_045 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_850264c07c TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_850264c07c. DATA check_initialized TYPE abap_bool. DATA mv_info_filter TYPE string. METHODS refresh_data. @@ -31,9 +32,21 @@ CLASS Z2UI5_CL_DEMO_APP_045 IMPLEMENTATION. METHOD refresh_data. DO 1000 TIMES. - DATA(ls_row) = VALUE ty_row( count = sy-index value = 'red' - info = COND #( WHEN sy-index < 50 THEN 'completed' ELSE 'uncompleted' ) - descr = 'this is a description' checkbox = abap_true ). + DATA temp1 TYPE ty_row. + CLEAR temp1. + temp1-count = sy-index. + temp1-value = 'red'. + DATA temp2 TYPE z2ui5_cl_demo_app_045=>ty_row-info. + IF sy-index < 50. + temp2 = 'completed'. + ELSE. + temp2 = 'uncompleted'. + ENDIF. + temp1-info = temp2. + temp1-descr = 'this is a description'. + temp1-checkbox = abap_true. + DATA ls_row LIKE temp1. + ls_row = temp1. INSERT ls_row INTO TABLE t_tab. ENDDO. @@ -64,11 +77,14 @@ CLASS Z2UI5_CL_DEMO_APP_045 IMPLEMENTATION. ENDCASE. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Scroll Container with Table and Toolbar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->header_content( )->link( )->get_parent( ). @@ -83,7 +99,8 @@ CLASS Z2UI5_CL_DEMO_APP_045 IMPLEMENTATION. text = 'filter' press = client->_event( 'FLTER_INFO' ) ). - DATA(tab) = page->scroll_container( height = '70%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->scroll_container( height = '70%' vertical = abap_true )->table( growing = abap_true diff --git a/src/z2ui5_cl_demo_app_046.clas.abap b/src/z2ui5_cl_demo_app_046.clas.abap index 5ed4f7b0..b49e5429 100644 --- a/src/z2ui5_cl_demo_app_046.clas.abap +++ b/src/z2ui5_cl_demo_app_046.clas.abap @@ -15,7 +15,7 @@ CLASS z2ui5_cl_demo_app_046 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA check_initialized TYPE abap_bool. DATA mv_display TYPE string. @@ -35,13 +35,40 @@ CLASS Z2UI5_CL_DEMO_APP_046 IMPLEMENTATION. mv_display = 'LIST'. - t_tab = VALUE #( - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Peter' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'incompleted'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Peter'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. ELSE. @@ -54,7 +81,8 @@ CLASS Z2UI5_CL_DEMO_APP_046 IMPLEMENTATION. ENDIF. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Table output in two different Ways - Changing UI without Model' navbuttonpress = client->_event( 'BACK' ) @@ -81,7 +109,8 @@ CLASS Z2UI5_CL_DEMO_APP_046 IMPLEMENTATION. WHEN 'TABLE'. - DATA(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( headertext = 'Table Control' items = client->_bind( t_tab ) ). diff --git a/src/z2ui5_cl_demo_app_047.clas.abap b/src/z2ui5_cl_demo_app_047.clas.abap index b71c9801..726b2390 100644 --- a/src/z2ui5_cl_demo_app_047.clas.abap +++ b/src/z2ui5_cl_demo_app_047.clas.abap @@ -20,7 +20,8 @@ CLASS z2ui5_cl_demo_app_047 DEFINITION PUBLIC. date TYPE d, time TYPE t, END OF ty_s_row. - DATA mt_tab TYPE STANDARD TABLE OF ty_s_row WITH EMPTY KEY. + TYPES temp1_244327dede TYPE STANDARD TABLE OF ty_s_row WITH DEFAULT KEY. +DATA mt_tab TYPE temp1_244327dede. DATA check_initialized TYPE abap_bool. @@ -42,7 +43,13 @@ CLASS z2ui5_cl_demo_app_047 IMPLEMENTATION. dec1 = - 1 / 3. dec2 = 2 / 3. - mt_tab = VALUE #( ( date = sy-datum time = sy-uzeit ) ). + DATA temp1 LIKE mt_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-date = sy-datum. + temp2-time = sy-uzeit. + INSERT temp2 INTO TABLE temp1. + mt_tab = temp1. client->_bind_edit( mt_tab ). ENDIF. @@ -55,11 +62,14 @@ CLASS z2ui5_cl_demo_app_047 IMPLEMENTATION. client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). ENDCASE. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Integer and Decimals' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp3 ). page->simple_form( title = 'Integer and Decimals' editable = abap_true )->content( 'form' @@ -83,7 +93,8 @@ CLASS z2ui5_cl_demo_app_047 IMPLEMENTATION. )->label( 'time' )->input( client->_bind_edit( time ) ). - DATA(tab) = page->scroll_container( height = '70%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->scroll_container( height = '70%' vertical = abap_true )->table( growing = abap_true diff --git a/src/z2ui5_cl_demo_app_048.clas.abap b/src/z2ui5_cl_demo_app_048.clas.abap index 8dbbc328..dacb4b22 100644 --- a/src/z2ui5_cl_demo_app_048.clas.abap +++ b/src/z2ui5_cl_demo_app_048.clas.abap @@ -19,7 +19,7 @@ CLASS z2ui5_cl_demo_app_048 DEFINITION checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA check_initialized TYPE abap_bool. PROTECTED SECTION. @@ -36,29 +36,79 @@ CLASS Z2UI5_CL_DEMO_APP_048 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_tab = VALUE #( - ( title = 'entry_01' info = 'Information' descr = 'this is a description1 1234567890 1234567890' icon = 'sap-icon://badge' highlight = 'Information' wrapcharlimit = '100' ) - ( title = 'entry_02' info = 'Success' descr = 'this is a description2 1234567890 1234567890' icon = 'sap-icon://favorite' highlight = 'Success' wrapcharlimit = '10') - ( title = 'entry_03' info = 'Warning' descr = 'this is a description3 1234567890 1234567890' icon = 'sap-icon://employee' highlight = 'Warning' wrapcharlimit = '100') - ( title = 'entry_04' info = 'Error' descr = 'this is a description4 1234567890 1234567890' icon = 'sap-icon://accept' highlight = 'Error' wrapcharlimit = '10' ) - ( title = 'entry_05' info = 'None' descr = 'this is a description5 1234567890 1234567890' icon = 'sap-icon://activities' highlight = 'None' wrapcharlimit = '10') - ( title = 'entry_06' info = 'Information' descr = 'this is a description6 1234567890 1234567890' icon = 'sap-icon://account' highlight = 'Information' wrapcharlimit = '100' ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'entry_01'. + temp2-info = 'Information'. + temp2-descr = 'this is a description1 1234567890 1234567890'. + temp2-icon = 'sap-icon://badge'. + temp2-highlight = 'Information'. + temp2-wrapcharlimit = '100'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry_02'. + temp2-info = 'Success'. + temp2-descr = 'this is a description2 1234567890 1234567890'. + temp2-icon = 'sap-icon://favorite'. + temp2-highlight = 'Success'. + temp2-wrapcharlimit = '10'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry_03'. + temp2-info = 'Warning'. + temp2-descr = 'this is a description3 1234567890 1234567890'. + temp2-icon = 'sap-icon://employee'. + temp2-highlight = 'Warning'. + temp2-wrapcharlimit = '100'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry_04'. + temp2-info = 'Error'. + temp2-descr = 'this is a description4 1234567890 1234567890'. + temp2-icon = 'sap-icon://accept'. + temp2-highlight = 'Error'. + temp2-wrapcharlimit = '10'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry_05'. + temp2-info = 'None'. + temp2-descr = 'this is a description5 1234567890 1234567890'. + temp2-icon = 'sap-icon://activities'. + temp2-highlight = 'None'. + temp2-wrapcharlimit = '10'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry_06'. + temp2-info = 'Information'. + temp2-descr = 'this is a description6 1234567890 1234567890'. + temp2-icon = 'sap-icon://account'. + temp2-highlight = 'Information'. + temp2-wrapcharlimit = '100'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. ENDIF. CASE client->get( )-event. WHEN 'EDIT'. - DATA(lv_row_title) = client->get_event_arg( 1 ). + DATA lv_row_title TYPE string. + lv_row_title = client->get_event_arg( 1 ). client->message_box_display( `EDIT - ` && lv_row_title ). WHEN 'SELCHANGE'. - DATA(lt_sel) = t_tab. + DATA lt_sel LIKE t_tab. + lt_sel = t_tab. DELETE lt_sel WHERE selected = abap_false. - client->message_box_display( `SELECTION_CHANGED -` && lt_sel[ 1 ]-title ). + DATA temp3 LIKE LINE OF lt_sel. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_sel INDEX 1 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_box_display( `SELECTION_CHANGED -` && temp3-title ). WHEN 'BACK'. client->nav_app_leave( ). ENDCASE. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( 'BACK' ) @@ -71,6 +121,57 @@ CLASS Z2UI5_CL_DEMO_APP_048 IMPLEMENTATION. )->link( )->get_parent( ). + DATA temp5 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-n = `title`. + temp6-v = '{TITLE}'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `description`. + temp6-v = '{DESCR}'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `icon`. + temp6-v = '{ICON}'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `iconInset`. + temp6-v = 'false'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `highlight`. + temp6-v = '{HIGHLIGHT}'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `info`. + temp6-v = '{INFO}'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `infoState`. + temp6-v = '{HIGHLIGHT}'. + INSERT temp6 INTO TABLE temp5. + temp6-n = `infoStateInverted`. + temp6-v = 'true'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'type'. + temp6-v = `Detail`. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'wrapping'. + temp6-v = `true`. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'wrapCharLimit'. + temp6-v = `{WRAPCHARLIMIT}`. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'selected'. + temp6-v = `{SELECTED}`. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'detailPress'. + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${TITLE}` INTO TABLE temp7. + INSERT `${DESCR}` INTO TABLE temp7. + INSERT `${ICON}` INTO TABLE temp7. + INSERT `${HIGHLIGHT}` INTO TABLE temp7. + INSERT `${INFO}` INTO TABLE temp7. + INSERT `${WRAPCHARLIMIT}` INTO TABLE temp7. + INSERT `${SELECTED}` INTO TABLE temp7. + temp6-v = client->_event( val = 'EDIT' t_arg = temp7 ). + INSERT temp6 INTO TABLE temp5. page->list( headertext = 'List Ouput' items = client->_bind_edit( t_tab ) @@ -78,28 +179,7 @@ CLASS Z2UI5_CL_DEMO_APP_048 IMPLEMENTATION. selectionchange = client->_event( 'SELCHANGE' ) )->_generic( name = `StandardListItem` - t_prop = VALUE #( - ( n = `title` v = '{TITLE}' ) - ( n = `description` v = '{DESCR}' ) - ( n = `icon` v = '{ICON}' ) - ( n = `iconInset` v = 'false' ) - ( n = `highlight` v = '{HIGHLIGHT}' ) - ( n = `info` v = '{INFO}' ) - ( n = `infoState` v = '{HIGHLIGHT}' ) - ( n = `infoStateInverted` v = 'true' ) - ( n = 'type' v = `Detail` ) - ( n = 'wrapping' v = `true` ) - ( n = 'wrapCharLimit' v = `{WRAPCHARLIMIT}` ) - ( n = 'selected' v = `{SELECTED}` ) - ( n = 'detailPress' v = client->_event( val = 'EDIT' t_arg = VALUE #( ( `${TITLE}` ) - ( `${DESCR}` ) - ( `${ICON}` ) - ( `${HIGHLIGHT}` ) - ( `${INFO}` ) - ( `${WRAPCHARLIMIT}` ) - ( `${SELECTED}` ) - ) ) ) - ) ). + t_prop = temp5 ). client->view_display( page->get_root( )->xml_get( ) ). diff --git a/src/z2ui5_cl_demo_app_049.clas.abap b/src/z2ui5_cl_demo_app_049.clas.abap index 6c0b1e59..a7f46a4e 100644 --- a/src/z2ui5_cl_demo_app_049.clas.abap +++ b/src/z2ui5_cl_demo_app_049.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_049 DEFINITION PUBLIC. info TYPE string, checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_d12931deb0 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_d12931deb0. DATA mv_counter TYPE i. DATA mv_key TYPE string. @@ -63,7 +64,13 @@ CLASS Z2UI5_CL_DEMO_APP_049 IMPLEMENTATION. DO 5 TIMES. mv_counter = mv_counter + 1. - INSERT VALUE #( title = 'entry' && mv_counter info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) + DATA temp1 TYPE z2ui5_cl_demo_app_049=>ty_row. + CLEAR temp1. + temp1-title = 'entry' && mv_counter. + temp1-info = 'completed'. + temp1-descr = 'this is a description'. + temp1-icon = 'sap-icon://account'. + INSERT temp1 INTO TABLE t_tab. @@ -83,22 +90,33 @@ CLASS Z2UI5_CL_DEMO_APP_049 IMPLEMENTATION. mv_counter = 1. mv_key = 'VIEW_REFRESH'. - t_tab = VALUE #( - ( title = 'entry' && mv_counter info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp2 LIKE t_tab. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-title = 'entry' && mv_counter. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-icon = 'sap-icon://account'. + INSERT temp3 INTO TABLE temp2. + t_tab = temp2. ENDMETHOD. METHOD z2ui5_view_display. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). lo_view->_z2ui5( )->timer( finished = client->_event( `TIMER_FINISHED` ) delayms = `2000` checkrepeat = abap_true ). - DATA(page) = lo_view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = 'abap2UI5 - CL_GUI_TIMER - Monitor' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->segmented_button( selected_key = client->_bind_edit( mv_key ) diff --git a/src/z2ui5_cl_demo_app_050.clas.abap b/src/z2ui5_cl_demo_app_050.clas.abap index a95eab09..04e46a9c 100644 --- a/src/z2ui5_cl_demo_app_050.clas.abap +++ b/src/z2ui5_cl_demo_app_050.clas.abap @@ -31,12 +31,14 @@ CLASS Z2UI5_CL_DEMO_APP_050 IMPLEMENTATION. client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). ENDCASE. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Changed CSS' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.sapMInput {` && |\n| && diff --git a/src/z2ui5_cl_demo_app_051.clas.abap b/src/z2ui5_cl_demo_app_051.clas.abap index 6c3f0b35..890f5309 100644 --- a/src/z2ui5_cl_demo_app_051.clas.abap +++ b/src/z2ui5_cl_demo_app_051.clas.abap @@ -32,13 +32,17 @@ CLASS Z2UI5_CL_DEMO_APP_051 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Label Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = 'Input mandatory' labelfor = `input1` ). diff --git a/src/z2ui5_cl_demo_app_052.clas.abap b/src/z2ui5_cl_demo_app_052.clas.abap index 1f8fdac3..6b2c6e4b 100644 --- a/src/z2ui5_cl_demo_app_052.clas.abap +++ b/src/z2ui5_cl_demo_app_052.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_052 DEFINITION PUBLIC. storage_location TYPE string, quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mt_table TYPE ty_t_table. DATA check_initialized TYPE abap_bool. @@ -39,7 +39,8 @@ CLASS z2ui5_cl_demo_app_052 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(lo_popover) = z2ui5_cl_xml_view=>factory_popup( ). + DATA lo_popover TYPE REF TO z2ui5_cl_xml_view. + lo_popover = z2ui5_cl_xml_view=>factory_popup( ). lo_popover->popover( placement = `Right` title = `abap2UI5 - Popover - ` && mv_product @@ -69,31 +70,43 @@ CLASS z2ui5_cl_demo_app_052 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->page( id = `page_main` + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'abap2UI5 - List Report Features' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). page = page->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). - DATA(cont) = page->content( ns = 'f' ). - DATA(tab) = cont->table( id = `tab` + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->content( ns = 'f' ). + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = cont->table( id = `tab` items = client->_bind_edit( val = mt_table ) ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + INSERT `${PRODUCT}` INTO TABLE temp1. lo_cells->link( id = `link` text = '{PRODUCT}' - press = client->_event( val = `POPOVER_DETAIL` t_arg = VALUE #( ( `${$source>/id}` ) ( `${PRODUCT}` ) ) ) ). + press = client->_event( val = `POPOVER_DETAIL` t_arg = temp1 ) ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). lo_cells->text( `{STORAGE_LOCATION}` ). @@ -135,55 +148,298 @@ CLASS z2ui5_cl_demo_app_052 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) ). + DATA temp3 TYPE z2ui5_cl_demo_app_052=>ty_t_table. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + mt_table = temp3. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_053.clas.abap b/src/z2ui5_cl_demo_app_053.clas.abap index 8a34e174..ee1ddcc4 100644 --- a/src/z2ui5_cl_demo_app_053.clas.abap +++ b/src/z2ui5_cl_demo_app_053.clas.abap @@ -14,7 +14,7 @@ CLASS z2ui5_cl_demo_app_053 DEFINITION PUBLIC. quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mv_search_value TYPE string. DATA mt_table TYPE ty_t_table. @@ -73,14 +73,19 @@ CLASS z2ui5_cl_demo_app_053 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( id = `page_main` + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Search with Enter' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(vbox) = page->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = page->vbox( ). vbox->hbox( )->search_field( value = client->_bind_edit( mv_search_value ) @@ -93,16 +98,19 @@ CLASS z2ui5_cl_demo_app_053 IMPLEMENTATION. press = client->_event( `BUTTON_START` ) type = `Emphasized` ). - DATA(tab) = vbox->table( items = client->_bind( val = mt_table ) ). + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = vbox->table( items = client->_bind( val = mt_table ) ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). @@ -116,13 +124,46 @@ CLASS z2ui5_cl_demo_app_053 IMPLEMENTATION. METHOD set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_053=>ty_t_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product = 'table'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'chair'. + temp2-create_date = `01.01.2022`. + temp2-create_by = `James`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 123. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'sofa'. + temp2-create_date = `01.05.2021`. + temp2-create_by = `Simone`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 700. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'computer'. + temp2-create_date = `27.01.2023`. + temp2-create_by = `Theo`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 200. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'printer'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Hannah`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 90. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'table2'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Julia`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 110. + INSERT temp2 INTO TABLE temp1. + mt_table = temp1. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_054.clas.abap b/src/z2ui5_cl_demo_app_054.clas.abap index be636767..fdf05010 100644 --- a/src/z2ui5_cl_demo_app_054.clas.abap +++ b/src/z2ui5_cl_demo_app_054.clas.abap @@ -14,7 +14,7 @@ CLASS z2ui5_cl_demo_app_054 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. METHODS refresh_data. @@ -32,9 +32,21 @@ CLASS Z2UI5_CL_DEMO_APP_054 IMPLEMENTATION. METHOD refresh_data. DO 100 TIMES. - DATA(ls_row) = VALUE ty_row( count = sy-index value = 'red' - info = COND #( WHEN sy-index < 50 THEN 'completed' ELSE 'uncompleted' ) - descr = 'this is a description' checkbox = abap_true ). + DATA temp1 TYPE ty_row. + CLEAR temp1. + temp1-count = sy-index. + temp1-value = 'red'. + DATA temp2 TYPE z2ui5_cl_demo_app_054=>ty_row-info. + IF sy-index < 50. + temp2 = 'completed'. + ELSE. + temp2 = 'uncompleted'. + ENDIF. + temp1-info = temp2. + temp1-descr = 'this is a description'. + temp1-checkbox = abap_true. + DATA ls_row LIKE temp1. + ls_row = temp1. INSERT ls_row INTO TABLE t_tab. ENDDO. diff --git a/src/z2ui5_cl_demo_app_055.clas.abap b/src/z2ui5_cl_demo_app_055.clas.abap index bb39c77c..f202ed55 100644 --- a/src/z2ui5_cl_demo_app_055.clas.abap +++ b/src/z2ui5_cl_demo_app_055.clas.abap @@ -14,7 +14,7 @@ CLASS z2ui5_cl_demo_app_055 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. METHODS refresh_data. @@ -31,9 +31,21 @@ CLASS Z2UI5_CL_DEMO_APP_055 IMPLEMENTATION. METHOD refresh_data. DO 100 TIMES. - DATA(ls_row) = VALUE ty_row( count = sy-index value = 'red' - info = COND #( WHEN sy-index < 50 THEN 'completed' ELSE 'uncompleted' ) - descr = 'this is a description' checkbox = abap_true ). + DATA temp1 TYPE ty_row. + CLEAR temp1. + temp1-count = sy-index. + temp1-value = 'red'. + DATA temp2 TYPE z2ui5_cl_demo_app_055=>ty_row-info. + IF sy-index < 50. + temp2 = 'completed'. + ELSE. + temp2 = 'uncompleted'. + ENDIF. + temp1-info = temp2. + temp1-descr = 'this is a description'. + temp1-checkbox = abap_true. + DATA ls_row LIKE temp1. + ls_row = temp1. INSERT ls_row INTO TABLE t_tab. ENDDO. diff --git a/src/z2ui5_cl_demo_app_056.clas.abap b/src/z2ui5_cl_demo_app_056.clas.abap index 15cde16d..f22fa84c 100644 --- a/src/z2ui5_cl_demo_app_056.clas.abap +++ b/src/z2ui5_cl_demo_app_056.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_056 DEFINITION PUBLIC. storage_location TYPE string, quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mt_table TYPE ty_t_table. DATA mt_token TYPE z2ui5_cl_util=>ty_t_token. @@ -46,12 +46,19 @@ CLASS z2ui5_cl_demo_app_056 IMPLEMENTATION. client->view_model_update( ). WHEN `UPDATE_TOKENS`. - LOOP AT mt_tokens_removed INTO DATA(ls_token). + DATA ls_token LIKE LINE OF mt_tokens_removed. + LOOP AT mt_tokens_removed INTO ls_token. DELETE mt_token WHERE key = ls_token-key. ENDLOOP. LOOP AT mt_tokens_added INTO ls_token. - INSERT VALUE #( key = ls_token-key text = ls_token-text visible = abap_true editable = abap_true ) INTO TABLE mt_token. + DATA temp1 TYPE z2ui5_cl_util=>ty_s_token. + CLEAR temp1. + temp1-key = ls_token-key. + temp1-text = ls_token-text. + temp1-visible = abap_true. + temp1-editable = abap_true. + INSERT temp1 INTO TABLE mt_token. ENDLOOP. CLEAR mt_tokens_removed. @@ -73,13 +80,46 @@ CLASS z2ui5_cl_demo_app_056 IMPLEMENTATION. METHOD set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'sofa' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'computer' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'oven' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) ). + DATA temp2 TYPE z2ui5_cl_demo_app_056=>ty_t_table. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-product = 'table'. + temp3-create_date = `01.01.2023`. + temp3-create_by = `Peter`. + temp3-storage_location = `AREA_001`. + temp3-quantity = 400. + INSERT temp3 INTO TABLE temp2. + temp3-product = 'chair'. + temp3-create_date = `01.01.2023`. + temp3-create_by = `Peter`. + temp3-storage_location = `AREA_001`. + temp3-quantity = 400. + INSERT temp3 INTO TABLE temp2. + temp3-product = 'sofa'. + temp3-create_date = `01.01.2023`. + temp3-create_by = `Peter`. + temp3-storage_location = `AREA_001`. + temp3-quantity = 400. + INSERT temp3 INTO TABLE temp2. + temp3-product = 'computer'. + temp3-create_date = `01.01.2023`. + temp3-create_by = `Peter`. + temp3-storage_location = `AREA_001`. + temp3-quantity = 400. + INSERT temp3 INTO TABLE temp2. + temp3-product = 'oven'. + temp3-create_date = `01.01.2023`. + temp3-create_by = `Peter`. + temp3-storage_location = `AREA_001`. + temp3-quantity = 400. + INSERT temp3 INTO TABLE temp2. + temp3-product = 'table2'. + temp3-create_date = `01.01.2023`. + temp3-create_by = `Peter`. + temp3-storage_location = `AREA_001`. + temp3-quantity = 400. + INSERT temp3 INTO TABLE temp2. + mt_table = temp2. DELETE mt_table WHERE product NOT IN mt_range. @@ -88,22 +128,27 @@ CLASS z2ui5_cl_demo_app_056 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Select-Options' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->get_parent( ). - DATA(vbox) = view->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = view->vbox( ). vbox->_z2ui5( )->multiinput_ext( addedtokens = client->_bind_edit( mt_tokens_added ) removedtokens = client->_bind_edit( mt_tokens_removed ) change = client->_event( 'UPDATE_TOKENS' ) multiinputid = `MultiInput` ). - DATA(tab) = vbox->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = vbox->table( items = client->_bind( val = mt_table ) )->header_toolbar( )->overflow_toolbar( @@ -132,14 +177,16 @@ CLASS z2ui5_cl_demo_app_056 IMPLEMENTATION. type = `Emphasized` )->get_parent( )->get_parent( ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). @@ -163,7 +210,10 @@ CLASS z2ui5_cl_demo_app_056 IMPLEMENTATION. IF client->get( )-check_on_navigated = abap_true. TRY. - DATA(lo_value_help) = CAST z2ui5_cl_pop_get_range( client->get_app( client->get( )-s_draft-id_prev_app ) ). + DATA temp4 TYPE REF TO z2ui5_cl_pop_get_range. + temp4 ?= client->get_app( client->get( )-s_draft-id_prev_app ). + DATA lo_value_help LIKE temp4. + lo_value_help = temp4. IF lo_value_help->result( )-check_confirmed = abap_false. RETURN. ENDIF. diff --git a/src/z2ui5_cl_demo_app_057.clas.abap b/src/z2ui5_cl_demo_app_057.clas.abap index 795675e6..8464049b 100644 --- a/src/z2ui5_cl_demo_app_057.clas.abap +++ b/src/z2ui5_cl_demo_app_057.clas.abap @@ -17,7 +17,7 @@ CLASS z2ui5_cl_demo_app_057 DEFINITION quantity TYPE i, END OF ty_s_tab . TYPES - ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY . + ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY . DATA mt_table TYPE ty_t_table . DATA mv_check_download TYPE abap_bool . @@ -108,35 +108,53 @@ CLASS z2ui5_cl_demo_app_057 IMPLEMENTATION. METHOD z2ui5_on_render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->page( id = `page_main` title = 'abap2UI5 - List Report Features' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp3 ). IF mv_check_download = abap_true. mv_check_download = abap_false. - DATA(lv_csv) = z2ui5_cl_util=>itab_get_csv_by_itab( mt_table ). - DATA(lv_csv_x) = z2ui5_cl_util=>conv_get_xstring_by_string( lv_csv ). - DATA(lv_base64) = z2ui5_cl_util=>conv_encode_x_base64( lv_csv_x ). - + DATA lv_csv TYPE string. + lv_csv = z2ui5_cl_util=>itab_get_csv_by_itab( mt_table ). + DATA lv_csv_x TYPE xstring. + lv_csv_x = z2ui5_cl_util=>conv_get_xstring_by_string( lv_csv ). + DATA lv_base64 TYPE string. + lv_base64 = z2ui5_cl_util=>conv_encode_x_base64( lv_csv_x ). + + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = `src`. + temp2-v = `data:text/csv;base64,` && lv_base64. + INSERT temp2 INTO TABLE temp1. + temp2-n = `hidden`. + temp2-v = `hidden`. + INSERT temp2 INTO TABLE temp1. view->_generic( ns = `html` name = `iframe` - t_prop = VALUE #( ( n = `src` v = `data:text/csv;base64,` && lv_base64 ) ( n = `hidden` v = `hidden` ) ) ). + t_prop = temp1 ). ENDIF. - DATA(page) = view->dynamic_page( headerexpanded = abap_true + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). - DATA(header_title) = page->title( ns = 'f' )->get( )->dynamic_page_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). header_title->heading( ns = 'f' )->hbox( )->title( `Download CSV` ). header_title->expanded_content( 'f' ). header_title->snapped_content( ns = 'f' ). - DATA(lo_box) = page->header( )->dynamic_page_header( pinnable = abap_true + DATA lo_box TYPE REF TO z2ui5_cl_xml_view. + lo_box = page->header( )->dynamic_page_header( pinnable = abap_true )->flex_box( alignitems = `Start` justifycontent = `SpaceBetween` )->flex_box( alignitems = `Start` ). @@ -146,9 +164,11 @@ CLASS z2ui5_cl_demo_app_057 IMPLEMENTATION. press = client->_event( `BUTTON_START` ) type = `Emphasized` ). - DATA(cont) = page->content( ns = 'f' ). + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->content( ns = 'f' ). - DATA(tab) = cont->table( items = client->_bind( val = mt_table ) ). + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = cont->table( items = client->_bind( val = mt_table ) ). tab->header_toolbar( )->toolbar( @@ -157,14 +177,16 @@ CLASS z2ui5_cl_demo_app_057 IMPLEMENTATION. icon = 'sap-icon://download' press = client->_event( 'BUTTON_DOWNLOAD' ) ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). @@ -178,13 +200,46 @@ CLASS z2ui5_cl_demo_app_057 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) ). + DATA temp3 TYPE z2ui5_cl_demo_app_057=>ty_t_table. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-product = 'table'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Peter`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 400. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'chair'. + temp4-create_date = `01.01.2022`. + temp4-create_by = `James`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 123. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'sofa'. + temp4-create_date = `01.05.2021`. + temp4-create_by = `Simone`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 700. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'computer'. + temp4-create_date = `27.01.2023`. + temp4-create_by = `Theo`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 200. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'printer'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Hannah`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 90. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'table2'. + temp4-create_date = `01.01.2023`. + temp4-create_by = `Julia`. + temp4-storage_location = `AREA_001`. + temp4-quantity = 110. + INSERT temp4 INTO TABLE temp3. + mt_table = temp3. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_058.clas.abap b/src/z2ui5_cl_demo_app_058.clas.abap index d1feafec..c45aa477 100644 --- a/src/z2ui5_cl_demo_app_058.clas.abap +++ b/src/z2ui5_cl_demo_app_058.clas.abap @@ -10,7 +10,7 @@ CLASS z2ui5_cl_demo_app_058 DEFINITION PUBLIC. text TYPE string, END OF s_combobox. - TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY. + TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_cols, @@ -29,15 +29,17 @@ CLASS z2ui5_cl_demo_app_058 DEFINITION PUBLIC. default TYPE abap_bool, data TYPE string, END OF ty_s_db_layout. - DATA mt_db_layout TYPE STANDARD TABLE OF ty_s_db_layout. + TYPES temp1_2c3f88f5df TYPE STANDARD TABLE OF ty_s_db_layout. +DATA mt_db_layout TYPE temp1_2c3f88f5df. - DATA: + TYPES temp2_2c3f88f5df TYPE STANDARD TABLE OF ty_s_cols. +DATA: BEGIN OF ms_layout, check_zebra TYPE abap_bool, title TYPE string, sticky_header TYPE string, selmode TYPE string, - t_cols TYPE STANDARD TABLE OF ty_s_cols, + t_cols TYPE temp2_2c3f88f5df, END OF ms_layout. TYPES: @@ -49,7 +51,7 @@ CLASS z2ui5_cl_demo_app_058 DEFINITION PUBLIC. storage_location TYPE string, quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mv_check_table TYPE abap_bool. @@ -121,7 +123,16 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. app-view_popup = `POPUP_SAVE`. WHEN `POPUP_LAYOUT_LOAD`. - DATA(ls_layout2) = mt_db_layout[ selkz = abap_true ]. + DATA ls_layout2 LIKE LINE OF mt_db_layout. + DATA temp2 LIKE LINE OF mt_db_layout. + DATA temp3 LIKE sy-tabix. + temp3 = sy-tabix. + READ TABLE mt_db_layout WITH KEY selkz = abap_true INTO temp2. + sy-tabix = temp3. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + ls_layout2 = temp2. z2ui5_cl_util=>xml_parse( EXPORTING xml = ls_layout2-data @@ -130,9 +141,12 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. app-view_popup = `POPUP_SAVE`. WHEN `BUTTON_SAVE_LAYOUT`. - DATA(ls_layout) = VALUE ty_s_db_layout( - data = z2ui5_cl_util=>xml_stringify( ms_layout ) - name = mv_layout ). + DATA temp1 TYPE ty_s_db_layout. + CLEAR temp1. + temp1-data = z2ui5_cl_util=>xml_stringify( ms_layout ). + temp1-name = mv_layout. + DATA ls_layout LIKE temp1. + ls_layout = temp1. INSERT ls_layout INTO TABLE mt_db_layout. app-view_popup = `POPUP_SAVE`. @@ -149,12 +163,30 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. app-view_main = `MAIN`. ms_layout-title = `data`. - ms_layout-t_cols = VALUE #( - ( name = `PRODUCT` title = `PRODUCT` visible = abap_true ) - ( name = `CREATE_DAT` title = `CREATE_DAT` visible = abap_true ) - ( name = `CREATE_BY` title = `CREATE_BY` visible = abap_true ) - ( name = `STORAGE_LOCATION` title = `STORAGE_LOCATION` visible = abap_true ) - ( name = `QUANTITY` title = `QUANTITY` visible = abap_true ) ). + DATA temp2 LIKE ms_layout-t_cols. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-name = `PRODUCT`. + temp3-title = `PRODUCT`. + temp3-visible = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-name = `CREATE_DAT`. + temp3-title = `CREATE_DAT`. + temp3-visible = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-name = `CREATE_BY`. + temp3-title = `CREATE_BY`. + temp3-visible = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-name = `STORAGE_LOCATION`. + temp3-title = `STORAGE_LOCATION`. + temp3-visible = abap_true. + INSERT temp3 INTO TABLE temp2. + temp3-name = `QUANTITY`. + temp3-title = `QUANTITY`. + temp3-visible = abap_true. + INSERT temp3 INTO TABLE temp2. + ms_layout-t_cols = temp2. ENDMETHOD. @@ -178,15 +210,19 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. METHOD z2ui5_on_render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Table Layout Sample' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(tab) = view->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = view->table( headertext = ms_layout-title items = client->_bind( mt_table ) alternaterowcolors = ms_layout-check_zebra @@ -194,9 +230,11 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. * autopopinmode = abap_true mode = ms_layout-selmode ). + DATA temp4 TYPE string. + temp4 = lines( mt_table ). tab->header_toolbar( )->toolbar( - )->title( text = ms_layout-title && ` (` && shift_right( CONV string( lines( mt_table ) ) ) && `)` + )->title( text = ms_layout-title && ` (` && shift_right( temp4 ) && `)` )->toolbar_spacer( )->button( icon = 'sap-icon://save' @@ -205,19 +243,31 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. icon = 'sap-icon://action-settings' press = client->_event( 'BUTTON_SETUP' ) ). - DATA(lv_width) = 10. - DATA(lo_columns) = tab->columns( ). - LOOP AT ms_layout-t_cols REFERENCE INTO DATA(lr_field) + DATA lv_width TYPE i. + lv_width = 10. + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). + DATA temp5 LIKE LINE OF ms_layout-t_cols. + DATA lr_field LIKE REF TO temp5. + LOOP AT ms_layout-t_cols REFERENCE INTO lr_field WHERE visible = abap_true. + DATA temp6 TYPE string. + temp6 = lv_width. + DATA temp8 TYPE char10. + temp8 = lr_field->title. lo_columns->column( - minscreenwidth = shift_right( CONV string( lv_width ) ) && `px` + minscreenwidth = shift_right( temp6 ) && `px` demandpopin = abap_true - width = lr_field->length )->text( text = CONV char10( lr_field->title ) ). + width = lr_field->length )->text( text = temp8 ). lv_width = lv_width + 10. ENDLOOP. - DATA(lo_cells) = tab->items( )->column_list_item( - press = client->_event( val = 'DETAIL' t_arg = VALUE #( ( `${UUID}` ) ) ) + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${UUID}` INTO TABLE temp7. + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( + press = client->_event( val = 'DETAIL' t_arg = temp7 ) selected = `{SELKZ}` )->cells( ). @@ -237,7 +287,8 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. METHOD z2ui5_on_render_popup. - DATA(ro_popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA ro_popup TYPE REF TO z2ui5_cl_xml_view. + ro_popup = z2ui5_cl_xml_view=>factory_popup( ). ro_popup = ro_popup->dialog( title = 'View Setup' resizable = abap_true @@ -250,8 +301,24 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. )->button( text = `zurücksetzten` press = client->_event( 'BUTTON_INIT' ) ). - DATA(lo_tab) = ro_popup->tab_container( ). - + DATA lo_tab TYPE REF TO z2ui5_cl_xml_view. + lo_tab = ro_popup->tab_container( ). + + DATA temp9 TYPE ty_t_combo. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-key = 'None'. + temp10-text = 'None'. + INSERT temp10 INTO TABLE temp9. + temp10-key = 'SingleSelect'. + temp10-text = 'SingleSelect'. + INSERT temp10 INTO TABLE temp9. + temp10-key = 'SingleSelectLeft'. + temp10-text = 'SingleSelectLeft'. + INSERT temp10 INTO TABLE temp9. + temp10-key = 'MultiSelect'. + temp10-text = 'MultiSelect'. + INSERT temp10 INTO TABLE temp9. lo_tab->tab( text = 'Table' selected = client->_bind_edit( mv_check_table ) )->simple_form( editable = abap_true @@ -265,11 +332,7 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. )->label( 'sel mode' )->combobox( selectedkey = client->_bind_edit( ms_layout-selmode ) - items = client->_bind_local( VALUE ty_t_combo( - ( key = 'None' text = 'None' ) - ( key = 'SingleSelect' text = 'SingleSelect' ) - ( key = 'SingleSelectLeft' text = 'SingleSelectLeft' ) - ( key = 'MultiSelect' text = 'MultiSelect' ) ) ) + items = client->_bind_local( temp9 ) )->item( key = '{KEY}' text = '{TEXT}' ). @@ -315,7 +378,8 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. METHOD z2ui5_on_render_popup_save. - DATA(lo_popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA lo_popup TYPE REF TO z2ui5_cl_xml_view. + lo_popup = z2ui5_cl_xml_view=>factory_popup( ). lo_popup = lo_popup->dialog( title = 'abap2UI5 - Layout' contentwidth = `50%` @@ -356,13 +420,46 @@ CLASS z2ui5_cl_demo_app_058 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'sofa' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'computer' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'oven' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) ). + DATA temp11 TYPE z2ui5_cl_demo_app_058=>ty_t_table. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-product = 'table'. + temp12-create_date = `01.01.2023`. + temp12-create_by = `Peter`. + temp12-storage_location = `AREA_001`. + temp12-quantity = 400. + INSERT temp12 INTO TABLE temp11. + temp12-product = 'chair'. + temp12-create_date = `01.01.2023`. + temp12-create_by = `Peter`. + temp12-storage_location = `AREA_001`. + temp12-quantity = 400. + INSERT temp12 INTO TABLE temp11. + temp12-product = 'sofa'. + temp12-create_date = `01.01.2023`. + temp12-create_by = `Peter`. + temp12-storage_location = `AREA_001`. + temp12-quantity = 400. + INSERT temp12 INTO TABLE temp11. + temp12-product = 'computer'. + temp12-create_date = `01.01.2023`. + temp12-create_by = `Peter`. + temp12-storage_location = `AREA_001`. + temp12-quantity = 400. + INSERT temp12 INTO TABLE temp11. + temp12-product = 'oven'. + temp12-create_date = `01.01.2023`. + temp12-create_by = `Peter`. + temp12-storage_location = `AREA_001`. + temp12-quantity = 400. + INSERT temp12 INTO TABLE temp11. + temp12-product = 'table2'. + temp12-create_date = `01.01.2023`. + temp12-create_by = `Peter`. + temp12-storage_location = `AREA_001`. + temp12-quantity = 400. + INSERT temp12 INTO TABLE temp11. + mt_table = temp11. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_059.clas.abap b/src/z2ui5_cl_demo_app_059.clas.abap index 918495ca..5fb08c0a 100644 --- a/src/z2ui5_cl_demo_app_059.clas.abap +++ b/src/z2ui5_cl_demo_app_059.clas.abap @@ -14,7 +14,7 @@ CLASS z2ui5_cl_demo_app_059 DEFINITION PUBLIC. quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. * DATA mv_search_value TYPE string. DATA mt_table TYPE ty_t_table. @@ -78,41 +78,88 @@ CLASS z2ui5_cl_demo_app_059 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_059=>ty_t_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product = 'table'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'chair'. + temp2-create_date = `01.01.2022`. + temp2-create_by = `James`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 123. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'sofa'. + temp2-create_date = `01.05.2021`. + temp2-create_by = `Simone`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 700. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'computer'. + temp2-create_date = `27.01.2023`. + temp2-create_by = `Theo`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 200. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'printer'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Hannah`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 90. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'table2'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Julia`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 110. + INSERT temp2 INTO TABLE temp1. + mt_table = temp1. ENDMETHOD. METHOD z2ui5_view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page1) = view->shell( )->page( id = `page_main` + DATA page1 TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page1 = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Search Field with Backend Live Change' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). - - DATA(lo_box) = page1->vbox( )->text( `Search` + shownavbutton = temp2 ). + + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/value}` INTO TABLE temp3. + DATA temp1 TYPE z2ui5_if_types=>ty_s_event_control. + CLEAR temp1. + temp1-check_allow_multi_req = abap_true. + DATA lo_box TYPE REF TO z2ui5_cl_xml_view. + lo_box = page1->vbox( )->text( `Search` )->search_field( width = `17.5rem` livechange = client->_event( val = 'BUTTON_SEARCH' - t_arg = VALUE #( ( `${$source>/value}` ) ) - s_ctrl = VALUE #( check_allow_multi_req = abap_true ) ) ). + t_arg = temp3 + s_ctrl = temp1 ) ). - DATA(tab) = lo_box->table( client->_bind( mt_table ) ). - DATA(lo_columns) = tab->columns( ). + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = lo_box->table( client->_bind( mt_table ) ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). diff --git a/src/z2ui5_cl_demo_app_060.clas.abap b/src/z2ui5_cl_demo_app_060.clas.abap index e94a6e5d..679a0c89 100644 --- a/src/z2ui5_cl_demo_app_060.clas.abap +++ b/src/z2ui5_cl_demo_app_060.clas.abap @@ -13,8 +13,10 @@ CLASS z2ui5_cl_demo_app_060 DEFINITION PUBLIC. END OF ty_s_currency. - DATA mt_suggestion_out TYPE STANDARD TABLE OF ty_s_currency. - DATA mt_suggestion TYPE STANDARD TABLE OF ty_s_currency. + TYPES temp1_f7eccf02fa TYPE STANDARD TABLE OF ty_s_currency. +DATA mt_suggestion_out TYPE temp1_f7eccf02fa. + TYPES temp2_f7eccf02fa TYPE STANDARD TABLE OF ty_s_currency. +DATA mt_suggestion TYPE temp2_f7eccf02fa. DATA input TYPE string. PROTECTED SECTION. @@ -44,216 +46,1055 @@ CLASS Z2UI5_CL_DEMO_APP_060 IMPLEMENTATION. currencyshortname TYPE string, END OF ty_s_currency. - mt_suggestion = VALUE #( - ( language = 'E' currency = 'ADP' currencyname = 'Andorran Peseta --> (Old --> EUR)' currencyshortname = 'Peseta' ) - ( language = 'E' currency = 'AED' currencyname = 'United Arab Emirates Dirham' currencyshortname = 'Dirham' ) - ( language = 'E' currency = 'AFA' currencyname = 'Afghani (Old)' currencyshortname = 'Afghani' ) - ( language = 'E' currency = 'AFN' currencyname = 'Afghani' currencyshortname = 'Afghani' ) - ( language = 'E' currency = 'ALL' currencyname = 'Albanian Lek' currencyshortname = 'Lek' ) - ( language = 'E' currency = 'AMD' currencyname = 'Armenian Dram' currencyshortname = 'Dram' ) - ( language = 'E' currency = 'ANG' currencyname = 'West Indian Guilder' currencyshortname = 'W.Ind.Guilder' ) - ( language = 'E' currency = 'AOA' currencyname = 'Angolanische Kwanza' currencyshortname = 'Kwansa' ) - ( language = 'E' currency = 'AON' currencyname = 'Angolan New Kwanza (Old)' currencyshortname = 'New Kwanza' ) - ( language = 'E' currency = 'AOR' currencyname = 'Angolan Kwanza Reajustado (Old)' currencyshortname = 'Kwanza Reajust.' ) - ( language = 'E' currency = 'ARS' currencyname = 'Argentine Peso' currencyshortname = 'Arg. Peso' ) - ( language = 'E' currency = 'ATS' currencyname = 'Austrian Schilling (Old --> EUR)' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'AUD' currencyname = 'Australian Dollar' currencyshortname = 'Austr. Dollar' ) - ( language = 'E' currency = 'AWG' currencyname = 'Aruban Florin' currencyshortname = 'Aruban Florin' ) - ( language = 'E' currency = 'AZM' currencyname = 'Azerbaijani Manat (Old)' currencyshortname = 'Manat' ) - ( language = 'E' currency = 'AZN' currencyname = 'Azerbaijani Manat' currencyshortname = 'Manat' ) - ( language = 'E' currency = 'BAM' currencyname = 'Bosnia and Herzegovina Convertible Mark' currencyshortname = 'Convert. Mark' ) - ( language = 'E' currency = 'BBD' currencyname = 'Barbados Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'BDT' currencyname = 'Bangladesh Taka' currencyshortname = 'Taka' ) - ( language = 'E' currency = 'BEF' currencyname = 'Belgian Franc (Old --> EUR)' currencyshortname = 'Belgian Franc' ) - ( language = 'E' currency = 'BGN' currencyname = 'Bulgarian Lev' currencyshortname = 'Lev' ) - ( language = 'E' currency = 'BHD' currencyname = 'Bahraini Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'BIF' currencyname = 'Burundi Franc' currencyshortname = 'Burundi Franc' ) - ( language = 'E' currency = 'BMD' currencyname = 'Bermudan Dollar' currencyshortname = 'Bermudan Dollar' ) - ( language = 'E' currency = 'BND' currencyname = 'Brunei Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'BOB' currencyname = 'Boliviano' currencyshortname = 'Boliviano' ) - ( language = 'E' currency = 'BRL' currencyname = 'Brazilian Real' currencyshortname = 'Real' ) - ( language = 'E' currency = 'BSD' currencyname = 'Bahaman Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'BTN' currencyname = 'Bhutan Ngultrum' currencyshortname = 'Ngultrum' ) - ( language = 'E' currency = 'BWP' currencyname = 'Botswana Pula' currencyshortname = 'Pula' ) - ( language = 'E' currency = 'BYB' currencyname = 'Belarusian Ruble (Old)' currencyshortname = 'Belarus. Ruble' ) - ( language = 'E' currency = 'BYN' currencyname = 'Belarusian Ruble (New)' currencyshortname = 'Bela. Ruble N.' ) - ( language = 'E' currency = 'BYR' currencyname = 'Belarusian Ruble' currencyshortname = 'Ruble' ) - ( language = 'E' currency = 'BZD' currencyname = 'Belize Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'CAD' currencyname = 'Canadian Dollar' currencyshortname = 'Canadian Dollar' ) - ( language = 'E' currency = 'CDF' currencyname = 'Congolese Franc' currencyshortname = 'test data' ) - ( language = 'E' currency = 'CFP' currencyname = 'French Franc (Pacific Islands)' currencyshortname = 'Fr. Franc (Pac)' ) - ( language = 'E' currency = 'CHF' currencyname = 'Swiss Franc' currencyshortname = 'Swiss Franc' ) - ( language = 'E' currency = 'CLP' currencyname = 'Chilean Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'CNY' currencyname = 'Chinese Renminbi' currencyshortname = 'Renminbi' ) - ( language = 'E' currency = 'COP' currencyname = 'Colombian Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'CRC' currencyname = 'Costa Rica Colon' currencyshortname = 'Cost.Rica Colon' ) - ( language = 'E' currency = 'CSD' currencyname = 'Serbian Dinar (Old)' currencyshortname = 'Serbian Dinar' ) - ( language = 'E' currency = 'CUC' currencyname = 'Peso Convertible' currencyshortname = 'Peso Convertib.' ) - ( language = 'E' currency = 'CUP' currencyname = 'Cuban Peso' currencyshortname = 'Cuban Peso' ) - ( language = 'E' currency = 'CVE' currencyname = 'Cape Verde Escudo' currencyshortname = 'Escudo' ) - ( language = 'E' currency = 'CYP' currencyname = 'Cyprus Pound (Old --> EUR)' currencyshortname = 'Cyprus Pound' ) - ( language = 'E' currency = 'CZK' currencyname = 'Czech Krona' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'DEM' currencyname = 'German Mark (Old --> EUR)' currencyshortname = 'German Mark' ) - ( language = 'E' currency = 'DEM3' currencyname = '(Internal) German Mark (3 dec.places)' currencyshortname = '(Int.) DEM 3 DP' ) - ( language = 'E' currency = 'DJF' currencyname = 'Djibouti Franc' currencyshortname = 'Djibouti Franc' ) - ( language = 'E' currency = 'DKK' currencyname = 'Danish Krone' currencyshortname = 'Danish Krone' ) - ( language = 'E' currency = 'DOP' currencyname = 'Dominican Peso' currencyshortname = 'Dominican Peso' ) - ( language = 'E' currency = 'DZD' currencyname = 'Algerian Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'ECS' currencyname = 'Ecuadorian Sucre (Old --> USD)' currencyshortname = 'Sucre' ) - ( language = 'E' currency = 'EEK' currencyname = 'Estonian Krone (Old --> EUR)' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'EGP' currencyname = 'Egyptian Pound' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'ERN' currencyname = 'Eritrean Nafka' currencyshortname = 'Nakfa' ) - ( language = 'E' currency = 'ESP' currencyname = 'Spanish Peseta (Old --> EUR)' currencyshortname = 'Peseta' ) - ( language = 'E' currency = 'ETB' currencyname = 'Ethiopian Birr' currencyshortname = 'Birr' ) - ( language = 'E' currency = 'EUR' currencyname = 'European Euro' currencyshortname = 'Euro' ) - ( language = 'E' currency = 'FIM' currencyname = 'Finnish Markka (Old --> EUR)' currencyshortname = 'Finnish markka' ) - ( language = 'E' currency = 'FJD' currencyname = 'Fiji Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'FKP' currencyname = 'Falkland Pound' currencyshortname = 'Falkland Pound' ) - ( language = 'E' currency = 'FRF' currencyname = 'French Franc (Old --> EUR)' currencyshortname = 'French Franc' ) - ( language = 'E' currency = 'GBP' currencyname = 'British Pound' currencyshortname = 'Pound sterling' ) - ( language = 'E' currency = 'GEL' currencyname = 'Georgian Lari' currencyshortname = 'Lari' ) - ( language = 'E' currency = 'GHC' currencyname = 'Ghanaian Cedi (Old)' currencyshortname = 'Cedi' ) - ( language = 'E' currency = 'GHS' currencyname = 'Ghanian Cedi' currencyshortname = 'Cedi' ) - ( language = 'E' currency = 'GIP' currencyname = 'Gibraltar Pound' currencyshortname = 'Gibraltar Pound' ) - ( language = 'E' currency = 'GMD' currencyname = 'Gambian Dalasi' currencyshortname = 'Dalasi' ) - ( language = 'E' currency = 'GNF' currencyname = 'Guinean Franc' currencyshortname = 'Franc' ) - ( language = 'E' currency = 'GRD' currencyname = 'Greek Drachma (Old --> EUR)' currencyshortname = 'Drachma' ) - ( language = 'E' currency = 'GTQ' currencyname = 'Guatemalan Quetzal' currencyshortname = 'Quetzal' ) - ( language = 'E' currency = 'GWP' currencyname = 'Guinea Peso (Old --> SHP)' currencyshortname = 'Guinea Peso' ) - ( language = 'E' currency = 'GYD' currencyname = 'Guyana Dollar' currencyshortname = 'Guyana Dollar' ) - ( language = 'E' currency = 'HKD' currencyname = 'Hong Kong Dollar' currencyshortname = 'H.K.Dollar' ) - ( language = 'E' currency = 'HNL' currencyname = 'Honduran Lempira' currencyshortname = 'Lempira' ) - ( language = 'E' currency = 'HRK' currencyname = 'Croatian Kuna' currencyshortname = 'Kuna' ) - ( language = 'E' currency = 'HTG' currencyname = 'Haitian Gourde' currencyshortname = 'Gourde' ) - ( language = 'E' currency = 'HUF' currencyname = 'Hungarian Forint' currencyshortname = 'Forint' ) - ( language = 'E' currency = 'IDR' currencyname = 'Indonesian Rupiah' currencyshortname = 'Rupiah' ) - ( language = 'E' currency = 'IEP' currencyname = 'Irish Punt (Old --> EUR)' currencyshortname = 'Irish Punt' ) - ( language = 'E' currency = 'ILS' currencyname = 'Israeli Scheckel' currencyshortname = 'Scheckel' ) - ( language = 'E' currency = 'INR' currencyname = 'Indian Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'IQD' currencyname = 'Iraqui Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'IRR' currencyname = 'Iranian Rial' currencyshortname = 'Rial' ) - ( language = 'E' currency = 'ISK' currencyname = 'Iceland Krona' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'ITL' currencyname = 'Italian Lira (Old --> EUR)' currencyshortname = 'Lire' ) - ( language = 'E' currency = 'JMD' currencyname = 'Jamaican Dollar' currencyshortname = 'Jamaican Dollar' ) - ( language = 'E' currency = 'JOD' currencyname = 'Jordanian Dinar' currencyshortname = 'Jordanian Dinar' ) - ( language = 'E' currency = 'JPY' currencyname = 'Japanese Yen' currencyshortname = 'Yen' ) - ( language = 'E' currency = 'KES' currencyname = 'Kenyan Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'KGS' currencyname = 'Kyrgyzstan Som' currencyshortname = 'Som' ) - ( language = 'E' currency = 'KHR' currencyname = 'Cambodian Riel' currencyshortname = 'Riel' ) - ( language = 'E' currency = 'KMF' currencyname = 'Comoros Franc' currencyshortname = 'Comoros Franc' ) - ( language = 'E' currency = 'KPW' currencyname = 'North Korean Won' currencyshortname = 'N. Korean Won' ) - ( language = 'E' currency = 'KRW' currencyname = 'South Korean Won' currencyshortname = 'S.Korean Won' ) - ( language = 'E' currency = 'KWD' currencyname = 'Kuwaiti Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'KYD' currencyname = 'Cayman Dollar' currencyshortname = 'Cayman Dollar' ) - ( language = 'E' currency = 'KZT' currencyname = 'Kazakstanian Tenge' currencyshortname = 'Tenge' ) - ( language = 'E' currency = 'LAK' currencyname = 'Laotian Kip' currencyshortname = 'Kip' ) - ( language = 'E' currency = 'LBP' currencyname = 'Lebanese Pound' currencyshortname = 'Lebanese Pound' ) - ( language = 'E' currency = 'LKR' currencyname = 'Sri Lankan Rupee' currencyshortname = 'Sri Lanka Rupee' ) - ( language = 'E' currency = 'LRD' currencyname = 'Liberian Dollar' currencyshortname = 'Liberian Dollar' ) - ( language = 'E' currency = 'LSL' currencyname = 'Lesotho Loti' currencyshortname = 'Loti' ) - ( language = 'E' currency = 'LTL' currencyname = 'Lithuanian Lita' currencyshortname = 'Lita' ) - ( language = 'E' currency = 'LUF' currencyname = 'Luxembourg Franc (Old --> EUR)' currencyshortname = 'Lux. Franc' ) - ( language = 'E' currency = 'LVL' currencyname = 'Latvian Lat' currencyshortname = 'Lat' ) - ( language = 'E' currency = 'LYD' currencyname = 'Libyan Dinar' currencyshortname = 'Libyan Dinar' ) - ( language = 'E' currency = 'MAD' currencyname = 'Moroccan Dirham' currencyshortname = 'Dirham' ) - ( language = 'E' currency = 'MDL' currencyname = 'Moldavian Leu' currencyshortname = 'Leu' ) - ( language = 'E' currency = 'MGA' currencyname = 'Madagascan Ariary' currencyshortname = 'Madagasc.Ariary' ) - ( language = 'E' currency = 'MGF' currencyname = 'Madagascan Franc (Old' currencyshortname = 'Madagascan Fr.' ) - ( language = 'E' currency = 'MKD' currencyname = 'Macedonian Denar' currencyshortname = 'Maced. Denar' ) - ( language = 'E' currency = 'MMK' currencyname = 'Myanmar Kyat' currencyshortname = 'Kyat' ) - ( language = 'E' currency = 'MNT' currencyname = 'Mongolian Tugrik' currencyshortname = 'Tugrik' ) - ( language = 'E' currency = 'MOP' currencyname = 'Macao Pataca' currencyshortname = 'Pataca' ) - ( language = 'E' currency = 'MRO' currencyname = 'Mauritanian Ouguiya' currencyshortname = 'Ouguiya' ) - ( language = 'E' currency = 'MTL' currencyname = 'Maltese Lira (Old --> EUR)' currencyshortname = 'Lira' ) - ( language = 'E' currency = 'MUR' currencyname = 'Mauritian Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'MVR' currencyname = 'Maldive Rufiyaa' currencyshortname = 'Rufiyaa' ) - ( language = 'E' currency = 'MWK' currencyname = 'Malawi Kwacha' currencyshortname = 'Malawi Kwacha' ) - ( language = 'E' currency = 'MXN' currencyname = 'Mexican Pesos' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'MYR' currencyname = 'Malaysian Ringgit' currencyshortname = 'Ringgit' ) - ( language = 'E' currency = 'MZM' currencyname = 'Mozambique Metical (Old)' currencyshortname = 'Metical' ) - ( language = 'E' currency = 'MZN' currencyname = 'Mozambique Metical' currencyshortname = 'Metical' ) - ( language = 'E' currency = 'NAD' currencyname = 'Namibian Dollar' currencyshortname = 'Namibian Dollar' ) - ( language = 'E' currency = 'NGN' currencyname = 'Nigerian Naira' currencyshortname = 'Naira' ) - ( language = 'E' currency = 'NIO' currencyname = 'Nicaraguan Cordoba Oro' currencyshortname = 'Cordoba Oro' ) - ( language = 'E' currency = 'NLG' currencyname = 'Dutch Guilder (Old --> EUR)' currencyshortname = 'Guilder' ) - ( language = 'E' currency = 'NOK' currencyname = 'Norwegian Krone' currencyshortname = 'Norwegian Krone' ) - ( language = 'E' currency = 'NPR' currencyname = 'Nepalese Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'NZD' currencyname = 'New Zealand Dollars' currencyshortname = 'N.Zeal.Dollars' ) - ( language = 'E' currency = 'OMR' currencyname = 'Omani Rial' currencyshortname = 'Omani Rial' ) - ( language = 'E' currency = 'PAB' currencyname = 'Panamanian Balboa' currencyshortname = 'Balboa' ) - ( language = 'E' currency = 'PEN' currencyname = 'Peruvian New Sol' currencyshortname = 'New Sol' ) - ( language = 'E' currency = 'PGK' currencyname = 'Papua New Guinea Kina' currencyshortname = 'Kina' ) - ( language = 'E' currency = 'PHP' currencyname = 'Philippine Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'PKR' currencyname = 'Pakistani Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'PLN' currencyname = 'Polish Zloty (new)' currencyshortname = 'Zloty' ) - ( language = 'E' currency = 'PTE' currencyname = 'Portuguese Escudo (Old --> EUR)' currencyshortname = 'Escudo' ) - ( language = 'E' currency = 'PYG' currencyname = 'Paraguayan Guarani' currencyshortname = 'Guarani' ) - ( language = 'E' currency = 'QAR' currencyname = 'Qatar Rial' currencyshortname = 'Rial' ) - ( language = 'E' currency = 'RMB' currencyname = 'Chinese Yuan Renminbi' currencyshortname = 'Yuan Renminbi' ) - ( language = 'E' currency = 'ROL' currencyname = 'Romanian Leu (Old)' currencyshortname = 'Leu (Old)' ) - ( language = 'E' currency = 'RON' currencyname = 'Romanian Leu' currencyshortname = 'Leu' ) - ( language = 'E' currency = 'RSD' currencyname = 'Serbian Dinar' currencyshortname = 'Serbian Dinar' ) - ( language = 'E' currency = 'RUB' currencyname = 'Russian Ruble' currencyshortname = 'Ruble' ) - ( language = 'E' currency = 'RWF' currencyname = 'Rwandan Franc' currencyshortname = 'Franc' ) - ( language = 'E' currency = 'SAR' currencyname = 'Saudi Riyal' currencyshortname = 'Rial' ) - ( language = 'E' currency = 'SBD' currencyname = 'Solomon Islands Dollar' currencyshortname = 'Sol.Isl.Dollar' ) - ( language = 'E' currency = 'SCR' currencyname = 'Seychelles Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'SDD' currencyname = 'Sudanese Dinar (Old)' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'SDG' currencyname = 'Sudanese Pound' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'SDP' currencyname = 'Sudanese Pound (until 1992)' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'SEK' currencyname = 'Swedish Krona' currencyshortname = 'Swedish Krona' ) - ( language = 'E' currency = 'SGD' currencyname = 'Singapore Dollar' currencyshortname = 'Sing.Dollar' ) - ( language = 'E' currency = 'SHP' currencyname = 'St.Helena Pound' currencyshortname = 'St.Helena Pound' ) - ( language = 'E' currency = 'SIT' currencyname = 'Slovenian Tolar (Old --> EUR)' currencyshortname = 'Tolar' ) - ( language = 'E' currency = 'SKK' currencyname = 'Slovakian Krona (Old --> EUR)' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'SLL' currencyname = 'Sierra Leone Leone' currencyshortname = 'Leone' ) - ( language = 'E' currency = 'SOS' currencyname = 'Somalian Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'SRD' currencyname = 'Surinam Dollar' currencyshortname = 'Surinam Doillar' ) - ( language = 'E' currency = 'SRG' currencyname = 'Surinam Guilder (Old)' currencyshortname = 'Surinam Guilder' ) - ( language = 'E' currency = 'SSP' currencyname = 'South Sudanese Pound' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'STD' currencyname = 'Sao Tome / Principe Dobra' currencyshortname = 'Dobra' ) - ( language = 'E' currency = 'SVC' currencyname = 'El Salvador Colon' currencyshortname = 'Colon' ) - ( language = 'E' currency = 'SYP' currencyname = 'Syrian Pound' currencyshortname = 'Syrian Pound' ) - ( language = 'E' currency = 'SZL' currencyname = 'Swaziland Lilangeni' currencyshortname = 'Lilangeni' ) - ( language = 'E' currency = 'THB' currencyname = 'Thailand Baht' currencyshortname = 'Baht' ) - ( language = 'E' currency = 'TJR' currencyname = 'Tajikistani Ruble (Old)' currencyshortname = 'Ruble' ) - ( language = 'E' currency = 'TJS' currencyname = 'Tajikistani Somoni' currencyshortname = 'Somoni' ) - ( language = 'E' currency = 'TMM' currencyname = 'Turkmenistani Manat (Old)' currencyshortname = 'Manat (Old)' ) - ( language = 'E' currency = 'TMT' currencyname = 'Turkmenistani Manat' currencyshortname = 'Manat' ) - ( language = 'E' currency = 'TND' currencyname = 'Tunisian Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'TOP' currencyname = 'Tongan Pa''anga' currencyshortname = 'Pa''anga' ) - ( language = 'E' currency = 'TPE' currencyname = 'Timor Escudo --> USD' currencyshortname = 'Timor Escudo' ) - ( language = 'E' currency = 'TRL' currencyname = 'Turkish Lira (Old)' currencyshortname = 'Lira (Old)' ) - ( language = 'E' currency = 'TRY' currencyname = 'Turkish Lira' currencyshortname = 'Lira' ) - ( language = 'E' currency = 'TTD' currencyname = 'Trinidad and Tobago Dollar' currencyshortname = 'T.+ T. Dollar' ) - ( language = 'E' currency = 'TWD' currencyname = 'New Taiwan Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'TZS' currencyname = 'Tanzanian Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'UAH' currencyname = 'Ukraine Hryvnia' currencyshortname = 'Hryvnia' ) - ( language = 'E' currency = 'UGX' currencyname = 'Ugandan Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'USD' currencyname = 'United States Dollar' currencyshortname = 'US Dollar' ) - ( language = 'E' currency = 'USDN' currencyname = '(Internal) United States Dollar (5 Dec.)' currencyshortname = 'US Dollar' ) - ( language = 'E' currency = 'UYU' currencyname = 'Uruguayan Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'UZS' currencyname = 'Uzbekistan Som' currencyshortname = 'Total' ) - ( language = 'E' currency = 'VEB' currencyname = 'Venezuelan Bolivar (Old)' currencyshortname = 'Bolivar (Old)' ) - ( language = 'E' currency = 'VEF' currencyname = 'Venezuelan Bolivar' currencyshortname = 'Bolivar' ) - ( language = 'E' currency = 'VND' currencyname = 'Vietnamese Dong' currencyshortname = 'Dong' ) - ( language = 'E' currency = 'VUV' currencyname = 'Vanuatu Vatu' currencyshortname = 'Vatu' ) - ( language = 'E' currency = 'WST' currencyname = 'Samoan Tala' currencyshortname = 'Tala' ) - ( language = 'E' currency = 'XAF' currencyname = 'Gabon CFA Franc BEAC' currencyshortname = 'CFA Franc BEAC' ) - ( language = 'E' currency = 'XCD' currencyname = 'East Carribean Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'XEU' currencyname = 'European Currency Unit (E.C.U.)' currencyshortname = 'E.C.U.' ) - ( language = 'E' currency = 'XOF' currencyname = 'Benin CFA Franc BCEAO' currencyshortname = 'CFA Franc BCEAO' ) - ( language = 'E' currency = 'XPF' currencyname = 'CFP Franc' currencyshortname = 'Franc' ) - ( language = 'E' currency = 'YER' currencyname = 'Yemeni Ryal' currencyshortname = 'Yemeni Ryal' ) - ( language = 'E' currency = 'YUM' currencyname = 'New Yugoslavian Dinar (Old)' currencyshortname = 'New Dinar' ) - ( language = 'E' currency = 'ZAR' currencyname = 'South African Rand' currencyshortname = 'Rand' ) - ( language = 'E' currency = 'ZMK' currencyname = 'Zambian Kwacha (Old)' currencyshortname = 'Kwacha' ) - ( language = 'E' currency = 'ZMW' currencyname = 'Zambian Kwacha (New)' currencyshortname = 'Kwacha' ) - ( language = 'E' currency = 'ZRN' currencyname = 'Zaire (Old)' currencyshortname = 'Zaire' ) - ( language = 'E' currency = 'ZWD' currencyname = 'Zimbabwean Dollar (Old)' currencyshortname = 'Zimbabwe Dollar' ) - ( language = 'E' currency = 'ZWL' currencyname = 'Zimbabwean Dollar (New)' currencyshortname = 'Zimbabwe Dollar' ) - ( language = 'E' currency = 'ZWN' currencyname = 'Zimbabwean Dollar (Old)' currencyshortname = 'Zimbabwe Dollar' ) - ( language = 'E' currency = 'ZWR' currencyname = 'Zimbabwean Dollar (Old)' currencyshortname = 'Zimbabwe Dollar' ) ). + DATA temp1 LIKE mt_suggestion. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-language = 'E'. + temp2-currency = 'ADP'. + temp2-currencyname = 'Andorran Peseta --> (Old --> EUR)'. + temp2-currencyshortname = 'Peseta'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AED'. + temp2-currencyname = 'United Arab Emirates Dirham'. + temp2-currencyshortname = 'Dirham'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AFA'. + temp2-currencyname = 'Afghani (Old)'. + temp2-currencyshortname = 'Afghani'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AFN'. + temp2-currencyname = 'Afghani'. + temp2-currencyshortname = 'Afghani'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ALL'. + temp2-currencyname = 'Albanian Lek'. + temp2-currencyshortname = 'Lek'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AMD'. + temp2-currencyname = 'Armenian Dram'. + temp2-currencyshortname = 'Dram'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ANG'. + temp2-currencyname = 'West Indian Guilder'. + temp2-currencyshortname = 'W.Ind.Guilder'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AOA'. + temp2-currencyname = 'Angolanische Kwanza'. + temp2-currencyshortname = 'Kwansa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AON'. + temp2-currencyname = 'Angolan New Kwanza (Old)'. + temp2-currencyshortname = 'New Kwanza'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AOR'. + temp2-currencyname = 'Angolan Kwanza Reajustado (Old)'. + temp2-currencyshortname = 'Kwanza Reajust.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ARS'. + temp2-currencyname = 'Argentine Peso'. + temp2-currencyshortname = 'Arg. Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ATS'. + temp2-currencyname = 'Austrian Schilling (Old --> EUR)'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AUD'. + temp2-currencyname = 'Australian Dollar'. + temp2-currencyshortname = 'Austr. Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AWG'. + temp2-currencyname = 'Aruban Florin'. + temp2-currencyshortname = 'Aruban Florin'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AZM'. + temp2-currencyname = 'Azerbaijani Manat (Old)'. + temp2-currencyshortname = 'Manat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AZN'. + temp2-currencyname = 'Azerbaijani Manat'. + temp2-currencyshortname = 'Manat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BAM'. + temp2-currencyname = 'Bosnia and Herzegovina Convertible Mark'. + temp2-currencyshortname = 'Convert. Mark'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BBD'. + temp2-currencyname = 'Barbados Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BDT'. + temp2-currencyname = 'Bangladesh Taka'. + temp2-currencyshortname = 'Taka'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BEF'. + temp2-currencyname = 'Belgian Franc (Old --> EUR)'. + temp2-currencyshortname = 'Belgian Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BGN'. + temp2-currencyname = 'Bulgarian Lev'. + temp2-currencyshortname = 'Lev'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BHD'. + temp2-currencyname = 'Bahraini Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BIF'. + temp2-currencyname = 'Burundi Franc'. + temp2-currencyshortname = 'Burundi Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BMD'. + temp2-currencyname = 'Bermudan Dollar'. + temp2-currencyshortname = 'Bermudan Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BND'. + temp2-currencyname = 'Brunei Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BOB'. + temp2-currencyname = 'Boliviano'. + temp2-currencyshortname = 'Boliviano'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BRL'. + temp2-currencyname = 'Brazilian Real'. + temp2-currencyshortname = 'Real'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BSD'. + temp2-currencyname = 'Bahaman Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BTN'. + temp2-currencyname = 'Bhutan Ngultrum'. + temp2-currencyshortname = 'Ngultrum'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BWP'. + temp2-currencyname = 'Botswana Pula'. + temp2-currencyshortname = 'Pula'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BYB'. + temp2-currencyname = 'Belarusian Ruble (Old)'. + temp2-currencyshortname = 'Belarus. Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BYN'. + temp2-currencyname = 'Belarusian Ruble (New)'. + temp2-currencyshortname = 'Bela. Ruble N.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BYR'. + temp2-currencyname = 'Belarusian Ruble'. + temp2-currencyshortname = 'Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BZD'. + temp2-currencyname = 'Belize Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CAD'. + temp2-currencyname = 'Canadian Dollar'. + temp2-currencyshortname = 'Canadian Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CDF'. + temp2-currencyname = 'Congolese Franc'. + temp2-currencyshortname = 'test data'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CFP'. + temp2-currencyname = 'French Franc (Pacific Islands)'. + temp2-currencyshortname = 'Fr. Franc (Pac)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CHF'. + temp2-currencyname = 'Swiss Franc'. + temp2-currencyshortname = 'Swiss Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CLP'. + temp2-currencyname = 'Chilean Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CNY'. + temp2-currencyname = 'Chinese Renminbi'. + temp2-currencyshortname = 'Renminbi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'COP'. + temp2-currencyname = 'Colombian Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CRC'. + temp2-currencyname = 'Costa Rica Colon'. + temp2-currencyshortname = 'Cost.Rica Colon'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CSD'. + temp2-currencyname = 'Serbian Dinar (Old)'. + temp2-currencyshortname = 'Serbian Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CUC'. + temp2-currencyname = 'Peso Convertible'. + temp2-currencyshortname = 'Peso Convertib.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CUP'. + temp2-currencyname = 'Cuban Peso'. + temp2-currencyshortname = 'Cuban Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CVE'. + temp2-currencyname = 'Cape Verde Escudo'. + temp2-currencyshortname = 'Escudo'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CYP'. + temp2-currencyname = 'Cyprus Pound (Old --> EUR)'. + temp2-currencyshortname = 'Cyprus Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CZK'. + temp2-currencyname = 'Czech Krona'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DEM'. + temp2-currencyname = 'German Mark (Old --> EUR)'. + temp2-currencyshortname = 'German Mark'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DEM3'. + temp2-currencyname = '(Internal) German Mark (3 dec.places)'. + temp2-currencyshortname = '(Int.) DEM 3 DP'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DJF'. + temp2-currencyname = 'Djibouti Franc'. + temp2-currencyshortname = 'Djibouti Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DKK'. + temp2-currencyname = 'Danish Krone'. + temp2-currencyshortname = 'Danish Krone'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DOP'. + temp2-currencyname = 'Dominican Peso'. + temp2-currencyshortname = 'Dominican Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DZD'. + temp2-currencyname = 'Algerian Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ECS'. + temp2-currencyname = 'Ecuadorian Sucre (Old --> USD)'. + temp2-currencyshortname = 'Sucre'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'EEK'. + temp2-currencyname = 'Estonian Krone (Old --> EUR)'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'EGP'. + temp2-currencyname = 'Egyptian Pound'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ERN'. + temp2-currencyname = 'Eritrean Nafka'. + temp2-currencyshortname = 'Nakfa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ESP'. + temp2-currencyname = 'Spanish Peseta (Old --> EUR)'. + temp2-currencyshortname = 'Peseta'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ETB'. + temp2-currencyname = 'Ethiopian Birr'. + temp2-currencyshortname = 'Birr'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'EUR'. + temp2-currencyname = 'European Euro'. + temp2-currencyshortname = 'Euro'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FIM'. + temp2-currencyname = 'Finnish Markka (Old --> EUR)'. + temp2-currencyshortname = 'Finnish markka'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FJD'. + temp2-currencyname = 'Fiji Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FKP'. + temp2-currencyname = 'Falkland Pound'. + temp2-currencyshortname = 'Falkland Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FRF'. + temp2-currencyname = 'French Franc (Old --> EUR)'. + temp2-currencyshortname = 'French Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GBP'. + temp2-currencyname = 'British Pound'. + temp2-currencyshortname = 'Pound sterling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GEL'. + temp2-currencyname = 'Georgian Lari'. + temp2-currencyshortname = 'Lari'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GHC'. + temp2-currencyname = 'Ghanaian Cedi (Old)'. + temp2-currencyshortname = 'Cedi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GHS'. + temp2-currencyname = 'Ghanian Cedi'. + temp2-currencyshortname = 'Cedi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GIP'. + temp2-currencyname = 'Gibraltar Pound'. + temp2-currencyshortname = 'Gibraltar Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GMD'. + temp2-currencyname = 'Gambian Dalasi'. + temp2-currencyshortname = 'Dalasi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GNF'. + temp2-currencyname = 'Guinean Franc'. + temp2-currencyshortname = 'Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GRD'. + temp2-currencyname = 'Greek Drachma (Old --> EUR)'. + temp2-currencyshortname = 'Drachma'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GTQ'. + temp2-currencyname = 'Guatemalan Quetzal'. + temp2-currencyshortname = 'Quetzal'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GWP'. + temp2-currencyname = 'Guinea Peso (Old --> SHP)'. + temp2-currencyshortname = 'Guinea Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GYD'. + temp2-currencyname = 'Guyana Dollar'. + temp2-currencyshortname = 'Guyana Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HKD'. + temp2-currencyname = 'Hong Kong Dollar'. + temp2-currencyshortname = 'H.K.Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HNL'. + temp2-currencyname = 'Honduran Lempira'. + temp2-currencyshortname = 'Lempira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HRK'. + temp2-currencyname = 'Croatian Kuna'. + temp2-currencyshortname = 'Kuna'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HTG'. + temp2-currencyname = 'Haitian Gourde'. + temp2-currencyshortname = 'Gourde'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HUF'. + temp2-currencyname = 'Hungarian Forint'. + temp2-currencyshortname = 'Forint'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IDR'. + temp2-currencyname = 'Indonesian Rupiah'. + temp2-currencyshortname = 'Rupiah'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IEP'. + temp2-currencyname = 'Irish Punt (Old --> EUR)'. + temp2-currencyshortname = 'Irish Punt'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ILS'. + temp2-currencyname = 'Israeli Scheckel'. + temp2-currencyshortname = 'Scheckel'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'INR'. + temp2-currencyname = 'Indian Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IQD'. + temp2-currencyname = 'Iraqui Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IRR'. + temp2-currencyname = 'Iranian Rial'. + temp2-currencyshortname = 'Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ISK'. + temp2-currencyname = 'Iceland Krona'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ITL'. + temp2-currencyname = 'Italian Lira (Old --> EUR)'. + temp2-currencyshortname = 'Lire'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'JMD'. + temp2-currencyname = 'Jamaican Dollar'. + temp2-currencyshortname = 'Jamaican Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'JOD'. + temp2-currencyname = 'Jordanian Dinar'. + temp2-currencyshortname = 'Jordanian Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'JPY'. + temp2-currencyname = 'Japanese Yen'. + temp2-currencyshortname = 'Yen'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KES'. + temp2-currencyname = 'Kenyan Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KGS'. + temp2-currencyname = 'Kyrgyzstan Som'. + temp2-currencyshortname = 'Som'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KHR'. + temp2-currencyname = 'Cambodian Riel'. + temp2-currencyshortname = 'Riel'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KMF'. + temp2-currencyname = 'Comoros Franc'. + temp2-currencyshortname = 'Comoros Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KPW'. + temp2-currencyname = 'North Korean Won'. + temp2-currencyshortname = 'N. Korean Won'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KRW'. + temp2-currencyname = 'South Korean Won'. + temp2-currencyshortname = 'S.Korean Won'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KWD'. + temp2-currencyname = 'Kuwaiti Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KYD'. + temp2-currencyname = 'Cayman Dollar'. + temp2-currencyshortname = 'Cayman Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KZT'. + temp2-currencyname = 'Kazakstanian Tenge'. + temp2-currencyshortname = 'Tenge'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LAK'. + temp2-currencyname = 'Laotian Kip'. + temp2-currencyshortname = 'Kip'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LBP'. + temp2-currencyname = 'Lebanese Pound'. + temp2-currencyshortname = 'Lebanese Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LKR'. + temp2-currencyname = 'Sri Lankan Rupee'. + temp2-currencyshortname = 'Sri Lanka Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LRD'. + temp2-currencyname = 'Liberian Dollar'. + temp2-currencyshortname = 'Liberian Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LSL'. + temp2-currencyname = 'Lesotho Loti'. + temp2-currencyshortname = 'Loti'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LTL'. + temp2-currencyname = 'Lithuanian Lita'. + temp2-currencyshortname = 'Lita'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LUF'. + temp2-currencyname = 'Luxembourg Franc (Old --> EUR)'. + temp2-currencyshortname = 'Lux. Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LVL'. + temp2-currencyname = 'Latvian Lat'. + temp2-currencyshortname = 'Lat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LYD'. + temp2-currencyname = 'Libyan Dinar'. + temp2-currencyshortname = 'Libyan Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MAD'. + temp2-currencyname = 'Moroccan Dirham'. + temp2-currencyshortname = 'Dirham'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MDL'. + temp2-currencyname = 'Moldavian Leu'. + temp2-currencyshortname = 'Leu'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MGA'. + temp2-currencyname = 'Madagascan Ariary'. + temp2-currencyshortname = 'Madagasc.Ariary'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MGF'. + temp2-currencyname = 'Madagascan Franc (Old'. + temp2-currencyshortname = 'Madagascan Fr.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MKD'. + temp2-currencyname = 'Macedonian Denar'. + temp2-currencyshortname = 'Maced. Denar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MMK'. + temp2-currencyname = 'Myanmar Kyat'. + temp2-currencyshortname = 'Kyat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MNT'. + temp2-currencyname = 'Mongolian Tugrik'. + temp2-currencyshortname = 'Tugrik'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MOP'. + temp2-currencyname = 'Macao Pataca'. + temp2-currencyshortname = 'Pataca'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MRO'. + temp2-currencyname = 'Mauritanian Ouguiya'. + temp2-currencyshortname = 'Ouguiya'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MTL'. + temp2-currencyname = 'Maltese Lira (Old --> EUR)'. + temp2-currencyshortname = 'Lira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MUR'. + temp2-currencyname = 'Mauritian Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MVR'. + temp2-currencyname = 'Maldive Rufiyaa'. + temp2-currencyshortname = 'Rufiyaa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MWK'. + temp2-currencyname = 'Malawi Kwacha'. + temp2-currencyshortname = 'Malawi Kwacha'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MXN'. + temp2-currencyname = 'Mexican Pesos'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MYR'. + temp2-currencyname = 'Malaysian Ringgit'. + temp2-currencyshortname = 'Ringgit'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MZM'. + temp2-currencyname = 'Mozambique Metical (Old)'. + temp2-currencyshortname = 'Metical'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MZN'. + temp2-currencyname = 'Mozambique Metical'. + temp2-currencyshortname = 'Metical'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NAD'. + temp2-currencyname = 'Namibian Dollar'. + temp2-currencyshortname = 'Namibian Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NGN'. + temp2-currencyname = 'Nigerian Naira'. + temp2-currencyshortname = 'Naira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NIO'. + temp2-currencyname = 'Nicaraguan Cordoba Oro'. + temp2-currencyshortname = 'Cordoba Oro'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NLG'. + temp2-currencyname = 'Dutch Guilder (Old --> EUR)'. + temp2-currencyshortname = 'Guilder'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NOK'. + temp2-currencyname = 'Norwegian Krone'. + temp2-currencyshortname = 'Norwegian Krone'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NPR'. + temp2-currencyname = 'Nepalese Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NZD'. + temp2-currencyname = 'New Zealand Dollars'. + temp2-currencyshortname = 'N.Zeal.Dollars'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'OMR'. + temp2-currencyname = 'Omani Rial'. + temp2-currencyshortname = 'Omani Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PAB'. + temp2-currencyname = 'Panamanian Balboa'. + temp2-currencyshortname = 'Balboa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PEN'. + temp2-currencyname = 'Peruvian New Sol'. + temp2-currencyshortname = 'New Sol'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PGK'. + temp2-currencyname = 'Papua New Guinea Kina'. + temp2-currencyshortname = 'Kina'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PHP'. + temp2-currencyname = 'Philippine Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PKR'. + temp2-currencyname = 'Pakistani Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PLN'. + temp2-currencyname = 'Polish Zloty (new)'. + temp2-currencyshortname = 'Zloty'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PTE'. + temp2-currencyname = 'Portuguese Escudo (Old --> EUR)'. + temp2-currencyshortname = 'Escudo'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PYG'. + temp2-currencyname = 'Paraguayan Guarani'. + temp2-currencyshortname = 'Guarani'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'QAR'. + temp2-currencyname = 'Qatar Rial'. + temp2-currencyshortname = 'Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RMB'. + temp2-currencyname = 'Chinese Yuan Renminbi'. + temp2-currencyshortname = 'Yuan Renminbi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ROL'. + temp2-currencyname = 'Romanian Leu (Old)'. + temp2-currencyshortname = 'Leu (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RON'. + temp2-currencyname = 'Romanian Leu'. + temp2-currencyshortname = 'Leu'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RSD'. + temp2-currencyname = 'Serbian Dinar'. + temp2-currencyshortname = 'Serbian Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RUB'. + temp2-currencyname = 'Russian Ruble'. + temp2-currencyshortname = 'Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RWF'. + temp2-currencyname = 'Rwandan Franc'. + temp2-currencyshortname = 'Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SAR'. + temp2-currencyname = 'Saudi Riyal'. + temp2-currencyshortname = 'Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SBD'. + temp2-currencyname = 'Solomon Islands Dollar'. + temp2-currencyshortname = 'Sol.Isl.Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SCR'. + temp2-currencyname = 'Seychelles Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SDD'. + temp2-currencyname = 'Sudanese Dinar (Old)'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SDG'. + temp2-currencyname = 'Sudanese Pound'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SDP'. + temp2-currencyname = 'Sudanese Pound (until 1992)'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SEK'. + temp2-currencyname = 'Swedish Krona'. + temp2-currencyshortname = 'Swedish Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SGD'. + temp2-currencyname = 'Singapore Dollar'. + temp2-currencyshortname = 'Sing.Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SHP'. + temp2-currencyname = 'St.Helena Pound'. + temp2-currencyshortname = 'St.Helena Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SIT'. + temp2-currencyname = 'Slovenian Tolar (Old --> EUR)'. + temp2-currencyshortname = 'Tolar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SKK'. + temp2-currencyname = 'Slovakian Krona (Old --> EUR)'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SLL'. + temp2-currencyname = 'Sierra Leone Leone'. + temp2-currencyshortname = 'Leone'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SOS'. + temp2-currencyname = 'Somalian Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SRD'. + temp2-currencyname = 'Surinam Dollar'. + temp2-currencyshortname = 'Surinam Doillar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SRG'. + temp2-currencyname = 'Surinam Guilder (Old)'. + temp2-currencyshortname = 'Surinam Guilder'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SSP'. + temp2-currencyname = 'South Sudanese Pound'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'STD'. + temp2-currencyname = 'Sao Tome / Principe Dobra'. + temp2-currencyshortname = 'Dobra'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SVC'. + temp2-currencyname = 'El Salvador Colon'. + temp2-currencyshortname = 'Colon'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SYP'. + temp2-currencyname = 'Syrian Pound'. + temp2-currencyshortname = 'Syrian Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SZL'. + temp2-currencyname = 'Swaziland Lilangeni'. + temp2-currencyshortname = 'Lilangeni'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'THB'. + temp2-currencyname = 'Thailand Baht'. + temp2-currencyshortname = 'Baht'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TJR'. + temp2-currencyname = 'Tajikistani Ruble (Old)'. + temp2-currencyshortname = 'Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TJS'. + temp2-currencyname = 'Tajikistani Somoni'. + temp2-currencyshortname = 'Somoni'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TMM'. + temp2-currencyname = 'Turkmenistani Manat (Old)'. + temp2-currencyshortname = 'Manat (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TMT'. + temp2-currencyname = 'Turkmenistani Manat'. + temp2-currencyshortname = 'Manat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TND'. + temp2-currencyname = 'Tunisian Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TOP'. + temp2-currencyname = 'Tongan Pa''anga'. + temp2-currencyshortname = 'Pa''anga'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TPE'. + temp2-currencyname = 'Timor Escudo --> USD'. + temp2-currencyshortname = 'Timor Escudo'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TRL'. + temp2-currencyname = 'Turkish Lira (Old)'. + temp2-currencyshortname = 'Lira (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TRY'. + temp2-currencyname = 'Turkish Lira'. + temp2-currencyshortname = 'Lira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TTD'. + temp2-currencyname = 'Trinidad and Tobago Dollar'. + temp2-currencyshortname = 'T.+ T. Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TWD'. + temp2-currencyname = 'New Taiwan Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TZS'. + temp2-currencyname = 'Tanzanian Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UAH'. + temp2-currencyname = 'Ukraine Hryvnia'. + temp2-currencyshortname = 'Hryvnia'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UGX'. + temp2-currencyname = 'Ugandan Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'USD'. + temp2-currencyname = 'United States Dollar'. + temp2-currencyshortname = 'US Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'USDN'. + temp2-currencyname = '(Internal) United States Dollar (5 Dec.)'. + temp2-currencyshortname = 'US Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UYU'. + temp2-currencyname = 'Uruguayan Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UZS'. + temp2-currencyname = 'Uzbekistan Som'. + temp2-currencyshortname = 'Total'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VEB'. + temp2-currencyname = 'Venezuelan Bolivar (Old)'. + temp2-currencyshortname = 'Bolivar (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VEF'. + temp2-currencyname = 'Venezuelan Bolivar'. + temp2-currencyshortname = 'Bolivar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VND'. + temp2-currencyname = 'Vietnamese Dong'. + temp2-currencyshortname = 'Dong'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VUV'. + temp2-currencyname = 'Vanuatu Vatu'. + temp2-currencyshortname = 'Vatu'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'WST'. + temp2-currencyname = 'Samoan Tala'. + temp2-currencyshortname = 'Tala'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XAF'. + temp2-currencyname = 'Gabon CFA Franc BEAC'. + temp2-currencyshortname = 'CFA Franc BEAC'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XCD'. + temp2-currencyname = 'East Carribean Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XEU'. + temp2-currencyname = 'European Currency Unit (E.C.U.)'. + temp2-currencyshortname = 'E.C.U.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XOF'. + temp2-currencyname = 'Benin CFA Franc BCEAO'. + temp2-currencyshortname = 'CFA Franc BCEAO'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XPF'. + temp2-currencyname = 'CFP Franc'. + temp2-currencyshortname = 'Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'YER'. + temp2-currencyname = 'Yemeni Ryal'. + temp2-currencyshortname = 'Yemeni Ryal'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'YUM'. + temp2-currencyname = 'New Yugoslavian Dinar (Old)'. + temp2-currencyshortname = 'New Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZAR'. + temp2-currencyname = 'South African Rand'. + temp2-currencyshortname = 'Rand'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZMK'. + temp2-currencyname = 'Zambian Kwacha (Old)'. + temp2-currencyshortname = 'Kwacha'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZMW'. + temp2-currencyname = 'Zambian Kwacha (New)'. + temp2-currencyshortname = 'Kwacha'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZRN'. + temp2-currencyname = 'Zaire (Old)'. + temp2-currencyshortname = 'Zaire'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWD'. + temp2-currencyname = 'Zimbabwean Dollar (Old)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWL'. + temp2-currencyname = 'Zimbabwean Dollar (New)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWN'. + temp2-currencyname = 'Zimbabwean Dollar (Old)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWR'. + temp2-currencyname = 'Zimbabwean Dollar (Old)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + mt_suggestion = temp1. ENDMETHOD. @@ -265,7 +1106,8 @@ CLASS Z2UI5_CL_DEMO_APP_060 IMPLEMENTATION. IF check_initialized = abap_false. - DATA(lv_script) = ` debugger;` && |\n| && + DATA lv_script TYPE string. + lv_script = ` debugger;` && |\n| && `function setInputFIlter(){` && |\n| && ` var inp = sap.z2ui5.oView.byId('suggInput');` && |\n| && ` inp.setFilterFunction(function(sValue, oItem){` && |\n| && @@ -304,7 +1146,8 @@ CLASS Z2UI5_CL_DEMO_APP_060 IMPLEMENTATION. METHOD z2ui5_on_event. - DATA lt_range TYPE RANGE OF string. + TYPES temp5 TYPE RANGE OF string. +DATA lt_range TYPE temp5. CASE client->get( )-event. WHEN 'START'. @@ -312,10 +1155,18 @@ CLASS Z2UI5_CL_DEMO_APP_060 IMPLEMENTATION. WHEN 'ON_SUGGEST'. - lt_range = VALUE #( ( sign = 'I' option = 'CP' low = `*` && input && `*` ) ). + DATA temp3 LIKE lt_range. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-sign = 'I'. + temp4-option = 'CP'. + temp4-low = `*` && input && `*`. + INSERT temp4 INTO TABLE temp3. + lt_range = temp3. CLEAR mt_suggestion_out. - LOOP AT mt_suggestion INTO DATA(ls_sugg) + DATA ls_sugg LIKE LINE OF mt_suggestion. + LOOP AT mt_suggestion INTO ls_sugg WHERE currencyname IN lt_range. INSERT ls_sugg INTO TABLE mt_suggestion_out. ENDLOOP. @@ -334,15 +1185,20 @@ CLASS Z2UI5_CL_DEMO_APP_060 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Live Suggestion Event' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(grid) = page->grid( 'L6 M12 S12' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). - DATA(input) = grid->simple_form( 'Input' + DATA input TYPE REF TO z2ui5_cl_xml_view. + input = grid->simple_form( 'Input' )->content( 'form' )->label( 'Input with value help' )->input( diff --git a/src/z2ui5_cl_demo_app_061.clas.abap b/src/z2ui5_cl_demo_app_061.clas.abap index 4f6cc60d..60266a42 100644 --- a/src/z2ui5_cl_demo_app_061.clas.abap +++ b/src/z2ui5_cl_demo_app_061.clas.abap @@ -21,18 +21,23 @@ CLASS Z2UI5_CL_DEMO_APP_061 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - RTTI created Table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). FIELD-SYMBOLS TYPE table. ASSIGN t_tab->* TO . - DATA(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( items = client->_bind_edit( ) mode = 'MultiSelect' )->header_toolbar( @@ -75,12 +80,27 @@ CLASS Z2UI5_CL_DEMO_APP_061 IMPLEMENTATION. ASSIGN t_tab->* TO . - INSERT VALUE z2ui5_t_01( id = 'this is an uuid' timestampl = '2023234243' id_prev = 'previous' ) + DATA temp1 TYPE z2ui5_t_01. + CLEAR temp1. + temp1-id = 'this is an uuid'. + temp1-timestampl = '2023234243'. + temp1-id_prev = 'previous'. + INSERT temp1 INTO TABLE . - INSERT VALUE z2ui5_t_01( id = 'this is an uuid' timestampl = '2023234243' id_prev = 'previous' ) + DATA temp2 TYPE z2ui5_t_01. + CLEAR temp2. + temp2-id = 'this is an uuid'. + temp2-timestampl = '2023234243'. + temp2-id_prev = 'previous'. + INSERT temp2 INTO TABLE . - INSERT VALUE z2ui5_t_01( id = 'this is an uuid' timestampl = '2023234243' id_prev = 'previous' ) + DATA temp3 TYPE z2ui5_t_01. + CLEAR temp3. + temp3-id = 'this is an uuid'. + temp3-timestampl = '2023234243'. + temp3-id_prev = 'previous'. + INSERT temp3 INTO TABLE . diff --git a/src/z2ui5_cl_demo_app_062.clas.abap b/src/z2ui5_cl_demo_app_062.clas.abap index ffab23a5..fde08023 100644 --- a/src/z2ui5_cl_demo_app_062.clas.abap +++ b/src/z2ui5_cl_demo_app_062.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_062 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Generic Tag Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->generic_tag( arialabelledby = 'genericTagLabel' diff --git a/src/z2ui5_cl_demo_app_063.clas.abap b/src/z2ui5_cl_demo_app_063.clas.abap index aa82bab6..a42de678 100644 --- a/src/z2ui5_cl_demo_app_063.clas.abap +++ b/src/z2ui5_cl_demo_app_063.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_063 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Badge Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->button( text = 'Emphasized Button with Badge' diff --git a/src/z2ui5_cl_demo_app_064.clas.abap b/src/z2ui5_cl_demo_app_064.clas.abap index c061708e..65dd2e15 100644 --- a/src/z2ui5_cl_demo_app_064.clas.abap +++ b/src/z2ui5_cl_demo_app_064.clas.abap @@ -129,7 +129,9 @@ CLASS Z2UI5_CL_DEMO_APP_064 IMPLEMENTATION. finished = client->_event( 'LOAD' ) checkactive = client->_bind( mv_check_active ) ). - temp5 = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + temp5 = temp2. page1 = view->shell( )->page( id = 'page_main' title = 'abap2UI5 - Progress Bar while Server Request' navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_065.clas.abap b/src/z2ui5_cl_demo_app_065.clas.abap index a46c3411..3813b404 100644 --- a/src/z2ui5_cl_demo_app_065.clas.abap +++ b/src/z2ui5_cl_demo_app_065.clas.abap @@ -19,9 +19,11 @@ CLASS z2ui5_cl_demo_app_065 IMPLEMENTATION. METHOD z2ui5_if_app~main. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view->shell( )->page( title = `Main View` id = `test` @@ -40,12 +42,16 @@ CLASS z2ui5_cl_demo_app_065 IMPLEMENTATION. press = client->_event( 'NEST' ) )->input( value = client->_bind_edit( mv_input_main ) ). - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `https://github.com/abap2UI5/abap2UI5/` INTO TABLE temp1. + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( )->page( title = `Nested View` )->button( text = 'event' press = client->_event( 'TEST' ) )->button( text = `frontend event` - press = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( `https://github.com/abap2UI5/abap2UI5/` ) ) ) + press = client->_event_client( val = client->cs_event-open_new_tab t_arg = temp1 ) )->input( value = client->_bind_edit( mv_input_nest ) ). IF check_initialized = abap_false. diff --git a/src/z2ui5_cl_demo_app_067.clas.abap b/src/z2ui5_cl_demo_app_067.clas.abap index e0594d27..7466fc27 100644 --- a/src/z2ui5_cl_demo_app_067.clas.abap +++ b/src/z2ui5_cl_demo_app_067.clas.abap @@ -33,11 +33,13 @@ CLASS Z2UI5_CL_DEMO_APP_067 IMPLEMENTATION. client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). ENDCASE. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Currency Format' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Currency' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_068.clas.abap b/src/z2ui5_cl_demo_app_068.clas.abap index 94e329ed..cde1f8f0 100644 --- a/src/z2ui5_cl_demo_app_068.clas.abap +++ b/src/z2ui5_cl_demo_app_068.clas.abap @@ -49,7 +49,8 @@ CLASS Z2UI5_CL_DEMO_APP_068 IMPLEMENTATION. METHOD ui5_display_popup_tree_select. - DATA(dialog) = z2ui5_cl_xml_view=>factory_popup( + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = z2ui5_cl_xml_view=>factory_popup( )->dialog( title = 'Choose Product here...' contentheight = '50%' contentwidth = '50%' ). @@ -78,7 +79,8 @@ CLASS Z2UI5_CL_DEMO_APP_068 IMPLEMENTATION. METHOD ui5_display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Popup Tree select Entry' navbuttonpress = client->_event( 'BACK' ) @@ -98,29 +100,51 @@ CLASS Z2UI5_CL_DEMO_APP_068 IMPLEMENTATION. METHOD ui5_initialize. + DATA temp1 TYPE z2ui5_cl_demo_app_068=>ty_prodh_nodes. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-text = 'Machines'. + temp2-prodh = '00100'. + DATA temp3 TYPE z2ui5_cl_demo_app_068=>ty_prodh_node_level1-nodes. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-text = 'Pumps'. + temp4-prodh = '0010000100'. + DATA temp7 TYPE z2ui5_cl_demo_app_068=>ty_prodh_node_level2-nodes. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-text = 'Pump 001'. + temp8-prodh = '001000010000000100'. + INSERT temp8 INTO TABLE temp7. + temp8-text = 'Pump 002'. + temp8-prodh = '001000010000000105'. + INSERT temp8 INTO TABLE temp7. + temp4-nodes = temp7. + INSERT temp4 INTO TABLE temp3. + temp2-nodes = temp3. + INSERT temp2 INTO TABLE temp1. + temp2-text = 'Paints'. + temp2-prodh = '00110'. + DATA temp5 TYPE z2ui5_cl_demo_app_068=>ty_prodh_node_level1-nodes. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-text = 'Gloss paints'. + temp6-prodh = '0011000105'. + DATA temp9 TYPE z2ui5_cl_demo_app_068=>ty_prodh_node_level2-nodes. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-text = 'Paint 001'. + temp10-prodh = '001100010500000100'. + INSERT temp10 INTO TABLE temp9. + temp10-text = 'Paint 002'. + temp10-prodh = '001100010500000105'. + INSERT temp10 INTO TABLE temp9. + temp6-nodes = temp9. + INSERT temp6 INTO TABLE temp5. + temp2-nodes = temp5. + INSERT temp2 INTO TABLE temp1. prodh_nodes = - VALUE #( ( text = 'Machines' - prodh = '00100' - nodes = VALUE #( ( text = 'Pumps' - prodh = '0010000100' - nodes = VALUE #( ( text = 'Pump 001' - prodh = '001000010000000100' ) - ( text = 'Pump 002' - prodh = '001000010000000105' ) - ) - ) ) - ) - ( text = 'Paints' - prodh = '00110' - nodes = VALUE #( ( text = 'Gloss paints' - prodh = '0011000105' - nodes = VALUE #( ( text = 'Paint 001' - prodh = '001100010500000100' ) - ( text = 'Paint 002' - prodh = '001100010500000105' ) - ) - ) ) - ) ). + temp1. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_069.clas.abap b/src/z2ui5_cl_demo_app_069.clas.abap index f12a52c2..26601557 100644 --- a/src/z2ui5_cl_demo_app_069.clas.abap +++ b/src/z2ui5_cl_demo_app_069.clas.abap @@ -50,9 +50,11 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. METHOD view_display_app_01. - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->page( title = `APP_01` ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->page( title = `APP_01` ). page->button( text = 'Update this view' press = client->_event( 'UPDATE_DETAIL' ) ). @@ -68,9 +70,11 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. METHOD view_display_app_02. - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->page( title = `APP_02` ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->page( title = `APP_02` ). page->button( text = 'Update this view' press = client->_event( 'UPDATE_DETAIL' ) @@ -102,9 +106,11 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. METHOD view_display_master. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Master-Detail View with Nested Views' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true @@ -115,15 +121,19 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. )->link( )->get_parent( ). - DATA(lr_master) = page->flexible_column_layout( layout = 'TwoColumnsBeginExpanded' + DATA lr_master TYPE REF TO z2ui5_cl_xml_view. + lr_master = page->flexible_column_layout( layout = 'TwoColumnsBeginExpanded' id ='test' )->begin_column_pages( ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${TEXT}` INTO TABLE temp1. lr_master->tree( items = client->_bind( mt_tree ) )->items( )->standard_tree_item( type = 'Active' title = '{TEXT}' press = client->_event( val = `EVENT_ITEM` - t_arg = VALUE #( ( `${TEXT}` ) ) ) ). + t_arg = temp1 ) ). client->view_display( page->stringify( ) ). @@ -137,20 +147,52 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - mt_tree = VALUE #( ( text = 'Apps' - nodes = VALUE #( ( text = 'Frontend' - nodes = VALUE #( ( text = 'App_001' ) - ( text = 'App_002' ) - ) ) ) ) - ( text = 'Configuration' - nodes = VALUE #( ( text = 'User Interface' - nodes = VALUE #( ( text = 'Theme' ) - ( text = 'Library' ) - ) ) - ( text = 'Database' - nodes = VALUE #( ( text = 'HANA' ) - ( text = 'ANY DB' ) - ) ) ) ) ). + DATA temp3 TYPE z2ui5_cl_demo_app_069=>ty_t_tree. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-text = 'Apps'. + DATA temp1 TYPE z2ui5_cl_demo_app_069=>ty_t_tree1-nodes. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-text = 'Frontend'. + DATA temp9 TYPE z2ui5_cl_demo_app_069=>ty_t_tree2-nodes. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-text = 'App_001'. + INSERT temp10 INTO TABLE temp9. + temp10-text = 'App_002'. + INSERT temp10 INTO TABLE temp9. + temp2-nodes = temp9. + INSERT temp2 INTO TABLE temp1. + temp4-nodes = temp1. + INSERT temp4 INTO TABLE temp3. + temp4-text = 'Configuration'. + DATA temp7 TYPE z2ui5_cl_demo_app_069=>ty_t_tree1-nodes. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-text = 'User Interface'. + DATA temp11 TYPE z2ui5_cl_demo_app_069=>ty_t_tree2-nodes. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-text = 'Theme'. + INSERT temp12 INTO TABLE temp11. + temp12-text = 'Library'. + INSERT temp12 INTO TABLE temp11. + temp8-nodes = temp11. + INSERT temp8 INTO TABLE temp7. + temp8-text = 'Database'. + DATA temp13 TYPE z2ui5_cl_demo_app_069=>ty_t_tree2-nodes. + CLEAR temp13. + DATA temp14 LIKE LINE OF temp13. + temp14-text = 'HANA'. + INSERT temp14 INTO TABLE temp13. + temp14-text = 'ANY DB'. + INSERT temp14 INTO TABLE temp13. + temp8-nodes = temp13. + INSERT temp8 INTO TABLE temp7. + temp4-nodes = temp7. + INSERT temp4 INTO TABLE temp3. + mt_tree = temp3. view_display_master( ). @@ -162,8 +204,17 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. view_display_app_01( ). WHEN `EVENT_ITEM`. - DATA(lt_arg) = client->get( )-t_event_arg. - CASE lt_arg[ 1 ]. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + DATA temp5 LIKE LINE OF lt_arg. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + CASE temp5. WHEN 'App_001'. view_display_app_01( ). WHEN 'App_002'. @@ -171,8 +222,12 @@ CLASS Z2UI5_CL_DEMO_APP_069 IMPLEMENTATION. ENDCASE. WHEN `NEST_TEST`. - mv_check_enabled_01 = xsdbool( mv_check_enabled_01 = abap_false ). - mv_check_enabled_02 = xsdbool( mv_check_enabled_01 = abap_false ). + DATA temp15 TYPE xsdboolean. + temp15 = boolc( mv_check_enabled_01 = abap_false ). + mv_check_enabled_01 = temp15. + DATA temp16 TYPE xsdboolean. + temp16 = boolc( mv_check_enabled_01 = abap_false ). + mv_check_enabled_02 = temp16. client->nest_view_model_update( ). diff --git a/src/z2ui5_cl_demo_app_070.clas.abap b/src/z2ui5_cl_demo_app_070.clas.abap index 3d10b76e..f40c715a 100644 --- a/src/z2ui5_cl_demo_app_070.clas.abap +++ b/src/z2ui5_cl_demo_app_070.clas.abap @@ -22,7 +22,7 @@ CLASS z2ui5_cl_demo_app_070 DEFINITION process TYPE string, process_state TYPE string, END OF ty_s_tab . - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_filter_pop, @@ -94,7 +94,8 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. z2ui5_set_search( ). client->view_model_update( ). WHEN 'SORT'. - DATA(lt_arg) = client->get( )-t_event_arg. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. client->message_toast_display( 'Event SORT' ). WHEN 'FILTER'. lt_arg = client->get( )-t_event_arg. @@ -110,7 +111,8 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. client->nav_app_leave( ). WHEN 'ROWEDIT'. lt_arg = client->get( )-t_event_arg. - READ TABLE lt_arg INTO DATA(ls_arg) INDEX 1. + DATA ls_arg TYPE string. + READ TABLE lt_arg INTO ls_arg INDEX 1. IF sy-subrc = 0. client->message_toast_display( |Event ROWEDIT Row Index { ls_arg } | ). ENDIF. @@ -133,35 +135,65 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. METHOD z2ui5_on_init. - mt_mapping = VALUE #( - ( n = `EQ` v = `={LOW}` ) - ( n = `LT` v = `<{LOW}` ) - ( n = `LE` v = `<={LOW}` ) - ( n = `GT` v = `>{LOW}` ) - ( n = `GE` v = `>={LOW}` ) - ( n = `CP` v = `*{LOW}*` ) - ( n = `BT` v = `{LOW}...{HIGH}` ) - ( n = `NE` v = `!(={LOW})` ) - ( n = `NE` v = `!()` ) - ( n = `` v = `` ) ). - - DATA(view) = z2ui5_cl_xml_view=>factory( ). - - DATA(page1) = view->page( id = `page_main` + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = `EQ`. + temp2-v = `={LOW}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `LT`. + temp2-v = `<{LOW}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `LE`. + temp2-v = `<={LOW}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `GT`. + temp2-v = `>{LOW}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `GE`. + temp2-v = `>={LOW}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `CP`. + temp2-v = `*{LOW}*`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `BT`. + temp2-v = `{LOW}...{HIGH}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `NE`. + temp2-v = `!(={LOW})`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `NE`. + temp2-v = `!()`. + INSERT temp2 INTO TABLE temp1. + temp2-n = ``. + temp2-v = ``. + INSERT temp2 INTO TABLE temp1. + mt_mapping = temp1. + + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + + DATA page1 TYPE REF TO z2ui5_cl_xml_view. + DATA temp5 TYPE xsdboolean. + temp5 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page1 = view->page( id = `page_main` title = 'abap2UI5 - sap.ui.table.Table Features' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp5 class = 'sapUiContentPadding' ). - DATA(page) = page1->dynamic_page( headerexpanded = abap_true + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = page1->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). - DATA(header_title) = page->title( ns = 'f' )->get( )->dynamic_page_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). header_title->heading( ns = 'f' )->hbox( )->title( `Search Field` ). header_title->expanded_content( 'f' ). header_title->snapped_content( ns = 'f' ). - DATA(lo_box) = page->header( )->dynamic_page_header( pinnable = abap_true + DATA lo_box TYPE REF TO z2ui5_cl_xml_view. + lo_box = page->header( )->dynamic_page_header( pinnable = abap_true )->flex_box( alignitems = `Start` justifycontent = `SpaceBetween` )->flex_box( alignitems = `Start` ). @@ -178,9 +210,11 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. press = client->_event( `BUTTON_START` ) type = `Emphasized` ). - DATA(cont) = page->content( ns = 'f' ). + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->content( ns = 'f' ). - DATA(tab) = cont->ui_table( rows = client->_bind( val = mt_table ) + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = cont->ui_table( rows = client->_bind( val = mt_table ) editable = abap_false alternaterowcolors = abap_true rowactioncount = '2' @@ -191,7 +225,8 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. filter = client->_event( 'FILTER' ) customfilter = client->_event( 'CUSTOMFILTER' ) ). tab->ui_extension( )->overflow_toolbar( )->title( text = 'Products' ). - DATA(lo_columns) = tab->ui_columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->ui_columns( ). lo_columns->ui_column( width = '4rem' )->checkbox( selected = client->_bind_edit( lv_selkz ) enabled = abap_true select = client->_event( val = `SELKZ` ) )->ui_template( )->checkbox( selected = `{SELKZ}` ). @@ -229,12 +264,18 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. sortproperty = 'PRICE' filterproperty = 'PRICE' )->text( text = `Price` )->ui_template( )->currency( value = `{PRICE}` currency = `{WAERS}` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${ROW_ID}` INTO TABLE temp3. + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${ROW_ID}` INTO TABLE temp4. lo_columns->get_parent( )->ui_row_action_template( )->ui_row_action( )->ui_row_action_item( type = 'Navigation' - press = client->_event( val = 'ROW_ACTION_ITEM_NAVIGATION' t_arg = VALUE #( ( `${ROW_ID}` ) ) ) + press = client->_event( val = 'ROW_ACTION_ITEM_NAVIGATION' t_arg = temp3 ) )->get_parent( )->ui_row_action_item( icon = 'sap-icon://edit' text = 'Edit' - press = client->_event( val = 'ROW_ACTION_ITEM_EDIT' t_arg = VALUE #( ( `${ROW_ID}` ) ) ) ). + press = client->_event( val = 'ROW_ACTION_ITEM_EDIT' t_arg = temp4 ) ). client->view_display( view->stringify( ) ). @@ -244,13 +285,88 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( selkz = abap_false row_id = '1' product = 'table' create_date = `01.01.2023` create_by = `Olaf` storage_location = `AREA_001` quantity = 400 meins = 'ST' price = '1000.50' waers = 'EUR' process = '10' process_state = 'None' ) - ( selkz = abap_false row_id = '2' product = 'chair' create_date = `01.01.2022` create_by = `Karlo` storage_location = `AREA_001` quantity = 123 meins = 'ST' price = '2000.55' waers = 'USD' process = '20' process_state = 'Warning' ) - ( selkz = abap_false row_id = '3' product = 'sofa' create_date = `01.05.2021` create_by = `Elin` storage_location = `AREA_002` quantity = 700 meins = 'ST' price = '3000.11' waers = 'CNY' process = '30' process_state = 'Success' ) - ( selkz = abap_false row_id = '4' product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_002` quantity = 200 meins = 'ST' price = '4000.88' waers = 'USD' process = '40' process_state = 'Information' ) - ( selkz = abap_false row_id = '5' product = 'printer' create_date = `01.01.2023` create_by = `Renate` storage_location = `AREA_003` quantity = 90 meins = 'ST' price = '5000.47' waers = 'EUR' process = '70' process_state = 'Warning' ) - ( selkz = abap_false row_id = '6' product = 'table2' create_date = `01.01.2023` create_by = `Angela` storage_location = `AREA_003` quantity = 110 meins = 'ST' price = '6000.33' waers = 'GBP' process = '90' process_state = 'Error' ) ). + DATA temp5 TYPE z2ui5_cl_demo_app_070=>ty_t_table. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-selkz = abap_false. + temp6-row_id = '1'. + temp6-product = 'table'. + temp6-create_date = `01.01.2023`. + temp6-create_by = `Olaf`. + temp6-storage_location = `AREA_001`. + temp6-quantity = 400. + temp6-meins = 'ST'. + temp6-price = '1000.50'. + temp6-waers = 'EUR'. + temp6-process = '10'. + temp6-process_state = 'None'. + INSERT temp6 INTO TABLE temp5. + temp6-selkz = abap_false. + temp6-row_id = '2'. + temp6-product = 'chair'. + temp6-create_date = `01.01.2022`. + temp6-create_by = `Karlo`. + temp6-storage_location = `AREA_001`. + temp6-quantity = 123. + temp6-meins = 'ST'. + temp6-price = '2000.55'. + temp6-waers = 'USD'. + temp6-process = '20'. + temp6-process_state = 'Warning'. + INSERT temp6 INTO TABLE temp5. + temp6-selkz = abap_false. + temp6-row_id = '3'. + temp6-product = 'sofa'. + temp6-create_date = `01.05.2021`. + temp6-create_by = `Elin`. + temp6-storage_location = `AREA_002`. + temp6-quantity = 700. + temp6-meins = 'ST'. + temp6-price = '3000.11'. + temp6-waers = 'CNY'. + temp6-process = '30'. + temp6-process_state = 'Success'. + INSERT temp6 INTO TABLE temp5. + temp6-selkz = abap_false. + temp6-row_id = '4'. + temp6-product = 'computer'. + temp6-create_date = `27.01.2023`. + temp6-create_by = `Theo`. + temp6-storage_location = `AREA_002`. + temp6-quantity = 200. + temp6-meins = 'ST'. + temp6-price = '4000.88'. + temp6-waers = 'USD'. + temp6-process = '40'. + temp6-process_state = 'Information'. + INSERT temp6 INTO TABLE temp5. + temp6-selkz = abap_false. + temp6-row_id = '5'. + temp6-product = 'printer'. + temp6-create_date = `01.01.2023`. + temp6-create_by = `Renate`. + temp6-storage_location = `AREA_003`. + temp6-quantity = 90. + temp6-meins = 'ST'. + temp6-price = '5000.47'. + temp6-waers = 'EUR'. + temp6-process = '70'. + temp6-process_state = 'Warning'. + INSERT temp6 INTO TABLE temp5. + temp6-selkz = abap_false. + temp6-row_id = '6'. + temp6-product = 'table2'. + temp6-create_date = `01.01.2023`. + temp6-create_by = `Angela`. + temp6-storage_location = `AREA_003`. + temp6-quantity = 110. + temp6-meins = 'ST'. + temp6-price = '6000.33'. + temp6-waers = 'GBP'. + temp6-process = '90'. + temp6-process_state = 'Error'. + INSERT temp6 INTO TABLE temp5. + mt_table = temp5. ENDMETHOD. @@ -259,11 +375,16 @@ CLASS z2ui5_cl_demo_app_070 IMPLEMENTATION. IF mv_search_value IS NOT INITIAL. - LOOP AT mt_table REFERENCE INTO DATA(lr_row). - DATA(lv_row) = ``. - DATA(lv_index) = 1. + DATA temp7 LIKE LINE OF mt_table. + DATA lr_row LIKE REF TO temp7. + LOOP AT mt_table REFERENCE INTO lr_row. + DATA lv_row TYPE string. + lv_row = ``. + DATA lv_index TYPE i. + lv_index = 1. DO. - ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO . IF sy-subrc <> 0. EXIT. ENDIF. diff --git a/src/z2ui5_cl_demo_app_071.clas.abap b/src/z2ui5_cl_demo_app_071.clas.abap index ea1e3367..a2bf6d6a 100644 --- a/src/z2ui5_cl_demo_app_071.clas.abap +++ b/src/z2ui5_cl_demo_app_071.clas.abap @@ -9,7 +9,7 @@ CLASS z2ui5_cl_demo_app_071 DEFINITION PUBLIC. key TYPE string, text TYPE string, END OF s_combobox. - TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY. + TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH DEFAULT KEY. DATA mv_set_size_limit TYPE i VALUE 100. DATA mv_combo_number TYPE i VALUE 105. @@ -28,9 +28,15 @@ CLASS z2ui5_cl_demo_app_071 IMPLEMENTATION. CASE client->get( )-event. WHEN `UPDATE`. + DATA temp1 TYPE string_table. + CLEAR temp1. + DATA temp2 TYPE string. + temp2 = mv_set_size_limit. + INSERT temp2 INTO TABLE temp1. + INSERT client->cs_view-main INTO TABLE temp1. client->follow_up_action( client->_event_client( val = `SET_SIZE_LIMIT` - t_arg = VALUE #( ( CONV #( mv_set_size_limit ) ) ( client->cs_view-main ) ) + t_arg = temp1 ) ). client->view_model_update( ). client->message_toast_display( `SizeLimitUpdated` ). @@ -43,17 +49,27 @@ CLASS z2ui5_cl_demo_app_071 IMPLEMENTATION. - DATA(lt_combo) = VALUE ty_t_combo( ). + DATA temp3 TYPE ty_t_combo. + CLEAR temp3. + DATA lt_combo LIKE temp3. + lt_combo = temp3. DO mv_combo_number TIMES. - INSERT VALUE #( key = sy-index text = sy-index ) INTO TABLE lt_combo. + DATA temp4 TYPE z2ui5_cl_demo_app_071=>s_combobox. + CLEAR temp4. + temp4-key = sy-index. + temp4-text = sy-index. + INSERT temp4 INTO TABLE lt_combo. ENDDO. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp5 TYPE xsdboolean. + temp5 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( val = view->shell( )->page( title = 'abap2UI5 - First Example' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp5 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' )->title( 'Input' diff --git a/src/z2ui5_cl_demo_app_072.clas.abap b/src/z2ui5_cl_demo_app_072.clas.abap index cb829958..370f0283 100644 --- a/src/z2ui5_cl_demo_app_072.clas.abap +++ b/src/z2ui5_cl_demo_app_072.clas.abap @@ -24,7 +24,7 @@ CLASS z2ui5_cl_demo_app_072 DEFINITION rating TYPE string, END OF ty_s_tab . TYPES - ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY . + ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY . DATA mt_table TYPE ty_t_table . DATA lv_cnt_total TYPE i . @@ -84,18 +84,28 @@ CLASS Z2UI5_CL_DEMO_APP_072 IMPLEMENTATION. METHOD z2ui5_on_init. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( id = `page_main` - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( id = `page_main` + showheader = temp2 title = 'abap2UI5 - IconTabBar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp3 class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${LV_SELECTEDKEY}` INTO TABLE temp1. + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( lv_selectedkey ) - select = client->_event( val = 'OnSelectIconTabBar' t_arg = VALUE #( ( `${LV_SELECTEDKEY}` ) ) ) )->items( ). + select = client->_event( val = 'OnSelectIconTabBar' t_arg = temp1 ) )->items( ). lo_items->icon_tab_filter( count = client->_bind_edit( lv_cnt_total ) text = 'Products' key = 'ALL' @@ -117,7 +127,8 @@ CLASS Z2UI5_CL_DEMO_APP_072 IMPLEMENTATION. text = 'Overweight' key = 'OVERWEIGHT' ). - DATA(tab) = page->scroll_container( height = '70%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->scroll_container( height = '70%' vertical = abap_true )->table( inset = abap_false @@ -164,22 +175,133 @@ CLASS Z2UI5_CL_DEMO_APP_072 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( productid = '1' productname = 'table' suppliername = 'Company 1' width = '10' depth = '20' height = '30' dimunit = 'CM' measure = 100 unit = 'ST' price = '1000.50' waers = 'EUR' state_price = `Success` rating = '0' state_measure = `Warning` ) - ( productid = '2' productname = 'chair' suppliername = 'Company 2' width = '10' depth = '20' height = '30' dimunit = 'CM' measure = 123 unit = 'ST' price = '2000.55' waers = 'USD' state_price = `Error` rating = '1' state_measure = `Warning` ) - ( productid = '3' productname = 'sofa' suppliername = 'Company 3' width = '10' depth = '20' height = '30' dimunit = 'CM' measure = 700 unit = 'ST' price = '3000.11' waers = 'CNY' state_price = `Success` rating = '2' state_measure = - `Warning` ) - ( productid = '4' productname = 'computer' suppliername = 'Company 4' width = '10' depth = '20' height = '30' dimunit = 'CM' measure = 200 unit = 'ST' price = '4000.88' waers = 'USD' state_price = `Success` rating = '3' state_measure = - `Success` ) - ( productid = '5' productname = 'printer' suppliername = 'Company 5' width = '10' depth = '20' height = '30' dimunit = 'CM' measure = 90 unit = 'ST' price = '5000.47' waers = 'EUR' state_price = `Error` rating = '4' state_measure = - `Warning` ) - ( productid = '6' productname = 'table2' suppliername = 'Company 6' width = '10' depth = '20' height = '30' dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Success` rating = '5' state_measure = - `Information` ) ). + DATA temp3 TYPE z2ui5_cl_demo_app_072=>ty_t_table. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-productid = '1'. + temp4-productname = 'table'. + temp4-suppliername = 'Company 1'. + temp4-width = '10'. + temp4-depth = '20'. + temp4-height = '30'. + temp4-dimunit = 'CM'. + temp4-measure = 100. + temp4-unit = 'ST'. + temp4-price = '1000.50'. + temp4-waers = 'EUR'. + temp4-state_price = `Success`. + temp4-rating = '0'. + temp4-state_measure = `Warning`. + INSERT temp4 INTO TABLE temp3. + temp4-productid = '2'. + temp4-productname = 'chair'. + temp4-suppliername = 'Company 2'. + temp4-width = '10'. + temp4-depth = '20'. + temp4-height = '30'. + temp4-dimunit = 'CM'. + temp4-measure = 123. + temp4-unit = 'ST'. + temp4-price = '2000.55'. + temp4-waers = 'USD'. + temp4-state_price = `Error`. + temp4-rating = '1'. + temp4-state_measure = `Warning`. + INSERT temp4 INTO TABLE temp3. + temp4-productid = '3'. + temp4-productname = 'sofa'. + temp4-suppliername = 'Company 3'. + temp4-width = '10'. + temp4-depth = '20'. + temp4-height = '30'. + temp4-dimunit = 'CM'. + temp4-measure = 700. + temp4-unit = 'ST'. + temp4-price = '3000.11'. + temp4-waers = 'CNY'. + temp4-state_price = `Success`. + temp4-rating = '2'. + temp4-state_measure = +`Warning`. + INSERT temp4 INTO TABLE temp3. + temp4-productid = '4'. + temp4-productname = 'computer'. + temp4-suppliername = 'Company 4'. + temp4-width = '10'. + temp4-depth = '20'. + temp4-height = '30'. + temp4-dimunit = 'CM'. + temp4-measure = 200. + temp4-unit = 'ST'. + temp4-price = '4000.88'. + temp4-waers = 'USD'. + temp4-state_price = `Success`. + temp4-rating = '3'. + temp4-state_measure = +`Success`. + INSERT temp4 INTO TABLE temp3. + temp4-productid = '5'. + temp4-productname = 'printer'. + temp4-suppliername = 'Company 5'. + temp4-width = '10'. + temp4-depth = '20'. + temp4-height = '30'. + temp4-dimunit = 'CM'. + temp4-measure = 90. + temp4-unit = 'ST'. + temp4-price = '5000.47'. + temp4-waers = 'EUR'. + temp4-state_price = `Error`. + temp4-rating = '4'. + temp4-state_measure = +`Warning`. + INSERT temp4 INTO TABLE temp3. + temp4-productid = '6'. + temp4-productname = 'table2'. + temp4-suppliername = 'Company 6'. + temp4-width = '10'. + temp4-depth = '20'. + temp4-height = '30'. + temp4-dimunit = 'CM'. + temp4-measure = 600. + temp4-unit = 'ST'. + temp4-price = '6000.33'. + temp4-waers = 'GBP'. + temp4-state_price = `Success`. + temp4-rating = '5'. + temp4-state_measure = +`Information`. + INSERT temp4 INTO TABLE temp3. + mt_table = temp3. lv_cnt_total = lines( mt_table ). - lv_cnt_pos = REDUCE i( INIT i = 0 FOR wa IN mt_table WHERE ( measure > 0 AND measure <= 100 ) NEXT i = i + 1 ). - lv_cnt_heavy = REDUCE i( INIT j = 0 FOR wa IN mt_table WHERE ( measure > 100 AND measure <= 500 ) NEXT j = j + 1 ). - lv_cnt_neg = REDUCE i( INIT k = 0 FOR wa IN mt_table WHERE ( measure > 500 ) NEXT k = k + 1 ). + DATA temp1 TYPE i. + DATA i TYPE i. + i = 0. + DATA temp6 LIKE LINE OF mt_table. + LOOP AT mt_table INTO temp6 WHERE measure > 0 AND measure <= 100. + i = i + 1. + ENDLOOP. + temp1 = i. + lv_cnt_pos = temp1. + DATA temp2 TYPE i. + DATA j TYPE i. + j = 0. + DATA temp5 LIKE LINE OF mt_table. + LOOP AT mt_table INTO temp5 WHERE measure > 100 AND measure <= 500. + j = j + 1. + ENDLOOP. + temp2 = j. + lv_cnt_heavy = temp2. + DATA temp7 TYPE i. + DATA k TYPE i. + k = 0. + DATA wa LIKE LINE OF mt_table. + LOOP AT mt_table INTO wa WHERE measure > 500. + k = k + 1. + ENDLOOP. + temp7 = k. + lv_cnt_neg = temp7. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_073.clas.abap b/src/z2ui5_cl_demo_app_073.clas.abap index ccec7884..3af38ee5 100644 --- a/src/z2ui5_cl_demo_app_073.clas.abap +++ b/src/z2ui5_cl_demo_app_073.clas.abap @@ -23,17 +23,25 @@ CLASS z2ui5_cl_demo_app_073 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + + DATA temp1 TYPE string_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2 = `$` && client->_bind( mv_url ). + INSERT temp2 INTO TABLE temp1. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - First Example' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp3 )->_z2ui5( )->timer( checkactive = client->_bind( mv_check_timer_active ) finished = client->_event_client( val = client->cs_event-open_new_tab - t_arg = VALUE #( ( `$` && client->_bind( mv_url ) ) ) ) + t_arg = temp1 ) )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_074.clas.abap b/src/z2ui5_cl_demo_app_074.clas.abap index 51e95496..a8041a8b 100644 --- a/src/z2ui5_cl_demo_app_074.clas.abap +++ b/src/z2ui5_cl_demo_app_074.clas.abap @@ -39,11 +39,15 @@ CLASS z2ui5_cl_demo_app_074 IMPLEMENTATION. WHEN 'UPLOAD'. - SPLIT mv_value AT `;` INTO DATA(lv_dummy) DATA(lv_data). + DATA lv_dummy TYPE string. + DATA lv_data TYPE string. + SPLIT mv_value AT `;` INTO lv_dummy lv_data. SPLIT lv_data AT `,` INTO lv_dummy lv_data. - DATA(lv_data2) = z2ui5_cl_util=>conv_decode_x_base64( lv_data ). - DATA(lv_ready) = z2ui5_cl_util=>conv_get_string_by_xstring( lv_data2 ). + DATA lv_data2 TYPE xstring. + lv_data2 = z2ui5_cl_util=>conv_decode_x_base64( lv_data ). + DATA lv_ready TYPE string. + lv_ready = z2ui5_cl_util=>conv_get_string_by_xstring( lv_data2 ). mr_table = z2ui5_cl_util=>itab_get_itab_by_csv( lv_ready ). client->message_box_display( `CSV loaded to table` ). @@ -58,7 +62,8 @@ CLASS z2ui5_cl_demo_app_074 IMPLEMENTATION. ENDCASE. - CATCH cx_root INTO DATA(x). + DATA x TYPE REF TO cx_root. + CATCH cx_root INTO x. client->message_box_display( text = x->get_text( ) type = `error` ). ENDTRY. @@ -77,11 +82,15 @@ CLASS z2ui5_cl_demo_app_074 IMPLEMENTATION. METHOD ui5_view_main_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - CSV to ABAP internal Table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp3 ). FIELD-SYMBOLS TYPE table. IF mr_table IS NOT INITIAL. @@ -89,8 +98,15 @@ CLASS z2ui5_cl_demo_app_074 IMPLEMENTATION. ASSIGN mr_table->* TO . - DATA(tab) = page->table( - items = COND #( WHEN mv_check_edit = abap_true THEN client->_bind_edit( ) ELSE client->_bind_edit( ) ) + DATA temp1 TYPE string. + IF mv_check_edit = abap_true. + temp1 = client->_bind_edit( ). + ELSE. + temp1 = client->_bind_edit( ). + ENDIF. + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( + items = temp1 )->header_toolbar( )->overflow_toolbar( )->title( 'CSV Content' @@ -98,18 +114,24 @@ CLASS z2ui5_cl_demo_app_074 IMPLEMENTATION. )->get_parent( )->get_parent( ). - DATA(lr_fields) = z2ui5_cl_util=>rtti_get_t_attri_by_any( ). - DATA(lo_cols) = tab->columns( ). - LOOP AT lr_fields REFERENCE INTO DATA(lr_col). + DATA lr_fields TYPE abap_component_tab. + lr_fields = z2ui5_cl_util=>rtti_get_t_attri_by_any( ). + DATA lo_cols TYPE REF TO z2ui5_cl_xml_view. + lo_cols = tab->columns( ). + DATA temp2 LIKE LINE OF lr_fields. + DATA lr_col LIKE REF TO temp2. + LOOP AT lr_fields REFERENCE INTO lr_col. lo_cols->column( )->text( lr_col->name ). ENDLOOP. - DATA(lo_cells) = tab->items( )->column_list_item( )->cells( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( )->cells( ). LOOP AT lr_fields REFERENCE INTO lr_col. lo_cells->text( `{` && lr_col->name && `}` ). ENDLOOP. ENDIF. - DATA(footer) = page->footer( )->overflow_toolbar( ). + DATA footer TYPE REF TO z2ui5_cl_xml_view. + footer = page->footer( )->overflow_toolbar( ). footer->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) diff --git a/src/z2ui5_cl_demo_app_075.clas.abap b/src/z2ui5_cl_demo_app_075.clas.abap index 006c4f3b..9aba1d21 100644 --- a/src/z2ui5_cl_demo_app_075.clas.abap +++ b/src/z2ui5_cl_demo_app_075.clas.abap @@ -42,10 +42,13 @@ CLASS Z2UI5_CL_DEMO_APP_075 IMPLEMENTATION. WHEN 'UPLOAD'. - SPLIT mv_value AT `;` INTO DATA(lv_dummy) DATA(lv_data). + DATA lv_dummy TYPE string. + DATA lv_data TYPE string. + SPLIT mv_value AT `;` INTO lv_dummy lv_data. SPLIT lv_data AT `,` INTO lv_dummy lv_data. - DATA(lv_data2) = z2ui5_cl_util=>conv_decode_x_base64( lv_data ). + DATA lv_data2 TYPE xstring. + lv_data2 = z2ui5_cl_util=>conv_decode_x_base64( lv_data ). mv_file = z2ui5_cl_util=>conv_get_string_by_xstring( lv_data2 ). client->message_box_display( `CSV loaded to table` ). @@ -60,7 +63,8 @@ CLASS Z2UI5_CL_DEMO_APP_075 IMPLEMENTATION. ENDCASE. - CATCH cx_root INTO DATA(x). + DATA x TYPE REF TO cx_root. + CATCH cx_root INTO x. client->message_box_display( text = x->get_text( ) type = `error` ). ENDTRY. @@ -84,11 +88,15 @@ CLASS Z2UI5_CL_DEMO_APP_075 IMPLEMENTATION. METHOD ui5_view_main_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Upload Files' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). IF mv_file IS NOT INITIAL. @@ -98,7 +106,8 @@ CLASS Z2UI5_CL_DEMO_APP_075 IMPLEMENTATION. ENDIF. - DATA(footer) = page->footer( )->overflow_toolbar( ). + DATA footer TYPE REF TO z2ui5_cl_xml_view. + footer = page->footer( )->overflow_toolbar( ). footer->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) diff --git a/src/z2ui5_cl_demo_app_076.clas.abap b/src/z2ui5_cl_demo_app_076.clas.abap index 178c6b0b..59a92ed7 100644 --- a/src/z2ui5_cl_demo_app_076.clas.abap +++ b/src/z2ui5_cl_demo_app_076.clas.abap @@ -86,19 +86,28 @@ CLASS Z2UI5_CL_DEMO_APP_076 IMPLEMENTATION. METHOD z2ui5_on_init. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - - view->_generic_property( VALUE #( n = `core:require` v = `{Helper:'z2ui5/Util'}` ) ). - - DATA(page) = view->page( id = `page_main` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + + DATA temp1 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp1. + temp1-n = `core:require`. + temp1-v = `{Helper:'z2ui5/Util'}`. + view->_generic_property( temp1 ). + + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'abap2UI5 - Gantt' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp2 class = 'sapUiContentPadding' ). - DATA(gantt) = page->gantt_chart_container( + DATA gantt TYPE REF TO z2ui5_cl_xml_view. + gantt = page->gantt_chart_container( )->gantt_chart_with_table( id = `gantt` shapeselectionmode = `Single` )->axis_time_strategy( @@ -136,14 +145,41 @@ CLASS Z2UI5_CL_DEMO_APP_076 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( children = VALUE #( ( id = `line` - text = `Level 1` - task = VALUE #( ( id = `rectangle1` starttime = `2018-11-01T09:00:00` endtime = `2018-11-27T09:00:00` - ) ) - children = VALUE #( ( id = `line2` text = `Level 2` - subtask = VALUE #( ( id = `chevron1` starttime = `2018-11-01T09:00:00` endtime = `2018-11-13T09:00:00` ) - ( id = `chevron2` starttime = `2018-11-15T09:00:00` endtime = `2018-11-27T09:00:00` ) ) - ) ) ) ) ). + CLEAR mt_table. + DATA temp1 TYPE z2ui5_cl_demo_app_076=>tt_children2. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = `line`. + temp2-text = `Level 1`. + DATA temp3 TYPE z2ui5_cl_demo_app_076=>tt_task3. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-id = `rectangle1`. + temp4-starttime = `2018-11-01T09:00:00`. + temp4-endtime = `2018-11-27T09:00:00`. + INSERT temp4 INTO TABLE temp3. + temp2-task = temp3. + DATA temp5 TYPE z2ui5_cl_demo_app_076=>tt_children4. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-id = `line2`. + temp6-text = `Level 2`. + DATA temp7 TYPE z2ui5_cl_demo_app_076=>tt_subtask5. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-id = `chevron1`. + temp8-starttime = `2018-11-01T09:00:00`. + temp8-endtime = `2018-11-13T09:00:00`. + INSERT temp8 INTO TABLE temp7. + temp8-id = `chevron2`. + temp8-starttime = `2018-11-15T09:00:00`. + temp8-endtime = `2018-11-27T09:00:00`. + INSERT temp8 INTO TABLE temp7. + temp6-subtask = temp7. + INSERT temp6 INTO TABLE temp5. + temp2-children = temp5. + INSERT temp2 INTO TABLE temp1. + mt_table-children = temp1. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_078.clas.abap b/src/z2ui5_cl_demo_app_078.clas.abap index 6532a8a6..ae4e525c 100644 --- a/src/z2ui5_cl_demo_app_078.clas.abap +++ b/src/z2ui5_cl_demo_app_078.clas.abap @@ -16,9 +16,12 @@ CLASS z2ui5_cl_demo_app_078 DEFINITION END OF ty_s_token. DATA mv_value TYPE string. - DATA mt_token TYPE STANDARD TABLE OF ty_s_token WITH EMPTY KEY. - DATA mt_tokens_added TYPE STANDARD TABLE OF ty_s_token WITH EMPTY KEY. - DATA mt_tokens_removed TYPE STANDARD TABLE OF ty_s_token WITH EMPTY KEY. + TYPES temp1_b1e501edeb TYPE STANDARD TABLE OF ty_s_token WITH DEFAULT KEY. +DATA mt_token TYPE temp1_b1e501edeb. + TYPES temp2_b1e501edeb TYPE STANDARD TABLE OF ty_s_token WITH DEFAULT KEY. +DATA mt_tokens_added TYPE temp2_b1e501edeb. + TYPES temp3_b1e501edeb TYPE STANDARD TABLE OF ty_s_token WITH DEFAULT KEY. +DATA mt_tokens_removed TYPE temp3_b1e501edeb. DATA check_initialized TYPE abap_bool. PROTECTED SECTION. PRIVATE SECTION. @@ -34,12 +37,15 @@ CLASS z2ui5_cl_demo_app_078 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Select-Options' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). view->_z2ui5( )->multiinput_ext( addedtokens = client->_bind_edit( mt_tokens_added ) @@ -58,7 +64,8 @@ CLASS z2ui5_cl_demo_app_078 IMPLEMENTATION. selected = `{SELKZ}` editable = `{EDITABLE}` ). - DATA(tab) = view->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = view->table( items = client->_bind_edit( mt_token ) mode = 'MultiSelect' ). @@ -84,12 +91,19 @@ CLASS z2ui5_cl_demo_app_078 IMPLEMENTATION. WHEN 'UPDATE_BACKEND'. - LOOP AT mt_tokens_removed INTO DATA(ls_token). + DATA ls_token LIKE LINE OF mt_tokens_removed. + LOOP AT mt_tokens_removed INTO ls_token. DELETE mt_token WHERE key = ls_token-key. ENDLOOP. LOOP AT mt_tokens_added INTO ls_token. - INSERT VALUE #( key = ls_token-key text = ls_token-text visible = abap_true editable = abap_true ) INTO TABLE mt_token. + DATA temp1 TYPE z2ui5_cl_demo_app_078=>ty_s_token. + CLEAR temp1. + temp1-key = ls_token-key. + temp1-text = ls_token-text. + temp1-visible = abap_true. + temp1-editable = abap_true. + INSERT temp1 INTO TABLE mt_token. ENDLOOP. CLEAR mt_tokens_removed. diff --git a/src/z2ui5_cl_demo_app_079.clas.abap b/src/z2ui5_cl_demo_app_079.clas.abap index 6e1bcd14..c1aab4f7 100644 --- a/src/z2ui5_cl_demo_app_079.clas.abap +++ b/src/z2ui5_cl_demo_app_079.clas.abap @@ -52,15 +52,24 @@ CLASS z2ui5_cl_demo_app_079 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'PDF Output' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = `src`. + temp2-v = get_example_pdf( ). + INSERT temp2 INTO TABLE temp1. + temp2-n = `height`. + temp2-v = `90%`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `width`. + temp2-v = `90%`. + INSERT temp2 INTO TABLE temp1. + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'PDF Output' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true )->_generic( ns = `html` name = `iframe` - t_prop = VALUE #( - ( n = `src` v = get_example_pdf( ) ) - ( n = `height` v = `90%` ) - ( n = `width` v = `90%` ) - ) ). + t_prop = temp1 ). client->view_display( view->stringify( ) ). diff --git a/src/z2ui5_cl_demo_app_080.clas.abap b/src/z2ui5_cl_demo_app_080.clas.abap index 88200730..81f87fef 100644 --- a/src/z2ui5_cl_demo_app_080.clas.abap +++ b/src/z2ui5_cl_demo_app_080.clas.abap @@ -35,7 +35,8 @@ CLASS z2ui5_cl_demo_app_080 DEFINITION headers TYPE TABLE OF ty_s_headers WITH NON-UNIQUE DEFAULT KEY, END OF ty_s_people . - DATA mt_people TYPE STANDARD TABLE OF ty_s_people. + TYPES temp1_813550bafa TYPE STANDARD TABLE OF ty_s_people. +DATA mt_people TYPE temp1_813550bafa. PROTECTED SECTION. @@ -56,28 +57,44 @@ CLASS Z2UI5_CL_DEMO_APP_080 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(lv_s_date) = '2023-04-22T08:15:00'. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - - view->_generic_property( VALUE #( n = `core:require` v = `{Helper:'z2ui5/Util'}` ) ). - - DATA(page) = view->page( id = `page_main` + DATA lv_s_date TYPE c LENGTH 19. + lv_s_date = '2023-04-22T08:15:00'. + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + + DATA temp1 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp1. + temp1-n = `core:require`. + temp1-v = `{Helper:'z2ui5/Util'}`. + view->_generic_property( temp1 ). + + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'abap2UI5 - Planning Calendar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp3 class = 'sapUiContentPadding' ). - DATA(lo_vbox) = page->vbox( class ='sapUiSmallMargin' ). + DATA lo_vbox TYPE REF TO z2ui5_cl_xml_view. + lo_vbox = page->vbox( class ='sapUiSmallMargin' ). - DATA(lo_planningcalendar) = lo_vbox->planning_calendar( + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${$parameters>/appointment/mProperties/title}` INTO TABLE temp2. + DATA lo_planningcalendar TYPE REF TO z2ui5_cl_xml_view. + lo_planningcalendar = lo_vbox->planning_calendar( startdate = `{= Helper.DateCreateObject($` && client->_bind_local( lv_s_date ) && ') }' rows = `{path: '` && client->_bind_local( val = mt_people path = abap_true ) && `'}` - appointmentselect = client->_event( val = 'AppSelected' t_arg = VALUE #( ( `${$parameters>/appointment/mProperties/title}`) ) ) + appointmentselect = client->_event( val = 'AppSelected' t_arg = temp2 ) showweeknumbers = abap_true ). - DATA(lo_rows) = lo_planningcalendar->rows( ). - DATA(lo_planningcalendarrow) = lo_rows->planning_calendar_row( + DATA lo_rows TYPE REF TO z2ui5_cl_xml_view. + lo_rows = lo_planningcalendar->rows( ). + DATA lo_planningcalendarrow TYPE REF TO z2ui5_cl_xml_view. + lo_planningcalendarrow = lo_rows->planning_calendar_row( appointments = `{path:'APPOINTMENTS', templateShareable: false}` icon = '{PIC}' title = '{NAME}' @@ -126,8 +143,17 @@ CLASS Z2UI5_CL_DEMO_APP_080 IMPLEMENTATION. METHOD z2ui5_on_event. CASE client->get( )-event. WHEN 'AppSelected'. - DATA(ls_client) = client->get( ). - client->message_toast_display( |Event AppSelected with appointment { ls_client-t_event_arg[ 1 ] }| ). + DATA ls_client TYPE z2ui5_if_types=>ty_s_get. + ls_client = client->get( ). + DATA temp4 LIKE LINE OF ls_client-t_event_arg. + DATA temp5 LIKE sy-tabix. + temp5 = sy-tabix. + READ TABLE ls_client-t_event_arg INDEX 1 INTO temp4. + sy-tabix = temp5. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_toast_display( |Event AppSelected with appointment { temp4 }| ). WHEN 'BACK'. client->nav_app_leave( ). ENDCASE. @@ -135,22 +161,105 @@ CLASS Z2UI5_CL_DEMO_APP_080 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_people = VALUE #( - ( name = 'Olaf' role = 'Team Member' pic = 'sap-icon://employee' - appointments = VALUE #( - ( start = '2023-04-22T08:15:00' end = '2023-04-23T08:15:00' info = 'Mittag1' type = 'Type01' title = 'App1' tentative = abap_false pic = 'sap-icon://sap-ui5' ) - ( start = '2023-04-25T10:30:00' end = '2023-04-26T11:30:00' info = 'Mittag2' type = 'Type02' title = 'App2' tentative = abap_false pic = 'sap-icon://sap-ui5' ) - ( start = '2023-04-10T10:30:00' end = '2023-04-11T11:30:00' info = 'Mittag3' type = 'Type03' title = 'App3' tentative = abap_false pic = 'sap-icon://sap-ui5' ) ) - headers = VALUE #( - ( start = '2020-04-22T08:15:00' end = '2020-04-23T08:15:00' type = 'Type11' title = 'Reminder1' tentative = abap_true ) - ( start = '2020-04-25T10:30:00' end = '2020-04-26T11:30:00' type = 'Type12' title = 'Reminder2' tentative = abap_false ) ) ) - ( name = 'Stefanie' role = 'Team Member' pic = 'sap-icon://employee' - appointments = VALUE #( - ( start = '2023-04-22T08:15:00' end = '2023-04-23T08:15:00' info = 'Mittag11' type = 'Type11' title = 'App11' tentative = abap_false pic = 'sap-icon://sap-ui5' ) - ( start = '2023-04-25T10:30:00' end = '2023-04-26T11:30:00' info = 'Mittag21' type = 'Type12' title = 'App12' tentative = abap_false pic = 'sap-icon://sap-ui5' ) - ( start = '2023-04-10T10:30:00' end = '2023-04-11T11:30:00' info = 'Mittag31' type = 'Type13' title = 'App13' tentative = abap_false pic = 'sap-icon://sap-ui5' ) ) - headers = VALUE #( - ( start = '2023-04-22T08:15:00' end = '2023-04-23T08:15:00' type = 'Type11' title = 'Reminder11' tentative = abap_true ) - ( start = '2023-04-25T10:30:00' end = '2023-04-26T11:30:00' type = 'Type12' title = 'Reminder21' tentative = abap_false ) ) ) ). + DATA temp6 LIKE mt_people. + CLEAR temp6. + DATA temp7 LIKE LINE OF temp6. + temp7-name = 'Olaf'. + temp7-role = 'Team Member'. + temp7-pic = 'sap-icon://employee'. + DATA temp1 TYPE z2ui5_cl_demo_app_080=>ty_s_people-appointments. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-start = '2023-04-22T08:15:00'. + temp2-end = '2023-04-23T08:15:00'. + temp2-info = 'Mittag1'. + temp2-type = 'Type01'. + temp2-title = 'App1'. + temp2-tentative = abap_false. + temp2-pic = 'sap-icon://sap-ui5'. + INSERT temp2 INTO TABLE temp1. + temp2-start = '2023-04-25T10:30:00'. + temp2-end = '2023-04-26T11:30:00'. + temp2-info = 'Mittag2'. + temp2-type = 'Type02'. + temp2-title = 'App2'. + temp2-tentative = abap_false. + temp2-pic = 'sap-icon://sap-ui5'. + INSERT temp2 INTO TABLE temp1. + temp2-start = '2023-04-10T10:30:00'. + temp2-end = '2023-04-11T11:30:00'. + temp2-info = 'Mittag3'. + temp2-type = 'Type03'. + temp2-title = 'App3'. + temp2-tentative = abap_false. + temp2-pic = 'sap-icon://sap-ui5'. + INSERT temp2 INTO TABLE temp1. + temp7-appointments = temp1. + DATA temp3 TYPE z2ui5_cl_demo_app_080=>ty_s_people-headers. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-start = '2020-04-22T08:15:00'. + temp4-end = '2020-04-23T08:15:00'. + temp4-type = 'Type11'. + temp4-title = 'Reminder1'. + temp4-tentative = abap_true. + INSERT temp4 INTO TABLE temp3. + temp4-start = '2020-04-25T10:30:00'. + temp4-end = '2020-04-26T11:30:00'. + temp4-type = 'Type12'. + temp4-title = 'Reminder2'. + temp4-tentative = abap_false. + INSERT temp4 INTO TABLE temp3. + temp7-headers = temp3. + INSERT temp7 INTO TABLE temp6. + temp7-name = 'Stefanie'. + temp7-role = 'Team Member'. + temp7-pic = 'sap-icon://employee'. + DATA temp5 TYPE z2ui5_cl_demo_app_080=>ty_s_people-appointments. + CLEAR temp5. + DATA temp8 LIKE LINE OF temp5. + temp8-start = '2023-04-22T08:15:00'. + temp8-end = '2023-04-23T08:15:00'. + temp8-info = 'Mittag11'. + temp8-type = 'Type11'. + temp8-title = 'App11'. + temp8-tentative = abap_false. + temp8-pic = 'sap-icon://sap-ui5'. + INSERT temp8 INTO TABLE temp5. + temp8-start = '2023-04-25T10:30:00'. + temp8-end = '2023-04-26T11:30:00'. + temp8-info = 'Mittag21'. + temp8-type = 'Type12'. + temp8-title = 'App12'. + temp8-tentative = abap_false. + temp8-pic = 'sap-icon://sap-ui5'. + INSERT temp8 INTO TABLE temp5. + temp8-start = '2023-04-10T10:30:00'. + temp8-end = '2023-04-11T11:30:00'. + temp8-info = 'Mittag31'. + temp8-type = 'Type13'. + temp8-title = 'App13'. + temp8-tentative = abap_false. + temp8-pic = 'sap-icon://sap-ui5'. + INSERT temp8 INTO TABLE temp5. + temp7-appointments = temp5. + DATA temp9 TYPE z2ui5_cl_demo_app_080=>ty_s_people-headers. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-start = '2023-04-22T08:15:00'. + temp10-end = '2023-04-23T08:15:00'. + temp10-type = 'Type11'. + temp10-title = 'Reminder11'. + temp10-tentative = abap_true. + INSERT temp10 INTO TABLE temp9. + temp10-start = '2023-04-25T10:30:00'. + temp10-end = '2023-04-26T11:30:00'. + temp10-type = 'Type12'. + temp10-title = 'Reminder21'. + temp10-tentative = abap_false. + INSERT temp10 INTO TABLE temp9. + temp7-headers = temp9. + INSERT temp7 INTO TABLE temp6. + mt_people = temp6. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_081.clas.abap b/src/z2ui5_cl_demo_app_081.clas.abap index cf859aea..eb38b9b9 100644 --- a/src/z2ui5_cl_demo_app_081.clas.abap +++ b/src/z2ui5_cl_demo_app_081.clas.abap @@ -15,7 +15,8 @@ CLASS z2ui5_cl_demo_app_081 DEFINITION PUBLIC. name TYPE string, END OF ty_tab. - DATA mt_tab TYPE STANDARD TABLE OF ty_tab WITH EMPTY KEY. + TYPES temp1_f7552d65b3 TYPE STANDARD TABLE OF ty_tab WITH DEFAULT KEY. +DATA mt_tab TYPE temp1_f7552d65b3. PROTECTED SECTION. @@ -42,7 +43,8 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->popover( title = 'Popover Title' placement = mv_placement @@ -67,7 +69,8 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. METHOD z2ui5_display_popover_list. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->popover( title = 'Popover Title' placement = mv_placement @@ -91,12 +94,15 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popover with List' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( 'Popover' )->content( 'form' )->title( 'Input' @@ -154,7 +160,8 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. CASE client->get( )-event. WHEN 'SEL_CHANGE'. - DATA(lt_sel) = mt_tab. + DATA lt_sel LIKE mt_tab. + lt_sel = mt_tab. DELETE lt_sel WHERE selected IS INITIAL. WHEN 'POPOVER_LIST'. @@ -185,11 +192,22 @@ CLASS Z2UI5_CL_DEMO_APP_081 IMPLEMENTATION. product = 'tomato'. quantity = '500'. - mt_tab = VALUE #( - ( id = `1` name = `name1` ) - ( id = `2` name = `name2` ) - ( id = `3` name = `name3` ) - ( id = `4` name = `name4` ) ). + DATA temp1 LIKE mt_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = `1`. + temp2-name = `name1`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `2`. + temp2-name = `name2`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `3`. + temp2-name = `name3`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `4`. + temp2-name = `name4`. + INSERT temp2 INTO TABLE temp1. + mt_tab = temp1. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_082.clas.abap b/src/z2ui5_cl_demo_app_082.clas.abap index 87417056..b22fd5cc 100644 --- a/src/z2ui5_cl_demo_app_082.clas.abap +++ b/src/z2ui5_cl_demo_app_082.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_082 DEFINITION PUBLIC. info TYPE string, checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_fc3eb0f31f TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_fc3eb0f31f. DATA mv_counter TYPE i. PROTECTED SECTION. @@ -57,7 +58,13 @@ CLASS Z2UI5_CL_DEMO_APP_082 IMPLEMENTATION. WHEN 'TIMER_FINISHED'. mv_counter = mv_counter + 1. - INSERT VALUE #( title = 'entry' && mv_counter info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) + DATA temp1 TYPE z2ui5_cl_demo_app_082=>ty_row. + CLEAR temp1. + temp1-title = 'entry' && mv_counter. + temp1-info = 'completed'. + temp1-descr = 'this is a description'. + temp1-icon = 'sap-icon://account'. + INSERT temp1 INTO TABLE t_tab. @@ -76,8 +83,15 @@ CLASS Z2UI5_CL_DEMO_APP_082 IMPLEMENTATION. mv_counter = 1. - t_tab = VALUE #( - ( title = 'entry' && mv_counter info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp2 LIKE t_tab. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-title = 'entry' && mv_counter. + temp3-info = 'completed'. + temp3-descr = 'this is a description'. + temp3-icon = 'sap-icon://account'. + INSERT temp3 INTO TABLE temp2. + t_tab = temp2. @@ -86,16 +100,20 @@ CLASS Z2UI5_CL_DEMO_APP_082 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). lo_view->_z2ui5( )->timer( finished = client->_event( `TIMER_FINISHED` ) delayms = `2000` checkrepeat = abap_true ). - DATA(page) = lo_view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = 'abap2UI5 - Roundtrip Speed Test' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->list( headertext = 'Data auto refresh (2 sec)' diff --git a/src/z2ui5_cl_demo_app_083.clas.abap b/src/z2ui5_cl_demo_app_083.clas.abap index 36ab8039..f1d36a2f 100644 --- a/src/z2ui5_cl_demo_app_083.clas.abap +++ b/src/z2ui5_cl_demo_app_083.clas.abap @@ -9,7 +9,8 @@ CLASS z2ui5_cl_demo_app_083 DEFINITION PUBLIC. screen_name TYPE string, END OF ty_s_tab_01. - DATA mt_01 TYPE STANDARD TABLE OF ty_s_tab_01 WITH EMPTY KEY. + TYPES temp1_ccb5cca2d1 TYPE STANDARD TABLE OF ty_s_tab_01 WITH DEFAULT KEY. +DATA mt_01 TYPE temp1_ccb5cca2d1. TYPES: BEGIN OF ty_s_tab_02, @@ -18,15 +19,18 @@ CLASS z2ui5_cl_demo_app_083 DEFINITION PUBLIC. field_doma TYPE string, END OF ty_s_tab_02. - DATA mt_02 TYPE STANDARD TABLE OF ty_s_tab_02 WITH EMPTY KEY. - DATA mt_02_display TYPE STANDARD TABLE OF ty_s_tab_02 WITH EMPTY KEY. + TYPES temp2_ccb5cca2d1 TYPE STANDARD TABLE OF ty_s_tab_02 WITH DEFAULT KEY. +DATA mt_02 TYPE temp2_ccb5cca2d1. + TYPES temp3_ccb5cca2d1 TYPE STANDARD TABLE OF ty_s_tab_02 WITH DEFAULT KEY. +DATA mt_02_display TYPE temp3_ccb5cca2d1. TYPES: BEGIN OF ty_s_tab_02_input, name TYPE string, value TYPE string, END OF ty_s_tab_02_input. - DATA mt_tab_02_input TYPE STANDARD TABLE OF ty_s_tab_02_input WITH EMPTY KEY. + TYPES temp4_ccb5cca2d1 TYPE STANDARD TABLE OF ty_s_tab_02_input WITH DEFAULT KEY. +DATA mt_tab_02_input TYPE temp4_ccb5cca2d1. TYPES: BEGIN OF ty_s_filter_pop, @@ -35,7 +39,8 @@ CLASS z2ui5_cl_demo_app_083 DEFINITION PUBLIC. high TYPE string, key TYPE string, END OF ty_s_filter_pop. - DATA mt_filter TYPE STANDARD TABLE OF ty_s_filter_pop WITH EMPTY KEY. + TYPES temp5_ccb5cca2d1 TYPE STANDARD TABLE OF ty_s_filter_pop WITH DEFAULT KEY. +DATA mt_filter TYPE temp5_ccb5cca2d1. TYPES: BEGIN OF ty_s_token, @@ -48,7 +53,8 @@ CLASS z2ui5_cl_demo_app_083 DEFINITION PUBLIC. DATA mv_value TYPE string. DATA mv_value2 TYPE string. - DATA mt_token TYPE STANDARD TABLE OF ty_s_token WITH EMPTY KEY. + TYPES temp6_ccb5cca2d1 TYPE STANDARD TABLE OF ty_s_token WITH DEFAULT KEY. +DATA mt_token TYPE temp6_ccb5cca2d1. DATA mt_mapping TYPE z2ui5_if_types=>ty_t_name_value. @@ -118,41 +124,61 @@ CLASS z2ui5_cl_demo_app_083 IMPLEMENTATION. WHEN `FILTER_VALUE_HELP_OK`. CLEAR ms_filter-product. - LOOP AT mt_filter REFERENCE INTO DATA(lr_filter). - INSERT VALUE #( - sign = `I` - option = lr_filter->option - low = lr_filter->low - high = lr_filter->high - ) INTO TABLE ms_filter-product. + DATA temp1 LIKE LINE OF mt_filter. + DATA lr_filter LIKE REF TO temp1. + LOOP AT mt_filter REFERENCE INTO lr_filter. + DATA temp2 LIKE LINE OF ms_filter-product. + CLEAR temp2. + temp2-sign = `I`. + temp2-option = lr_filter->option. + temp2-low = lr_filter->low. + temp2-high = lr_filter->high. + INSERT temp2 INTO TABLE ms_filter-product. ENDLOOP. client->popup_destroy( ). WHEN `POPUP_ADD`. - INSERT VALUE #( key = z2ui5_cl_util=>uuid_get_c32( ) ) INTO TABLE mt_filter. + DATA temp3 TYPE z2ui5_cl_demo_app_083=>ty_s_filter_pop. + CLEAR temp3. + temp3-key = z2ui5_cl_util=>uuid_get_c32( ). + INSERT temp3 INTO TABLE mt_filter. client->popup_model_update( ). WHEN `POPUP_DELETE`. - DATA(lt_item) = client->get( )-t_event_arg. - DELETE mt_filter WHERE key = lt_item[ 1 ]. + DATA lt_item TYPE string_table. + lt_item = client->get( )-t_event_arg. + DATA temp4 LIKE LINE OF lt_item. + DATA temp5 LIKE sy-tabix. + temp5 = sy-tabix. + READ TABLE lt_item INDEX 1 INTO temp4. + sy-tabix = temp5. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + DELETE mt_filter WHERE key = temp4. client->popup_model_update( ). WHEN `POPUP_DELETE_ALL`. - mt_filter = VALUE #( ). + DATA temp6 LIKE mt_filter. + CLEAR temp6. + mt_filter = temp6. client->popup_model_update( ). WHEN `FILTER_VALUE_HELP`. z2ui5_on_render_pop_filter( ). CLEAR mt_filter. - LOOP AT ms_filter-product REFERENCE INTO DATA(lr_product). - INSERT VALUE #( - low = lr_product->low - high = lr_product->high - option = lr_product->option - key = z2ui5_cl_util=>uuid_get_c32( ) - ) INTO TABLE mt_filter. + DATA temp7 LIKE LINE OF ms_filter-product. + DATA lr_product LIKE REF TO temp7. + LOOP AT ms_filter-product REFERENCE INTO lr_product. + DATA temp8 TYPE z2ui5_cl_demo_app_083=>ty_s_filter_pop. + CLEAR temp8. + temp8-low = lr_product->low. + temp8-high = lr_product->high. + temp8-option = lr_product->option. + temp8-key = z2ui5_cl_util=>uuid_get_c32( ). + INSERT temp8 INTO TABLE mt_filter. ENDLOOP. @@ -165,44 +191,91 @@ CLASS z2ui5_cl_demo_app_083 IMPLEMENTATION. METHOD z2ui5_on_init. - mt_01 = VALUE #( ( screen_name = `screen_01` ) ( screen_name = `screen_02` ) ). - - mt_02 = VALUE #( - ( screen_name = `screen_01` field_doma = `CHAR30` field = `MATNR` ) - ( screen_name = `screen_01` field_doma = `STRING` field = `LGNUM` ) - ( screen_name = `screen_02` field_doma = `PRODUCT` field = `PRODUCT` ) ). + DATA temp9 LIKE mt_01. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-screen_name = `screen_01`. + INSERT temp10 INTO TABLE temp9. + temp10-screen_name = `screen_02`. + INSERT temp10 INTO TABLE temp9. + mt_01 = temp9. + + DATA temp11 LIKE mt_02. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-screen_name = `screen_01`. + temp12-field_doma = `CHAR30`. + temp12-field = `MATNR`. + INSERT temp12 INTO TABLE temp11. + temp12-screen_name = `screen_01`. + temp12-field_doma = `STRING`. + temp12-field = `LGNUM`. + INSERT temp12 INTO TABLE temp11. + temp12-screen_name = `screen_02`. + temp12-field_doma = `PRODUCT`. + temp12-field = `PRODUCT`. + INSERT temp12 INTO TABLE temp11. + mt_02 = temp11. mv_name = `screen_01`. z2ui5_on_render_main( ). - mt_mapping = VALUE #( - ( n = `EQ` v = `={LOW}` ) - ( n = `LT` v = `<{LOW}` ) - ( n = `LE` v = `<={LOW}` ) - ( n = `GT` v = `>{LOW}` ) - ( n = `GE` v = `>={LOW}` ) - ( n = `CP` v = `*{LOW}*` ) - ( n = `BT` v = `{LOW}...{HIGH}` ) - ( n = `NE` v = `!(={LOW})` ) - ( n = `NE` v = `!()` ) - ( n = `` v = `` ) ). + DATA temp13 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp13. + DATA temp14 LIKE LINE OF temp13. + temp14-n = `EQ`. + temp14-v = `={LOW}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `LT`. + temp14-v = `<{LOW}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `LE`. + temp14-v = `<={LOW}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `GT`. + temp14-v = `>{LOW}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `GE`. + temp14-v = `>={LOW}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `CP`. + temp14-v = `*{LOW}*`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `BT`. + temp14-v = `{LOW}...{HIGH}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `NE`. + temp14-v = `!(={LOW})`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `NE`. + temp14-v = `!()`. + INSERT temp14 INTO TABLE temp13. + temp14-n = ``. + temp14-v = ``. + INSERT temp14 INTO TABLE temp13. + mt_mapping = temp13. ENDMETHOD. METHOD z2ui5_on_render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->page( id = `page_main` title = 'abap2UI5 - Select-Options' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(page) = view->dynamic_page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). - DATA(header_title) = page->title( ns = 'f' + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). header_title->heading( ns = 'f' )->hbox( @@ -210,11 +283,13 @@ CLASS z2ui5_cl_demo_app_083 IMPLEMENTATION. header_title->expanded_content( 'f' ). header_title->snapped_content( ns = 'f' ). - DATA(lo_box) = page->header( )->dynamic_page_header( pinnable = abap_true + DATA lo_box TYPE REF TO z2ui5_cl_xml_view. + lo_box = page->header( )->dynamic_page_header( pinnable = abap_true )->flex_box( alignitems = `Start` justifycontent = `SpaceBetween` )->flex_box( alignitems = `Start` ). - DATA(vbox) = lo_box->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = lo_box->vbox( ). vbox->simple_form( editable = abap_true )->content( `form` )->title( 'Table' @@ -233,13 +308,23 @@ CLASS z2ui5_cl_demo_app_083 IMPLEMENTATION. mt_02_display = mt_02. DELETE mt_02_display WHERE screen_name <> mv_name. - mt_tab_02_input = VALUE #( FOR line IN mt_cols ( name = line ) ). - - LOOP AT mt_02_display REFERENCE INTO DATA(lr_tab). - INSERT VALUE #( - name = lr_tab->field -* value = lr_tab->field_doma - ) INTO TABLE mt_tab_02_input. + DATA temp15 LIKE mt_tab_02_input. + CLEAR temp15. + DATA line LIKE LINE OF mt_cols. + LOOP AT mt_cols INTO line. + DATA temp16 LIKE LINE OF temp15. + temp16-name = line. + INSERT temp16 INTO TABLE temp15. + ENDLOOP. + mt_tab_02_input = temp15. + + DATA temp17 LIKE LINE OF mt_02_display. + DATA lr_tab LIKE REF TO temp17. + LOOP AT mt_02_display REFERENCE INTO lr_tab. + DATA temp18 TYPE z2ui5_cl_demo_app_083=>ty_s_tab_02_input. + CLEAR temp18. + temp18-name = lr_tab->field. + INSERT temp18 INTO TABLE mt_tab_02_input. ENDLOOP. * vbox->list( @@ -275,29 +360,37 @@ CLASS z2ui5_cl_demo_app_083 IMPLEMENTATION. METHOD z2ui5_on_render_pop_filter. - DATA(lo_popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA lo_popup TYPE REF TO z2ui5_cl_xml_view. + lo_popup = z2ui5_cl_xml_view=>factory_popup( ). lo_popup = lo_popup->dialog( contentheight = `50%` contentwidth = `50%` title = 'Define Conditons - Product' ). - DATA(vbox) = lo_popup->vbox( height = `100%` + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = lo_popup->vbox( height = `100%` justifycontent = 'SpaceBetween' ). - DATA(pan) = vbox->panel( + DATA pan TYPE REF TO z2ui5_cl_xml_view. + pan = vbox->panel( expandable = abap_false expanded = abap_true headertext = `Product` ). - DATA(item) = pan->list( + DATA item TYPE REF TO z2ui5_cl_xml_view. + item = pan->list( " headertext = `Product` nodata = `no conditions defined` items = client->_bind_edit( mt_filter ) selectionchange = client->_event( 'SELCHANGE' ) )->custom_list_item( ). - DATA(grid) = item->grid( ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = item->grid( ). + DATA temp19 TYPE string_table. + CLEAR temp19. + INSERT `${KEY}` INTO TABLE temp19. grid->combobox( selectedkey = `{OPTION}` items = client->_bind_edit( mt_mapping ) @@ -310,7 +403,7 @@ CLASS z2ui5_cl_demo_app_083 IMPLEMENTATION. visible = `{= ${OPTION} === 'BT' }` )->button( icon = 'sap-icon://decline' type = `Transparent` - press = client->_event( val = `POPUP_DELETE` t_arg = VALUE #( ( `${KEY}` ) ) ) ). + press = client->_event( val = `POPUP_DELETE` t_arg = temp19 ) ). lo_popup->footer( )->overflow_toolbar( )->button( text = `Delete All` diff --git a/src/z2ui5_cl_demo_app_084.clas.abap b/src/z2ui5_cl_demo_app_084.clas.abap index 1f15518d..53062a96 100644 --- a/src/z2ui5_cl_demo_app_084.clas.abap +++ b/src/z2ui5_cl_demo_app_084.clas.abap @@ -24,7 +24,8 @@ CLASS z2ui5_cl_demo_app_084 DEFINITION PUBLIC. value TYPE string, descr TYPE string, END OF s_suggestion_items. - DATA mt_suggestion TYPE STANDARD TABLE OF s_suggestion_items WITH EMPTY KEY. + TYPES temp1_c1d7389a64 TYPE STANDARD TABLE OF s_suggestion_items WITH DEFAULT KEY. +DATA mt_suggestion TYPE temp1_c1d7389a64. TYPES: BEGIN OF s_combobox, @@ -32,7 +33,7 @@ CLASS z2ui5_cl_demo_app_084 DEFINITION PUBLIC. text TYPE string, END OF s_combobox. - TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY. + TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH DEFAULT KEY. @@ -61,7 +62,8 @@ CLASS z2ui5_cl_demo_app_084 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - DATA(lv_script) = `` && |\n| && + DATA lv_script TYPE string. + lv_script = `` && |\n| && `function setInputFIlter(){` && |\n| && ` var inp = sap.z2ui5.oView.byId('suggInput');` && |\n| && ` inp.setFilterFunction(function(sValue, oItem){` && |\n| && @@ -100,11 +102,15 @@ CLASS z2ui5_cl_demo_app_084 IMPLEMENTATION. z2ui5_on_rendering( ). WHEN 'BUTTON_MCUSTOM'. * send type = '' is mandatory in order to not break current implementation + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `First Button` INTO TABLE temp1. + INSERT `Second Button` INTO TABLE temp1. client->message_box_display( type = '' text = 'Custom MessageBox' icon = `SUCCESS` title = 'Custom MessageBox' - actions = VALUE #( ( `First Button` ) ( `Second Button` ) ) + actions = temp1 emphasizedaction = `First Button` onclose = `callMessageToast()` details = `

these are details

` ). @@ -142,40 +148,62 @@ CLASS z2ui5_cl_demo_app_084 IMPLEMENTATION. METHOD z2ui5_on_init. - screen = VALUE #( - check_is_active = abap_true - colour = 'BLUE' - combo_key = 'GRAY' - segment_key = 'GREEN' - date = '07.12.22' - date_time = '23.12.2022, 19:27:20' - time_start = '05:24:00' - time_end = '17:23:57' ). - - mt_suggestion = VALUE #( - ( descr = 'Green' value = 'GREEN' ) - ( descr = 'Blue' value = 'BLUE' ) - ( descr = 'Black' value = 'BLACK' ) - ( descr = 'Gray' value = 'GRAY' ) - ( descr = 'Blue2' value = 'BLUE2' ) - ( descr = 'Blue3' value = 'BLUE3' ) ). + CLEAR screen. + screen-check_is_active = abap_true. + screen-colour = 'BLUE'. + screen-combo_key = 'GRAY'. + screen-segment_key = 'GREEN'. + screen-date = '07.12.22'. + screen-date_time = '23.12.2022, 19:27:20'. + screen-time_start = '05:24:00'. + screen-time_end = '17:23:57'. + + DATA temp3 LIKE mt_suggestion. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-descr = 'Green'. + temp4-value = 'GREEN'. + INSERT temp4 INTO TABLE temp3. + temp4-descr = 'Blue'. + temp4-value = 'BLUE'. + INSERT temp4 INTO TABLE temp3. + temp4-descr = 'Black'. + temp4-value = 'BLACK'. + INSERT temp4 INTO TABLE temp3. + temp4-descr = 'Gray'. + temp4-value = 'GRAY'. + INSERT temp4 INTO TABLE temp3. + temp4-descr = 'Blue2'. + temp4-value = 'BLUE2'. + INSERT temp4 INTO TABLE temp3. + temp4-descr = 'Blue3'. + temp4-value = 'BLUE3'. + INSERT temp4 INTO TABLE temp3. + mt_suggestion = temp3. ENDMETHOD. METHOD z2ui5_on_rendering. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `script` ns = `html` )->_cc_plain_xml( `function callMessageToast(sAction) { sap.m.MessageToast.show('Hello there !!'); }` ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp1 title = 'abap2UI5 - Selection-Screen Example' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). - DATA(grid) = page->grid( 'L6 M12 S12' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). grid->simple_form( title = 'Input' diff --git a/src/z2ui5_cl_demo_app_085.clas.abap b/src/z2ui5_cl_demo_app_085.clas.abap index b85bcd8c..a2b5b553 100644 --- a/src/z2ui5_cl_demo_app_085.clas.abap +++ b/src/z2ui5_cl_demo_app_085.clas.abap @@ -39,9 +39,9 @@ CLASS z2ui5_cl_demo_app_085 DEFINITION country TYPE string, END OF ty_s_tab_supplier . TYPES - ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY . + ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY . TYPES - ty_t_table_supplier TYPE STANDARD TABLE OF ty_s_tab_supplier WITH EMPTY KEY . + ty_t_table_supplier TYPE STANDARD TABLE OF ty_s_tab_supplier WITH DEFAULT KEY . DATA mt_table TYPE ty_t_table . DATA mt_table_supplier TYPE ty_t_table_supplier . @@ -87,15 +87,18 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. METHOD view_display_detail. - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->object_page_layout( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->object_page_layout( showtitleinheadercontent = abap_true showeditheaderbutton = abap_true editheaderbuttonpress = client->_event( 'EDIT_HEADER_PRESS' ) uppercaseanchorbar = abap_false ). - DATA(header_title) = page->header_title( )->object_page_dyn_header_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->header_title( )->object_page_dyn_header_title( ). header_title->expanded_heading( )->hbox( @@ -118,6 +121,20 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. header_title->snapped_content( ns = `uxap` )->text( client->_bind_local( val = ls_detail-productname ) ). header_title->snapped_title_on_mobile( )->title( client->_bind_local( val = ls_detail-productname ) ). + DATA temp1 TYPE string. + CASE lv_layout. + WHEN 'TwoColumnsMidExpanded'. + temp1 = 'false'. + WHEN 'MidColumnFullScreen'. + temp1 = 'true'. + ENDCASE. + DATA temp4 TYPE string. + CASE lv_layout. + WHEN 'TwoColumnsMidExpanded'. + temp4 = 'true'. + WHEN 'MidColumnFullScreen'. + temp4 = 'false'. + ENDCASE. header_title->actions( ns = `uxap` )->overflow_toolbar( )->overflow_toolbar_button( icon = `sap-icon://supplier` @@ -131,19 +148,13 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. text = 'Exit Fullscreen Mode' type = 'Transparent' tooltip = 'Close Fullscreen Mode' - enabled = SWITCH string( lv_layout - WHEN 'TwoColumnsMidExpanded' THEN 'false' - WHEN 'MidColumnFullScreen' THEN 'true' - ) + enabled = temp1 press = client->_event( 'ONEXITFULLSCREENMODE' ) )->overflow_toolbar_button( icon = `sap-icon://full-screen` text = 'Enter Fullscreen Mode' type = 'Transparent' - enabled = SWITCH string( lv_layout - WHEN 'TwoColumnsMidExpanded' THEN 'true' - WHEN 'MidColumnFullScreen' THEN 'false' - ) + enabled = temp4 tooltip = 'Fullscreen Mode' press = client->_event( 'ONFULLSCREENMODE' ) )->overflow_toolbar_button( @@ -154,7 +165,10 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. tooltip = 'Close Detail' press = client->_event( 'ONCLOSEDETAIL' ) ). - DATA(header_content) = page->header_content( ns = 'uxap' ). + DATA header_content TYPE REF TO z2ui5_cl_xml_view. + header_content = page->header_content( ns = 'uxap' ). + DATA temp2 TYPE string. + temp2 = ls_detail-measure. header_content->flex_box( wrap = 'Wrap' )->avatar( src = c_pic_url && ls_detail-pic class = 'sapUiSmallMarginEnd' @@ -168,7 +182,7 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. )->get_parent( )->vertical_layout( class = 'sapUiSmallMarginBeginEnd' )->text( text = | { ls_detail-width } x { ls_detail-depth } x { ls_detail-height } { ls_detail-dimunit }| - )->object_number( number = CONV string( ls_detail-measure ) + )->object_number( number = temp2 unit = ls_detail-unit state = ls_detail-state_measure )->text( text = |{ ls_detail-price } { ls_detail-waers } | @@ -206,7 +220,8 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. href = |tel:{ ls_detail_supplier-phone }| )->get_parent( ). - DATA(sections) = page->sections( ). + DATA sections TYPE REF TO z2ui5_cl_xml_view. + sections = page->sections( ). sections->object_page_section( titleuppercase = abap_false id = 'SectionDescription' @@ -272,6 +287,9 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${SUPPLIERNAME}` INTO TABLE temp3. sections->object_page_section( titleuppercase = abap_false id = 'OtherSuppliers' title = 'Other Supplier' @@ -301,7 +319,7 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. )->get_parent( )->items( )->column_list_item( type = 'Navigation' - press = client->_event( val = `ONPRESSSUPPLIER` t_arg = VALUE #( ( `${SUPPLIERNAME}` ) ) ) + press = client->_event( val = `ONPRESSSUPPLIER` t_arg = temp3 ) )->cells( )->text( text = '{SUPPLIERNAME}' )->get_parent( )->text( text = '{COUNTRY}' @@ -319,9 +337,11 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. METHOD view_display_master. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Master Detail' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true @@ -332,10 +352,12 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. )->link( )->get_parent( ). - DATA(lr_master) = page->flexible_column_layout( layout = lv_layout + DATA lr_master TYPE REF TO z2ui5_cl_xml_view. + lr_master = page->flexible_column_layout( layout = lv_layout id = 'Detail' )->begin_column_pages( ). - DATA(tab) = lr_master->scroll_container( height = '100%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = lr_master->scroll_container( height = '100%' vertical = abap_true )->table( inset = abap_false @@ -376,9 +398,12 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. )->column( halign = 'End' )->text( 'Price' ). + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${KEY}` INTO TABLE temp5. tab->items( )->column_list_item( type = 'Navigation' - press = client->_event( val = `ONPRESSMASTER` t_arg = VALUE #( ( `${KEY}` ) ) ) + press = client->_event( val = `ONPRESSMASTER` t_arg = temp5 ) )->cells( )->object_identifier( text = '{PRODUCTNAME}' title = '{PRODUCTID}' )->get_parent( @@ -423,7 +448,8 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. * https://sapui5.hana.ondemand.com/sdk/#/topic/3b9f760da5b64adf8db7f95247879086 CASE client->get( )-event. WHEN 'ONGOTOSUPPLIER'. - DATA(lo_app_next) = NEW z2ui5_cl_demo_app_086( ). + DATA lo_app_next TYPE REF TO z2ui5_cl_demo_app_086. + CREATE OBJECT lo_app_next TYPE z2ui5_cl_demo_app_086. lo_app_next->ls_detail_supplier = ls_detail_supplier. client->nav_app_call( lo_app_next ). WHEN 'ONEXITFULLSCREENMODE'. @@ -446,16 +472,49 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. client->nest_view_model_update( ). client->message_toast_display( |Event Close Detail | ). WHEN 'ONPRESSSUPPLIER'. - DATA(lt_arg) = client->get( )-t_event_arg. - READ TABLE mt_table_supplier WITH KEY suppliername = lt_arg[ 1 ] INTO ls_detail_supplier. - client->message_toast_display( |Event Press Supplier List Name: { lt_arg[ 1 ] } | ). - lo_app_next = NEW z2ui5_cl_demo_app_086( ). + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + DATA temp7 LIKE LINE OF lt_arg. + DATA temp8 LIKE sy-tabix. + temp8 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp7. + sy-tabix = temp8. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + READ TABLE mt_table_supplier WITH KEY suppliername = temp7 INTO ls_detail_supplier. + DATA temp9 LIKE LINE OF lt_arg. + DATA temp10 LIKE sy-tabix. + temp10 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp9. + sy-tabix = temp10. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_toast_display( |Event Press Supplier List Name: { temp9 } | ). + CREATE OBJECT lo_app_next TYPE z2ui5_cl_demo_app_086. lo_app_next->ls_detail_supplier = ls_detail_supplier. client->nav_app_call( lo_app_next ). WHEN `ONPRESSMASTER`. lt_arg = client->get( )-t_event_arg. - client->message_toast_display( |Event Press Master - Product Id { lt_arg[ 1 ] } | ). - READ TABLE mt_table WITH KEY key = lt_arg[ 1 ] INTO ls_detail. + DATA temp11 LIKE LINE OF lt_arg. + DATA temp12 LIKE sy-tabix. + temp12 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp11. + sy-tabix = temp12. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_toast_display( |Event Press Master - Product Id { temp11 } | ). + DATA temp13 LIKE LINE OF lt_arg. + DATA temp14 LIKE sy-tabix. + temp14 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp13. + sy-tabix = temp14. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + READ TABLE mt_table WITH KEY key = temp13 INTO ls_detail. READ TABLE mt_table_supplier WITH KEY suppliername = ls_detail-suppliername INTO ls_detail_supplier. lv_layout = 'TwoColumnsMidExpanded'. IF check_detail_active = abap_false. @@ -493,56 +552,319 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( key = '1' productid = '1' productname = 'table' suppliername = 'Company 1' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 100 unit = 'ST' price = '1000.50' waers = 'EUR' state_price = `Success` state_measure = `Warning` - pic = 'HT-1010.jpg' rating = '0' process = '0' ) - ( key = '2' productid = '2' productname = 'chair' suppliername = 'Company 2' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 123 unit = 'ST' price = '2000.55' waers = 'USD' state_price = `Error` state_measure = `Error` - pic = 'HT-2001.jpg' rating = '1' process = '10' ) - ( key = '3' productid = '3' productname = 'sofa' suppliername = 'Company 3' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 700 unit = 'ST' price = '3000.11' waers = 'CNY' state_price = `Success` state_measure = `Warning` - pic = 'HT-1251.jpg' rating = '2' process = '15' ) - ( key = '4' productid = '4' productname = 'computer' suppliername = 'Company 4' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 200 unit = 'ST' price = '4000.88' waers = 'USD' state_price = `Success` state_measure = `Success` - pic = 'HT-6100.jpg' rating = '3' process = '38' ) - ( key = '5' productid = '5' productname = 'printer' suppliername = 'Company 5' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 90 unit = 'ST' price = '5000.47' waers = 'EUR' state_price = `Error` state_measure = `Warning` - pic = 'HT-1000.jpg' rating = '4' process = '66' ) - ( key = '6' productid = '6' productname = 'table2' suppliername = 'Company 6' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Success` state_measure = `Information` - pic = 'HT-1137.jpg' rating = '2' process = '91' ) - ( key = '7' productid = '7' productname = 'table3' suppliername = 'Company 7' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Success` state_measure = `Warning` - pic = 'HT-7000.jpg' rating = '6' process = '5' ) - ( key = '8' productid = '8' productname = 'table4' suppliername = 'Company 8' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Warning` state_measure = `Error` - pic = 'HT-9997.jpg' rating = '0' process = '75' ) - ( key = '9' productid = '9' productname = 'table5' suppliername = 'Company 9' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Information` state_measure = `Success` - pic = 'HT-7020.jpg' rating = '1' process = '81' ) - ( key = '10' productid = '10' productname = 'table6' suppliername = 'Company 10' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Success` state_measure = `Information` - pic = 'HT-1023.jpg' rating = '4' process = '24' ) - ( key = '11' productid = '11' productname = 'table7' suppliername = 'Company 11' width = '10' depth = '20' height = '30' - dimunit = 'CM' measure = 600 unit = 'ST' price = '6000.33' waers = 'GBP' state_price = `Information` state_measure = `Success` - pic = 'HT-1085.jpg' rating = '5' process = '46' ) ). + DATA temp15 TYPE z2ui5_cl_demo_app_085=>ty_t_table. + CLEAR temp15. + DATA temp16 LIKE LINE OF temp15. + temp16-key = '1'. + temp16-productid = '1'. + temp16-productname = 'table'. + temp16-suppliername = 'Company 1'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 100. + temp16-unit = 'ST'. + temp16-price = '1000.50'. + temp16-waers = 'EUR'. + temp16-state_price = `Success`. + temp16-state_measure = `Warning`. + temp16-pic = 'HT-1010.jpg'. + temp16-rating = '0'. + temp16-process = '0'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '2'. + temp16-productid = '2'. + temp16-productname = 'chair'. + temp16-suppliername = 'Company 2'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 123. + temp16-unit = 'ST'. + temp16-price = '2000.55'. + temp16-waers = 'USD'. + temp16-state_price = `Error`. + temp16-state_measure = `Error`. + temp16-pic = 'HT-2001.jpg'. + temp16-rating = '1'. + temp16-process = '10'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '3'. + temp16-productid = '3'. + temp16-productname = 'sofa'. + temp16-suppliername = 'Company 3'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 700. + temp16-unit = 'ST'. + temp16-price = '3000.11'. + temp16-waers = 'CNY'. + temp16-state_price = `Success`. + temp16-state_measure = `Warning`. + temp16-pic = 'HT-1251.jpg'. + temp16-rating = '2'. + temp16-process = '15'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '4'. + temp16-productid = '4'. + temp16-productname = 'computer'. + temp16-suppliername = 'Company 4'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 200. + temp16-unit = 'ST'. + temp16-price = '4000.88'. + temp16-waers = 'USD'. + temp16-state_price = `Success`. + temp16-state_measure = `Success`. + temp16-pic = 'HT-6100.jpg'. + temp16-rating = '3'. + temp16-process = '38'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '5'. + temp16-productid = '5'. + temp16-productname = 'printer'. + temp16-suppliername = 'Company 5'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 90. + temp16-unit = 'ST'. + temp16-price = '5000.47'. + temp16-waers = 'EUR'. + temp16-state_price = `Error`. + temp16-state_measure = `Warning`. + temp16-pic = 'HT-1000.jpg'. + temp16-rating = '4'. + temp16-process = '66'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '6'. + temp16-productid = '6'. + temp16-productname = 'table2'. + temp16-suppliername = 'Company 6'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 600. + temp16-unit = 'ST'. + temp16-price = '6000.33'. + temp16-waers = 'GBP'. + temp16-state_price = `Success`. + temp16-state_measure = `Information`. + temp16-pic = 'HT-1137.jpg'. + temp16-rating = '2'. + temp16-process = '91'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '7'. + temp16-productid = '7'. + temp16-productname = 'table3'. + temp16-suppliername = 'Company 7'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 600. + temp16-unit = 'ST'. + temp16-price = '6000.33'. + temp16-waers = 'GBP'. + temp16-state_price = `Success`. + temp16-state_measure = `Warning`. + temp16-pic = 'HT-7000.jpg'. + temp16-rating = '6'. + temp16-process = '5'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '8'. + temp16-productid = '8'. + temp16-productname = 'table4'. + temp16-suppliername = 'Company 8'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 600. + temp16-unit = 'ST'. + temp16-price = '6000.33'. + temp16-waers = 'GBP'. + temp16-state_price = `Warning`. + temp16-state_measure = `Error`. + temp16-pic = 'HT-9997.jpg'. + temp16-rating = '0'. + temp16-process = '75'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '9'. + temp16-productid = '9'. + temp16-productname = 'table5'. + temp16-suppliername = 'Company 9'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 600. + temp16-unit = 'ST'. + temp16-price = '6000.33'. + temp16-waers = 'GBP'. + temp16-state_price = `Information`. + temp16-state_measure = `Success`. + temp16-pic = 'HT-7020.jpg'. + temp16-rating = '1'. + temp16-process = '81'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '10'. + temp16-productid = '10'. + temp16-productname = 'table6'. + temp16-suppliername = 'Company 10'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 600. + temp16-unit = 'ST'. + temp16-price = '6000.33'. + temp16-waers = 'GBP'. + temp16-state_price = `Success`. + temp16-state_measure = `Information`. + temp16-pic = 'HT-1023.jpg'. + temp16-rating = '4'. + temp16-process = '24'. + INSERT temp16 INTO TABLE temp15. + temp16-key = '11'. + temp16-productid = '11'. + temp16-productname = 'table7'. + temp16-suppliername = 'Company 11'. + temp16-width = '10'. + temp16-depth = '20'. + temp16-height = '30'. + temp16-dimunit = 'CM'. + temp16-measure = 600. + temp16-unit = 'ST'. + temp16-price = '6000.33'. + temp16-waers = 'GBP'. + temp16-state_price = `Information`. + temp16-state_measure = `Success`. + temp16-pic = 'HT-1085.jpg'. + temp16-rating = '5'. + temp16-process = '46'. + INSERT temp16 INTO TABLE temp15. + mt_table = temp15. *Rungestraße 79-78, 18055 RostockMarktstraße, 03046 CottbusMarktpl. 1, 06108 Halle (Saale) - mt_table_supplier = VALUE #( - ( suppliername = 'Company 1' email = 'company1@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Dresden' street = 'Neumarkt' zipcode = '01067' ) - ( suppliername = 'Company 2' email = 'company2@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Erfurt' street = 'Domplatz' zipcode = '99084' ) - ( suppliername = 'Company 3' email = 'company3@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Suhl' street = 'Carl-Fiedler-Straße 58' zipcode = '98527' ) - ( suppliername = 'Company 4' email = 'company4@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Hildburgheusen' street = 'Markt' zipcode = '98646' ) - ( suppliername = 'Company 5' email = 'company5@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Sonneberg' street = 'Beethovenstraße 10' zipcode = '96515' ) - ( suppliername = 'Company 6' email = 'company6@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Meiningen' street = 'Schloßplatz 1' zipcode = '98617' ) - ( suppliername = 'Company 7' email = 'company7@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Leipzig' street = 'Pfaffendorfer Str. 29' zipcode = '04105' ) - ( suppliername = 'Company 8' email = 'company8@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Magdeburg' street = 'Am Dom 1' zipcode = '39104' ) - ( suppliername = 'Company 9' email = 'company9@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Schwerin' street = 'Lennéstraße 1' zipcode = '19053' ) - ( suppliername = 'Company 10' email = 'company10@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Rostock' street = 'Rungestraße 79-78' zipcode = '18055' ) - ( suppliername = 'Company 11' email = 'company11@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Cottbus' street = 'Marktstraße' zipcode = '03046' ) - ( suppliername = 'Company 12' email = 'company12@sap.com' phone = '+49 1234567890' country = 'Germany' city = 'Halle (Saale)' street = 'Marktpl. 1' zipcode = '06108' ) ). - - ls_detail = mt_table[ 1 ]. + DATA temp17 TYPE z2ui5_cl_demo_app_085=>ty_t_table_supplier. + CLEAR temp17. + DATA temp18 LIKE LINE OF temp17. + temp18-suppliername = 'Company 1'. + temp18-email = 'company1@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Dresden'. + temp18-street = 'Neumarkt'. + temp18-zipcode = '01067'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 2'. + temp18-email = 'company2@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Erfurt'. + temp18-street = 'Domplatz'. + temp18-zipcode = '99084'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 3'. + temp18-email = 'company3@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Suhl'. + temp18-street = 'Carl-Fiedler-Straße 58'. + temp18-zipcode = '98527'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 4'. + temp18-email = 'company4@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Hildburgheusen'. + temp18-street = 'Markt'. + temp18-zipcode = '98646'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 5'. + temp18-email = 'company5@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Sonneberg'. + temp18-street = 'Beethovenstraße 10'. + temp18-zipcode = '96515'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 6'. + temp18-email = 'company6@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Meiningen'. + temp18-street = 'Schloßplatz 1'. + temp18-zipcode = '98617'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 7'. + temp18-email = 'company7@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Leipzig'. + temp18-street = 'Pfaffendorfer Str. 29'. + temp18-zipcode = '04105'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 8'. + temp18-email = 'company8@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Magdeburg'. + temp18-street = 'Am Dom 1'. + temp18-zipcode = '39104'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 9'. + temp18-email = 'company9@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Schwerin'. + temp18-street = 'Lennéstraße 1'. + temp18-zipcode = '19053'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 10'. + temp18-email = 'company10@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Rostock'. + temp18-street = 'Rungestraße 79-78'. + temp18-zipcode = '18055'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 11'. + temp18-email = 'company11@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Cottbus'. + temp18-street = 'Marktstraße'. + temp18-zipcode = '03046'. + INSERT temp18 INTO TABLE temp17. + temp18-suppliername = 'Company 12'. + temp18-email = 'company12@sap.com'. + temp18-phone = '+49 1234567890'. + temp18-country = 'Germany'. + temp18-city = 'Halle (Saale)'. + temp18-street = 'Marktpl. 1'. + temp18-zipcode = '06108'. + INSERT temp18 INTO TABLE temp17. + mt_table_supplier = temp17. + + DATA temp19 LIKE LINE OF mt_table. + DATA temp20 LIKE sy-tabix. + temp20 = sy-tabix. + READ TABLE mt_table INDEX 1 INTO temp19. + sy-tabix = temp20. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + ls_detail = temp19. ENDMETHOD. @@ -550,11 +872,16 @@ CLASS Z2UI5_CL_DEMO_APP_085 IMPLEMENTATION. IF mv_search_value IS NOT INITIAL. - LOOP AT mt_table REFERENCE INTO DATA(lr_row). - DATA(lv_row) = ``. - DATA(lv_index) = 1. + DATA temp21 LIKE LINE OF mt_table. + DATA lr_row LIKE REF TO temp21. + LOOP AT mt_table REFERENCE INTO lr_row. + DATA lv_row TYPE string. + lv_row = ``. + DATA lv_index TYPE i. + lv_index = 1. DO. - ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO . IF sy-subrc <> 0. EXIT. ENDIF. diff --git a/src/z2ui5_cl_demo_app_086.clas.abap b/src/z2ui5_cl_demo_app_086.clas.abap index e5632c4d..77e19fa4 100644 --- a/src/z2ui5_cl_demo_app_086.clas.abap +++ b/src/z2ui5_cl_demo_app_086.clas.abap @@ -36,8 +36,10 @@ CLASS Z2UI5_CL_DEMO_APP_086 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Flow Logic - APP 85' navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_087.clas.abap b/src/z2ui5_cl_demo_app_087.clas.abap index 18c9ad9d..ca8d85a1 100644 --- a/src/z2ui5_cl_demo_app_087.clas.abap +++ b/src/z2ui5_cl_demo_app_087.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_087 DEFINITION PUBLIC. valuecolor TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_de99bde8a9 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_de99bde8a9. DATA check_initialized TYPE abap_bool. DATA check_ui5 TYPE abap_bool. DATA mv_key TYPE string. @@ -69,14 +70,19 @@ CLASS z2ui5_cl_demo_app_087 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Table with Cell Copy' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( growing = abap_true growingthreshold = '20' growingscrolltoload = abap_true diff --git a/src/z2ui5_cl_demo_app_088.clas.abap b/src/z2ui5_cl_demo_app_088.clas.abap index 1692402a..bfa515f4 100644 --- a/src/z2ui5_cl_demo_app_088.clas.abap +++ b/src/z2ui5_cl_demo_app_088.clas.abap @@ -58,15 +58,23 @@ CLASS z2ui5_cl_demo_app_088 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp2 title = `abap2UI5 - Sample: Nav Container` )->content( ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `NavCon` INTO TABLE temp1. + INSERT `${$parameters>/selectedKey}` INTO TABLE temp1. page->icon_tab_header( selectedkey = client->_bind_edit( mv_selected_key ) - select = client->_event_client( val = client->cs_event-nav_container_to t_arg = VALUE #( ( `NavCon` ) ( `${$parameters>/selectedKey}` ) ) ) + select = client->_event_client( val = client->cs_event-nav_container_to t_arg = temp1 ) mode = `Inline` )->items( )->icon_tab_filter( key = `page1` diff --git a/src/z2ui5_cl_demo_app_090.clas.abap b/src/z2ui5_cl_demo_app_090.clas.abap index 9ac2ac0e..0323610c 100644 --- a/src/z2ui5_cl_demo_app_090.clas.abap +++ b/src/z2ui5_cl_demo_app_090.clas.abap @@ -130,50 +130,86 @@ CLASS z2ui5_cl_demo_app_090 IMPLEMENTATION. client->_bind_edit( val = mt_groups_p13n custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ). - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). + DATA temp11 TYPE xsdboolean. + temp11 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). page = page->shell( )->page( title = 'abap2UI5 - P13N Dialog' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp11 class = 'sapUiContentPadding' ). page = page->vbox( ). + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = `title`. + temp2-v = `My Custom View Settings`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `close`. + temp2-v = `sap.z2ui5.updateData(${$parameters>/reason})`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `id`. + temp2-v = `p13nPopup`. + INSERT temp2 INTO TABLE temp1. + DATA temp3 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-n = `id`. + temp4-v = `columnsPanel`. + INSERT temp4 INTO TABLE temp3. + temp4-n = `title`. + temp4-v = `Columns`. + INSERT temp4 INTO TABLE temp3. + DATA temp5 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-n = `id`. + temp6-v = `sortPanel`. + INSERT temp6 INTO TABLE temp5. + temp6-n = `title`. + temp6-v = `Sort`. + INSERT temp6 INTO TABLE temp5. + DATA temp7 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-n = `id`. + temp8-v = `filterPanel`. + INSERT temp8 INTO TABLE temp7. + temp8-n = `title`. + temp8-v = `Filter`. + INSERT temp8 INTO TABLE temp7. + DATA temp9 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-n = `id`. + temp10-v = `groupPanel`. + INSERT temp10 INTO TABLE temp9. + temp10-n = `title`. + temp10-v = `Group`. + INSERT temp10 INTO TABLE temp9. page->_generic( name = `Popup` ns = `p13n` - t_prop = VALUE #( ( n = `title` v = `My Custom View Settings` ) - ( n = `close` v = `sap.z2ui5.updateData(${$parameters>/reason})` ) -* ( n = `warningText` v = `Are you sure?` ) - ( n = `id` v = `p13nPopup` ) -* ( n = `reset` v = client->_event( `P13N_RESET` ) ) - ) + t_prop = temp1 )->_generic( name = `panels` ns = `p13n` )->_generic( name = `SelectionPanel` ns = `p13n` - t_prop = VALUE #( ( n = `id` v = `columnsPanel` ) - ( n = `title` v = `Columns` ) -* ( n = `enableCount` v = 'X' ) -* ( n = `showHeader` v = 'X' ) - ) )->get_parent( + t_prop = temp3 )->get_parent( )->_generic( name = `SortPanel` ns = `p13n` - t_prop = VALUE #( ( n = `id` v = `sortPanel` ) - ( n = `title` v = `Sort` ) - ) + t_prop = temp5 )->get_parent( )->_generic( name = `P13nFilterPanel` ns = `` - t_prop = VALUE #( ( n = `id` v = `filterPanel` ) - ( n = `title` v = `Filter` ) - ) + t_prop = temp7 )->get_parent( )->_generic( name = `GroupPanel` ns = `p13n` - t_prop = VALUE #( ( n = `id` v = `groupPanel` ) - ( n = `title` v = `Group` ) - ) + t_prop = temp9 )->get_parent( )->get_parent( )->get_parent( )->get_parent( )->get_parent( ). @@ -190,44 +226,104 @@ CLASS z2ui5_cl_demo_app_090 IMPLEMENTATION. METHOD z2ui5_view_p13n. - DATA(p13n_dialog) = z2ui5_cl_xml_view=>factory_popup( ). - - DATA(p13n) = p13n_dialog->_generic( name = `P13nDialog` - t_prop = VALUE #( - ( n = `ok` v = client->_event( `OK` ) ) - ( n = `cancel` v = client->_event( `CANCEL` ) ) - ( n = `reset` v = client->_event( `RESET` ) ) - ( n = `showReset` v = `true` ) - ( n = `initialVisiblePanelType` v = `sort` ) - ) + DATA p13n_dialog TYPE REF TO z2ui5_cl_xml_view. + p13n_dialog = z2ui5_cl_xml_view=>factory_popup( ). + + DATA temp3 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-n = `ok`. + temp4-v = client->_event( `OK` ). + INSERT temp4 INTO TABLE temp3. + temp4-n = `cancel`. + temp4-v = client->_event( `CANCEL` ). + INSERT temp4 INTO TABLE temp3. + temp4-n = `reset`. + temp4-v = client->_event( `RESET` ). + INSERT temp4 INTO TABLE temp3. + temp4-n = `showReset`. + temp4-v = `true`. + INSERT temp4 INTO TABLE temp3. + temp4-n = `initialVisiblePanelType`. + temp4-v = `sort`. + INSERT temp4 INTO TABLE temp3. + DATA temp5 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-n = `items`. + temp6-v = `{path:'` && client->_bind_edit( val = mt_columns path = abap_true custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ) && `'}`. + INSERT temp6 INTO TABLE temp5. + temp6-n = `columnsItems`. + temp6-v = `{path:'` && client->_bind_edit( val = mt_columns1 path = abap_true custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ) && `'}`. + INSERT temp6 INTO TABLE temp5. + DATA temp7 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-n = `columnKey`. + temp8-v = `{columnkey}`. + INSERT temp8 INTO TABLE temp7. + temp8-n = `text`. + temp8-v = `{text}`. + INSERT temp8 INTO TABLE temp7. + DATA temp9 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-n = `columnKey`. + temp10-v = `{columnkey}`. + INSERT temp10 INTO TABLE temp9. + temp10-n = `visible`. + temp10-v = `{visible}`. + INSERT temp10 INTO TABLE temp9. + temp10-n = `index`. + temp10-v = `{index}`. + INSERT temp10 INTO TABLE temp9. + DATA temp11 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-n = `groupItems`. + temp12-v = `{path:'` && client->_bind_edit( val = mt_groups path = abap_true custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ) && `'}`. + INSERT temp12 INTO TABLE temp11. + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = `columnKey`. + temp2-v = `{columnkey}`. + INSERT temp2 INTO TABLE temp1. + temp2-n = `text`. + temp2-v = `{text}`. + INSERT temp2 INTO TABLE temp1. + DATA temp13 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp13. + DATA temp14 LIKE LINE OF temp13. + temp14-n = `columnKey`. + temp14-v = `{columnkey}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `operation`. + temp14-v = `{operation}`. + INSERT temp14 INTO TABLE temp13. + temp14-n = `showIfGrouped`. + temp14-v = `{showifgrouped}`. + INSERT temp14 INTO TABLE temp13. + DATA p13n TYPE REF TO z2ui5_cl_xml_view. + p13n = p13n_dialog->_generic( name = `P13nDialog` + t_prop = temp3 )->_generic( name = `panels` )->_generic( name = `P13nColumnsPanel` - t_prop = VALUE #( -* ( n = `title` v = `Columns` ) -* ( n = `visible` v = `true` ) -* ( n = `type` v = `Columns` ) - ( n = `items` v = `{path:'` && client->_bind_edit( val = mt_columns path = abap_true custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ) && `'}` ) - ( n = `columnsItems` v = `{path:'` && client->_bind_edit( val = mt_columns1 path = abap_true custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ) && `'}` ) ) + t_prop = temp5 )->items( )->_generic( name = `P13nItem` - t_prop = VALUE #( ( n = `columnKey` v = `{columnkey}` ) - ( n = `text` v = `{text}` ) ) )->get_parent( )->get_parent( + t_prop = temp7 )->get_parent( )->get_parent( )->_generic( name = `columnsItems` )->_generic( name = `P13nColumnsItem` - t_prop = VALUE #( ( n = `columnKey` v = `{columnkey}` ) - ( n = `visible` v = `{visible}` ) - ( n = `index` v = `{index}` ) ) )->get_parent( )->get_parent( )->get_parent( + t_prop = temp9 )->get_parent( )->get_parent( )->get_parent( )->_generic( name = `P13nGroupPanel` - t_prop = VALUE #( ( n = `groupItems` v = `{path:'` && client->_bind_edit( val = mt_groups path = abap_true custom_mapper = z2ui5_cl_ajson_mapping=>create_lower_case( ) ) && `'}` ) ) + t_prop = temp11 )->items( )->_generic( name = `P13nItem` - t_prop = VALUE #( ( n = `columnKey` v = `{columnkey}` ) - ( n = `text` v = `{text}` ) ) )->get_parent( )->get_parent( + t_prop = temp1 )->get_parent( )->get_parent( )->_generic( name = `groupItems` )->_generic( name = `P13nGroupItem` - t_prop = VALUE #( ( n = `columnKey` v = `{columnkey}` ) - ( n = `operation` v = `{operation}` ) - ( n = `showIfGrouped` v = `{showifgrouped}` ) ) ). + t_prop = temp13 ). client->popup_display( p13n->stringify( ) ). @@ -236,36 +332,60 @@ CLASS z2ui5_cl_demo_app_090 IMPLEMENTATION. METHOD z2ui5_view_p13n_popup. - DATA(p13n_popup) = z2ui5_cl_xml_view=>factory( ). - + DATA p13n_popup TYPE REF TO z2ui5_cl_xml_view. + p13n_popup = z2ui5_cl_xml_view=>factory( ). + + DATA temp5 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-n = `title`. + temp6-v = `My Custom View Settings`. + INSERT temp6 INTO TABLE temp5. + temp6-n = `id`. + temp6-v = `p13nPopup`. + INSERT temp6 INTO TABLE temp5. + DATA temp7 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-n = `id`. + temp8-v = `columnsPanel`. + INSERT temp8 INTO TABLE temp7. + temp8-n = `title`. + temp8-v = `Columns`. + INSERT temp8 INTO TABLE temp7. + DATA temp9 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-n = `id`. + temp10-v = `sortPanel`. + INSERT temp10 INTO TABLE temp9. + temp10-n = `title`. + temp10-v = `Sort`. + INSERT temp10 INTO TABLE temp9. + DATA temp11 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-n = `id`. + temp12-v = `groupPanel`. + INSERT temp12 INTO TABLE temp11. + temp12-n = `title`. + temp12-v = `Group`. + INSERT temp12 INTO TABLE temp11. p13n_popup->_generic( name = `Popup` ns = `p13n` - t_prop = VALUE #( ( n = `title` v = `My Custom View Settings` ) -* ( n = `close` v = client->_event( 'P13N_CLOSE' ) ) -* ( n = `warningText` v = `Are you sure?` ) - ( n = `id` v = `p13nPopup` ) -* ( n = `reset` v = client->_event( `P13N_RESET` ) ) - ) + t_prop = temp5 )->_generic( name = `panels` ns = `p13n` )->_generic( name = `SelectionPanel` ns = `p13n` - t_prop = VALUE #( ( n = `id` v = `columnsPanel` ) - ( n = `title` v = `Columns` ) -* ( n = `enableCount` v = 'X' ) -* ( n = `showHeader` v = 'X' ) - ) )->get_parent( + t_prop = temp7 )->get_parent( )->_generic( name = `SortPanel` ns = `p13n` - t_prop = VALUE #( ( n = `id` v = `sortPanel` ) - ( n = `title` v = `Sort` ) - ) + t_prop = temp9 )->get_parent( )->_generic( name = `GroupPanel` ns = `p13n` - t_prop = VALUE #( ( n = `id` v = `groupPanel` ) - ( n = `title` v = `Group` ) - ) + t_prop = temp11 )->get_parent( )->get_parent( )->get_parent( ). client->view_display( p13n_popup->stringify( ) ). @@ -274,35 +394,113 @@ CLASS z2ui5_cl_demo_app_090 IMPLEMENTATION. METHOD init_data_set. - mt_columns = VALUE #( ( columnkey = `productId` text = `Product ID` ) - ( columnkey = `name` text = `Name` ) - ( columnkey = `category` text = `Category` ) - ( columnkey = `supplierName` text = `Supplier Name` ) ). - mt_columns1 = VALUE #( - ( columnkey = `name` visible = abap_true index = 0 ) - ( columnkey = `category` visible = abap_true index = 1 ) - ( columnkey = `productId` visible = abap_false ) - ( columnkey = `supplierName` visible = abap_false ) ). - - mt_groups = VALUE #( ( columnkey = `name` text = `Name` showifgrouped = abap_true ) - ( columnkey = `category` text = `Category` showifgrouped = abap_true ) - ( columnkey = `productId` showifgrouped = abap_false ) - ( columnkey = `supplierName` showifgrouped = abap_false ) ). - - mt_columns_p13n = VALUE #( - ( visible = `true` name = `key1` label = `City` ) - ( visible = `false` name = `key2` label = `Country` ) - ( visible = `false` name = `key2` label = `Region` ) ). - - mt_sort_p13n = VALUE #( - ( sorted = `true` name = `key1` label = `City` descending = `true` ) - ( sorted = `false` name = `key2` label = `Country` descending = `false` ) - ( sorted = `false` name = `key2` label = `Region` descending = `false` ) ). - - mt_groups_p13n = VALUE #( - ( grouped = `true` name = `key1` label = `City` ) - ( grouped = `false` name = `key2` label = `Country` ) - ( grouped = `false` name = `key2` label = `Region` ) ). + DATA temp7 TYPE z2ui5_cl_demo_app_090=>tt_items2. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-columnkey = `productId`. + temp8-text = `Product ID`. + INSERT temp8 INTO TABLE temp7. + temp8-columnkey = `name`. + temp8-text = `Name`. + INSERT temp8 INTO TABLE temp7. + temp8-columnkey = `category`. + temp8-text = `Category`. + INSERT temp8 INTO TABLE temp7. + temp8-columnkey = `supplierName`. + temp8-text = `Supplier Name`. + INSERT temp8 INTO TABLE temp7. + mt_columns = temp7. + DATA temp9 TYPE z2ui5_cl_demo_app_090=>tt_items2. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-columnkey = `name`. + temp10-visible = abap_true. + temp10-index = 0. + INSERT temp10 INTO TABLE temp9. + temp10-columnkey = `category`. + temp10-visible = abap_true. + temp10-index = 1. + INSERT temp10 INTO TABLE temp9. + temp10-columnkey = `productId`. + temp10-visible = abap_false. + INSERT temp10 INTO TABLE temp9. + temp10-columnkey = `supplierName`. + temp10-visible = abap_false. + INSERT temp10 INTO TABLE temp9. + mt_columns1 = temp9. + + DATA temp11 TYPE z2ui5_cl_demo_app_090=>tt_items3. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-columnkey = `name`. + temp12-text = `Name`. + temp12-showifgrouped = abap_true. + INSERT temp12 INTO TABLE temp11. + temp12-columnkey = `category`. + temp12-text = `Category`. + temp12-showifgrouped = abap_true. + INSERT temp12 INTO TABLE temp11. + temp12-columnkey = `productId`. + temp12-showifgrouped = abap_false. + INSERT temp12 INTO TABLE temp11. + temp12-columnkey = `supplierName`. + temp12-showifgrouped = abap_false. + INSERT temp12 INTO TABLE temp11. + mt_groups = temp11. + + DATA temp13 TYPE z2ui5_cl_demo_app_090=>tt_items22. + CLEAR temp13. + DATA temp14 LIKE LINE OF temp13. + temp14-visible = `true`. + temp14-name = `key1`. + temp14-label = `City`. + INSERT temp14 INTO TABLE temp13. + temp14-visible = `false`. + temp14-name = `key2`. + temp14-label = `Country`. + INSERT temp14 INTO TABLE temp13. + temp14-visible = `false`. + temp14-name = `key2`. + temp14-label = `Region`. + INSERT temp14 INTO TABLE temp13. + mt_columns_p13n = temp13. + + DATA temp15 TYPE z2ui5_cl_demo_app_090=>tt_items32. + CLEAR temp15. + DATA temp16 LIKE LINE OF temp15. + temp16-sorted = `true`. + temp16-name = `key1`. + temp16-label = `City`. + temp16-descending = `true`. + INSERT temp16 INTO TABLE temp15. + temp16-sorted = `false`. + temp16-name = `key2`. + temp16-label = `Country`. + temp16-descending = `false`. + INSERT temp16 INTO TABLE temp15. + temp16-sorted = `false`. + temp16-name = `key2`. + temp16-label = `Region`. + temp16-descending = `false`. + INSERT temp16 INTO TABLE temp15. + mt_sort_p13n = temp15. + + DATA temp17 TYPE z2ui5_cl_demo_app_090=>tt_items33. + CLEAR temp17. + DATA temp18 LIKE LINE OF temp17. + temp18-grouped = `true`. + temp18-name = `key1`. + temp18-label = `City`. + INSERT temp18 INTO TABLE temp17. + temp18-grouped = `false`. + temp18-name = `key2`. + temp18-label = `Country`. + INSERT temp18 INTO TABLE temp17. + temp18-grouped = `false`. + temp18-name = `key2`. + temp18-label = `Region`. + INSERT temp18 INTO TABLE temp17. + mt_groups_p13n = temp17. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_091.clas.abap b/src/z2ui5_cl_demo_app_091.clas.abap index 68013f17..18115aaa 100644 --- a/src/z2ui5_cl_demo_app_091.clas.abap +++ b/src/z2ui5_cl_demo_app_091.clas.abap @@ -90,36 +90,145 @@ CLASS Z2UI5_CL_DEMO_APP_091 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_nodes = VALUE #( ( id = `1` lane = `0` title = `Sales Order 1` titleabbreviation = `SO 1` children = VALUE #( ( 10 ) ( 11 ) ( 12 ) ) state = `Positive` statetext = `OK status` focused = abap_true - highlighted = abap_false texts = VALUE #( ( `Sales Order Document Overdue long text for the wrap up all the aspects` ) ( `Not cleared` ) ) ) - ( id = `10` lane = `1` title = `Outbound Delivery 40` titleabbreviation = `OD 40` state = `Positive` statetext = `OK status` focused = abap_true highlighted = abap_false - texts = VALUE #( ( `Sales Order Document Overdue long text for the wrap up all the aspects` ) ( `Not cleared` ) ) ) - ( id = `11` lane = `1` title = `Outbound Delivery 43` titleabbreviation = `OD 43` children = VALUE #( ( 21 ) ) state = `Neutral` statetext = `OK status` focused = abap_true highlighted = abap_false - texts = VALUE #( ( `Sales Order Document Overdue long text for the wrap up all the aspects` ) ( `Not cleared` ) ) ) - ( id = `12` lane = `1` title = `Outbound Delivery 45` titleabbreviation = `OD 45` children = VALUE #( ( 20 ) ) state = `Neutral` focused = abap_false highlighted = abap_false - texts = VALUE #( ( `Sales Order Document Overdue long text for the wrap up all the aspects` ) ( `Not cleared` ) ) ) - ( id = `20` lane = `2` title = `Invoice 9` titleabbreviation = `I 9` state = `Positive` statetext = `OK status` focused = abap_false highlighted = abap_false - texts = VALUE #( ( `Sales Order Document Overdue long text for the wrap up all the aspects` ) ( `Not cleared` ) ) ) - ( id = `21` lane = `2` title = `Invoice Planned` titleabbreviation = `IP` state = `PlannedNegative` focused = abap_false highlighted = abap_false - texts = VALUE #( ( `Sales Order Document Overdue long text for the wrap up all the aspects` ) ( `Not cleared` ) ) ) ). - - mt_lanes = VALUE #( ( id = `0` icon = `sap-icon://order-status` label = `Order Processing` position = 0 ) - ( id = `1` icon = `sap-icon://monitor-payments` label = `Delivery Processing` position = 1 ) - ( id = `2` icon = `sap-icon://payment-approval` label = `Invoicing` position = 2 ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_091=>tt_nodes2. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = `1`. + temp2-lane = `0`. + temp2-title = `Sales Order 1`. + temp2-titleabbreviation = `SO 1`. + DATA temp5 TYPE z2ui5_cl_demo_app_091=>children_array. + CLEAR temp5. + INSERT 10 INTO TABLE temp5. + INSERT 11 INTO TABLE temp5. + INSERT 12 INTO TABLE temp5. + temp2-children = temp5. + temp2-state = `Positive`. + temp2-statetext = `OK status`. + temp2-focused = abap_true. + temp2-highlighted = abap_false. + DATA temp7 TYPE z2ui5_cl_demo_app_091=>texts_array. + CLEAR temp7. + INSERT `Sales Order Document Overdue long text for the wrap up all the aspects` INTO TABLE temp7. + INSERT `Not cleared` INTO TABLE temp7. + temp2-texts = temp7. + INSERT temp2 INTO TABLE temp1. + temp2-id = `10`. + temp2-lane = `1`. + temp2-title = `Outbound Delivery 40`. + temp2-titleabbreviation = `OD 40`. + temp2-state = `Positive`. + temp2-statetext = `OK status`. + temp2-focused = abap_true. + temp2-highlighted = abap_false. + DATA temp9 TYPE z2ui5_cl_demo_app_091=>texts_array. + CLEAR temp9. + INSERT `Sales Order Document Overdue long text for the wrap up all the aspects` INTO TABLE temp9. + INSERT `Not cleared` INTO TABLE temp9. + temp2-texts = temp9. + INSERT temp2 INTO TABLE temp1. + temp2-id = `11`. + temp2-lane = `1`. + temp2-title = `Outbound Delivery 43`. + temp2-titleabbreviation = `OD 43`. + DATA temp11 TYPE z2ui5_cl_demo_app_091=>children_array. + CLEAR temp11. + INSERT 21 INTO TABLE temp11. + temp2-children = temp11. + temp2-state = `Neutral`. + temp2-statetext = `OK status`. + temp2-focused = abap_true. + temp2-highlighted = abap_false. + DATA temp13 TYPE z2ui5_cl_demo_app_091=>texts_array. + CLEAR temp13. + INSERT `Sales Order Document Overdue long text for the wrap up all the aspects` INTO TABLE temp13. + INSERT `Not cleared` INTO TABLE temp13. + temp2-texts = temp13. + INSERT temp2 INTO TABLE temp1. + temp2-id = `12`. + temp2-lane = `1`. + temp2-title = `Outbound Delivery 45`. + temp2-titleabbreviation = `OD 45`. + DATA temp15 TYPE z2ui5_cl_demo_app_091=>children_array. + CLEAR temp15. + INSERT 20 INTO TABLE temp15. + temp2-children = temp15. + temp2-state = `Neutral`. + temp2-focused = abap_false. + temp2-highlighted = abap_false. + DATA temp17 TYPE z2ui5_cl_demo_app_091=>texts_array. + CLEAR temp17. + INSERT `Sales Order Document Overdue long text for the wrap up all the aspects` INTO TABLE temp17. + INSERT `Not cleared` INTO TABLE temp17. + temp2-texts = temp17. + INSERT temp2 INTO TABLE temp1. + temp2-id = `20`. + temp2-lane = `2`. + temp2-title = `Invoice 9`. + temp2-titleabbreviation = `I 9`. + temp2-state = `Positive`. + temp2-statetext = `OK status`. + temp2-focused = abap_false. + temp2-highlighted = abap_false. + DATA temp19 TYPE z2ui5_cl_demo_app_091=>texts_array. + CLEAR temp19. + INSERT `Sales Order Document Overdue long text for the wrap up all the aspects` INTO TABLE temp19. + INSERT `Not cleared` INTO TABLE temp19. + temp2-texts = temp19. + INSERT temp2 INTO TABLE temp1. + temp2-id = `21`. + temp2-lane = `2`. + temp2-title = `Invoice Planned`. + temp2-titleabbreviation = `IP`. + temp2-state = `PlannedNegative`. + temp2-focused = abap_false. + temp2-highlighted = abap_false. + DATA temp21 TYPE z2ui5_cl_demo_app_091=>texts_array. + CLEAR temp21. + INSERT `Sales Order Document Overdue long text for the wrap up all the aspects` INTO TABLE temp21. + INSERT `Not cleared` INTO TABLE temp21. + temp2-texts = temp21. + INSERT temp2 INTO TABLE temp1. + mt_nodes = temp1. + + DATA temp3 TYPE z2ui5_cl_demo_app_091=>tt_lanes5. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-id = `0`. + temp4-icon = `sap-icon://order-status`. + temp4-label = `Order Processing`. + temp4-position = 0. + INSERT temp4 INTO TABLE temp3. + temp4-id = `1`. + temp4-icon = `sap-icon://monitor-payments`. + temp4-label = `Delivery Processing`. + temp4-position = 1. + INSERT temp4 INTO TABLE temp3. + temp4-id = `2`. + temp4-icon = `sap-icon://payment-approval`. + temp4-label = `Invoicing`. + temp4-position = 2. + INSERT temp4 INTO TABLE temp3. + mt_lanes = temp3. ENDMETHOD. METHOD z2ui5_view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Process Flow' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(process_flow) = page->process_flow( + DATA process_flow TYPE REF TO z2ui5_cl_xml_view. + process_flow = page->process_flow( id = `processflow1` scrollable = abap_true wheelzoomable = abap_false diff --git a/src/z2ui5_cl_demo_app_093.clas.abap b/src/z2ui5_cl_demo_app_093.clas.abap index f2709708..f090fbb3 100644 --- a/src/z2ui5_cl_demo_app_093.clas.abap +++ b/src/z2ui5_cl_demo_app_093.clas.abap @@ -25,16 +25,19 @@ CLASS Z2UI5_CL_DEMO_APP_093 IMPLEMENTATION. product = 'tomato'. quantity = '500'. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( ns = `html` name = `script`)->_cc_plain_xml( `sap.z2ui5.myFunction();` ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - First Example' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_094.clas.abap b/src/z2ui5_cl_demo_app_094.clas.abap index 333e387b..c7256d1e 100644 --- a/src/z2ui5_cl_demo_app_094.clas.abap +++ b/src/z2ui5_cl_demo_app_094.clas.abap @@ -62,7 +62,7 @@ CLASS Z2UI5_CL_DEMO_APP_094 IMPLEMENTATION. ms_screen-ty_s_02-ty_s_03-ty_s_04-input = `struc deep switch guid name - working`. - mo_app = NEW #( ). + CREATE OBJECT mo_app. mo_app->mv_val = `instance attribute val - working`. mo_app->ms_screen-input = `instance attribute struc - working`. @@ -81,10 +81,12 @@ CLASS Z2UI5_CL_DEMO_APP_094 IMPLEMENTATION. page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `test` ). - DATA(o_grid) = page->grid( 'L6 M12 S12' + DATA o_grid TYPE REF TO z2ui5_cl_xml_view. + o_grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). - DATA(content) = o_grid->simple_form( title = 'Input' + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = o_grid->simple_form( title = 'Input' )->content( 'form' ). content->label( 'structure level 01' diff --git a/src/z2ui5_cl_demo_app_095.clas.abap b/src/z2ui5_cl_demo_app_095.clas.abap index 84fe2c01..c3bb30db 100644 --- a/src/z2ui5_cl_demo_app_095.clas.abap +++ b/src/z2ui5_cl_demo_app_095.clas.abap @@ -77,7 +77,7 @@ CLASS Z2UI5_CL_DEMO_APP_095 IMPLEMENTATION. METHOD on_init_sub. - mo_app_sub = NEW #( ). + CREATE OBJECT mo_app_sub. mo_app_sub->mo_view_parent = mo_grid_sub. mo_app_sub->z2ui5_if_app~main( client = client ). @@ -94,10 +94,12 @@ CLASS Z2UI5_CL_DEMO_APP_095 IMPLEMENTATION. navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true ). - DATA(o_grid) = page->grid( 'L6 M12 S12' + DATA o_grid TYPE REF TO z2ui5_cl_xml_view. + o_grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). - DATA(content) = o_grid->simple_form( title = 'Input' + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = o_grid->simple_form( title = 'Input' )->content( 'form' ). content->label( 'main app' )->input( diff --git a/src/z2ui5_cl_demo_app_096.clas.abap b/src/z2ui5_cl_demo_app_096.clas.abap index a855dd22..e74e850d 100644 --- a/src/z2ui5_cl_demo_app_096.clas.abap +++ b/src/z2ui5_cl_demo_app_096.clas.abap @@ -58,7 +58,8 @@ CLASS Z2UI5_CL_DEMO_APP_096 IMPLEMENTATION. IF mo_view_parent IS NOT BOUND. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'Main View' ). mo_view_parent = page->grid( 'L6 M12 S12' diff --git a/src/z2ui5_cl_demo_app_097.clas.abap b/src/z2ui5_cl_demo_app_097.clas.abap index 01bcd462..5b15b838 100644 --- a/src/z2ui5_cl_demo_app_097.clas.abap +++ b/src/z2ui5_cl_demo_app_097.clas.abap @@ -19,8 +19,8 @@ CLASS z2ui5_cl_demo_app_097 DEFINITION checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. - DATA t_tab2 TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. + DATA t_tab2 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA mv_layout TYPE string. DATA check_initialized TYPE abap_bool . DATA mv_check_enabled_01 TYPE abap_bool VALUE abap_true. @@ -43,11 +43,14 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. METHOD view_display_detail. - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->page( title = `Nested View` ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->page( title = `Nested View` ). - DATA(tab) = page->ui_table( rows = client->_bind_edit( val = t_tab2 view = client->cs_view-nested ) + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->ui_table( rows = client->_bind_edit( val = t_tab2 view = client->cs_view-nested ) editable = abap_false alternaterowcolors = abap_true rowactioncount = '1' @@ -58,7 +61,8 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. filter = client->_event( 'FILTER' ) customfilter = client->_event( 'CUSTOMFILTER' ) ). tab->ui_extension( )->overflow_toolbar( )->title( text = 'Products' ). - DATA(lo_columns) = tab->ui_columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->ui_columns( ). lo_columns->ui_column( sortproperty = 'TITLE' filterproperty = 'TITLE' )->text( text = `Index` )->ui_template( )->text( text = `{TITLE}` ). @@ -66,9 +70,12 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. filterproperty = 'DESCR' )->text( text = `DESCR` )->ui_template( )->text( text = `{DESCR}` ). lo_columns->ui_column( sortproperty = 'INFO' filterproperty = 'INFO' )->text( text = `INFO` )->ui_template( )->text( text = `{INFO}` ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${TITLE}` INTO TABLE temp1. lo_columns->get_parent( )->ui_row_action_template( )->ui_row_action( )->ui_row_action_item( icon = `sap-icon://delete` - press = client->_event( val = 'ROW_DELETE' t_arg = VALUE #( ( `${TITLE}` ) ) ) ). + press = client->_event( val = 'ROW_DELETE' t_arg = temp1 ) ). client->nest_view_display( val = lo_view_nested->stringify( ) @@ -81,7 +88,8 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. METHOD view_display_master. - DATA(page) = z2ui5_cl_xml_view=>factory( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->page( title = 'abap2UI5 - Master Detail Page with Nested View' navbuttonpress = client->_event( 'BACK' ) @@ -94,12 +102,15 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. )->link( )->get_parent( ). - DATA(col_layout) = page->flexible_column_layout( layout = client->_bind_edit( mv_layout ) + DATA col_layout TYPE REF TO z2ui5_cl_xml_view. + col_layout = page->flexible_column_layout( layout = client->_bind_edit( mv_layout ) id = 'test' ). - DATA(lr_master) = col_layout->begin_column_pages( ). + DATA lr_master TYPE REF TO z2ui5_cl_xml_view. + lr_master = col_layout->begin_column_pages( ). - DATA(lr_list) = lr_master->list( + DATA lr_list TYPE REF TO z2ui5_cl_xml_view. + lr_list = lr_master->list( headertext = 'List Ouput' items = client->_bind_edit( val = t_tab view = client->cs_view-main ) mode = `SingleSelectMaster` @@ -124,13 +135,40 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_tab = VALUE #( - ( title = 'row_01' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_02' info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_03' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_04' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_05' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_06' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp3 LIKE t_tab. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-title = 'row_01'. + temp4-info = 'completed'. + temp4-descr = 'this is a description'. + temp4-icon = 'sap-icon://account'. + INSERT temp4 INTO TABLE temp3. + temp4-title = 'row_02'. + temp4-info = 'incompleted'. + temp4-descr = 'this is a description'. + temp4-icon = 'sap-icon://account'. + INSERT temp4 INTO TABLE temp3. + temp4-title = 'row_03'. + temp4-info = 'working'. + temp4-descr = 'this is a description'. + temp4-icon = 'sap-icon://account'. + INSERT temp4 INTO TABLE temp3. + temp4-title = 'row_04'. + temp4-info = 'working'. + temp4-descr = 'this is a description'. + temp4-icon = 'sap-icon://account'. + INSERT temp4 INTO TABLE temp3. + temp4-title = 'row_05'. + temp4-info = 'completed'. + temp4-descr = 'this is a description'. + temp4-icon = 'sap-icon://account'. + INSERT temp4 INTO TABLE temp3. + temp4-title = 'row_06'. + temp4-info = 'completed'. + temp4-descr = 'this is a description'. + temp4-icon = 'sap-icon://account'. + INSERT temp4 INTO TABLE temp3. + t_tab = temp3. mv_layout = `OneColumn`. @@ -142,8 +180,10 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. CASE client->get( )-event. WHEN 'ROW_DELETE'. - DATA(lt_arg) = client->get( )-t_event_arg. - READ TABLE lt_arg INTO DATA(ls_arg) INDEX 1. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + DATA ls_arg TYPE string. + READ TABLE lt_arg INTO ls_arg INDEX 1. IF ls_arg IS NOT INITIAL. DELETE t_tab2 WHERE title = ls_arg. ENDIF. @@ -151,10 +191,12 @@ CLASS Z2UI5_CL_DEMO_APP_097 IMPLEMENTATION. client->nest_view_model_update( ). WHEN `SELCHANGE`. - DATA(lt_sel) = t_tab. + DATA lt_sel LIKE t_tab. + lt_sel = t_tab. DELETE lt_sel WHERE selected = abap_false. - READ TABLE lt_sel INTO DATA(ls_sel) INDEX 1. + DATA ls_sel TYPE z2ui5_cl_demo_app_097=>ty_row. + READ TABLE lt_sel INTO ls_sel INDEX 1. APPEND ls_sel TO t_tab2. mv_layout = `TwoColumnsMidExpanded`. diff --git a/src/z2ui5_cl_demo_app_098.clas.abap b/src/z2ui5_cl_demo_app_098.clas.abap index a596e31d..3d32ac67 100644 --- a/src/z2ui5_cl_demo_app_098.clas.abap +++ b/src/z2ui5_cl_demo_app_098.clas.abap @@ -20,9 +20,9 @@ CLASS z2ui5_cl_demo_app_098 DEFINITION END OF ty_row . DATA - t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY . DATA - t_tab2 TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + t_tab2 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY . DATA mv_layout TYPE string . DATA mv_title TYPE string . DATA check_initialized TYPE abap_bool . @@ -47,11 +47,14 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. METHOD view_display_detail. - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->page( title = `Nested View` ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->page( title = `Nested View` ). - DATA(tab) = page->ui_table( rows = client->_bind_edit( val = t_tab2 view = client->cs_view-nested ) + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->ui_table( rows = client->_bind_edit( val = t_tab2 view = client->cs_view-nested ) editable = abap_false alternaterowcolors = abap_true rowactioncount = '1' @@ -62,7 +65,8 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. filter = client->_event( 'FILTER' ) customfilter = client->_event( 'CUSTOMFILTER' ) ). tab->ui_extension( )->overflow_toolbar( )->title( text = 'Products' ). - DATA(lo_columns) = tab->ui_columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->ui_columns( ). lo_columns->ui_column( sortproperty = 'TITLE' filterproperty = 'TITLE' )->text( text = `Index` )->ui_template( )->text( text = `{TITLE}` ). @@ -70,9 +74,12 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. filterproperty = 'DESCR' )->text( text = `DESCR` )->ui_template( )->text( text = `{DESCR}` ). lo_columns->ui_column( sortproperty = 'INFO' filterproperty = 'INFO')->text( text = `INFO` )->ui_template( )->text( text = `{INFO}` ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${TITLE}` INTO TABLE temp1. lo_columns->get_parent( )->ui_row_action_template( )->ui_row_action( )->ui_row_action_item( type = `Navigation` "icon = `sap-icon://navigation-right-arrow` - press = client->_event( val = 'ROW_NAVIGATE' t_arg = VALUE #( ( `${TITLE}` ) ) ) ). + press = client->_event( val = 'ROW_NAVIGATE' t_arg = temp1 ) ). client->nest_view_display( val = lo_view_nested->stringify( ) @@ -85,14 +92,19 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. METHOD view_display_detail_detail. - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->page( title = `Nested View` ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->page( title = `Nested View` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `https://github.com/abap2UI5/abap2UI5/` INTO TABLE temp3. page = page->text( text = client->_bind( mv_title ) )->button( text = `frontend event` - press = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( `https://github.com/abap2UI5/abap2UI5/` ) ) ) ). + press = client->_event_client( val = client->cs_event-open_new_tab t_arg = temp3 ) ). client->nest2_view_display( @@ -106,9 +118,12 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. METHOD view_display_master. - DATA(page) = z2ui5_cl_xml_view=>factory( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( abap_false = client->get( )-check_launchpad_active ). + page = z2ui5_cl_xml_view=>factory( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp1 title = 'abap2UI5 - Master Detail Page with Nested View' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true ). @@ -120,12 +135,15 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. )->link( )->get_parent( ). - DATA(col_layout) = page->flexible_column_layout( layout = client->_bind_edit( mv_layout ) + DATA col_layout TYPE REF TO z2ui5_cl_xml_view. + col_layout = page->flexible_column_layout( layout = client->_bind_edit( mv_layout ) id ='test' ). - DATA(lr_master) = col_layout->begin_column_pages( ). + DATA lr_master TYPE REF TO z2ui5_cl_xml_view. + lr_master = col_layout->begin_column_pages( ). - DATA(lr_list) = lr_master->list( + DATA lr_list TYPE REF TO z2ui5_cl_xml_view. + lr_list = lr_master->list( headertext = 'List Ouput' items = client->_bind_edit( val = t_tab view = client->cs_view-main ) mode = `SingleSelectMaster` @@ -150,13 +168,40 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_tab = VALUE #( - ( title = 'row_01' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_02' info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_03' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_04' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_05' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_06' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp5 LIKE t_tab. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-title = 'row_01'. + temp6-info = 'completed'. + temp6-descr = 'this is a description'. + temp6-icon = 'sap-icon://account'. + INSERT temp6 INTO TABLE temp5. + temp6-title = 'row_02'. + temp6-info = 'incompleted'. + temp6-descr = 'this is a description'. + temp6-icon = 'sap-icon://account'. + INSERT temp6 INTO TABLE temp5. + temp6-title = 'row_03'. + temp6-info = 'working'. + temp6-descr = 'this is a description'. + temp6-icon = 'sap-icon://account'. + INSERT temp6 INTO TABLE temp5. + temp6-title = 'row_04'. + temp6-info = 'working'. + temp6-descr = 'this is a description'. + temp6-icon = 'sap-icon://account'. + INSERT temp6 INTO TABLE temp5. + temp6-title = 'row_05'. + temp6-info = 'completed'. + temp6-descr = 'this is a description'. + temp6-icon = 'sap-icon://account'. + INSERT temp6 INTO TABLE temp5. + temp6-title = 'row_06'. + temp6-info = 'completed'. + temp6-descr = 'this is a description'. + temp6-icon = 'sap-icon://account'. + INSERT temp6 INTO TABLE temp5. + t_tab = temp5. mv_layout = `OneColumn`. @@ -180,10 +225,12 @@ CLASS Z2UI5_CL_DEMO_APP_098 IMPLEMENTATION. view_display_detail_detail( ). WHEN `SELCHANGE`. - DATA(lt_sel) = t_tab. + DATA lt_sel LIKE t_tab. + lt_sel = t_tab. DELETE lt_sel WHERE selected = abap_false. - READ TABLE lt_sel INTO DATA(ls_sel) INDEX 1. + DATA ls_sel TYPE z2ui5_cl_demo_app_098=>ty_row. + READ TABLE lt_sel INTO ls_sel INDEX 1. APPEND ls_sel TO t_tab2. mv_layout = `TwoColumnsMidExpanded`. diff --git a/src/z2ui5_cl_demo_app_099.clas.abap b/src/z2ui5_cl_demo_app_099.clas.abap index 366249ef..e0b797a2 100644 --- a/src/z2ui5_cl_demo_app_099.clas.abap +++ b/src/z2ui5_cl_demo_app_099.clas.abap @@ -24,13 +24,13 @@ CLASS z2ui5_cl_demo_app_099 DEFINITION END OF ty_sort . DATA - t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY . DATA - t_tab_sort TYPE STANDARD TABLE OF ty_sort WITH EMPTY KEY . + t_tab_sort TYPE STANDARD TABLE OF ty_sort WITH DEFAULT KEY . DATA - t_tab_group TYPE STANDARD TABLE OF ty_sort WITH EMPTY KEY . + t_tab_group TYPE STANDARD TABLE OF ty_sort WITH DEFAULT KEY . DATA - t_tab_filter TYPE STANDARD TABLE OF ty_sort WITH EMPTY KEY . + t_tab_filter TYPE STANDARD TABLE OF ty_sort WITH DEFAULT KEY . DATA mv_sorter_group TYPE string . DATA mv_filter TYPE string . DATA mv_sort_descending TYPE abap_bool . @@ -90,11 +90,21 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. WHEN 'GROUP'. z2ui5_view_group_popup( ). WHEN 'CONFIRM_SORT'. - DATA(lt_arg) = client->get( )-t_event_arg. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. IF lt_arg IS NOT INITIAL. - DATA(sort_field) = lt_arg[ 1 ]. + DATA sort_field LIKE LINE OF lt_arg. + DATA temp1 LIKE LINE OF lt_arg. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + sort_field = temp1. IF mv_sort_descending = abap_true. SORT t_tab BY (sort_field) DESCENDING. @@ -113,20 +123,36 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. IF lt_arg IS NOT INITIAL. - DATA(filter_string) = lt_arg[ 1 ]. - SPLIT filter_string AT ':' INTO DATA(lv_dummy) filter_string. + DATA filter_string LIKE LINE OF lt_arg. + DATA temp3 LIKE LINE OF lt_arg. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + filter_string = temp3. + DATA lv_dummy TYPE string. + SPLIT filter_string AT ':' INTO lv_dummy filter_string. CONDENSE filter_string NO-GAPS. - SPLIT filter_string AT `(` INTO DATA(lv_field) DATA(lv_values). + DATA lv_field TYPE string. + DATA lv_values TYPE string. + SPLIT filter_string AT `(` INTO lv_field lv_values. TRANSLATE lv_field TO UPPER CASE. - DATA(lv_values_len) = strlen( lv_values ) - 1. + DATA lv_values_len TYPE i. + lv_values_len = strlen( lv_values ) - 1. lv_values = lv_values+0(lv_values_len). - SPLIT lv_values AT ',' INTO TABLE DATA(lt_values) IN CHARACTER MODE. + DATA lt_values TYPE STANDARD TABLE OF string WITH DEFAULT KEY. + SPLIT lv_values AT ',' INTO TABLE lt_values IN CHARACTER MODE. IF sy-subrc = 0. - LOOP AT lt_values INTO DATA(lv_val). + DATA lv_val LIKE LINE OF lt_values. + LOOP AT lt_values INTO lv_val. mv_filter = mv_filter && `{path:'` && lv_field && `',operator: 'EQ',value1:'` && lv_val && `'},`. ENDLOOP. ENDIF. - DATA(mv_filter_len) = strlen( mv_filter ) - 1. + DATA mv_filter_len TYPE i. + mv_filter_len = strlen( mv_filter ) - 1. mv_filter = mv_filter+0(mv_filter_len). @@ -139,7 +165,16 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. IF lt_arg IS NOT INITIAL. - DATA(group_field) = lt_arg[ 1 ]. + DATA group_field LIKE LINE OF lt_arg. + DATA temp5 LIKE LINE OF lt_arg. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + group_field = temp5. IF group_field IS NOT INITIAL. @@ -175,28 +210,82 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. METHOD z2ui5_set_data. - t_tab = VALUE #( - ( title = 'row_01' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_02' info = 'incompleted' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_03' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_04' info = 'working' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_05' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'row_06' info = 'completed' descr = 'this is a description' icon = 'sap-icon://account' ) ). - - t_tab_group = VALUE #( - ( text = `Title` key = `title` ) - ( text = `Info` key = `info` ) - ( text = `Description` key = `descr` ) ). - - t_tab_sort = VALUE #( - ( text = `Title` key = `title` ) - ( text = `Info` key = `info` ) - ( text = `Description` key = `descr` ) ). - - t_tab_filter = VALUE #( - ( text = `Title` key = `Title` ) - ( text = `Descr` key = `Descr` ) - ( text = `Info` key = `Info` ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'row_01'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_02'. + temp2-info = 'incompleted'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_03'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_04'. + temp2-info = 'working'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_05'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'row_06'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. + + DATA temp3 LIKE t_tab_group. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-text = `Title`. + temp4-key = `title`. + INSERT temp4 INTO TABLE temp3. + temp4-text = `Info`. + temp4-key = `info`. + INSERT temp4 INTO TABLE temp3. + temp4-text = `Description`. + temp4-key = `descr`. + INSERT temp4 INTO TABLE temp3. + t_tab_group = temp3. + + DATA temp5 LIKE t_tab_sort. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-text = `Title`. + temp6-key = `title`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Info`. + temp6-key = `info`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Description`. + temp6-key = `descr`. + INSERT temp6 INTO TABLE temp5. + t_tab_sort = temp5. + + DATA temp7 LIKE t_tab_filter. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-text = `Title`. + temp8-key = `Title`. + INSERT temp8 INTO TABLE temp7. + temp8-text = `Descr`. + temp8-key = `Descr`. + INSERT temp8 INTO TABLE temp7. + temp8-text = `Info`. + temp8-key = `Info`. + INSERT temp8 INTO TABLE temp7. + t_tab_filter = temp7. ENDMETHOD. @@ -204,8 +293,10 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( 'BACK' ) @@ -260,10 +351,15 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. METHOD z2ui5_view_filter_popup. - DATA(popup_filter) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup_filter TYPE REF TO z2ui5_cl_xml_view. + popup_filter = z2ui5_cl_xml_view=>factory_popup( ). - DATA(filter_view) = popup_filter->view_settings_dialog( filteritems = client->_bind_edit( t_tab_filter ) - confirm = client->_event( val = `CONFIRM_FILTER` t_arg = VALUE #( ( `${$parameters>/filterString}` ) ) ) + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `${$parameters>/filterString}` INTO TABLE temp9. + DATA filter_view TYPE REF TO z2ui5_cl_xml_view. + filter_view = popup_filter->view_settings_dialog( filteritems = client->_bind_edit( t_tab_filter ) + confirm = client->_event( val = `CONFIRM_FILTER` t_arg = temp9 ) )->filter_items( )->view_settings_filter_item( multiselect = abap_true text = `{TEXT}` @@ -283,9 +379,14 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. METHOD z2ui5_view_group_popup. - DATA(popup_group) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup_group TYPE REF TO z2ui5_cl_xml_view. + popup_group = z2ui5_cl_xml_view=>factory_popup( ). - DATA(group_view) = popup_group->view_settings_dialog( confirm = client->_event( val = `CONFIRM_GROUP` t_arg = VALUE #( ( `${$parameters>/groupItem/mProperties/key}` ) ) ) + DATA temp11 TYPE string_table. + CLEAR temp11. + INSERT `${$parameters>/groupItem/mProperties/key}` INTO TABLE temp11. + DATA group_view TYPE REF TO z2ui5_cl_xml_view. + group_view = popup_group->view_settings_dialog( confirm = client->_event( val = `CONFIRM_GROUP` t_arg = temp11 ) reset = client->_event( `RESET_GROUP` ) groupdescending = client->_bind_edit( mv_group_descending ) groupitems = client->_bind_edit( t_tab_group ) @@ -300,7 +401,8 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. METHOD z2ui5_view_settings_popup. - DATA(popup_settings) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup_settings TYPE REF TO z2ui5_cl_xml_view. + popup_settings = z2ui5_cl_xml_view=>factory_popup( ). popup_settings = popup_settings->view_settings_dialog( confirm = client->_event( 'ALL_EVENT' ) @@ -330,10 +432,15 @@ CLASS Z2UI5_CL_DEMO_APP_099 IMPLEMENTATION. METHOD z2ui5_view_sort_popup. - DATA(popup_sort) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup_sort TYPE REF TO z2ui5_cl_xml_view. + popup_sort = z2ui5_cl_xml_view=>factory_popup( ). - DATA(sort_view) = popup_sort->view_settings_dialog( - confirm = client->_event( val = `CONFIRM_SORT` t_arg = VALUE #( ( `${$parameters>/sortItem/mProperties/key}` ) ) ) + DATA temp13 TYPE string_table. + CLEAR temp13. + INSERT `${$parameters>/sortItem/mProperties/key}` INTO TABLE temp13. + DATA sort_view TYPE REF TO z2ui5_cl_xml_view. + sort_view = popup_sort->view_settings_dialog( + confirm = client->_event( val = `CONFIRM_SORT` t_arg = temp13 ) sortitems = client->_bind_edit( t_tab_sort ) sortdescending = client->_bind_edit( mv_sort_descending ) )->sort_items( diff --git a/src/z2ui5_cl_demo_app_100.clas.abap b/src/z2ui5_cl_demo_app_100.clas.abap index 6a091dee..0eff3e31 100644 --- a/src/z2ui5_cl_demo_app_100.clas.abap +++ b/src/z2ui5_cl_demo_app_100.clas.abap @@ -22,7 +22,7 @@ CLASS z2ui5_cl_demo_app_100 DEFINITION process TYPE string, process_state TYPE string, END OF ty_s_tab . - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mt_table TYPE ty_t_table . DATA lv_selkz TYPE abap_bool . @@ -76,13 +76,88 @@ CLASS Z2UI5_CL_DEMO_APP_100 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( selkz = abap_false row_id = '1' product = 'table' create_date = `01.01.2023` create_by = `Olaf` storage_location = `AREA_001` quantity = 400 meins = 'ST' price = '1000.50' waers = 'EUR' process = '10' process_state = 'None' ) - ( selkz = abap_false row_id = '2' product = 'chair' create_date = `01.01.2022` create_by = `Karlo` storage_location = `AREA_001` quantity = 123 meins = 'ST' price = '2000.55' waers = 'USD' process = '20' process_state = 'Warning' ) - ( selkz = abap_false row_id = '3' product = 'sofa' create_date = `01.05.2021` create_by = `Elin` storage_location = `AREA_002` quantity = 700 meins = 'ST' price = '3000.11' waers = 'CNY' process = '30' process_state = 'Success' ) - ( selkz = abap_false row_id = '4' product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_002` quantity = 200 meins = 'ST' price = '4000.88' waers = 'USD' process = '40' process_state = 'Information' ) - ( selkz = abap_false row_id = '5' product = 'printer' create_date = `01.01.2023` create_by = `Renate` storage_location = `AREA_003` quantity = 90 meins = 'ST' price = '5000.47' waers = 'EUR' process = '70' process_state = 'Warning' ) - ( selkz = abap_false row_id = '6' product = 'table2' create_date = `01.01.2023` create_by = `Angela` storage_location = `AREA_003` quantity = 110 meins = 'ST' price = '6000.33' waers = 'GBP' process = '90' process_state = 'Error' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_100=>ty_t_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-selkz = abap_false. + temp2-row_id = '1'. + temp2-product = 'table'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Olaf`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + temp2-meins = 'ST'. + temp2-price = '1000.50'. + temp2-waers = 'EUR'. + temp2-process = '10'. + temp2-process_state = 'None'. + INSERT temp2 INTO TABLE temp1. + temp2-selkz = abap_false. + temp2-row_id = '2'. + temp2-product = 'chair'. + temp2-create_date = `01.01.2022`. + temp2-create_by = `Karlo`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 123. + temp2-meins = 'ST'. + temp2-price = '2000.55'. + temp2-waers = 'USD'. + temp2-process = '20'. + temp2-process_state = 'Warning'. + INSERT temp2 INTO TABLE temp1. + temp2-selkz = abap_false. + temp2-row_id = '3'. + temp2-product = 'sofa'. + temp2-create_date = `01.05.2021`. + temp2-create_by = `Elin`. + temp2-storage_location = `AREA_002`. + temp2-quantity = 700. + temp2-meins = 'ST'. + temp2-price = '3000.11'. + temp2-waers = 'CNY'. + temp2-process = '30'. + temp2-process_state = 'Success'. + INSERT temp2 INTO TABLE temp1. + temp2-selkz = abap_false. + temp2-row_id = '4'. + temp2-product = 'computer'. + temp2-create_date = `27.01.2023`. + temp2-create_by = `Theo`. + temp2-storage_location = `AREA_002`. + temp2-quantity = 200. + temp2-meins = 'ST'. + temp2-price = '4000.88'. + temp2-waers = 'USD'. + temp2-process = '40'. + temp2-process_state = 'Information'. + INSERT temp2 INTO TABLE temp1. + temp2-selkz = abap_false. + temp2-row_id = '5'. + temp2-product = 'printer'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Renate`. + temp2-storage_location = `AREA_003`. + temp2-quantity = 90. + temp2-meins = 'ST'. + temp2-price = '5000.47'. + temp2-waers = 'EUR'. + temp2-process = '70'. + temp2-process_state = 'Warning'. + INSERT temp2 INTO TABLE temp1. + temp2-selkz = abap_false. + temp2-row_id = '6'. + temp2-product = 'table2'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Angela`. + temp2-storage_location = `AREA_003`. + temp2-quantity = 110. + temp2-meins = 'ST'. + temp2-price = '6000.33'. + temp2-waers = 'GBP'. + temp2-process = '90'. + temp2-process_state = 'Error'. + INSERT temp2 INTO TABLE temp1. + mt_table = temp1. ENDMETHOD. @@ -90,8 +165,10 @@ CLASS Z2UI5_CL_DEMO_APP_100 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( 'BACK' ) @@ -101,7 +178,8 @@ CLASS Z2UI5_CL_DEMO_APP_100 IMPLEMENTATION. )->get_parent( ). - DATA(tab) = page->ui_table( rows = client->_bind( val = mt_table ) + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->ui_table( rows = client->_bind( val = mt_table ) id = `persoTable` editable = abap_false alternaterowcolors = abap_true @@ -118,7 +196,8 @@ CLASS Z2UI5_CL_DEMO_APP_100 IMPLEMENTATION. )->variant_item( key = `{KEY}` text = `{TEXT}` executeonselection = abap_true )->get_parent( ). - DATA(lo_columns) = tab->ui_columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->ui_columns( ). lo_columns->ui_column( width = '4rem' )->checkbox( selected = client->_bind_edit( lv_selkz ) enabled = abap_true select = client->_event( val = `SELKZ` ) )->ui_template( )->checkbox( selected = `{SELKZ}` ). @@ -156,12 +235,18 @@ CLASS Z2UI5_CL_DEMO_APP_100 IMPLEMENTATION. sortproperty = 'PRICE' filterproperty = 'PRICE' )->text( text = `Price` )->ui_template( )->currency( value = `{PRICE}` currency = `{WAERS}` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${ROW_ID}` INTO TABLE temp3. + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${ROW_ID}` INTO TABLE temp1. lo_columns->get_parent( )->ui_row_action_template( )->ui_row_action( )->ui_row_action_item( type = 'Navigation' - press = client->_event( val = 'ROW_ACTION_ITEM_NAVIGATION' t_arg = VALUE #( ( `${ROW_ID}` ) ) ) + press = client->_event( val = 'ROW_ACTION_ITEM_NAVIGATION' t_arg = temp3 ) )->get_parent( )->ui_row_action_item( icon = 'sap-icon://edit' text = 'Edit' - press = client->_event( val = 'ROW_ACTION_ITEM_EDIT' t_arg = VALUE #( ( `${ROW_ID}` ) ) ) ). + press = client->_event( val = 'ROW_ACTION_ITEM_EDIT' t_arg = temp1 ) ). * client->view_display( view->stringify( ) ). @@ -171,7 +256,8 @@ CLASS Z2UI5_CL_DEMO_APP_100 IMPLEMENTATION. METHOD z2ui5_view_vm_popup. - DATA(popup_sort) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup_sort TYPE REF TO z2ui5_cl_xml_view. + popup_sort = z2ui5_cl_xml_view=>factory_popup( ). client->popup_display( popup_sort->stringify( ) ). ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_101.clas.abap b/src/z2ui5_cl_demo_app_101.clas.abap index b0218438..5985f099 100644 --- a/src/z2ui5_cl_demo_app_101.clas.abap +++ b/src/z2ui5_cl_demo_app_101.clas.abap @@ -15,7 +15,8 @@ CLASS z2ui5_cl_demo_app_101 DEFINITION text TYPE string, END OF ty_feed. - DATA mt_feed TYPE TABLE OF ty_feed. + TYPES temp1_c64fbbad04 TYPE TABLE OF ty_feed. +DATA mt_feed TYPE temp1_c64fbbad04. DATA ms_feed TYPE ty_feed. DATA mv_value TYPE string. @@ -73,29 +74,46 @@ CLASS z2ui5_cl_demo_app_101 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_feed = VALUE #( - ( author = `choper725` authorpic = `employee` type = `Request` date = `August 26 2023` - text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, seddiamnonumyeirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna` && - `aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` ) - ( author = `choper725` authorpic = `sap-icon://employee` type = `Reply` date = `August 26 2023` text = `this is feed input` ) ). + DATA temp1 LIKE mt_feed. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-author = `choper725`. + temp2-authorpic = `employee`. + temp2-type = `Request`. + temp2-date = `August 26 2023`. + temp2-text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, seddiamnonumyeirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna` && +`aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `choper725`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-date = `August 26 2023`. + temp2-text = `this is feed input`. + INSERT temp2 INTO TABLE temp1. + mt_feed = temp1. ENDMETHOD. METHOD z2ui5_view_display. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = 'Feed Input' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(fi) = page->vbox( + DATA fi TYPE REF TO z2ui5_cl_xml_view. + fi = page->vbox( )->feed_input( post = client->_event( val = 'POST' ) growing = abap_true rows = `4` diff --git a/src/z2ui5_cl_demo_app_103.clas.abap b/src/z2ui5_cl_demo_app_103.clas.abap index bdd36f01..eb654d72 100644 --- a/src/z2ui5_cl_demo_app_103.clas.abap +++ b/src/z2ui5_cl_demo_app_103.clas.abap @@ -48,7 +48,8 @@ CLASS z2ui5_cl_demo_app_103 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Side Panel Example' navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_104.clas.abap b/src/z2ui5_cl_demo_app_104.clas.abap index 3c4fdf4f..91e4ae6e 100644 --- a/src/z2ui5_cl_demo_app_104.clas.abap +++ b/src/z2ui5_cl_demo_app_104.clas.abap @@ -23,9 +23,9 @@ CLASS z2ui5_cl_demo_app_104 DEFINITION END OF ty_row . DATA - t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY . DATA - t_tab2 TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + t_tab2 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY . DATA mv_layout TYPE string . DATA mv_title TYPE string . DATA check_initialized TYPE abap_bool . @@ -56,7 +56,8 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. IF mo_app_sub IS BOUND. - ASSIGN mo_app_sub->('MO_VIEW_PARENT') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app_sub->('MO_VIEW_PARENT') TO . = mo_grid_sub. CALL METHOD mo_app_sub->('Z2UI5_IF_APP~MAIN') EXPORTING client = client. @@ -69,7 +70,8 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. classname = to_upper( classname ). CREATE OBJECT mo_app_sub TYPE (classname). - ASSIGN mo_app_sub->('MO_VIEW_PARENT') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app_sub->('MO_VIEW_PARENT') TO . = mo_grid_sub. CALL METHOD mo_app_sub->('Z2UI5_IF_APP~MAIN') EXPORTING client = client. @@ -79,7 +81,8 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. METHOD view_display_detail. lo_view_nested = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view_nested->page( title = `Nested View` ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = lo_view_nested->page( title = `Nested View` ). mo_grid_sub = page->grid( 'L12 M12 S12' )->content( 'layout' ). @@ -88,7 +91,8 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. METHOD view_display_master. - DATA(page) = z2ui5_cl_xml_view=>factory( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->page( title = 'abap2UI5 - Master Detail Page with Nested View' navbuttonpress = client->_event( 'BACK' ) @@ -101,12 +105,15 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. )->link( )->get_parent( ). - DATA(col_layout) = page->flexible_column_layout( layout = client->_bind_edit( mv_layout ) + DATA col_layout TYPE REF TO z2ui5_cl_xml_view. + col_layout = page->flexible_column_layout( layout = client->_bind_edit( mv_layout ) id ='test' ). - DATA(lr_master) = col_layout->begin_column_pages( ). + DATA lr_master TYPE REF TO z2ui5_cl_xml_view. + lr_master = col_layout->begin_column_pages( ). - DATA(lr_list) = lr_master->list( + DATA lr_list TYPE REF TO z2ui5_cl_xml_view. + lr_list = lr_master->list( headertext = 'List Ouput' items = client->_bind_edit( val = t_tab view = client->cs_view-main ) mode = `SingleSelectMaster` @@ -131,9 +138,20 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_tab = VALUE #( - ( title = 'Class 1' info = 'z2ui5_cl_demo_app_105' descr = 'this is a description' icon = 'sap-icon://account' ) - ( title = 'Class 2' info = 'z2ui5_cl_demo_app_112' descr = 'this is a description' icon = 'sap-icon://account' ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'Class 1'. + temp2-info = 'z2ui5_cl_demo_app_105'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Class 2'. + temp2-info = 'z2ui5_cl_demo_app_112'. + temp2-descr = 'this is a description'. + temp2-icon = 'sap-icon://account'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. mv_layout = `OneColumn`. view_display_master( ). @@ -145,10 +163,12 @@ CLASS z2ui5_cl_demo_app_104 IMPLEMENTATION. WHEN `SELCHANGE`. - DATA(lt_sel) = t_tab. + DATA lt_sel LIKE t_tab. + lt_sel = t_tab. DELETE lt_sel WHERE selected = abap_false. - READ TABLE lt_sel INTO DATA(ls_sel) INDEX 1. + DATA ls_sel TYPE z2ui5_cl_demo_app_104=>ty_row. + READ TABLE lt_sel INTO ls_sel INDEX 1. APPEND ls_sel TO t_tab2. IF classname IS NOT INITIAL. diff --git a/src/z2ui5_cl_demo_app_106.clas.abap b/src/z2ui5_cl_demo_app_106.clas.abap index 9639d640..53b15b42 100644 --- a/src/z2ui5_cl_demo_app_106.clas.abap +++ b/src/z2ui5_cl_demo_app_106.clas.abap @@ -23,13 +23,17 @@ CLASS z2ui5_cl_demo_app_106 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(lo_p) = view->shell( + DATA lo_p TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + lo_p = view->shell( )->page( title = 'abap2UI5 - Rich Text Editor' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). lo_p->rich_text_editor( width = `100%` diff --git a/src/z2ui5_cl_demo_app_107.clas.abap b/src/z2ui5_cl_demo_app_107.clas.abap index 1c4f0d02..858738b6 100644 --- a/src/z2ui5_cl_demo_app_107.clas.abap +++ b/src/z2ui5_cl_demo_app_107.clas.abap @@ -15,8 +15,9 @@ CLASS z2ui5_cl_demo_app_107 DEFINITION url TYPE string, END OF ty_items . - DATA - mt_items TYPE TABLE OF ty_items WITH DEFAULT KEY . + TYPES temp1_ca2cb7b652 TYPE TABLE OF ty_items WITH DEFAULT KEY. +DATA + mt_items TYPE temp1_ca2cb7b652 . DATA mv_file_raw TYPE string . PROTECTED SECTION. @@ -100,12 +101,16 @@ CLASS Z2UI5_CL_DEMO_APP_107 IMPLEMENTATION. client->_bind_edit( mv_file_raw ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - P13N Dialog' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). page = page->upload_set( instantupload = abap_true diff --git a/src/z2ui5_cl_demo_app_108.clas.abap b/src/z2ui5_cl_demo_app_108.clas.abap index 152756b8..23f978e3 100644 --- a/src/z2ui5_cl_demo_app_108.clas.abap +++ b/src/z2ui5_cl_demo_app_108.clas.abap @@ -69,7 +69,8 @@ CLASS Z2UI5_CL_DEMO_APP_108 IMPLEMENTATION. METHOD z2ui5_on_rendering. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Side Panel Example' navbuttonpress = client->_event( 'BACK' ) @@ -79,7 +80,8 @@ CLASS Z2UI5_CL_DEMO_APP_108 IMPLEMENTATION. )->link( )->get_parent( ). - DATA(side_panel) = page->side_panel( sidepanelposition = `Left` + DATA side_panel TYPE REF TO z2ui5_cl_xml_view. + side_panel = page->side_panel( sidepanelposition = `Left` )->main_content( )->button( text = `Button 1` )->button( text = `Button 2` diff --git a/src/z2ui5_cl_demo_app_109.clas.abap b/src/z2ui5_cl_demo_app_109.clas.abap index 9454862e..7758d2c9 100644 --- a/src/z2ui5_cl_demo_app_109.clas.abap +++ b/src/z2ui5_cl_demo_app_109.clas.abap @@ -32,7 +32,8 @@ CLASS z2ui5_cl_demo_app_109 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = mv_placement )->quick_view_page( pageid = `employeePageId` header = `Employee Info` @@ -74,12 +75,15 @@ CLASS z2ui5_cl_demo_app_109 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popover Quickview Examples' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( 'QuickView Popover' )->content( 'form' )->title( 'QuickView Popover' diff --git a/src/z2ui5_cl_demo_app_110.clas.abap b/src/z2ui5_cl_demo_app_110.clas.abap index 07594068..95b06197 100644 --- a/src/z2ui5_cl_demo_app_110.clas.abap +++ b/src/z2ui5_cl_demo_app_110.clas.abap @@ -29,12 +29,15 @@ CLASS Z2UI5_CL_DEMO_APP_110 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Sample: MaskInput' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Generic Mask Input' layout = 'ColumnLayout' editable = abap_true diff --git a/src/z2ui5_cl_demo_app_111.clas.abap b/src/z2ui5_cl_demo_app_111.clas.abap index c3401cbe..f935af44 100644 --- a/src/z2ui5_cl_demo_app_111.clas.abap +++ b/src/z2ui5_cl_demo_app_111.clas.abap @@ -17,7 +17,7 @@ CLASS z2ui5_cl_demo_app_111 DEFINITION quantity TYPE i, END OF ty_s_tab . TYPES - ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY . + ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY . DATA mv_search_value TYPE string . DATA mt_table TYPE ty_t_table . @@ -86,13 +86,46 @@ CLASS z2ui5_cl_demo_app_111 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_111=>ty_t_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product = 'table'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'chair'. + temp2-create_date = `01.01.2022`. + temp2-create_by = `James`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 123. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'sofa'. + temp2-create_date = `01.05.2021`. + temp2-create_by = `Simone`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 700. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'computer'. + temp2-create_date = `27.01.2023`. + temp2-create_by = `Theo`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 200. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'printer'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Hannah`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 90. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'table2'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Julia`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 110. + INSERT temp2 INTO TABLE temp1. + mt_table = temp1. ENDMETHOD. @@ -101,11 +134,16 @@ CLASS z2ui5_cl_demo_app_111 IMPLEMENTATION. IF mv_search_value IS NOT INITIAL. - LOOP AT mt_table REFERENCE INTO DATA(lr_row). - DATA(lv_row) = ``. - DATA(lv_index) = 1. + DATA temp3 LIKE LINE OF mt_table. + DATA lr_row LIKE REF TO temp3. + LOOP AT mt_table REFERENCE INTO lr_row. + DATA lv_row TYPE string. + lv_row = ``. + DATA lv_index TYPE i. + lv_index = 1. DO. - ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO . IF sy-subrc <> 0. EXIT. ENDIF. @@ -124,7 +162,8 @@ CLASS z2ui5_cl_demo_app_111 IMPLEMENTATION. METHOD z2ui5_view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). client->view_display( z2ui5_cl_xml_view=>factory( * )->_cc_plain_xml( `` && lv_script && `` @@ -134,21 +173,27 @@ CLASS z2ui5_cl_demo_app_111 IMPLEMENTATION. - DATA(page1) = view->page( id = `page_main` + DATA page1 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page1 = view->page( id = `page_main` title = 'abap2UI5 - List Report Features' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(page) = page1->dynamic_page( headerexpanded = abap_true + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = page1->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). - DATA(header_title) = page->title( ns = 'f' )->get( )->dynamic_page_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). header_title->heading( ns = 'f' )->smart_variant_management( id = `svm` showexecuteonselection = abap_true ). header_title->expanded_content( 'f' ). header_title->snapped_content( ns = 'f' ). - DATA(lo_fb) = page->header( )->dynamic_page_header( pinnable = abap_true ). + DATA lo_fb TYPE REF TO z2ui5_cl_xml_view. + lo_fb = page->header( )->dynamic_page_header( pinnable = abap_true ). lo_fb->filter_bar( id = `fbar` persistencykey = `myPersKey` @@ -199,19 +244,23 @@ CLASS z2ui5_cl_demo_app_111 IMPLEMENTATION. )->get( )->suggestion_items( )->item( text = `{QUANTITY}` )->get_parent( )->get_parent( )->get_parent( ). - DATA(cont) = page->content( ns = 'f' ). + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->content( ns = 'f' ). - DATA(tab) = cont->table( id = `table1` + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = cont->table( id = `table1` items = client->_bind_edit( val = mt_table ) ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). diff --git a/src/z2ui5_cl_demo_app_113.clas.abap b/src/z2ui5_cl_demo_app_113.clas.abap index 325da751..9070f506 100644 --- a/src/z2ui5_cl_demo_app_113.clas.abap +++ b/src/z2ui5_cl_demo_app_113.clas.abap @@ -17,7 +17,8 @@ CLASS z2ui5_cl_demo_app_113 DEFINITION text TYPE string, END OF ty_feed. - DATA mt_feed TYPE TABLE OF ty_feed. + TYPES temp1_4a20fb9fa2 TYPE TABLE OF ty_feed. +DATA mt_feed TYPE temp1_4a20fb9fa2. DATA ms_feed TYPE ty_feed. PROTECTED SECTION. @@ -62,39 +63,105 @@ CLASS z2ui5_cl_demo_app_113 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_feed = VALUE #( - ( author = `Developer9` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.11.2023` text = `newest entry` ) - ( author = `Developer8` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.10.2023` text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor` ) - ( author = `Developer7` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.09.2023` text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor` ) - ( author = `Developer6` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.08.2023` text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor` ) - ( author = `Developer5` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.07.2023` text = `this is a text` ) - ( author = `Developer4` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.06.2023` text = `this is another entry Product D` ) - ( author = `Developer3` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.05.2023` text = `this is another entry Product C` ) - ( author = `Developer2` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.04.2023` text = `this is another entry Product B` ) - ( author = `Developer1` authorpic = `sap-icon://employee` type = `Reply` datetime = `01.03.2023` text = `this is another entry Product A` ) - ( author = `Developer` title = `this is a title` datetime = `01.02.2023` authorpic = `sap-icon://employee` type = `Request` date = `August 26 2023` - text = - `this is a long text Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, seddiamnonumyeirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna` && - `aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` ) - ( title = `first entry` author = `Developer` datetime = `01.01.2023` authorpic = `sap-icon://employee` type = `Reply` date = `August 26 2023` text = `this is the beginning of a timeline` ) ). + DATA temp1 LIKE mt_feed. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-author = `Developer9`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.11.2023`. + temp2-text = `newest entry`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer8`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.10.2023`. + temp2-text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer7`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.09.2023`. + temp2-text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer6`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.08.2023`. + temp2-text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer5`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.07.2023`. + temp2-text = `this is a text`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer4`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.06.2023`. + temp2-text = `this is another entry Product D`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer3`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.05.2023`. + temp2-text = `this is another entry Product C`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer2`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.04.2023`. + temp2-text = `this is another entry Product B`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer1`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-datetime = `01.03.2023`. + temp2-text = `this is another entry Product A`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `Developer`. + temp2-title = `this is a title`. + temp2-datetime = `01.02.2023`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Request`. + temp2-date = `August 26 2023`. + temp2-text = +`this is a long text Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, seddiamnonumyeirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna` && +`aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `first entry`. + temp2-author = `Developer`. + temp2-datetime = `01.01.2023`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-date = `August 26 2023`. + temp2-text = `this is the beginning of a timeline`. + INSERT temp2 INTO TABLE temp1. + mt_feed = temp1. ENDMETHOD. METHOD z2ui5_view_display. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view->shell( )->page( + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = 'Timeline' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(timeline) = page->timeline( + DATA timeline TYPE REF TO z2ui5_cl_xml_view. + timeline = page->timeline( content = client->_bind( mt_feed ) ). timeline->content( ns = `commons` )->timeline_item( diff --git a/src/z2ui5_cl_demo_app_114.clas.abap b/src/z2ui5_cl_demo_app_114.clas.abap index e39ea911..72942c31 100644 --- a/src/z2ui5_cl_demo_app_114.clas.abap +++ b/src/z2ui5_cl_demo_app_114.clas.abap @@ -15,7 +15,8 @@ CLASS z2ui5_cl_demo_app_114 DEFINITION text TYPE string, END OF ty_feed. - DATA mt_feed TYPE TABLE OF ty_feed. + TYPES temp1_f441dc833e TYPE TABLE OF ty_feed. +DATA mt_feed TYPE temp1_f441dc833e. DATA ms_feed TYPE ty_feed. DATA mv_value TYPE string. @@ -74,28 +75,44 @@ CLASS z2ui5_cl_demo_app_114 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_feed = VALUE #( - ( author = `choper725` authorpic = `employee` type = `Request` date = `August 26 2023` - text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, seddiamnonumyeirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna` && - `aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` ) - ( author = `choper725` authorpic = `sap-icon://employee` type = `Reply` date = `August 26 2023` text = `this is feed input` ) ). + DATA temp1 LIKE mt_feed. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-author = `choper725`. + temp2-authorpic = `employee`. + temp2-type = `Request`. + temp2-date = `August 26 2023`. + temp2-text = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, seddiamnonumyeirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna` && +`aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.`. + INSERT temp2 INTO TABLE temp1. + temp2-author = `choper725`. + temp2-authorpic = `sap-icon://employee`. + temp2-type = `Reply`. + temp2-date = `August 26 2023`. + temp2-text = `this is feed input`. + INSERT temp2 INTO TABLE temp1. + mt_feed = temp1. ENDMETHOD. METHOD z2ui5_view_display. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = 'Feed Input' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->flex_box( justifycontent = `Start` diff --git a/src/z2ui5_cl_demo_app_115.clas.abap b/src/z2ui5_cl_demo_app_115.clas.abap index b9dc3274..6e087115 100644 --- a/src/z2ui5_cl_demo_app_115.clas.abap +++ b/src/z2ui5_cl_demo_app_115.clas.abap @@ -23,12 +23,15 @@ CLASS Z2UI5_CL_DEMO_APP_115 IMPLEMENTATION. METHOD display_demo_output. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - CL_DEMO_OUTPUT - TODO uncomment the source code' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->_z2ui5( )->demo_output( mv_output )->stringify( ) ). diff --git a/src/z2ui5_cl_demo_app_116.clas.abap b/src/z2ui5_cl_demo_app_116.clas.abap index 7440fdfd..9212df33 100644 --- a/src/z2ui5_cl_demo_app_116.clas.abap +++ b/src/z2ui5_cl_demo_app_116.clas.abap @@ -63,17 +63,20 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. METHOD add_node. - LOOP AT prodh_nodes ASSIGNING FIELD-SYMBOL(). + FIELD-SYMBOLS LIKE LINE OF prodh_nodes. + LOOP AT prodh_nodes ASSIGNING . IF -prodh = p_prodh. -counter = -counter + 1. EXIT. ELSE. - LOOP AT -nodes ASSIGNING FIELD-SYMBOL(). + FIELD-SYMBOLS LIKE LINE OF -nodes. + LOOP AT -nodes ASSIGNING . IF -prodh = p_prodh. -counter = -counter + 1. EXIT. ELSE. - LOOP AT -nodes ASSIGNING FIELD-SYMBOL(). + FIELD-SYMBOLS LIKE LINE OF -nodes. + LOOP AT -nodes ASSIGNING . IF -prodh = p_prodh. -counter = -counter + 1. EXIT. @@ -88,7 +91,8 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. METHOD ui5_display_popover. - DATA(lo_popover) = z2ui5_cl_xml_view=>factory_popup( ). + DATA lo_popover TYPE REF TO z2ui5_cl_xml_view. + lo_popover = z2ui5_cl_xml_view=>factory_popup( ). lo_popover->popover( placement = `Right` title = 'SS' "text-028 "`Stock - Details:` "&& '-' && gv_matnr "contentwidth = `32%` @@ -110,20 +114,24 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. METHOD ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->object_page_layout( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->object_page_layout( showtitleinheadercontent = abap_true uppercaseanchorbar = abap_false ). - DATA(header_title) = page->header_title( )->object_page_dyn_header_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->header_title( )->object_page_dyn_header_title( ). header_title->expanded_heading( )->hbox( )->title( text = 'PriceList' ). - DATA(header_content) = page->header_content( ns = 'uxap'). + DATA header_content TYPE REF TO z2ui5_cl_xml_view. + header_content = page->header_content( ns = 'uxap'). header_content->block_layout( )->block_layout_row( )->block_layout_cell( backgroundcolorset = 'ColorSet10' @@ -149,11 +157,19 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. )->text( text = client->_bind( gv_date ) ). - DATA(sections) = page->sections( ). + DATA sections TYPE REF TO z2ui5_cl_xml_view. + sections = page->sections( ). - DATA(cont) = sections->object_page_section( titleuppercase = abap_false + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${PRODH}` INTO TABLE temp2. + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = sections->object_page_section( titleuppercase = abap_false id = 'Sets' title = 'Sets' )->heading( ns = `uxap` @@ -178,12 +194,12 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. )->tree_column( label = 'Counter' )->tree_template( )->link( text = `{COUNTER}` - press = client->_event( val = 'POPOVER' t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = 'POPOVER' t_arg = temp1 ) )->get_parent( )->get_parent( )->tree_column( label = 'ADD' )->tree_template( )->button( icon = 'sap-icon://add' - press = client->_event( val = 'ROW_ADD' t_arg = VALUE #( ( `${PRODH}` ) ) ) + press = client->_event( val = 'ROW_ADD' t_arg = temp2 ) tooltip = 'ADD' )->get_parent( )->get_parent( ). client->view_display( page->get_root( )->xml_get( ) ). @@ -191,29 +207,51 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. METHOD ui5_initialize. + DATA temp3 TYPE z2ui5_cl_demo_app_116=>ty_prodh_nodes. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-text = 'Machines'. + temp4-prodh = '00100'. + DATA temp5 TYPE z2ui5_cl_demo_app_116=>ty_prodh_node_level1-nodes. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-text = 'Pumps'. + temp6-prodh = '0010000100'. + DATA temp1 TYPE z2ui5_cl_demo_app_116=>ty_prodh_node_level2-nodes. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-text = 'Pump 001'. + temp2-prodh = '001000010000000100'. + INSERT temp2 INTO TABLE temp1. + temp2-text = 'Pump 002'. + temp2-prodh = '001000010000000105'. + INSERT temp2 INTO TABLE temp1. + temp6-nodes = temp1. + INSERT temp6 INTO TABLE temp5. + temp4-nodes = temp5. + INSERT temp4 INTO TABLE temp3. + temp4-text = 'Paints'. + temp4-prodh = '00110'. + DATA temp7 TYPE z2ui5_cl_demo_app_116=>ty_prodh_node_level1-nodes. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-text = 'Gloss paints'. + temp8-prodh = '0011000105'. + DATA temp9 TYPE z2ui5_cl_demo_app_116=>ty_prodh_node_level2-nodes. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-text = 'Paint 001'. + temp10-prodh = '001100010500000100'. + INSERT temp10 INTO TABLE temp9. + temp10-text = 'Paint 002'. + temp10-prodh = '001100010500000105'. + INSERT temp10 INTO TABLE temp9. + temp8-nodes = temp9. + INSERT temp8 INTO TABLE temp7. + temp4-nodes = temp7. + INSERT temp4 INTO TABLE temp3. prodh_nodes = - VALUE #( ( text = 'Machines' - prodh = '00100' - nodes = VALUE #( ( text = 'Pumps' - prodh = '0010000100' - nodes = VALUE #( ( text = 'Pump 001' - prodh = '001000010000000100' ) - ( text = 'Pump 002' - prodh = '001000010000000105' ) - ) - ) ) - ) - ( text = 'Paints' - prodh = '00110' - nodes = VALUE #( ( text = 'Gloss paints' - prodh = '0011000105' - nodes = VALUE #( ( text = 'Paint 001' - prodh = '001100010500000100' ) - ( text = 'Paint 002' - prodh = '001100010500000105' ) - ) - ) ) - ) ). + temp3. gv_user = sy-uname. gv_date = sy-datum. @@ -229,12 +267,14 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. is_initialized = abap_true. ui5_initialize( ). - DATA(lv_save_state_js) = `function saveState() {debugger;` && |\n| && + DATA lv_save_state_js TYPE string. + lv_save_state_js = `function saveState() {debugger;` && |\n| && ` var treeTable = sap.z2ui5.oView.byId("treeTable");` && |\n| && ` sap.z2ui5.treeState = treeTable.getBinding('rows').getCurrentTreeState();` && |\n| && ` }; `. - DATA(lv_reset_state_js) = `function setState() {debugger;` && |\n| && + DATA lv_reset_state_js TYPE string. + lv_reset_state_js = `function setState() {debugger;` && |\n| && ` var treeTable = sap.z2ui5.oView.byId("treeTable");` && |\n| && ` if( sap.z2ui5.treeState == undefined ) {` && |\n| && ` sap.z2ui5.treeState = treeTable.getBinding('rows').getCurrentTreeState();` && |\n| && @@ -271,11 +311,28 @@ CLASS Z2UI5_CL_DEMO_APP_116 IMPLEMENTATION. client->popup_destroy( ). WHEN 'POPOVER'. lt_event_arg = client->get( )-t_event_arg. - DATA(lv_open_by_id) = lt_event_arg[ 1 ]. + DATA lv_open_by_id LIKE LINE OF lt_event_arg. + DATA temp9 LIKE LINE OF lt_event_arg. + DATA temp10 LIKE sy-tabix. + temp10 = sy-tabix. + READ TABLE lt_event_arg INDEX 1 INTO temp9. + sy-tabix = temp10. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_open_by_id = temp9. ui5_display_popover( lv_open_by_id ). WHEN 'ROW_ADD'. - add_node( lt_event_arg[ 1 ] ). + DATA temp5 LIKE LINE OF lt_event_arg. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE lt_event_arg INDEX 1 INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + add_node( temp5 ). mv_run_js = abap_true. diff --git a/src/z2ui5_cl_demo_app_117.clas.abap b/src/z2ui5_cl_demo_app_117.clas.abap index afc8ec5c..9956f49f 100644 --- a/src/z2ui5_cl_demo_app_117.clas.abap +++ b/src/z2ui5_cl_demo_app_117.clas.abap @@ -57,7 +57,14 @@ CLASS z2ui5_cl_demo_app_117 IMPLEMENTATION. METHOD on_init. - mt_t002 = VALUE #( ( id = '1' class = 'Z2UI5_CL_DEMO_APP_126' count = '12' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_117=>ty_t_t002. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = '1'. + temp2-class = 'Z2UI5_CL_DEMO_APP_126'. + temp2-count = '12'. + INSERT temp2 INTO TABLE temp1. + mt_t002 = temp1. mv_selectedkey = '1'. @@ -65,19 +72,26 @@ CLASS z2ui5_cl_demo_app_117 IMPLEMENTATION. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'Main App calling Subapps' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( mv_selectedkey ) select = client->_event( val = 'ONSELECTICONTABBAR' ) )->items( ). - LOOP AT mt_t002 REFERENCE INTO DATA(line). + DATA temp3 LIKE LINE OF mt_t002. + DATA line LIKE REF TO temp3. + LOOP AT mt_t002 REFERENCE INTO line. lo_items->icon_tab_filter( text = line->class count = line->count key = line->id ). @@ -108,7 +122,8 @@ CLASS z2ui5_cl_demo_app_117 IMPLEMENTATION. FIELD-SYMBOLS TYPE any. - READ TABLE mt_t002 REFERENCE INTO DATA(t002) + DATA t002 TYPE REF TO z2ui5_cl_demo_app_117=>ty_s_t002. + READ TABLE mt_t002 REFERENCE INTO t002 WITH KEY id = mv_selectedkey. IF sy-subrc <> 0. @@ -130,7 +145,8 @@ CLASS z2ui5_cl_demo_app_117 IMPLEMENTATION. render_main( ). - ASSIGN mo_app->('MO_PARENT_VIEW') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MO_PARENT_VIEW') TO . IF IS ASSIGNED. = mo_main_page. ENDIF. diff --git a/src/z2ui5_cl_demo_app_118.clas.abap b/src/z2ui5_cl_demo_app_118.clas.abap index d991eef2..e7e68552 100644 --- a/src/z2ui5_cl_demo_app_118.clas.abap +++ b/src/z2ui5_cl_demo_app_118.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_118 DEFINITION adate TYPE d, atime TYPE t, END OF s_row. - TYPES t_rows TYPE STANDARD TABLE OF s_row WITH EMPTY KEY. + TYPES t_rows TYPE STANDARD TABLE OF s_row WITH DEFAULT KEY. DATA problematic_rows TYPE t_rows. DATA these_are_fine_rows TYPE t_rows. @@ -32,33 +32,84 @@ CLASS z2ui5_cl_demo_app_118 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - problematic_rows = VALUE #( - ( id = 1 descr = 'filled with the actual date and time in correct format' adate = sy-datum atime = sy-uzeit ) - ( id = 2 descr = 'correct init values' adate = '00000000' atime = '000000' ) - ( id = 3 descr = 'correct init values by ignoring' ) - ( id = 4 descr = 'filling with a zero leads to a correct init value' adate = 0 atime = 0 ) - ( id = 5 descr = 'this raises an exception now' adate = '' atime = '' ) - ( id = 6 descr = 'Fifth row' adate = sy-datum atime = sy-uzeit ) ). - - these_are_fine_rows = VALUE #( - ( id = 1 descr = 'First row' adate = sy-datum atime = sy-uzeit ) - ( id = 2 descr = 'Second row' adate = 0 atime = 0 ) - ( id = 3 descr = 'Third row' adate = 0 atime = 0 ) - ( id = 4 descr = 'Fourth row' adate = 0 atime = 0 ) - ( id = 5 descr = 'Fifth row' adate = sy-datum atime = sy-uzeit ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_118=>t_rows. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = 1. + temp2-descr = 'filled with the actual date and time in correct format'. + temp2-adate = sy-datum. + temp2-atime = sy-uzeit. + INSERT temp2 INTO TABLE temp1. + temp2-id = 2. + temp2-descr = 'correct init values'. + temp2-adate = '00000000'. + temp2-atime = '000000'. + INSERT temp2 INTO TABLE temp1. + temp2-id = 3. + temp2-descr = 'correct init values by ignoring'. + INSERT temp2 INTO TABLE temp1. + temp2-id = 4. + temp2-descr = 'filling with a zero leads to a correct init value'. + temp2-adate = 0. + temp2-atime = 0. + INSERT temp2 INTO TABLE temp1. + temp2-id = 5. + temp2-descr = 'this raises an exception now'. + temp2-adate = ''. + temp2-atime = ''. + INSERT temp2 INTO TABLE temp1. + temp2-id = 6. + temp2-descr = 'Fifth row'. + temp2-adate = sy-datum. + temp2-atime = sy-uzeit. + INSERT temp2 INTO TABLE temp1. + problematic_rows = temp1. + + DATA temp3 TYPE z2ui5_cl_demo_app_118=>t_rows. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-id = 1. + temp4-descr = 'First row'. + temp4-adate = sy-datum. + temp4-atime = sy-uzeit. + INSERT temp4 INTO TABLE temp3. + temp4-id = 2. + temp4-descr = 'Second row'. + temp4-adate = 0. + temp4-atime = 0. + INSERT temp4 INTO TABLE temp3. + temp4-id = 3. + temp4-descr = 'Third row'. + temp4-adate = 0. + temp4-atime = 0. + INSERT temp4 INTO TABLE temp3. + temp4-id = 4. + temp4-descr = 'Fourth row'. + temp4-adate = 0. + temp4-atime = 0. + INSERT temp4 INTO TABLE temp3. + temp4-id = 5. + temp4-descr = 'Fifth row'. + temp4-adate = sy-datum. + temp4-atime = sy-uzeit. + INSERT temp4 INTO TABLE temp3. + these_are_fine_rows = temp3. ENDIF. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->_z2ui5( )->title( 'ABAP2UI5 Weird behavior showcase' )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->_z2ui5( )->title( 'ABAP2UI5 Weird behavior showcase' )->shell( )->page( title = 'ABAP2UI5 Weird behavior showcase' navbuttonpress = client->_event( 'BACK' ) showheader = abap_true ). - DATA(tab_ko) = page->table( + DATA tab_ko TYPE REF TO z2ui5_cl_xml_view. + tab_ko = page->table( mode = 'MultiSelect' items = client->_bind_edit( problematic_rows ) ). @@ -86,7 +137,8 @@ CLASS z2ui5_cl_demo_app_118 IMPLEMENTATION. )->text( '{ATIME}' ). - DATA(tab_ok) = page->table( + DATA tab_ok TYPE REF TO z2ui5_cl_xml_view. + tab_ok = page->table( mode = 'MultiSelect' items = client->_bind_edit( these_are_fine_rows ) ). diff --git a/src/z2ui5_cl_demo_app_120.clas.abap b/src/z2ui5_cl_demo_app_120.clas.abap index 11c30901..19387a2d 100644 --- a/src/z2ui5_cl_demo_app_120.clas.abap +++ b/src/z2ui5_cl_demo_app_120.clas.abap @@ -24,7 +24,8 @@ CLASS z2ui5_cl_demo_app_120 DEFINITION key TYPE string, icon TYPE string, END OF ty_spot. - DATA mt_spot TYPE TABLE OF ty_spot. + TYPES temp1_0dabf66d4a TYPE TABLE OF ty_spot. +DATA mt_spot TYPE temp1_0dabf66d4a. PROTECTED SECTION. PRIVATE SECTION. @@ -39,12 +40,15 @@ CLASS z2ui5_cl_demo_app_120 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - Device Capabilities' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp3 )->_z2ui5( )->geolocation( finished = client->_event( `GEOLOCATION_LOADED` ) longitude = client->_bind_edit( longitude ) @@ -83,15 +87,27 @@ CLASS z2ui5_cl_demo_app_120 IMPLEMENTATION. WHEN 'MAP_CONTAINER_DISPLAY'. IF longitude IS NOT INITIAL. - mt_spot = VALUE #( ( pos = longitude && `;` && latitude && `;0` type = `Default` contentoffset = `0;-6` scale = `1;1;1` key = `Your Position` tooltip = `Your Position` ) ). + DATA temp1 LIKE mt_spot. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-pos = longitude && `;` && latitude && `;0`. + temp2-type = `Default`. + temp2-contentoffset = `0;-6`. + temp2-scale = `1;1;1`. + temp2-key = `Your Position`. + temp2-tooltip = `Your Position`. + INSERT temp2 INTO TABLE temp1. + mt_spot = temp1. ENDIF. view = z2ui5_cl_xml_view=>factory( ). + DATA temp4 TYPE xsdboolean. + temp4 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - Device Capabilities' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp4 )->_z2ui5( )->geolocation( finished = client->_event( ) longitude = client->_bind_edit( longitude ) diff --git a/src/z2ui5_cl_demo_app_121.clas.abap b/src/z2ui5_cl_demo_app_121.clas.abap index de113fb8..65067445 100644 --- a/src/z2ui5_cl_demo_app_121.clas.abap +++ b/src/z2ui5_cl_demo_app_121.clas.abap @@ -54,13 +54,16 @@ CLASS Z2UI5_CL_DEMO_APP_121 IMPLEMENTATION. "render view - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->_z2ui5( )->timer( finished = client->_event( `TIMER_FINISHED` ) delayms = `2000` diff --git a/src/z2ui5_cl_demo_app_122.clas.abap b/src/z2ui5_cl_demo_app_122.clas.abap index 3fc69dd3..58ceac4e 100644 --- a/src/z2ui5_cl_demo_app_122.clas.abap +++ b/src/z2ui5_cl_demo_app_122.clas.abap @@ -35,12 +35,15 @@ CLASS z2ui5_cl_demo_app_122 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->_z2ui5( )->info_frontend( finished = client->_event( `INFO_FINISHED` ) device_browser = client->_bind_edit( device_browser ) diff --git a/src/z2ui5_cl_demo_app_123.clas.abap b/src/z2ui5_cl_demo_app_123.clas.abap index 00379900..ed2c2262 100644 --- a/src/z2ui5_cl_demo_app_123.clas.abap +++ b/src/z2ui5_cl_demo_app_123.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_123 DEFINITION key TYPE string, icon TYPE string, END OF ty_spot. - DATA mt_spot TYPE TABLE OF ty_spot. + TYPES temp1_d73221ca3a TYPE TABLE OF ty_spot. +DATA mt_spot TYPE temp1_d73221ca3a. DATA check_initialized TYPE abap_bool. @@ -30,14 +31,16 @@ CLASS z2ui5_cl_demo_app_123 DEFINITION linewidth TYPE string, END OF ty_route . - DATA - mt_route TYPE TABLE OF ty_route . + TYPES temp2_d73221ca3a TYPE TABLE OF ty_route. +DATA + mt_route TYPE temp2_d73221ca3a . TYPES: BEGIN OF ty_s_legend, text TYPE string, color TYPE string, END OF ty_s_legend. - DATA mt_legend TYPE TABLE OF ty_s_legend. + TYPES temp3_d73221ca3a TYPE TABLE OF ty_s_legend. +DATA mt_legend TYPE temp3_d73221ca3a. PROTECTED SECTION. PRIVATE SECTION. @@ -53,18 +56,58 @@ CLASS z2ui5_cl_demo_app_123 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - mt_spot = VALUE #( - ( pos = `9.98336;53.55024;0` contentoffset = `0;-6` scale = `1;1;1` key = `Hamburg` tooltip = `Hamburg` type = `Default` icon = `factory` ) - ( pos = `11.5820;48.1351;0` contentoffset = `0;-5` scale = `1;1;1` key = `Munich` tooltip = `Munich` type = `Default` icon = `factory` ) - ( pos = `8.683340000;50.112000000;0` contentoffset = `0;-6` scale = `1;1;1` key = `Frankfurt` tooltip = `Frankfurt` type = `Default` icon = `factory` ) ). - - mt_route = VALUE #( - ( position = '2.3522219;48.856614;0; -74.0059731;40.7143528;0' routetype = 'Geodesic' linedash = '10;5' color = '92,186,230' colorborder = 'rgb(255,255,255)' linewidth = '25' ) ). - - - mt_legend = VALUE #( - ( text = 'Dashed flight route' color = 'rgb(92,186,230)' ) - ( text = 'Flight route' color = 'rgb(92,186,35)' ) ). + DATA temp1 LIKE mt_spot. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-pos = `9.98336;53.55024;0`. + temp2-contentoffset = `0;-6`. + temp2-scale = `1;1;1`. + temp2-key = `Hamburg`. + temp2-tooltip = `Hamburg`. + temp2-type = `Default`. + temp2-icon = `factory`. + INSERT temp2 INTO TABLE temp1. + temp2-pos = `11.5820;48.1351;0`. + temp2-contentoffset = `0;-5`. + temp2-scale = `1;1;1`. + temp2-key = `Munich`. + temp2-tooltip = `Munich`. + temp2-type = `Default`. + temp2-icon = `factory`. + INSERT temp2 INTO TABLE temp1. + temp2-pos = `8.683340000;50.112000000;0`. + temp2-contentoffset = `0;-6`. + temp2-scale = `1;1;1`. + temp2-key = `Frankfurt`. + temp2-tooltip = `Frankfurt`. + temp2-type = `Default`. + temp2-icon = `factory`. + INSERT temp2 INTO TABLE temp1. + mt_spot = temp1. + + DATA temp3 LIKE mt_route. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-position = '2.3522219;48.856614;0; -74.0059731;40.7143528;0'. + temp4-routetype = 'Geodesic'. + temp4-linedash = '10;5'. + temp4-color = '92,186,230'. + temp4-colorborder = 'rgb(255,255,255)'. + temp4-linewidth = '25'. + INSERT temp4 INTO TABLE temp3. + mt_route = temp3. + + + DATA temp5 LIKE mt_legend. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-text = 'Dashed flight route'. + temp6-color = 'rgb(92,186,230)'. + INSERT temp6 INTO TABLE temp5. + temp6-text = 'Flight route'. + temp6-color = 'rgb(92,186,35)'. + INSERT temp6 INTO TABLE temp5. + mt_legend = temp5. ENDIF. @@ -76,14 +119,19 @@ CLASS z2ui5_cl_demo_app_123 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp7 TYPE xsdboolean. + temp7 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Map Container' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp7 ). - DATA(map) = page->map_container( autoadjustheight = abap_true + DATA map TYPE REF TO z2ui5_cl_xml_view. + map = page->map_container( autoadjustheight = abap_true )->content( ns = `vk` )->container_content( title = `Analytic Map` diff --git a/src/z2ui5_cl_demo_app_124.clas.abap b/src/z2ui5_cl_demo_app_124.clas.abap index a5aab0b3..70f21eec 100644 --- a/src/z2ui5_cl_demo_app_124.clas.abap +++ b/src/z2ui5_cl_demo_app_124.clas.abap @@ -23,9 +23,26 @@ CLASS z2ui5_cl_demo_app_124 IMPLEMENTATION. WHEN 'ON_SCAN_SUCCESS'. client->message_box_display( `Scan finished!`). - DATA(lt_arg) = client->get( )-t_event_arg. - mv_scan_input = lt_arg[ 1 ]. - mv_scan_type = lt_arg[ 2 ]. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + DATA temp1 LIKE LINE OF lt_arg. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + mv_scan_input = temp1. + DATA temp3 LIKE LINE OF lt_arg. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_arg INDEX 2 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + mv_scan_type = temp3. "implement further processing here... "... client->view_model_update( ). @@ -37,12 +54,20 @@ CLASS z2ui5_cl_demo_app_124 IMPLEMENTATION. ENDCASE. + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$parameters>/text}` INTO TABLE temp5. + INSERT `${$parameters>/format}` INTO TABLE temp5. + DATA temp6 TYPE xsdboolean. + temp6 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp7 TYPE xsdboolean. + temp7 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( z2ui5_cl_xml_view=>factory( )->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp6 title = 'abap2UI5' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp7 )->simple_form( title = 'Information' editable = abap_true )->content( 'form' @@ -52,7 +77,7 @@ CLASS z2ui5_cl_demo_app_124 IMPLEMENTATION. )->input( client->_bind_edit( mv_scan_type ) )->label( `scanner` )->barcode_scanner_button( - scansuccess = client->_event( val = 'ON_SCAN_SUCCESS' t_arg = VALUE #( ( `${$parameters>/text}` ) ( `${$parameters>/format}` ) ) ) + scansuccess = client->_event( val = 'ON_SCAN_SUCCESS' t_arg = temp5 ) dialogtitle = `Barcode Scanner` )->stringify( ) ). diff --git a/src/z2ui5_cl_demo_app_125.clas.abap b/src/z2ui5_cl_demo_app_125.clas.abap index ed66f12a..96be47c2 100644 --- a/src/z2ui5_cl_demo_app_125.clas.abap +++ b/src/z2ui5_cl_demo_app_125.clas.abap @@ -21,14 +21,18 @@ CLASS Z2UI5_CL_DEMO_APP_125 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(tmp) = view->_z2ui5( )->title( client->_bind_edit( title ) + DATA tmp TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + tmp = view->_z2ui5( )->title( client->_bind_edit( title ) )->shell( )->page( title = 'abap2UI5 - Change Browser Title' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_126.clas.abap b/src/z2ui5_cl_demo_app_126.clas.abap index f24f5099..658378a2 100644 --- a/src/z2ui5_cl_demo_app_126.clas.abap +++ b/src/z2ui5_cl_demo_app_126.clas.abap @@ -48,16 +48,22 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. TRY. + DATA typedesc TYPE REF TO cl_abap_typedescr. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = 'Z2UI5_T_UTIL_01' - RECEIVING p_descr_ref = DATA(typedesc) + RECEIVING p_descr_ref = typedesc EXCEPTIONS type_not_found = 1 OTHERS = 2 ). - DATA(structdesc) = CAST cl_abap_structdescr( typedesc ). + DATA temp1 TYPE REF TO cl_abap_structdescr. + temp1 ?= typedesc. + DATA structdesc LIKE temp1. + structdesc = temp1. - DATA(comp) = structdesc->get_components( ). + DATA comp TYPE abap_component_tab. + comp = structdesc->get_components( ). - LOOP AT comp INTO DATA(com). + DATA com LIKE LINE OF comp. + LOOP AT comp INTO com. IF com-as_include = abap_false. @@ -67,13 +73,21 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. ENDLOOP. - CATCH cx_root INTO DATA(root). " TODO: variable is assigned but never used (ABAP cleaner) + DATA root TYPE REF TO cx_root. + CATCH cx_root INTO root. " TODO: variable is assigned but never used (ABAP cleaner) ENDTRY. - DATA(component) = VALUE cl_abap_structdescr=>component_table( - ( name = 'ROW_ID' - type = CAST #( cl_abap_datadescr=>describe_by_data( index ) ) ) ). + DATA temp2 TYPE cl_abap_structdescr=>component_table. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-name = 'ROW_ID'. + DATA temp4 TYPE REF TO cl_abap_datadescr. + temp4 ?= cl_abap_datadescr=>describe_by_data( index ). + temp3-type = temp4. + INSERT temp3 INTO TABLE temp2. + DATA component LIKE temp2. + component = temp2. APPEND LINES OF component TO result. @@ -86,13 +100,16 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. FIELD-SYMBOLS TYPE STANDARD TABLE. FIELD-SYMBOLS TYPE STANDARD TABLE. - DATA(t_comp) = get_comp( ). + DATA t_comp TYPE abap_component_tab. + t_comp = get_comp( ). TRY. - DATA(new_struct_desc) = cl_abap_structdescr=>create( t_comp ). + DATA new_struct_desc TYPE REF TO cl_abap_structdescr. + new_struct_desc = cl_abap_structdescr=>create( t_comp ). - DATA(new_table_desc) = cl_abap_tabledescr=>create( p_line_type = new_struct_desc + DATA new_table_desc TYPE REF TO cl_abap_tabledescr. + new_table_desc = cl_abap_tabledescr=>create( p_line_type = new_struct_desc p_table_kind = cl_abap_tabledescr=>tablekind_std ). CREATE DATA mt_table TYPE HANDLE new_table_desc. @@ -103,7 +120,7 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. ASSIGN mt_table->* TO
. SELECT * FROM z2ui5_t_01 - INTO CORRESPONDING FIELDS OF TABLE @
+ INTO CORRESPONDING FIELDS OF TABLE
UP TO 100 ROWS. CATCH cx_root. @@ -136,7 +153,8 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. METHOD render_main. IF mo_parent_view IS INITIAL. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). ELSE. @@ -144,7 +162,8 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. ENDIF. - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( 'ProgressIndicator' )->progress_indicator( percentvalue = mv_perc diff --git a/src/z2ui5_cl_demo_app_129.clas.abap b/src/z2ui5_cl_demo_app_129.clas.abap index 1ffd9a54..af399ecb 100644 --- a/src/z2ui5_cl_demo_app_129.clas.abap +++ b/src/z2ui5_cl_demo_app_129.clas.abap @@ -18,7 +18,7 @@ CLASS z2ui5_cl_demo_app_129 DEFINITION text TYPE string, END OF s_combobox . TYPES - ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY . + ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH DEFAULT KEY . DATA lv_text TYPE string. DATA: BEGIN OF screen, @@ -35,7 +35,7 @@ CLASS z2ui5_cl_demo_app_129 DEFINITION check_switch_02 TYPE abap_bool VALUE abap_false, END OF screen . DATA - mt_suggestion TYPE STANDARD TABLE OF s_suggestion_items WITH EMPTY KEY . + mt_suggestion TYPE STANDARD TABLE OF s_suggestion_items WITH DEFAULT KEY . DATA check_initialized TYPE abap_bool . PROTECTED SECTION. @@ -102,30 +102,46 @@ CLASS Z2UI5_CL_DEMO_APP_129 IMPLEMENTATION. METHOD z2ui5_on_init. - screen = VALUE #( - check_is_active = abap_true - colour = 'BLUE' - combo_key = 'GRAY' - segment_key = 'GREEN' - date = '07.12.22' - date_time = '23.12.2022, 19:27:20' - time_start = '05:24:00' - time_end = '17:23:57'). - - mt_suggestion = VALUE #( - ( descr = 'Green' value = 'GREEN' ) - ( descr = 'Blue' value = 'BLUE' ) - ( descr = 'Black' value = 'BLACK' ) - ( descr = 'Grey' value = 'GREY' ) - ( descr = 'Blue2' value = 'BLUE2' ) - ( descr = 'Blue3' value = 'BLUE3' ) ). + CLEAR screen. + screen-check_is_active = abap_true. + screen-colour = 'BLUE'. + screen-combo_key = 'GRAY'. + screen-segment_key = 'GREEN'. + screen-date = '07.12.22'. + screen-date_time = '23.12.2022, 19:27:20'. + screen-time_start = '05:24:00'. + screen-time_end = '17:23:57'. + + DATA temp1 LIKE mt_suggestion. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-descr = 'Green'. + temp2-value = 'GREEN'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Blue'. + temp2-value = 'BLUE'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Black'. + temp2-value = 'BLACK'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Grey'. + temp2-value = 'GREY'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Blue2'. + temp2-value = 'BLUE2'. + INSERT temp2 INTO TABLE temp1. + temp2-descr = 'Blue3'. + temp2-value = 'BLUE3'. + INSERT temp2 INTO TABLE temp1. + mt_suggestion = temp1. ENDMETHOD. METHOD z2ui5_on_rendering. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). page->_z2ui5( )->timer( finished = client->_event( 'REFRESH' ) checkrepeat = abap_true @@ -139,18 +155,22 @@ CLASS Z2UI5_CL_DEMO_APP_129 IMPLEMENTATION. navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true ). - DATA(grid) = page->grid( 'L6 M12 S12' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). grid = grid->text( text = client->_bind_edit( val = lv_text view = client->cs_view-main ) ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/sId}` INTO TABLE temp3. page->footer( )->overflow_toolbar( )->toolbar_spacer( )->button( id = `ppvr` text = 'Open Popover' - press = client->_event( val = 'BUTTON_POPOVER' t_arg = VALUE #( ( `${$source>/sId}` ) ) ) + press = client->_event( val = 'BUTTON_POPOVER' t_arg = temp3 ) type = 'Ghost' )->button( text = 'Open Popup' @@ -163,7 +183,8 @@ CLASS Z2UI5_CL_DEMO_APP_129 IMPLEMENTATION. METHOD z2ui5_on_rendering_popover. - DATA(popover) = z2ui5_cl_xml_view=>factory_popup( )->popover( placement = `Top` ). + DATA popover TYPE REF TO z2ui5_cl_xml_view. + popover = z2ui5_cl_xml_view=>factory_popup( )->popover( placement = `Top` ). popover->text( text = 'this is popover in middle with timer auto refresh' ). client->popover_display( xml = popover->stringify( ) @@ -173,7 +194,8 @@ CLASS Z2UI5_CL_DEMO_APP_129 IMPLEMENTATION. METHOD z2ui5_on_rendering_popup. - DATA(dialog) = z2ui5_cl_xml_view=>factory_popup( )->dialog( ). + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = z2ui5_cl_xml_view=>factory_popup( )->dialog( ). dialog->text( text = 'this is popup in middle with timer auto refresh' ). dialog->button( text = 'close' diff --git a/src/z2ui5_cl_demo_app_130.clas.abap b/src/z2ui5_cl_demo_app_130.clas.abap index 89ac6b55..109e3654 100644 --- a/src/z2ui5_cl_demo_app_130.clas.abap +++ b/src/z2ui5_cl_demo_app_130.clas.abap @@ -16,7 +16,7 @@ CLASS z2ui5_cl_demo_app_130 DEFINITION editable TYPE abap_bool, END OF ty_s_token . TYPES - ty_t_token TYPE STANDARD TABLE OF ty_s_token WITH EMPTY KEY . + ty_t_token TYPE STANDARD TABLE OF ty_s_token WITH DEFAULT KEY . TYPES ty_t_range TYPE RANGE OF string . TYPES @@ -29,7 +29,7 @@ CLASS z2ui5_cl_demo_app_130 DEFINITION key TYPE string, END OF ty_s_filter_pop . TYPES - ty_t_filter_pop TYPE STANDARD TABLE OF ty_s_filter_pop WITH EMPTY KEY . + ty_t_filter_pop TYPE STANDARD TABLE OF ty_s_filter_pop WITH DEFAULT KEY . TYPES: BEGIN OF ty_s_fieldsdb, screen_name TYPE char10, @@ -76,15 +76,19 @@ CLASS z2ui5_cl_demo_app_130 DEFINITION descr TYPE string, END OF ty_s_screens . - DATA - mt_filter TYPE STANDARD TABLE OF ty_s_filter_pop WITH EMPTY KEY . + TYPES temp1_279441b868 TYPE STANDARD TABLE OF ty_s_filter_pop WITH DEFAULT KEY. +DATA + mt_filter TYPE temp1_279441b868 . DATA mt_mapping TYPE z2ui5_if_types=>ty_t_name_value . - DATA - mt_screens TYPE STANDARD TABLE OF ty_s_screens WITH EMPTY KEY . - DATA - mt_variants TYPE STANDARD TABLE OF ty_s_variants WITH EMPTY KEY . - DATA - mt_variants_pop TYPE STANDARD TABLE OF ty_s_var_pop WITH EMPTY KEY . + TYPES temp2_279441b868 TYPE STANDARD TABLE OF ty_s_screens WITH DEFAULT KEY. +DATA + mt_screens TYPE temp2_279441b868 . + TYPES temp3_279441b868 TYPE STANDARD TABLE OF ty_s_variants WITH DEFAULT KEY. +DATA + mt_variants TYPE temp3_279441b868 . + TYPES temp4_279441b868 TYPE STANDARD TABLE OF ty_s_var_pop WITH DEFAULT KEY. +DATA + mt_variants_pop TYPE temp4_279441b868 . DATA mv_activ_elemnt TYPE string . DATA mv_screen TYPE string . DATA mv_button_active TYPE abap_bool . @@ -140,7 +144,8 @@ CLASS z2ui5_cl_demo_app_130 DEFINITION PRIVATE SECTION. DATA client TYPE REF TO z2ui5_if_client. - DATA mt_fields TYPE STANDARD TABLE OF ty_s_fields WITH EMPTY KEY. + TYPES temp5_279441b868 TYPE STANDARD TABLE OF ty_s_fields WITH DEFAULT KEY. +DATA mt_fields TYPE temp5_279441b868. DATA check_initialized TYPE abap_bool. ENDCLASS. @@ -152,26 +157,72 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD get_fields. - DATA(db_fields) = VALUE ty_t_fieldsdb( - ( screen_name = 'INV' field = 'LGNUM' field_doma = '/SCWM/LGNUM' ) - ( screen_name = 'LAGP' field = 'LGNUM' field_doma = '/SCWM/LGNUM' ) - ( screen_name = 'LAGP' field = 'LGPLA' field_doma = '/SCWM/DE_LGPLA' ) - ( screen_name = 'LAGP' field = 'LGTYP' field_doma = '/SCWM/DE_LGTYP' ) - ( screen_name = 'QUAN' field = 'LGNUM' field_doma = '/SCWM/LGNUM' ) - ( screen_name = 'QUAN' field = 'LGPLA' field_doma = '/SCWM/DE_LGPLA' ) - ( screen_name = 'QUAN' field = 'MATNR' field_doma = '/SCWM/DE_MATNR' ) - ( screen_name = 'QUAN' field = 'OWNER' field_doma = '/SCWM/DE_OWNER' ) - ( screen_name = 'TO' field = 'LGNUM' field_doma = '/SCWM/LGNUM' ) - ( screen_name = 'TO' field = 'MATNR' field_doma = '/SCWM/DE_MATNR' ) - ( screen_name = 'TO' field = 'PROCTY' field_doma = '/SCWM/DE_PROCTY' ) - ( screen_name = 'TO' field = 'TOSTAT' field_doma = '/SCWM/DE_TOSTAT' ) - ( screen_name = 'TO' field = 'VLPLA' field_doma = '/SCWM/LTAP_VLPLA' ) ). + DATA temp1 TYPE ty_t_fieldsdb. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-screen_name = 'INV'. + temp2-field = 'LGNUM'. + temp2-field_doma = '/SCWM/LGNUM'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'LAGP'. + temp2-field = 'LGNUM'. + temp2-field_doma = '/SCWM/LGNUM'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'LAGP'. + temp2-field = 'LGPLA'. + temp2-field_doma = '/SCWM/DE_LGPLA'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'LAGP'. + temp2-field = 'LGTYP'. + temp2-field_doma = '/SCWM/DE_LGTYP'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'QUAN'. + temp2-field = 'LGNUM'. + temp2-field_doma = '/SCWM/LGNUM'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'QUAN'. + temp2-field = 'LGPLA'. + temp2-field_doma = '/SCWM/DE_LGPLA'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'QUAN'. + temp2-field = 'MATNR'. + temp2-field_doma = '/SCWM/DE_MATNR'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'QUAN'. + temp2-field = 'OWNER'. + temp2-field_doma = '/SCWM/DE_OWNER'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'TO'. + temp2-field = 'LGNUM'. + temp2-field_doma = '/SCWM/LGNUM'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'TO'. + temp2-field = 'MATNR'. + temp2-field_doma = '/SCWM/DE_MATNR'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'TO'. + temp2-field = 'PROCTY'. + temp2-field_doma = '/SCWM/DE_PROCTY'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'TO'. + temp2-field = 'TOSTAT'. + temp2-field_doma = '/SCWM/DE_TOSTAT'. + INSERT temp2 INTO TABLE temp1. + temp2-screen_name = 'TO'. + temp2-field = 'VLPLA'. + temp2-field_doma = '/SCWM/LTAP_VLPLA'. + INSERT temp2 INTO TABLE temp1. + DATA db_fields LIKE temp1. + db_fields = temp1. CLEAR mt_fields. - LOOP AT db_fields REFERENCE INTO DATA(lr_fields) WHERE screen_name = mv_screen. + DATA temp3 LIKE LINE OF db_fields. + DATA lr_fields LIKE REF TO temp3. + LOOP AT db_fields REFERENCE INTO lr_fields WHERE screen_name = mv_screen. - APPEND INITIAL LINE TO mt_fields REFERENCE INTO DATA(field). - field->* = CORRESPONDING #( lr_fields->* ). + DATA field TYPE REF TO z2ui5_cl_demo_app_130=>ty_s_fields. + APPEND INITIAL LINE TO mt_fields REFERENCE INTO field. + MOVE-CORRESPONDING lr_fields->* TO field->*. ENDLOOP. @@ -194,53 +245,146 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD get_values. - DATA(l_variants) = VALUE ty_t_variants( - ( screen_name = 'QUAN' var = 'E001 - ALL' descr = '123' ) - ( screen_name = 'TO' var = 'E001' descr = '123' ) - ( screen_name = 'TO' var = 'E001 - All' descr = '123' ) ). + DATA temp4 TYPE ty_t_variants. + CLEAR temp4. + DATA temp5 LIKE LINE OF temp4. + temp5-screen_name = 'QUAN'. + temp5-var = 'E001 - ALL'. + temp5-descr = '123'. + INSERT temp5 INTO TABLE temp4. + temp5-screen_name = 'TO'. + temp5-var = 'E001'. + temp5-descr = '123'. + INSERT temp5 INTO TABLE temp4. + temp5-screen_name = 'TO'. + temp5-var = 'E001 - All'. + temp5-descr = '123'. + INSERT temp5 INTO TABLE temp4. + DATA l_variants LIKE temp4. + l_variants = temp4. DATA var TYPE ty_t_variants. DATA var_val TYPE ty_t_var_val. - LOOP AT l_variants INTO DATA(a) WHERE screen_name = mv_screen + DATA a LIKE LINE OF l_variants. + LOOP AT l_variants INTO a WHERE screen_name = mv_screen AND var = mv_variant. APPEND a TO var. mv_description = a-descr. ENDLOOP. - DATA(var_vall_all) = VALUE ty_t_var_val( - ( screen_name = 'LTAP' var = 'E001 - All' field = 'LGNUM' guid = '663192E9D70C1EEE8CC06B0F98CD81A3' sign = 'I' opt = 'EQ' ) - ( screen_name = 'LTAP' var = 'E001 - All' field = 'MATNR' guid = '663192E9D70C1EEE8CD4E9389CB11403' sign = 'I' opt = 'EQ' ) - ( screen_name = 'LTAP' var = 'E001 - All' field = 'TOSTAT' guid = '663192E9D70C1EEE8CC06BC66AD581A3' sign = 'I' opt = 'NE' ) - ( screen_name = 'LTAP' var = 'E002 - All' field = 'LGNUM' guid = '663192E9D70C1EEE8CC06B0F98CD81A3' sign = 'I' opt = 'EQ' ) - ( screen_name = 'LTAP' var = 'E002 - All' field = 'MATNR' guid = '663192E9D70C1EEE8CD4E9389CB11403' sign = 'I' opt = 'EQ' ) - ( screen_name = 'LTAP' var = 'E002 - All' field = 'TOSTAT' guid = '663192E9D70C1EEE8CC06BC66AD581A3' sign = 'I' opt = 'NE' ) - ( screen_name = 'QUAN' var = 'E001 - ALL' field = 'LGNUM' guid = '663192E9D70C1EEE90CEE2FA658C51EE' sign = 'I' opt = 'EQ' ) - ( screen_name = 'QUAN' var = 'E001 - ALL' field = 'LGPLA' guid = '663192E9D70C1EEE90CEEF4750FD91EE' sign = 'I' opt = 'EQ' ) - ( screen_name = 'TO' var = 'E001 ' field = 'LGNUM' guid = '663192E9D70C1EEE8E87DE5FF8CC512A' sign = 'I' opt = 'EQ' ) - ( screen_name = 'TO' var = 'E001 ' field = 'PROCTY' guid = '663192E9D70C1EEE8E87DD8D1EB8C7F5' sign = 'I' opt = 'EQ' ) - ( screen_name = 'TO' var = 'E001 - All' field = 'LGNUM' guid = '663192E9D70C1EEE8E86552847635198' sign = 'I' opt = 'EQ' ) ). - - - - LOOP AT var_vall_all INTO DATA(b) WHERE screen_name = mv_screen + DATA temp6 TYPE ty_t_var_val. + CLEAR temp6. + DATA temp7 LIKE LINE OF temp6. + temp7-screen_name = 'LTAP'. + temp7-var = 'E001 - All'. + temp7-field = 'LGNUM'. + temp7-guid = '663192E9D70C1EEE8CC06B0F98CD81A3'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'LTAP'. + temp7-var = 'E001 - All'. + temp7-field = 'MATNR'. + temp7-guid = '663192E9D70C1EEE8CD4E9389CB11403'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'LTAP'. + temp7-var = 'E001 - All'. + temp7-field = 'TOSTAT'. + temp7-guid = '663192E9D70C1EEE8CC06BC66AD581A3'. + temp7-sign = 'I'. + temp7-opt = 'NE'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'LTAP'. + temp7-var = 'E002 - All'. + temp7-field = 'LGNUM'. + temp7-guid = '663192E9D70C1EEE8CC06B0F98CD81A3'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'LTAP'. + temp7-var = 'E002 - All'. + temp7-field = 'MATNR'. + temp7-guid = '663192E9D70C1EEE8CD4E9389CB11403'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'LTAP'. + temp7-var = 'E002 - All'. + temp7-field = 'TOSTAT'. + temp7-guid = '663192E9D70C1EEE8CC06BC66AD581A3'. + temp7-sign = 'I'. + temp7-opt = 'NE'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'QUAN'. + temp7-var = 'E001 - ALL'. + temp7-field = 'LGNUM'. + temp7-guid = '663192E9D70C1EEE90CEE2FA658C51EE'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'QUAN'. + temp7-var = 'E001 - ALL'. + temp7-field = 'LGPLA'. + temp7-guid = '663192E9D70C1EEE90CEEF4750FD91EE'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'TO'. + temp7-var = 'E001 '. + temp7-field = 'LGNUM'. + temp7-guid = '663192E9D70C1EEE8E87DE5FF8CC512A'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'TO'. + temp7-var = 'E001 '. + temp7-field = 'PROCTY'. + temp7-guid = '663192E9D70C1EEE8E87DD8D1EB8C7F5'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + temp7-screen_name = 'TO'. + temp7-var = 'E001 - All'. + temp7-field = 'LGNUM'. + temp7-guid = '663192E9D70C1EEE8E86552847635198'. + temp7-sign = 'I'. + temp7-opt = 'EQ'. + INSERT temp7 INTO TABLE temp6. + DATA var_vall_all LIKE temp6. + var_vall_all = temp6. + + + + DATA b LIKE LINE OF var_vall_all. + LOOP AT var_vall_all INTO b WHERE screen_name = mv_screen AND var = mv_variant. APPEND b TO var_val. ENDLOOP. - LOOP AT mt_fields REFERENCE INTO DATA(field). + DATA temp8 LIKE LINE OF mt_fields. + DATA field LIKE REF TO temp8. + LOOP AT mt_fields REFERENCE INTO field. CLEAR field->t_filter. CLEAR field->t_token. - LOOP AT var_val REFERENCE INTO DATA(val) + DATA temp9 LIKE LINE OF var_val. + DATA val LIKE REF TO temp9. + LOOP AT var_val REFERENCE INTO val WHERE field = field->field. - DATA(filter) = VALUE ty_s_filter_pop( key = val->guid - option = val->opt - low = val->low - high = val->high ). + DATA temp10 TYPE ty_s_filter_pop. + CLEAR temp10. + temp10-key = val->guid. + temp10-option = val->opt. + temp10-low = val->low. + temp10-high = val->high. + DATA filter LIKE temp10. + filter = temp10. APPEND filter TO field->t_filter. @@ -254,10 +398,22 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD get_variants. - mt_variants = VALUE #( - ( screen_name = 'QUAN' var = 'E001 - ALL' descr = '123' ) - ( screen_name = 'TO' var = 'E001' descr = '123' ) - ( screen_name = 'TO' var = 'E001 - All' descr = '123' ) ). + DATA temp11 LIKE mt_variants. + CLEAR temp11. + DATA temp12 LIKE LINE OF temp11. + temp12-screen_name = 'QUAN'. + temp12-var = 'E001 - ALL'. + temp12-descr = '123'. + INSERT temp12 INTO TABLE temp11. + temp12-screen_name = 'TO'. + temp12-var = 'E001'. + temp12-descr = '123'. + INSERT temp12 INTO TABLE temp11. + temp12-screen_name = 'TO'. + temp12-var = 'E001 - All'. + temp12-descr = '123'. + INSERT temp12 INTO TABLE temp11. + mt_variants = temp11. ENDMETHOD. @@ -270,25 +426,59 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD on_init. - mt_screens = VALUE #( - ( screen_name = 'INV' descr = '123' ) - ( screen_name = 'LAGP' descr = '123' ) - ( screen_name = 'PO' descr = '123' ) - ( screen_name = 'QUAN' descr = '123' ) - ( screen_name = 'TO' descr = '123' ) ). + DATA temp13 LIKE mt_screens. + CLEAR temp13. + DATA temp14 LIKE LINE OF temp13. + temp14-screen_name = 'INV'. + temp14-descr = '123'. + INSERT temp14 INTO TABLE temp13. + temp14-screen_name = 'LAGP'. + temp14-descr = '123'. + INSERT temp14 INTO TABLE temp13. + temp14-screen_name = 'PO'. + temp14-descr = '123'. + INSERT temp14 INTO TABLE temp13. + temp14-screen_name = 'QUAN'. + temp14-descr = '123'. + INSERT temp14 INTO TABLE temp13. + temp14-screen_name = 'TO'. + temp14-descr = '123'. + INSERT temp14 INTO TABLE temp13. + mt_screens = temp13. render_main( ). - mt_mapping = VALUE #( - ( n = `EQ` v = `={LOW}` ) - ( n = `LT` v = `<{LOW}` ) - ( n = `LE` v = `<={LOW}` ) - ( n = `GT` v = `>{LOW}` ) - ( n = `GE` v = `>={LOW}` ) - ( n = `CP` v = `*{LOW}*` ) - ( n = `BT` v = `{LOW}...{HIGH}` ) - ( n = `NE` v = `!(={LOW})` ) - ( n = `` v = `` ) ). + DATA temp15 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp15. + DATA temp16 LIKE LINE OF temp15. + temp16-n = `EQ`. + temp16-v = `={LOW}`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `LT`. + temp16-v = `<{LOW}`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `LE`. + temp16-v = `<={LOW}`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `GT`. + temp16-v = `>{LOW}`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `GE`. + temp16-v = `>={LOW}`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `CP`. + temp16-v = `*{LOW}*`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `BT`. + temp16-v = `{LOW}...{HIGH}`. + INSERT temp16 INTO TABLE temp15. + temp16-n = `NE`. + temp16-v = `!(={LOW})`. + INSERT temp16 INTO TABLE temp15. + temp16-n = ``. + temp16-v = ``. + INSERT temp16 INTO TABLE temp15. + mt_mapping = temp15. @@ -307,7 +497,8 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD popup_filter_ok. - READ TABLE mt_fields REFERENCE INTO DATA(lr_field) + DATA lr_field TYPE REF TO z2ui5_cl_demo_app_130=>ty_s_fields. + READ TABLE mt_fields REFERENCE INTO lr_field WITH KEY field = mv_activ_elemnt. IF sy-subrc = 0. @@ -334,9 +525,11 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. IF mo_parent_view IS INITIAL. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = get_txt( '/SCWM/DE_TW_COND_CHECK_SELECT' ) navbuttonpress = client->_event( 'BACK' ) @@ -353,7 +546,8 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. page->header_content( )->get_parent( ). - DATA(grid) = page->grid( 'L6 M12 S12' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). grid->simple_form( get_txt( 'BU_DYNID' ) @@ -387,21 +581,32 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. value = client->_bind_edit( mv_description ) showvaluehelp = abap_false ). - DATA(content) = grid->simple_form( get_txt( 'CLASSFEL' ) + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = grid->simple_form( get_txt( 'CLASSFEL' ) )->content( 'form' ). IF mt_fields IS NOT INITIAL. - LOOP AT mt_fields REFERENCE INTO DATA(lr_tab). + DATA temp17 LIKE LINE OF mt_fields. + DATA lr_tab LIKE REF TO temp17. + LOOP AT mt_fields REFERENCE INTO lr_tab. - DATA(scrtext) = get_txt( CONV #( lr_tab->field_doma ) ). + DATA temp18 TYPE string. + temp18 = lr_tab->field_doma. + DATA scrtext TYPE string. + scrtext = get_txt( temp18 ). + DATA temp19 TYPE string_table. + CLEAR temp19. + DATA temp1 TYPE string. + temp1 = lr_tab->field. + INSERT temp1 INTO TABLE temp19. content->label( text = scrtext )->multi_input( tokens = client->_bind_local( lr_tab->t_token ) showclearicon = abap_true id = lr_tab->field - valuehelprequest = client->_event( val = 'CALL_POPUP_FILTER' t_arg = VALUE #( ( CONV #( lr_tab->field ) ) ) ) + valuehelprequest = client->_event( val = 'CALL_POPUP_FILTER' t_arg = temp19 ) )->item( key = `{KEY}` text = `{TEXT}` @@ -447,24 +652,31 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD render_popup_filter. - DATA(lo_popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA lo_popup TYPE REF TO z2ui5_cl_xml_view. + lo_popup = z2ui5_cl_xml_view=>factory_popup( ). lo_popup = lo_popup->dialog( contentheight = `50%` contentwidth = `50%` title = get_txt_l( '/SCWM/DE_TW_COND_CHECK_COND' ) ). - DATA(vbox) = lo_popup->vbox( height = `100%` + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = lo_popup->vbox( height = `100%` justifycontent = 'SpaceBetween' ). - DATA(item) = vbox->list( + DATA item TYPE REF TO z2ui5_cl_xml_view. + item = vbox->list( nodata = get_txt( '/SCWM/DE_IND_BIN_EMPTY' ) items = client->_bind_edit( mt_filter ) selectionchange = client->_event( 'SELCHANGE' ) )->custom_list_item( ). - DATA(grid) = item->grid( ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = item->grid( ). + DATA temp21 TYPE string_table. + CLEAR temp21. + INSERT `${KEY}` INTO TABLE temp21. grid->combobox( selectedkey = `{OPTION}` items = client->_bind_edit( mt_mapping ) @@ -478,7 +690,7 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. )->button( icon = 'sap-icon://decline' type = `Transparent` press = client->_event( val = `POPUP_FILTER_DELETE` - t_arg = VALUE #( ( `${KEY}` ) ) ) ). + t_arg = temp21 ) ). lo_popup->footer( )->overflow_toolbar( )->button( text = get_txt( 'FC_DELALL' ) @@ -501,7 +713,8 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD render_popup_varaint. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup->dialog( title = get_txt( '/SCWM/WB_VARIANT' ) contentwidth = '30%' @@ -534,7 +747,8 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD render_pop_copy. - DATA(lo_popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA lo_popup TYPE REF TO z2ui5_cl_xml_view. + lo_popup = z2ui5_cl_xml_view=>factory_popup( ). lo_popup = lo_popup->dialog( contentheight = `50%` @@ -572,13 +786,30 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. METHOD set_token. - LOOP AT field->t_filter REFERENCE INTO DATA(lr_filter). - - DATA(lv_value) = mt_mapping[ n = lr_filter->option ]-v. + DATA temp23 LIKE LINE OF field->t_filter. + DATA lr_filter LIKE REF TO temp23. + LOOP AT field->t_filter REFERENCE INTO lr_filter. + + DATA lv_value TYPE z2ui5_if_types=>ty_s_name_value-v. + DATA temp2 LIKE LINE OF mt_mapping. + DATA temp3 LIKE sy-tabix. + temp3 = sy-tabix. + READ TABLE mt_mapping WITH KEY n = lr_filter->option INTO temp2. + sy-tabix = temp3. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_value = temp2-v. REPLACE `{LOW}` IN lv_value WITH lr_filter->low. REPLACE `{HIGH}` IN lv_value WITH lr_filter->high. - INSERT VALUE #( key = lv_value text = lv_value visible = abap_true editable = abap_false ) INTO TABLE field->t_token. + DATA temp24 TYPE z2ui5_cl_demo_app_130=>ty_s_token. + CLEAR temp24. + temp24-key = lv_value. + temp24-text = lv_value. + temp24-visible = abap_true. + temp24-editable = abap_false. + INSERT temp24 INTO TABLE field->t_token. ENDLOOP. @@ -592,7 +823,14 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. WHEN `INPUT_SCREEN_CHANGE`. - mv_screen_descr = VALUE #( mt_screens[ screen_name = mv_screen ]-descr OPTIONAL ). + DATA temp25 TYPE string. + CLEAR temp25. + DATA temp26 TYPE z2ui5_cl_demo_app_130=>ty_s_screens. + READ TABLE mt_screens INTO temp26 WITH KEY screen_name = mv_screen. + IF sy-subrc = 0. + temp25 = temp26-descr. + ENDIF. + mv_screen_descr = temp25. get_fields( ). @@ -615,30 +853,53 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. WHEN `POPUP_FILTER_ADD`. - INSERT VALUE #( key = z2ui5_cl_util=>uuid_get_c32( ) ) INTO TABLE mt_filter. + DATA temp27 TYPE z2ui5_cl_demo_app_130=>ty_s_filter_pop. + CLEAR temp27. + temp27-key = z2ui5_cl_util=>uuid_get_c32( ). + INSERT temp27 INTO TABLE mt_filter. client->popup_model_update( ). WHEN `POPUP_FILTER_DELETE`. - DATA(lt_item) = client->get( )-t_event_arg. + DATA lt_item TYPE string_table. + lt_item = client->get( )-t_event_arg. - DELETE mt_filter WHERE key = lt_item[ 1 ]. + DATA temp28 LIKE LINE OF lt_item. + DATA temp29 LIKE sy-tabix. + temp29 = sy-tabix. + READ TABLE lt_item INDEX 1 INTO temp28. + sy-tabix = temp29. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + DELETE mt_filter WHERE key = temp28. client->popup_model_update( ). WHEN `POPUP_FILTER_DELETE_ALL`. - mt_filter = VALUE #( ). + DATA temp30 LIKE mt_filter. + CLEAR temp30. + mt_filter = temp30. client->popup_model_update( ). WHEN `CALL_POPUP_FILTER`. - DATA(arg) = client->get( )-t_event_arg. - mv_activ_elemnt = VALUE #( arg[ 1 ] OPTIONAL ). - - READ TABLE mt_fields REFERENCE INTO DATA(lr_field) + DATA arg TYPE string_table. + arg = client->get( )-t_event_arg. + DATA temp31 TYPE string. + CLEAR temp31. + DATA temp32 TYPE string. + READ TABLE arg INTO temp32 INDEX 1. + IF sy-subrc = 0. + temp31 = temp32. + ENDIF. + mv_activ_elemnt = temp31. + + DATA lr_field TYPE REF TO z2ui5_cl_demo_app_130=>ty_s_fields. + READ TABLE mt_fields REFERENCE INTO lr_field WITH KEY field = mv_activ_elemnt. " vorhanden werte übertragen @@ -648,16 +909,26 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. WHEN 'CALL_POPUP_VARIANT'. - LOOP AT mt_variants REFERENCE INTO DATA(lr_fields). - APPEND INITIAL LINE TO mt_variants_pop REFERENCE INTO DATA(field). - field->* = CORRESPONDING #( lr_fields->* ). + DATA temp33 LIKE LINE OF mt_variants. + DATA lr_fields LIKE REF TO temp33. + LOOP AT mt_variants REFERENCE INTO lr_fields. + DATA field TYPE REF TO z2ui5_cl_demo_app_130=>ty_s_var_pop. + APPEND INITIAL LINE TO mt_variants_pop REFERENCE INTO field. + MOVE-CORRESPONDING lr_fields->* TO field->*. ENDLOOP. render_popup_varaint( client ). WHEN 'POPUP_VARIANT_CLOSE'. - mv_variant = VALUE #( mt_variants_pop[ selkz = abap_true ]-var OPTIONAL ). + DATA temp34 TYPE string. + CLEAR temp34. + DATA temp35 TYPE z2ui5_cl_demo_app_130=>ty_s_var_pop. + READ TABLE mt_variants_pop INTO temp35 WITH KEY selkz = abap_true. + IF sy-subrc = 0. + temp34 = temp35-var. + ENDIF. + mv_variant = temp34. client->popup_destroy( ). @@ -712,7 +983,9 @@ CLASS z2ui5_cl_demo_app_130 IMPLEMENTATION. on_event( ). - mv_button_active = xsdbool( mv_screen IS NOT INITIAL AND mv_variant IS NOT INITIAL ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( mv_screen IS NOT INITIAL AND mv_variant IS NOT INITIAL ). + mv_button_active = temp1. client->view_model_update( ). diff --git a/src/z2ui5_cl_demo_app_131.clas.abap b/src/z2ui5_cl_demo_app_131.clas.abap index d7dc63cb..614229ac 100644 --- a/src/z2ui5_cl_demo_app_131.clas.abap +++ b/src/z2ui5_cl_demo_app_131.clas.abap @@ -58,8 +58,18 @@ CLASS z2ui5_cl_demo_app_131 IMPLEMENTATION. METHOD on_init. - mt_t002 = VALUE #( ( id = '1' class = 'Z2UI5_CL_DEMO_APP_132' count = '12' ) - ( id = '2' class = 'Z2UI5_CL_DEMO_APP_132' count = '80' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_131=>ty_t_t002. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = '1'. + temp2-class = 'Z2UI5_CL_DEMO_APP_132'. + temp2-count = '12'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '2'. + temp2-class = 'Z2UI5_CL_DEMO_APP_132'. + temp2-count = '80'. + INSERT temp2 INTO TABLE temp1. + mt_t002 = temp1. mv_selectedkey = '1'. @@ -67,19 +77,26 @@ CLASS z2ui5_cl_demo_app_131 IMPLEMENTATION. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'Main App calling Subapps' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( mv_selectedkey ) select = client->_event( val = 'ONSELECTICONTABBAR' ) )->items( ). - LOOP AT mt_t002 REFERENCE INTO DATA(line). + DATA temp3 LIKE LINE OF mt_t002. + DATA line LIKE REF TO temp3. + LOOP AT mt_t002 REFERENCE INTO line. lo_items->icon_tab_filter( text = line->class count = line->count key = line->id ). @@ -110,7 +127,8 @@ CLASS z2ui5_cl_demo_app_131 IMPLEMENTATION. FIELD-SYMBOLS TYPE any. - READ TABLE mt_t002 REFERENCE INTO DATA(t002) + DATA t002 TYPE REF TO z2ui5_cl_demo_app_131=>ty_s_t002. + READ TABLE mt_t002 REFERENCE INTO t002 WITH KEY id = mv_selectedkey. IF sy-subrc <> 0. @@ -133,7 +151,8 @@ CLASS z2ui5_cl_demo_app_131 IMPLEMENTATION. render_main( ). - ASSIGN mo_app->('MO_PARENT_VIEW') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MO_PARENT_VIEW') TO . IF IS ASSIGNED. = mo_main_page. ENDIF. diff --git a/src/z2ui5_cl_demo_app_132.clas.abap b/src/z2ui5_cl_demo_app_132.clas.abap index 5ecace37..b287a82b 100644 --- a/src/z2ui5_cl_demo_app_132.clas.abap +++ b/src/z2ui5_cl_demo_app_132.clas.abap @@ -37,16 +37,22 @@ CLASS z2ui5_cl_demo_app_132 IMPLEMENTATION. TRY. + DATA typedesc TYPE REF TO cl_abap_typedescr. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = 'Z2UI5_T_UTIL_01' - RECEIVING p_descr_ref = DATA(typedesc) + RECEIVING p_descr_ref = typedesc EXCEPTIONS type_not_found = 1 OTHERS = 2 ). - DATA(structdesc) = CAST cl_abap_structdescr( typedesc ). + DATA temp1 TYPE REF TO cl_abap_structdescr. + temp1 ?= typedesc. + DATA structdesc LIKE temp1. + structdesc = temp1. - DATA(comp) = structdesc->get_components( ). + DATA comp TYPE abap_component_tab. + comp = structdesc->get_components( ). - LOOP AT comp INTO DATA(com). + DATA com LIKE LINE OF comp. + LOOP AT comp INTO com. IF com-as_include = abap_false. @@ -56,13 +62,21 @@ CLASS z2ui5_cl_demo_app_132 IMPLEMENTATION. ENDLOOP. - CATCH cx_root INTO DATA(root). " TODO: variable is assigned but never used (ABAP cleaner) + DATA root TYPE REF TO cx_root. + CATCH cx_root INTO root. " TODO: variable is assigned but never used (ABAP cleaner) ENDTRY. - DATA(component) = VALUE cl_abap_structdescr=>component_table( - ( name = 'ROW_ID' - type = CAST #( cl_abap_datadescr=>describe_by_data( index ) ) ) ). + DATA temp2 TYPE cl_abap_structdescr=>component_table. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-name = 'ROW_ID'. + DATA temp4 TYPE REF TO cl_abap_datadescr. + temp4 ?= cl_abap_datadescr=>describe_by_data( index ). + temp3-type = temp4. + INSERT temp3 INTO TABLE temp2. + DATA component LIKE temp2. + component = temp2. APPEND LINES OF component TO result. @@ -88,7 +102,8 @@ CLASS z2ui5_cl_demo_app_132 IMPLEMENTATION. METHOD render_main. IF mo_parent_view IS INITIAL. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). ELSE. @@ -96,7 +111,8 @@ CLASS z2ui5_cl_demo_app_132 IMPLEMENTATION. ENDIF. - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( 'ProgressIndicator' )->progress_indicator( percentvalue = mv_perc diff --git a/src/z2ui5_cl_demo_app_133.clas.abap b/src/z2ui5_cl_demo_app_133.clas.abap index 016e4f0e..c99cafc1 100644 --- a/src/z2ui5_cl_demo_app_133.clas.abap +++ b/src/z2ui5_cl_demo_app_133.clas.abap @@ -29,12 +29,15 @@ CLASS z2ui5_cl_demo_app_133 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - Focus' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->_z2ui5( )->focus( focusid = client->_bind_edit( focus_id ) selectionstart = client->_bind_edit( selstart ) diff --git a/src/z2ui5_cl_demo_app_134.clas.abap b/src/z2ui5_cl_demo_app_134.clas.abap index e169b8c1..e658cd6c 100644 --- a/src/z2ui5_cl_demo_app_134.clas.abap +++ b/src/z2ui5_cl_demo_app_134.clas.abap @@ -11,7 +11,7 @@ CLASS z2ui5_cl_demo_app_134 DEFINITION PUBLIC. descr TYPE string, info TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA mv_scrollupdate TYPE abap_bool. @@ -44,13 +44,22 @@ CLASS z2ui5_cl_demo_app_134 IMPLEMENTATION. METHOD display_view. - DATA(ls_row) = VALUE ty_row( title = 'Peter' value = 'red' info = 'completed' descr = 'this is a description' ). + DATA temp1 TYPE ty_row. + CLEAR temp1. + temp1-title = 'Peter'. + temp1-value = 'red'. + temp1-info = 'completed'. + temp1-descr = 'this is a description'. + DATA ls_row LIKE temp1. + ls_row = temp1. DO 100 TIMES. INSERT ls_row INTO TABLE t_tab. ENDDO. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->page( id = 'id_page' title = 'abap2ui5 - Scrolling (use Chrome to avoid incompatibilities)' navbuttonpress = client->_event( 'BACK' ) @@ -60,7 +69,8 @@ CLASS z2ui5_cl_demo_app_134 IMPLEMENTATION. setupdate = client->_bind_edit( mv_scrollupdate ) items = client->_bind_edit( mt_scroll ) ). - DATA(tab) = page->table( sticky = 'ColumnHeaders,HeaderToolbar' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( sticky = 'ColumnHeaders,HeaderToolbar' headertext = 'Table with some entries' items = client->_bind( t_tab ) ). @@ -98,7 +108,10 @@ CLASS z2ui5_cl_demo_app_134 IMPLEMENTATION. selstart = `3`. selend = `7`. - INSERT VALUE #( n = 'id_page' ) INTO TABLE mt_scroll. + DATA temp2 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp2. + temp2-n = 'id_page'. + INSERT temp2 INTO TABLE mt_scroll. display_view( client ). ENDMETHOD. @@ -119,35 +132,82 @@ CLASS z2ui5_cl_demo_app_134 IMPLEMENTATION. WHEN 'BUTTON_SCROLL_TOP'. CLEAR mt_scroll. - INSERT VALUE #( n = 'id_page' v = '0' ) INTO TABLE mt_scroll. + DATA temp3 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp3. + temp3-n = 'id_page'. + temp3-v = '0'. + INSERT temp3 INTO TABLE mt_scroll. mv_scrollupdate = abap_true. client->view_model_update( ). WHEN 'BUTTON_SCROLL_UP'. - DATA(lv_pos) = CONV i( mt_scroll[ n = 'id_page' ]-v ). + DATA temp4 TYPE i. + DATA temp1 LIKE LINE OF mt_scroll. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE mt_scroll WITH KEY n = 'id_page' INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + temp4 = temp1-v. + DATA lv_pos LIKE temp4. + lv_pos = temp4. lv_pos = lv_pos - 500. IF lv_pos < 0. lv_pos = 0. ENDIF. - mt_scroll[ n = 'id_page' ]-v = shift_left( shift_right( CONV string( lv_pos ) ) ). + FIELD-SYMBOLS LIKE LINE OF mt_scroll. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE mt_scroll WITH KEY n = 'id_page' ASSIGNING . + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + DATA temp5 TYPE string. + temp5 = lv_pos. + -v = shift_left( shift_right( temp5 ) ). mv_scrollupdate = abap_true. client->view_model_update( ). WHEN 'BUTTON_SCROLL_DOWN'. - lv_pos = mt_scroll[ n = 'id_page' ]-v. + DATA temp7 LIKE LINE OF mt_scroll. + DATA temp8 LIKE sy-tabix. + temp8 = sy-tabix. + READ TABLE mt_scroll WITH KEY n = 'id_page' INTO temp7. + sy-tabix = temp8. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_pos = temp7-v. lv_pos = lv_pos + 500. IF lv_pos < 0. lv_pos = 0. ENDIF. - mt_scroll[ n = 'id_page' ]-v = shift_left( shift_right( CONV string( lv_pos ) ) ). + FIELD-SYMBOLS LIKE LINE OF mt_scroll. + DATA temp10 LIKE sy-tabix. + temp10 = sy-tabix. + READ TABLE mt_scroll WITH KEY n = 'id_page' ASSIGNING . + sy-tabix = temp10. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + DATA temp9 TYPE string. + temp9 = lv_pos. + -v = shift_left( shift_right( temp9 ) ). mv_scrollupdate = abap_true. client->view_model_update( ). WHEN 'BUTTON_SCROLL_BOTTOM'. CLEAR mt_scroll. - INSERT VALUE #( n = 'id_page' v = '99999' ) INTO TABLE mt_scroll. + DATA temp11 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp11. + temp11-n = 'id_page'. + temp11-v = '99999'. + INSERT temp11 INTO TABLE mt_scroll. mv_scrollupdate = abap_true. client->view_model_update( ). diff --git a/src/z2ui5_cl_demo_app_136.clas.abap b/src/z2ui5_cl_demo_app_136.clas.abap index dc92dc7d..b2208f80 100644 --- a/src/z2ui5_cl_demo_app_136.clas.abap +++ b/src/z2ui5_cl_demo_app_136.clas.abap @@ -39,11 +39,15 @@ CLASS z2ui5_cl_demo_app_136 IMPLEMENTATION. WHEN 'UPLOAD'. - SPLIT mv_value AT `;` INTO DATA(lv_dummy) DATA(lv_data). + DATA lv_dummy TYPE string. + DATA lv_data TYPE string. + SPLIT mv_value AT `;` INTO lv_dummy lv_data. SPLIT lv_data AT `,` INTO lv_dummy lv_data. - DATA(lv_data2) = z2ui5_cl_util=>conv_decode_x_base64( lv_data ). - DATA(lv_ready) = z2ui5_cl_util=>conv_get_string_by_xstring( lv_data2 ). + DATA lv_data2 TYPE xstring. + lv_data2 = z2ui5_cl_util=>conv_decode_x_base64( lv_data ). + DATA lv_ready TYPE string. + lv_ready = z2ui5_cl_util=>conv_get_string_by_xstring( lv_data2 ). mr_table = z2ui5_cl_util=>itab_get_itab_by_csv( lv_ready ). client->message_box_display( `CSV loaded to table` ). @@ -58,7 +62,8 @@ CLASS z2ui5_cl_demo_app_136 IMPLEMENTATION. ENDCASE. - CATCH cx_root INTO DATA(x). + DATA x TYPE REF TO cx_root. + CATCH cx_root INTO x. client->message_box_display( text = x->get_text( ) type = `error` ). ENDTRY. @@ -76,11 +81,15 @@ CLASS z2ui5_cl_demo_app_136 IMPLEMENTATION. METHOD ui5_view_main_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - CSV to ABAP internal Table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp3 ). FIELD-SYMBOLS TYPE table. IF mr_table IS NOT INITIAL. @@ -88,8 +97,15 @@ CLASS z2ui5_cl_demo_app_136 IMPLEMENTATION. ASSIGN mr_table->* TO . - DATA(tab) = page->table( - items = COND #( WHEN mv_check_edit = abap_true THEN client->_bind_edit( ) ELSE client->_bind_edit( ) ) + DATA temp1 TYPE string. + IF mv_check_edit = abap_true. + temp1 = client->_bind_edit( ). + ELSE. + temp1 = client->_bind_edit( ). + ENDIF. + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( + items = temp1 )->header_toolbar( )->overflow_toolbar( )->title( 'CSV Content' @@ -97,18 +113,24 @@ CLASS z2ui5_cl_demo_app_136 IMPLEMENTATION. )->get_parent( )->get_parent( ). - DATA(lr_fields) = z2ui5_cl_util=>rtti_get_t_attri_by_any( ). - DATA(lo_cols) = tab->columns( ). - LOOP AT lr_fields REFERENCE INTO DATA(lr_col). + DATA lr_fields TYPE abap_component_tab. + lr_fields = z2ui5_cl_util=>rtti_get_t_attri_by_any( ). + DATA lo_cols TYPE REF TO z2ui5_cl_xml_view. + lo_cols = tab->columns( ). + DATA temp2 LIKE LINE OF lr_fields. + DATA lr_col LIKE REF TO temp2. + LOOP AT lr_fields REFERENCE INTO lr_col. lo_cols->column( )->text( lr_col->name ). ENDLOOP. - DATA(lo_cells) = tab->items( )->column_list_item( )->cells( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( )->cells( ). LOOP AT lr_fields REFERENCE INTO lr_col. lo_cells->text( `{` && lr_col->name && `}` ). ENDLOOP. ENDIF. - DATA(footer) = page->footer( )->overflow_toolbar( ). + DATA footer TYPE REF TO z2ui5_cl_xml_view. + footer = page->footer( )->overflow_toolbar( ). footer->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) diff --git a/src/z2ui5_cl_demo_app_138.clas.abap b/src/z2ui5_cl_demo_app_138.clas.abap index 209538e3..16d15cd6 100644 --- a/src/z2ui5_cl_demo_app_138.clas.abap +++ b/src/z2ui5_cl_demo_app_138.clas.abap @@ -48,12 +48,15 @@ CLASS z2ui5_cl_demo_app_138 IMPLEMENTATION. ms_data-ms_data2-ms_data2-ms_data2-ms_data2-ms_data2-ms_data2-val = 'tomato'. quantity = '500'. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( view->shell( )->page( title = 'abap2UI5 - First Example' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_139.clas.abap b/src/z2ui5_cl_demo_app_139.clas.abap index 23b13e79..265e930a 100644 --- a/src/z2ui5_cl_demo_app_139.clas.abap +++ b/src/z2ui5_cl_demo_app_139.clas.abap @@ -44,14 +44,18 @@ CLASS z2ui5_cl_demo_app_139 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(tmp) = view->_z2ui5( )->history( client->_bind_edit( search ) + DATA tmp TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + tmp = view->_z2ui5( )->history( client->_bind_edit( search ) )->shell( )->page( title = 'abap2UI5 - Change URL History' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_140.clas.abap b/src/z2ui5_cl_demo_app_140.clas.abap index f3ba4990..f2105d46 100644 --- a/src/z2ui5_cl_demo_app_140.clas.abap +++ b/src/z2ui5_cl_demo_app_140.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_140 DEFINITION text TYPE string, END OF s_combobox . TYPES - ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY . + ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH DEFAULT KEY . DATA client TYPE REF TO z2ui5_if_client . DATA check_initialized TYPE abap_bool . @@ -39,13 +39,15 @@ CLASS z2ui5_cl_demo_app_140 IMPLEMENTATION. METHOD ui5_on_event. TRY. - DATA(ok_code) = client->get( )-event. + DATA ok_code TYPE z2ui5_if_types=>ty_s_get-event. + ok_code = client->get( )-event. CASE ok_code. WHEN 'FILTERBAR'. client->view_model_update( ). ENDCASE. - CATCH cx_root INTO DATA(x). + DATA x TYPE REF TO cx_root. + CATCH cx_root INTO x. client->message_box_display( text = x->get_text( ) type = `error` ). ENDTRY. @@ -59,14 +61,30 @@ CLASS z2ui5_cl_demo_app_140 IMPLEMENTATION. * +-------------------------------------------------------------------------------------- METHOD ui5_on_init. - gt_multi = VALUE ty_t_combo( - ( key = 'A01' text = 'T1' ) - ( key = 'A02' text = 'T2' ) - ( key = 'A03' text = 'T3' ) - ( key = 'A04' text = 'T4' ) - ( key = 'A05' text = 'T5' ) ). - - gt_sel_multi2 = VALUE #( ( `A01` ) ). + DATA temp1 TYPE ty_t_combo. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-key = 'A01'. + temp2-text = 'T1'. + INSERT temp2 INTO TABLE temp1. + temp2-key = 'A02'. + temp2-text = 'T2'. + INSERT temp2 INTO TABLE temp1. + temp2-key = 'A03'. + temp2-text = 'T3'. + INSERT temp2 INTO TABLE temp1. + temp2-key = 'A04'. + temp2-text = 'T4'. + INSERT temp2 INTO TABLE temp1. + temp2-key = 'A05'. + temp2-text = 'T5'. + INSERT temp2 INTO TABLE temp1. + gt_multi = temp1. + + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `A01` INTO TABLE temp3. + gt_sel_multi2 = temp3. ENDMETHOD. @@ -77,13 +95,16 @@ CLASS z2ui5_cl_demo_app_140 IMPLEMENTATION. * +-------------------------------------------------------------------------------------- METHOD ui5_view_main_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Multi Combo Box' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->simple_form( title = 'Form Title' editable = abap_true )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_141.clas.abap b/src/z2ui5_cl_demo_app_141.clas.abap index 88af7a78..9bbad86e 100644 --- a/src/z2ui5_cl_demo_app_141.clas.abap +++ b/src/z2ui5_cl_demo_app_141.clas.abap @@ -15,7 +15,8 @@ CLASS z2ui5_cl_demo_app_141 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_4540ab214f TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_4540ab214f. DATA mv_textarea TYPE string. DATA mv_stretch_active TYPE abap_bool. @@ -66,22 +67,51 @@ CLASS Z2UI5_CL_DEMO_APP_141 IMPLEMENTATION. METHOD ui5_init. - t_bapiret = VALUE #( - ( message = 'An empty Report field causes an empty XML Message to be sent' type = 'E' id = 'MSG1' number = '001' ) - ( message = 'Check was executed for wrong Scenario' type = 'E' id = 'MSG1' number = '002' ) - ( message = 'Request was handled without errors' type = 'S' id = 'MSG1' number = '003' ) - ( message = 'product activated' type = 'S' id = 'MSG4' number = '375' ) - ( message = 'check the input values' type = 'W' id = 'MSG2' number = '375' ) - ( message = 'product already in use' type = 'I' id = 'MSG2' number = '375' ) ). + DATA temp1 TYPE bapirettab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-message = 'An empty Report field causes an empty XML Message to be sent'. + temp2-type = 'E'. + temp2-id = 'MSG1'. + temp2-number = '001'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'Check was executed for wrong Scenario'. + temp2-type = 'E'. + temp2-id = 'MSG1'. + temp2-number = '002'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'Request was handled without errors'. + temp2-type = 'S'. + temp2-id = 'MSG1'. + temp2-number = '003'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'product activated'. + temp2-type = 'S'. + temp2-id = 'MSG4'. + temp2-number = '375'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'check the input values'. + temp2-type = 'W'. + temp2-id = 'MSG2'. + temp2-number = '375'. + INSERT temp2 INTO TABLE temp1. + temp2-message = 'product already in use'. + temp2-type = 'I'. + temp2-id = 'MSG2'. + temp2-number = '375'. + INSERT temp2 INTO TABLE temp1. + t_bapiret = temp1. ENDMETHOD. METHOD ui5_popup_input. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). - DATA(dialog) = popup->dialog( + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = popup->dialog( contentheight = '500px' contentwidth = '500px' title = 'Title' ). @@ -109,11 +139,18 @@ CLASS Z2UI5_CL_DEMO_APP_141 IMPLEMENTATION. press = client->_event_client( client->cs_event-popup_close ) type = 'Emphasized' ). + DATA temp3 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-n = `content`. + temp4-v = ``. + INSERT temp4 INTO TABLE temp3. + temp4-n = `preferDOM`. + temp4-v = `true`. + INSERT temp4 INTO TABLE temp3. dialog->_generic( name = `HTML` ns = `core` - t_prop = VALUE #( ( n = `content` v = `` ) - ( n = `preferDOM` v = `true` ) - ) )->get_parent( ). + t_prop = temp3 )->get_parent( ). client->popup_display( popup->stringify( ) ). @@ -122,10 +159,12 @@ CLASS Z2UI5_CL_DEMO_APP_141 IMPLEMENTATION. METHOD ui5_view_display. - DATA(css) = `` && + DATA css TYPE string. + css = `` && `.lbl-color { color: red !important; font-size: 30px !important; }`. - DATA(script) = `` && + DATA script TYPE string. + script = `` && `sap.z2ui5.setBlackColor = function() {` && |\n| && ` var lbl = sap.ui.getCore().byId('popupId--lbl1');` && |\n| && ` lbl.setText('changed from js');` && |\n| && @@ -133,18 +172,23 @@ CLASS Z2UI5_CL_DEMO_APP_141 IMPLEMENTATION. `};`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). view->_generic( name = `script` ns = `html` )->_cc_plain_xml( script )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Popups' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(grid) = page->grid( 'L8 M12 S12' )->content( 'layout' ). + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L8 M12 S12' )->content( 'layout' ). grid->simple_form( 'Inputs' )->content( 'form' diff --git a/src/z2ui5_cl_demo_app_143.clas.abap b/src/z2ui5_cl_demo_app_143.clas.abap index 5211ee25..435c675b 100644 --- a/src/z2ui5_cl_demo_app_143.clas.abap +++ b/src/z2ui5_cl_demo_app_143.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_143 DEFINITION field2 TYPE string, field3 TYPE string, END OF t_data . - TYPES ty_t_data TYPE STANDARD TABLE OF t_data WITH EMPTY KEY. + TYPES ty_t_data TYPE STANDARD TABLE OF t_data WITH DEFAULT KEY. DATA gt_data TYPE ty_t_data. DATA client TYPE REF TO z2ui5_if_client . @@ -34,13 +34,15 @@ CLASS z2ui5_cl_demo_app_143 IMPLEMENTATION. METHOD ui5_on_event. TRY. - DATA(ok_code) = client->get( )-event. + DATA ok_code TYPE z2ui5_if_types=>ty_s_get-event. + ok_code = client->get( )-event. CASE ok_code. WHEN 'ROW_ACTION_ITEM_ADD'. client->message_toast_display( 'Something' ). client->view_model_update( ). ENDCASE. - CATCH cx_root INTO DATA(x). + DATA x TYPE REF TO cx_root. + CATCH cx_root INTO x. client->message_box_display( text = x->get_text( ) type = `error` ). ENDTRY. @@ -49,35 +51,62 @@ CLASS z2ui5_cl_demo_app_143 IMPLEMENTATION. METHOD ui5_on_init. - gt_data = VALUE ty_t_data( - ( field1 = '21' field2 = 'T1' field3 = 'TEXT1' ) - ( field1 = '22' field2 = 'T1' field3 = 'TEXT1' ) - ( field1 = '23' field2 = 'T2' field3 = 'TEXT1' ) - ( field1 = '24' field2 = 'T2' field3 = 'TEXT2' ) - ( field1 = '25' field2 = 'T3' field3 = 'TEXT2' ) ). + DATA temp1 TYPE ty_t_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-field1 = '21'. + temp2-field2 = 'T1'. + temp2-field3 = 'TEXT1'. + INSERT temp2 INTO TABLE temp1. + temp2-field1 = '22'. + temp2-field2 = 'T1'. + temp2-field3 = 'TEXT1'. + INSERT temp2 INTO TABLE temp1. + temp2-field1 = '23'. + temp2-field2 = 'T2'. + temp2-field3 = 'TEXT1'. + INSERT temp2 INTO TABLE temp1. + temp2-field1 = '24'. + temp2-field2 = 'T2'. + temp2-field3 = 'TEXT2'. + INSERT temp2 INTO TABLE temp1. + temp2-field1 = '25'. + temp2-field2 = 'T3'. + temp2-field3 = 'TEXT2'. + INSERT temp2 INTO TABLE temp1. + gt_data = temp1. ENDMETHOD. METHOD ui5_view_main_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page1) = view->page( id = `page_main` + DATA page1 TYPE REF TO z2ui5_cl_xml_view. + page1 = view->page( id = `page_main` title = 'Table Filters Reset after view Update' class = 'sapUiContentPadding' ). - DATA(page) = page1->dynamic_page( headerexpanded = abap_true + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = page1->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). page1->_z2ui5( )->uitableext( tableid = `Table1` ). - DATA(header_title) = page->title( ns = 'f' )->get( )->dynamic_page_title( ). + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). header_title->heading( ns = 'f' )->hbox( )->title( `Table` ). header_title->expanded_content( 'f' ). header_title->snapped_content( ns = 'f' ). - DATA(cont) = page->content( ns = 'f' ). + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->content( ns = 'f' ). - DATA(tab) = cont->vbox( + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${MATNR}` INTO TABLE temp3. + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = cont->vbox( )->ui_table( rows = client->_bind( val = gt_data ) id = 'Table1' editable = abap_false @@ -110,7 +139,7 @@ CLASS z2ui5_cl_demo_app_143 IMPLEMENTATION. )->ui_row_action_template( )->ui_row_action( )->ui_row_action_item( icon = 'sap-icon://add' text = 'Add' - press = client->_event( val = 'ROW_ACTION_ITEM_ADD' t_arg = VALUE #( ( `${MATNR}` ) ) ) ). + press = client->_event( val = 'ROW_ACTION_ITEM_ADD' t_arg = temp3 ) ). client->view_display( view->stringify( ) ). ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_144.clas.abap b/src/z2ui5_cl_demo_app_144.clas.abap index 0844ad12..fa4031b9 100644 --- a/src/z2ui5_cl_demo_app_144.clas.abap +++ b/src/z2ui5_cl_demo_app_144.clas.abap @@ -12,7 +12,8 @@ CLASS z2ui5_cl_demo_app_144 DEFINITION value TYPE string, END OF ty_row . - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + TYPES temp1_23c3e7b34e TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_23c3e7b34e . DATA check_initialized TYPE abap_bool. DATA client TYPE REF TO z2ui5_if_client. METHODS set_view. @@ -28,21 +29,29 @@ CLASS z2ui5_cl_demo_app_144 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp10 TYPE xsdboolean. + temp10 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Binding Cell Level' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp10 ). - LOOP AT t_tab REFERENCE INTO DATA(lr_row). - DATA(lv_tabix) = sy-tabix. + DATA temp1 LIKE LINE OF t_tab. + DATA lr_row LIKE REF TO temp1. + LOOP AT t_tab REFERENCE INTO lr_row. + DATA lv_tabix LIKE sy-tabix. + lv_tabix = sy-tabix. page->input( value = client->_bind_edit( val = lr_row->title tab = t_tab tab_index = lv_tabix ) ). page->input( value = client->_bind_edit( val = lr_row->value tab = t_tab tab_index = lv_tabix ) ). ENDLOOP. - DATA(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( items = client->_bind_edit( t_tab ) mode = 'MultiSelect' )->header_toolbar( @@ -57,10 +66,42 @@ CLASS z2ui5_cl_demo_app_144 IMPLEMENTATION. )->input( value = '{TITLE}' )->input( value = '{VALUE}' ). - page->input( value = client->_bind_edit( val = t_tab[ 1 ]-title tab = t_tab tab_index = 1 ) ). - page->input( value = client->_bind_edit( val = t_tab[ 1 ]-value tab = t_tab tab_index = 1 ) ). - page->input( value = client->_bind_edit( val = t_tab[ 2 ]-title tab = t_tab tab_index = 2 ) ). - page->input( value = client->_bind_edit( val = t_tab[ 2 ]-value tab = t_tab tab_index = 2 ) ). + DATA temp2 LIKE LINE OF t_tab. + DATA temp3 LIKE sy-tabix. + temp3 = sy-tabix. + READ TABLE t_tab INDEX 1 INTO temp2. + sy-tabix = temp3. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + page->input( value = client->_bind_edit( val = temp2-title tab = t_tab tab_index = 1 ) ). + DATA temp4 LIKE LINE OF t_tab. + DATA temp5 LIKE sy-tabix. + temp5 = sy-tabix. + READ TABLE t_tab INDEX 1 INTO temp4. + sy-tabix = temp5. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + page->input( value = client->_bind_edit( val = temp4-value tab = t_tab tab_index = 1 ) ). + DATA temp6 LIKE LINE OF t_tab. + DATA temp7 LIKE sy-tabix. + temp7 = sy-tabix. + READ TABLE t_tab INDEX 2 INTO temp6. + sy-tabix = temp7. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + page->input( value = client->_bind_edit( val = temp6-title tab = t_tab tab_index = 2 ) ). + DATA temp8 LIKE LINE OF t_tab. + DATA temp9 LIKE sy-tabix. + temp9 = sy-tabix. + READ TABLE t_tab INDEX 2 INTO temp8. + sy-tabix = temp9. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + page->input( value = client->_bind_edit( val = temp8-value tab = t_tab tab_index = 2 ) ). client->view_display( view->stringify( ) ). @@ -75,9 +116,17 @@ CLASS z2ui5_cl_demo_app_144 IMPLEMENTATION. check_initialized = abap_true. DO 1 TIMES. - t_tab = VALUE #( BASE t_tab - ( title = 'entry 01' value = 'red' ) - ( title = 'entry 02' value = 'blue' ) ). + DATA temp10 LIKE t_tab. + CLEAR temp10. + temp10 = t_tab. + DATA temp11 LIKE LINE OF temp10. + temp11-title = 'entry 01'. + temp11-value = 'red'. + INSERT temp11 INTO TABLE temp10. + temp11-title = 'entry 02'. + temp11-value = 'blue'. + INSERT temp11 INTO TABLE temp10. + t_tab = temp10. ENDDO. set_view( ). ENDIF. diff --git a/src/z2ui5_cl_demo_app_149.clas.abap b/src/z2ui5_cl_demo_app_149.clas.abap index 58b2af13..02db0e51 100644 --- a/src/z2ui5_cl_demo_app_149.clas.abap +++ b/src/z2ui5_cl_demo_app_149.clas.abap @@ -22,8 +22,12 @@ CLASS Z2UI5_CL_DEMO_APP_149 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lo_dummy) = CAST z2ui5_cl_pop_to_inform( lo_prev ). + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_to_inform. + temp1 ?= lo_prev. + DATA lo_dummy LIKE temp1. + lo_dummy = temp1. client->message_box_display( `callback after popup to inform` ). CATCH cx_root. ENDTRY. @@ -33,12 +37,15 @@ CLASS Z2UI5_CL_DEMO_APP_149 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup HTML' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -53,7 +60,8 @@ CLASS Z2UI5_CL_DEMO_APP_149 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_html=>factory( `

HTML Links

` && |\n| && + DATA lo_app TYPE REF TO z2ui5_cl_pop_html. + lo_app = z2ui5_cl_pop_html=>factory( `

HTML Links

` && |\n| && `

HTML links are defined with the a tag:

` && |\n| && |\n| && `This is a link` ). diff --git a/src/z2ui5_cl_demo_app_150.clas.abap b/src/z2ui5_cl_demo_app_150.clas.abap index 3844333b..66158b1f 100644 --- a/src/z2ui5_cl_demo_app_150.clas.abap +++ b/src/z2ui5_cl_demo_app_150.clas.abap @@ -24,7 +24,8 @@ CLASS Z2UI5_CL_DEMO_APP_150 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_to_confirm=>factory( `this is a question` ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_to_confirm. + lo_app = z2ui5_cl_pop_to_confirm=>factory( `this is a question` ). client->nav_app_call( lo_app ). WHEN 'BACK'. @@ -37,8 +38,12 @@ CLASS Z2UI5_CL_DEMO_APP_150 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lv_confirm_result) = CAST z2ui5_cl_pop_to_confirm( lo_prev )->result( ). + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_to_confirm. + temp1 ?= lo_prev. + DATA lv_confirm_result TYPE abap_bool. + lv_confirm_result = temp1->result( ). client->message_box_display( `the result is ` && lv_confirm_result ). CATCH cx_root. ENDTRY. @@ -47,12 +52,15 @@ CLASS Z2UI5_CL_DEMO_APP_150 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup To Confirm' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). diff --git a/src/z2ui5_cl_demo_app_151.clas.abap b/src/z2ui5_cl_demo_app_151.clas.abap index 048bb2f5..ed0f29b1 100644 --- a/src/z2ui5_cl_demo_app_151.clas.abap +++ b/src/z2ui5_cl_demo_app_151.clas.abap @@ -24,7 +24,8 @@ CLASS z2ui5_cl_demo_app_151 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_to_inform=>factory( `this is a question` ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_to_inform. + lo_app = z2ui5_cl_pop_to_inform=>factory( `this is a question` ). client->nav_app_call( lo_app ). WHEN 'BACK'. @@ -37,12 +38,15 @@ CLASS z2ui5_cl_demo_app_151 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup To Inform' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -69,8 +73,12 @@ CLASS z2ui5_cl_demo_app_151 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lo_dummy) = CAST z2ui5_cl_pop_to_inform( lo_prev ). + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_to_inform. + temp1 ?= lo_prev. + DATA lo_dummy LIKE temp1. + lo_dummy = temp1. client->message_box_display( `callback after popup to inform` ). CATCH cx_root. ENDTRY. diff --git a/src/z2ui5_cl_demo_app_152.clas.abap b/src/z2ui5_cl_demo_app_152.clas.abap index 963a4136..ec86d32e 100644 --- a/src/z2ui5_cl_demo_app_152.clas.abap +++ b/src/z2ui5_cl_demo_app_152.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_152 DEFINITION PUBLIC. value TYPE string, descr TYPE string, END OF ty_row. - DATA mt_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_eeb45a0adc TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA mt_tab TYPE temp1_eeb45a0adc. DATA mv_check_initialized TYPE abap_bool. DATA mv_multiselect TYPE abap_bool. @@ -38,28 +39,55 @@ CLASS z2ui5_cl_demo_app_152 IMPLEMENTATION. WHEN 'POPUP'. - mt_tab = VALUE #( descr = 'this is a description' - ( zzselkz = mv_preselect title = 'title_01' value = 'value_01' ) - ( zzselkz = mv_preselect title = 'title_02' value = 'value_02' ) - ( zzselkz = mv_preselect title = 'title_03' value = 'value_03' ) - ( zzselkz = mv_preselect title = 'title_04' value = 'value_04' ) - ( zzselkz = mv_preselect title = 'title_05' value = 'value_05' ) ). - - DATA(lo_app) = z2ui5_cl_pop_to_select=>factory( + DATA temp1 LIKE mt_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-descr = 'this is a description'. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_01'. + temp2-value = 'value_01'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_02'. + temp2-value = 'value_02'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_03'. + temp2-value = 'value_03'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_04'. + temp2-value = 'value_04'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_05'. + temp2-value = 'value_05'. + INSERT temp2 INTO TABLE temp1. + mt_tab = temp1. + + DATA temp3 TYPE string. + IF mv_multiselect = abap_true. + temp3 = `Multi select`. + ELSE. + temp3 = `Single select`. + ENDIF. + DATA lo_app TYPE REF TO z2ui5_cl_pop_to_select. + lo_app = z2ui5_cl_pop_to_select=>factory( i_tab = mt_tab i_multiselect = mv_multiselect - i_title = COND #( - WHEN mv_multiselect = abap_true - THEN `Multi select` - ELSE `Single select` ) ). + i_title = temp3 ). client->nav_app_call( lo_app ). WHEN 'MULTISELECT_TOGGLE'. - mv_preselect = COND #( WHEN mv_multiselect = abap_false - THEN abap_false - ELSE mv_preselect ). + DATA temp4 TYPE abap_bool. + IF mv_multiselect = abap_false. + temp4 = abap_false. + ELSE. + temp4 = mv_preselect. + ENDIF. + mv_preselect = temp4. client->view_model_update( ). @@ -73,12 +101,15 @@ CLASS z2ui5_cl_demo_app_152 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup To Select' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->hbox( )->text( text = 'Multiselect: ' class = 'sapUiTinyMargin' @@ -122,8 +153,12 @@ CLASS z2ui5_cl_demo_app_152 IMPLEMENTATION. FIELD-SYMBOLS TYPE ty_row. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(ls_result) = CAST z2ui5_cl_pop_to_select( lo_prev )->result( ). + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp5 TYPE REF TO z2ui5_cl_pop_to_select. + temp5 ?= lo_prev. + DATA ls_result TYPE z2ui5_cl_pop_to_select=>ty_s_result. + ls_result = temp5->result( ). IF ls_result-check_confirmed = abap_false. client->message_box_display( `Popup was cancelled` ). @@ -138,7 +173,8 @@ CLASS z2ui5_cl_demo_app_152 IMPLEMENTATION. ELSE. - ASSIGN ls_result-table->* TO FIELD-SYMBOL(
). + FIELD-SYMBOLS
TYPE data. + ASSIGN ls_result-table->* TO
. client->nav_app_call( z2ui5_cl_pop_table=>factory( i_tab =
i_title = 'Selected rows' ) ). diff --git a/src/z2ui5_cl_demo_app_153.clas.abap b/src/z2ui5_cl_demo_app_153.clas.abap index e24de60f..468c26f2 100644 --- a/src/z2ui5_cl_demo_app_153.clas.abap +++ b/src/z2ui5_cl_demo_app_153.clas.abap @@ -67,12 +67,15 @@ CLASS z2ui5_cl_demo_app_153 IMPLEMENTATION. custom_mapper = z2ui5_cl_ajson_mapping=>create_camel_case( iv_first_json_upper = abap_false ) custom_mapper_back = z2ui5_cl_ajson_mapping=>create_to_snake_case( ) ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Binding' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Rountrip...' press = client->_event( 'POPUP' ) @@ -116,14 +119,31 @@ CLASS z2ui5_cl_demo_app_153 IMPLEMENTATION. IF client->get( )-check_on_navigated = abap_true. - ms_struc-data-labels = VALUE #( ( `Jan` ) ( `Feb` ) ( `Mar` ) ( `Apr` ) ( `May` ) ( `Jun` ) ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `Jan` INTO TABLE temp1. + INSERT `Feb` INTO TABLE temp1. + INSERT `Mar` INTO TABLE temp1. + INSERT `Apr` INTO TABLE temp1. + INSERT `May` INTO TABLE temp1. + INSERT `Jun` INTO TABLE temp1. + ms_struc-data-labels = temp1. CLEAR ls_dataset. ls_dataset-label = 'Fully Rounded'. ls_dataset-border_width = 2. ls_dataset-border_radius = 200. - ls_dataset-data = VALUE #( ( `1` ) ( `-12` ) ( `19` ) ( `3` ) ( `5` ) ( `-2` ) ( `3` ) ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `1` INTO TABLE temp3. + INSERT `-12` INTO TABLE temp3. + INSERT `19` INTO TABLE temp3. + INSERT `3` INTO TABLE temp3. + INSERT `5` INTO TABLE temp3. + INSERT `-2` INTO TABLE temp3. + INSERT `3` INTO TABLE temp3. + ls_dataset-data = temp3. diff --git a/src/z2ui5_cl_demo_app_154.clas.abap b/src/z2ui5_cl_demo_app_154.clas.abap index 34473154..fd6df45c 100644 --- a/src/z2ui5_cl_demo_app_154.clas.abap +++ b/src/z2ui5_cl_demo_app_154.clas.abap @@ -40,15 +40,28 @@ CLASS z2ui5_cl_demo_app_154 IMPLEMENTATION. TYPES params TYPE c LENGTH 255. TYPES msg_txt TYPE string. TYPES END OF ty_log_entry. - DATA lt_bal TYPE STANDARD TABLE OF ty_log_entry WITH EMPTY KEY. + TYPES temp5 TYPE STANDARD TABLE OF ty_log_entry WITH DEFAULT KEY. +DATA lt_bal TYPE temp5. CASE client->get( )-event. WHEN 'POPUP_BAPIRET'. - DATA(lt_msg) = VALUE bapirettab( - ( type = 'E' id = 'MSG1' number = '001' message = 'An empty Report field causes an empty XML Message to be sent' ) - ( type = 'I' id = 'MSG2' number = '002' message = 'Product already in use' ) ). + DATA temp1 TYPE bapirettab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-type = 'E'. + temp2-id = 'MSG1'. + temp2-number = '001'. + temp2-message = 'An empty Report field causes an empty XML Message to be sent'. + INSERT temp2 INTO TABLE temp1. + temp2-type = 'I'. + temp2-id = 'MSG2'. + temp2-number = '002'. + temp2-message = 'Product already in use'. + INSERT temp2 INTO TABLE temp1. + DATA lt_msg LIKE temp1. + lt_msg = temp1. client->nav_app_call( z2ui5_cl_pop_messages=>factory( lt_msg ) ). @@ -56,19 +69,35 @@ CLASS z2ui5_cl_demo_app_154 IMPLEMENTATION. - lt_bal = VALUE #( - ( msgid = 'Z001' msgno = '001' msgty = 'S' time_stmp = z2ui5_cl_util=>time_get_timestampl( ) msgnumber = '01' ) - ( msgid = 'Z001' msgno = '002' msgty = 'S' time_stmp = z2ui5_cl_util=>time_get_timestampl( ) msgnumber = '02' ) ). + DATA temp3 LIKE lt_bal. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-msgid = 'Z001'. + temp4-msgno = '001'. + temp4-msgty = 'S'. + temp4-time_stmp = z2ui5_cl_util=>time_get_timestampl( ). + temp4-msgnumber = '01'. + INSERT temp4 INTO TABLE temp3. + temp4-msgid = 'Z001'. + temp4-msgno = '002'. + temp4-msgty = 'S'. + temp4-time_stmp = z2ui5_cl_util=>time_get_timestampl( ). + temp4-msgnumber = '02'. + INSERT temp4 INTO TABLE temp3. + lt_bal = temp3. client->nav_app_call( z2ui5_cl_pop_bal=>factory( lt_bal ) ). WHEN 'POPUP_EXCEPTION'. TRY. - DATA(lv_dummy) = 1 / 0. - CATCH cx_root INTO DATA(lx). + DATA lv_dummy TYPE i. + lv_dummy = 1 / 0. + DATA lx TYPE REF TO cx_root. + CATCH cx_root INTO lx. ENDTRY. - DATA(lo_app) = z2ui5_cl_pop_error=>factory( lx ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_error. + lo_app = z2ui5_cl_pop_error=>factory( lx ). client->nav_app_call( lo_app ). WHEN 'BACK'. @@ -81,12 +110,15 @@ CLASS z2ui5_cl_demo_app_154 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup Messages' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup BAPIRET' press = client->_event( 'POPUP_BAPIRET' ) @@ -106,7 +138,7 @@ CLASS z2ui5_cl_demo_app_154 IMPLEMENTATION. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. ui5_display( ). RETURN. ENDIF. diff --git a/src/z2ui5_cl_demo_app_155.clas.abap b/src/z2ui5_cl_demo_app_155.clas.abap index 513c6d3e..1437f8dc 100644 --- a/src/z2ui5_cl_demo_app_155.clas.abap +++ b/src/z2ui5_cl_demo_app_155.clas.abap @@ -24,7 +24,8 @@ CLASS z2ui5_cl_demo_app_155 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_textedit=>factory( `this is a text` ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_textedit. + lo_app = z2ui5_cl_pop_textedit=>factory( `this is a text` ). client->nav_app_call( lo_app ). WHEN 'BACK'. @@ -37,12 +38,15 @@ CLASS z2ui5_cl_demo_app_155 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup To Text Edit' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -69,8 +73,12 @@ CLASS z2ui5_cl_demo_app_155 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lv_text) = CAST z2ui5_cl_pop_textedit( lo_prev )->result( )-text. + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_textedit. + temp1 ?= lo_prev. + DATA lv_text TYPE z2ui5_cl_pop_textedit=>ty_s_result-text. + lv_text = temp1->result( )-text. client->message_box_display( `the result is ` && lv_text ). CATCH cx_root. ENDTRY. diff --git a/src/z2ui5_cl_demo_app_156.clas.abap b/src/z2ui5_cl_demo_app_156.clas.abap index d044452b..3d318c8a 100644 --- a/src/z2ui5_cl_demo_app_156.clas.abap +++ b/src/z2ui5_cl_demo_app_156.clas.abap @@ -22,8 +22,12 @@ CLASS Z2UI5_CL_DEMO_APP_156 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lv_text) = CAST z2ui5_cl_pop_input_val( lo_prev )->result( )-value. + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_input_val. + temp1 ?= lo_prev. + DATA lv_text TYPE z2ui5_cl_pop_input_val=>ty_s_result-value. + lv_text = temp1->result( )-value. client->message_box_display( `the input is ` && lv_text ). CATCH cx_root. ENDTRY. @@ -33,12 +37,15 @@ CLASS Z2UI5_CL_DEMO_APP_156 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup Input Value' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -53,7 +60,8 @@ CLASS Z2UI5_CL_DEMO_APP_156 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_input_val=>factory( text = `Amount of products:` ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_input_val. + lo_app = z2ui5_cl_pop_input_val=>factory( text = `Amount of products:` ). client->nav_app_call( lo_app ). WHEN 'BACK'. diff --git a/src/z2ui5_cl_demo_app_157.clas.abap b/src/z2ui5_cl_demo_app_157.clas.abap index 51604602..423af39b 100644 --- a/src/z2ui5_cl_demo_app_157.clas.abap +++ b/src/z2ui5_cl_demo_app_157.clas.abap @@ -22,8 +22,12 @@ CLASS Z2UI5_CL_DEMO_APP_157 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lv_text) = CAST z2ui5_cl_pop_file_ul( lo_prev )->result( )-value. + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_file_ul. + temp1 ?= lo_prev. + DATA lv_text TYPE z2ui5_cl_pop_file_ul=>ty_s_result-value. + lv_text = temp1->result( )-value. client->message_box_display( `the input is ` && lv_text ). CATCH cx_root. ENDTRY. @@ -33,12 +37,15 @@ CLASS Z2UI5_CL_DEMO_APP_157 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup File Upload' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -53,7 +60,8 @@ CLASS Z2UI5_CL_DEMO_APP_157 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_file_ul=>factory( ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_file_ul. + lo_app = z2ui5_cl_pop_file_ul=>factory( ). client->nav_app_call( lo_app ). WHEN 'BACK'. diff --git a/src/z2ui5_cl_demo_app_158.clas.abap b/src/z2ui5_cl_demo_app_158.clas.abap index 04962915..2c0431e4 100644 --- a/src/z2ui5_cl_demo_app_158.clas.abap +++ b/src/z2ui5_cl_demo_app_158.clas.abap @@ -49,8 +49,12 @@ CLASS z2ui5_cl_demo_app_158 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lv_text) = CAST z2ui5_cl_pop_pdf( lo_prev )->result( )-text. + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_pdf. + temp1 ?= lo_prev. + DATA lv_text TYPE z2ui5_cl_pop_pdf=>ty_s_result-text. + lv_text = temp1->result( )-text. client->message_box_display( `pdf viewer closed` ). CATCH cx_root. ENDTRY. @@ -60,12 +64,15 @@ CLASS z2ui5_cl_demo_app_158 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup Display PDF' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -80,8 +87,10 @@ CLASS z2ui5_cl_demo_app_158 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - data(lv_pdf) = get_example_pdf( ). - DATA(lo_app) = z2ui5_cl_pop_pdf=>factory( lv_pdf ). + DATA lv_pdf TYPE string. + lv_pdf = get_example_pdf( ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_pdf. + lo_app = z2ui5_cl_pop_pdf=>factory( lv_pdf ). client->nav_app_call( lo_app ). WHEN 'BACK'. diff --git a/src/z2ui5_cl_demo_app_159.clas.abap b/src/z2ui5_cl_demo_app_159.clas.abap index b74e7065..29e9128d 100644 --- a/src/z2ui5_cl_demo_app_159.clas.abap +++ b/src/z2ui5_cl_demo_app_159.clas.abap @@ -50,8 +50,12 @@ CLASS Z2UI5_CL_DEMO_APP_159 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(lv_text) = CAST z2ui5_cl_pop_pdf( lo_prev )->result( )-text. + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_pdf. + temp1 ?= lo_prev. + DATA lv_text TYPE z2ui5_cl_pop_pdf=>ty_s_result-text. + lv_text = temp1->result( )-text. client->message_box_display( `pdf viewer closed` ). CATCH cx_root. ENDTRY. @@ -61,12 +65,15 @@ CLASS Z2UI5_CL_DEMO_APP_159 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup Display PDF' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -81,8 +88,10 @@ CLASS Z2UI5_CL_DEMO_APP_159 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - data(lv_pdf) = get_example_pdf( ). - DATA(lo_app) = z2ui5_cl_pop_pdf=>factory( lv_pdf ). + DATA lv_pdf TYPE string. + lv_pdf = get_example_pdf( ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_pdf. + lo_app = z2ui5_cl_pop_pdf=>factory( lv_pdf ). client->nav_app_call( lo_app ). WHEN 'BACK'. diff --git a/src/z2ui5_cl_demo_app_160.clas.abap b/src/z2ui5_cl_demo_app_160.clas.abap index 6ebe00ba..99dfa898 100644 --- a/src/z2ui5_cl_demo_app_160.clas.abap +++ b/src/z2ui5_cl_demo_app_160.clas.abap @@ -40,7 +40,8 @@ CLASS z2ui5_cl_demo_app_160 DEFINITION END OF s_output . DATA check_initialized TYPE abap_bool . - DATA mt_output TYPE STANDARD TABLE OF s_output. + TYPES temp1_d2eb35b09b TYPE STANDARD TABLE OF s_output. +DATA mt_output TYPE temp1_d2eb35b09b. DATA client TYPE REF TO z2ui5_if_client. PROTECTED SECTION. @@ -87,12 +88,48 @@ CLASS z2ui5_cl_demo_app_160 IMPLEMENTATION. WHEN 'PL_TOTAL_CHANGE'. lt_event_arguments = client->get( )-t_event_arg. - DATA(lv_id_event) = lt_event_arguments[ 1 ]. - - DATA(lv_tab_index) = lt_event_arguments[ 2 ]. - DATA(ls_row_submit) = mt_output[ lv_tab_index ]. - - DATA(lv_id_parent) = lt_event_arguments[ 3 ]. + DATA lv_id_event LIKE LINE OF lt_event_arguments. + DATA temp1 LIKE LINE OF lt_event_arguments. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_event_arguments INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_id_event = temp1. + + DATA lv_tab_index LIKE LINE OF lt_event_arguments. + DATA temp3 LIKE LINE OF lt_event_arguments. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_event_arguments INDEX 2 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_tab_index = temp3. + DATA ls_row_submit LIKE LINE OF mt_output. + DATA temp5 LIKE LINE OF mt_output. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE mt_output INDEX lv_tab_index INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + ls_row_submit = temp5. + + DATA lv_id_parent LIKE LINE OF lt_event_arguments. + DATA temp7 LIKE LINE OF lt_event_arguments. + DATA temp8 LIKE sy-tabix. + temp8 = sy-tabix. + READ TABLE lt_event_arguments INDEX 3 INTO temp7. + sy-tabix = temp8. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_id_parent = temp7. client->message_box_display( lv_tab_index && lv_id_event && lv_id_parent ). @@ -108,26 +145,32 @@ CLASS z2ui5_cl_demo_app_160 IMPLEMENTATION. METHOD render_main_screen. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Event on cell level' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp2 )->header_content( )->link( )->get_parent( ). - DATA(table) = page->flex_box( height = '85vh' )->ui_table( alternaterowcolors = 'true' + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->flex_box( height = '85vh' )->ui_table( alternaterowcolors = 'true' visiblerowcountmode = 'Auto' fixedrowcount = '1' selectionmode = 'None' rows = client->_bind_edit( val = mt_output * compress_mode = z2ui5_if_client=>cs_compress_mode-none ) ). - DATA(columns) = table->ui_columns( ). + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->ui_columns( ). columns->ui_column( width = '5.2rem' sortproperty = 'SET_SK' @@ -142,16 +185,16 @@ CLASS z2ui5_cl_demo_app_160 IMPLEMENTATION. sortproperty = 'IS_TOTAL' filterproperty = 'IS_TOTAL' )->text( text = 'Column 4' )->ui_template( )->text( text = `{IS_TOTAL}` ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + INSERT `${INDEX}` INTO TABLE temp1. + INSERT `$event.oSource.oParent.sId` INTO TABLE temp1. columns->ui_column( width = '5rem' sortproperty = 'PL_TOTAL' filterproperty = 'PL_TOTAL' )->text( text = 'Column 5' )->ui_template( )->input( value = `{PL_TOTAL}` - submit = client->_event( val = 'PL_TOTAL_CHANGE' t_arg = VALUE #( - ( `${$source>/id}` ) - ( `${INDEX}` ) -* ( `$source.oParent.sId` ) - ( `$event.oSource.oParent.sId` ) - ) ) editable = abap_true + submit = client->_event( val = 'PL_TOTAL_CHANGE' t_arg = temp1 ) editable = abap_true type = 'Number' ). columns->ui_column( width = '4rem' diff --git a/src/z2ui5_cl_demo_app_161.clas.abap b/src/z2ui5_cl_demo_app_161.clas.abap index 266417d3..1ef129c9 100644 --- a/src/z2ui5_cl_demo_app_161.clas.abap +++ b/src/z2ui5_cl_demo_app_161.clas.abap @@ -24,13 +24,16 @@ CLASS z2ui5_cl_demo_app_161 IMPLEMENTATION. METHOD simple_popup1. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). - DATA(dialog) = popup->dialog( + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = popup->dialog( afterclose = client->_event( 'BTN_OK_1ND' ) )->content( ). - DATA(content) = dialog->button( text = `Open 2nd popup` + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = dialog->button( text = `Open 2nd popup` press = client->_event( 'GOTO_2ND' ) ). dialog->get_parent( )->buttons( @@ -46,13 +49,16 @@ CLASS z2ui5_cl_demo_app_161 IMPLEMENTATION. METHOD simple_popup2. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). - DATA(dialog) = popup->dialog( + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = popup->dialog( afterclose = client->_event( 'BTN_OK_2ND' ) )->content( ). - DATA(content) = dialog->label( text = 'this is a second popup' ). + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = dialog->label( text = 'this is a second popup' ). dialog->get_parent( )->buttons( )->button( @@ -67,12 +73,15 @@ CLASS z2ui5_cl_demo_app_161 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup To Popup' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). diff --git a/src/z2ui5_cl_demo_app_162.clas.abap b/src/z2ui5_cl_demo_app_162.clas.abap index 71a10826..f6577952 100644 --- a/src/z2ui5_cl_demo_app_162.clas.abap +++ b/src/z2ui5_cl_demo_app_162.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_162 DEFINITION PUBLIC. storage_location TYPE string, quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mt_table TYPE ty_t_table. DATA mt_filter TYPE z2ui5_cl_util=>ty_t_filter_multi. @@ -52,13 +52,46 @@ CLASS z2ui5_cl_demo_app_162 IMPLEMENTATION. METHOD set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'sofa' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'computer' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'oven' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_162=>ty_t_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product = 'table'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'chair'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'sofa'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'computer'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'oven'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'table2'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + mt_table = temp1. z2ui5_cl_util=>filter_itab( EXPORTING @@ -71,16 +104,21 @@ CLASS z2ui5_cl_demo_app_162 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Select-Options' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(vbox) = view->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = view->vbox( ). - DATA(tab) = vbox->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = vbox->table( items = client->_bind( val = mt_table ) )->header_toolbar( )->overflow_toolbar( @@ -93,14 +131,16 @@ CLASS z2ui5_cl_demo_app_162 IMPLEMENTATION. type = `Emphasized` )->get_parent( )->get_parent( ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). @@ -126,7 +166,10 @@ CLASS z2ui5_cl_demo_app_162 IMPLEMENTATION. IF client->get( )-check_on_navigated = abap_true. TRY. - DATA(lo_value_help) = CAST z2ui5_cl_pop_get_range_m( client->get_app( client->get( )-s_draft-id_prev_app ) ). + DATA temp3 TYPE REF TO z2ui5_cl_pop_get_range_m. + temp3 ?= client->get_app( client->get( )-s_draft-id_prev_app ). + DATA lo_value_help LIKE temp3. + lo_value_help = temp3. IF lo_value_help->result( )-check_confirmed = abap_true. mt_filter = lo_value_help->result( )-t_filter. set_data( ). diff --git a/src/z2ui5_cl_demo_app_163.clas.abap b/src/z2ui5_cl_demo_app_163.clas.abap index 4512f940..1d4be35d 100644 --- a/src/z2ui5_cl_demo_app_163.clas.abap +++ b/src/z2ui5_cl_demo_app_163.clas.abap @@ -38,9 +38,14 @@ CLASS Z2UI5_CL_DEMO_APP_163 IMPLEMENTATION. METHOD view_action_sheet. - DATA(action_sheet_view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA action_sheet_view TYPE REF TO z2ui5_cl_xml_view. + action_sheet_view = z2ui5_cl_xml_view=>factory_popup( ). - action_sheet_view->_generic_property( VALUE #( n = `core:require` v = `{ MessageToast: 'sap/m/MessageToast' }` ) ). + DATA temp1 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp1. + temp1-n = `core:require`. + temp1-v = `{ MessageToast: 'sap/m/MessageToast' }`. + action_sheet_view->_generic_property( temp1 ). action_sheet_view->action_sheet( placement = `Botton` showcancelbutton = abap_true @@ -71,14 +76,18 @@ CLASS Z2UI5_CL_DEMO_APP_163 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Action Sheet' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(vbox) = view->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = view->vbox( ). vbox->button( text = 'Open Action Sheet' press = client->_event( 'OPEN_ACTION_SHEET' ) diff --git a/src/z2ui5_cl_demo_app_164.clas.abap b/src/z2ui5_cl_demo_app_164.clas.abap index 7f7ea221..8c861a72 100644 --- a/src/z2ui5_cl_demo_app_164.clas.abap +++ b/src/z2ui5_cl_demo_app_164.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_164 DEFINITION PUBLIC. storage_location TYPE string, quantity TYPE i, END OF ty_s_tab. - TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY. + TYPES ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY. DATA mt_table TYPE ty_t_table. @@ -49,29 +49,67 @@ CLASS z2ui5_cl_demo_app_164 IMPLEMENTATION. METHOD set_data. "replace this with a db select here... - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'sofa' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'computer' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'oven' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_164=>ty_t_table. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product = 'table'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'chair'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'sofa'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'computer'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'oven'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'table2'. + temp2-create_date = `01.01.2023`. + temp2-create_by = `Peter`. + temp2-storage_location = `AREA_001`. + temp2-quantity = 400. + INSERT temp2 INTO TABLE temp1. + mt_table = temp1. ENDMETHOD. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` title = 'abap2UI5 - Popup Display Table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(vbox) = view->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = view->vbox( ). - DATA(tab) = vbox->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = vbox->table( items = client->_bind( val = mt_table ) )->header_toolbar( )->overflow_toolbar( @@ -82,14 +120,16 @@ CLASS z2ui5_cl_demo_app_164 IMPLEMENTATION. type = `Emphasized` )->get_parent( )->get_parent( ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->text( `{PRODUCT}` ). lo_cells->text( `{CREATE_DATE}` ). lo_cells->text( `{CREATE_BY}` ). @@ -114,7 +154,10 @@ CLASS z2ui5_cl_demo_app_164 IMPLEMENTATION. IF client->get( )-check_on_navigated = abap_true. TRY. - DATA(lo_popup_table) = CAST z2ui5_cl_pop_table( client->get_app( client->get( )-s_draft-id_prev_app ) ). + DATA temp3 TYPE REF TO z2ui5_cl_pop_table. + temp3 ?= client->get_app( client->get( )-s_draft-id_prev_app ). + DATA lo_popup_table LIKE temp3. + lo_popup_table = temp3. set_data( ). client->view_model_update( ). CATCH cx_root. diff --git a/src/z2ui5_cl_demo_app_166.clas.abap b/src/z2ui5_cl_demo_app_166.clas.abap index 3f11af13..31b5204b 100644 --- a/src/z2ui5_cl_demo_app_166.clas.abap +++ b/src/z2ui5_cl_demo_app_166.clas.abap @@ -42,12 +42,16 @@ CLASS z2ui5_cl_demo_app_166 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Binding Structure Level' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->input( client->_bind_edit( val = ms_struc-title ) ). page->input( client->_bind_edit( val = ms_struc-value ) ). diff --git a/src/z2ui5_cl_demo_app_167.clas.abap b/src/z2ui5_cl_demo_app_167.clas.abap index 5e0a70cb..400b27b5 100644 --- a/src/z2ui5_cl_demo_app_167.clas.abap +++ b/src/z2ui5_cl_demo_app_167.clas.abap @@ -21,39 +21,55 @@ CLASS z2ui5_cl_demo_app_167 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp4 TYPE xsdboolean. + temp4 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Event with add Information and t_arg' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp4 ). page->link( text = 'More Infos..' target = '_blank' href = `https://sapui5.hana.ondemand.com/sdk/#/topic/b0fb4de7364f4bcbb053a99aa645affe` ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `FIX_VAL` INTO TABLE temp1. page->button( text = `EVENT_FIX_VAL` - press = client->_event( val = `EVENT_FIX_VAL` t_arg = VALUE #( - ( `FIX_VAL` ) ) ) ). + press = client->_event( val = `EVENT_FIX_VAL` t_arg = temp1 ) ). page->input( client->_bind_edit( mv_value ) ). + DATA temp3 TYPE string_table. + CLEAR temp3. + DATA temp2 LIKE LINE OF temp3. + temp2 = `$` && client->_bind_edit( mv_value ). + INSERT temp2 INTO TABLE temp3. page->button( text = `EVENT_MODEL_VALUE` - press = client->_event( val = `EVENT_MODEL_VALUE` t_arg = VALUE #( - ( `$` && client->_bind_edit( mv_value ) ) ) ) ). + press = client->_event( val = `EVENT_MODEL_VALUE` t_arg = temp3 ) ). + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$source>/text}` INTO TABLE temp5. page->button( text = `SOURCE_PROPERTY_TEXT` - press = client->_event( val = `SOURCE_PROPERTY_TEXT` t_arg = VALUE #( - ( `${$source>/text}` ) ) ) ). + press = client->_event( val = `SOURCE_PROPERTY_TEXT` t_arg = temp5 ) ). + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$parameters>/value}` INTO TABLE temp7. page->input( description = `make an input and press enter - ` - submit = client->_event( val = `EVENT_PROPERTY_VALUE` t_arg = VALUE #( - ( `${$parameters>/value}` ) ) ) ). + submit = client->_event( val = `EVENT_PROPERTY_VALUE` t_arg = temp7 ) ). + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `$event.oSource.oParent.sId` INTO TABLE temp9. page->button( text = `PARENT_PROPERTY_ID` - press = client->_event( val = `PARENT_PROPERTY_ID` t_arg = VALUE #( - ( `$event.oSource.oParent.sId` ) ) ) ). + press = client->_event( val = `PARENT_PROPERTY_ID` t_arg = temp9 ) ). client->view_display( view->stringify( ) ). @@ -70,10 +86,19 @@ CLASS z2ui5_cl_demo_app_167 IMPLEMENTATION. set_view( ). ENDIF. - DATA(lt_arg) = client->get( )-t_event_arg. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. CASE client->get( )-event. WHEN `EVENT_FIX_VAL` OR `EVENT_MODEL_VALUE` OR 'SOURCE_PROPERTY_TEXT' OR 'EVENT_PROPERTY_VALUE' OR 'PARENT_PROPERTY_ID'. - client->message_box_display( `backend event :` && lt_arg[ 1 ] ). + DATA temp11 LIKE LINE OF lt_arg. + DATA temp12 LIKE sy-tabix. + temp12 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp11. + sy-tabix = temp12. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_box_display( `backend event :` && temp11 ). WHEN 'BACK'. client->nav_app_leave( ). diff --git a/src/z2ui5_cl_demo_app_168.clas.abap b/src/z2ui5_cl_demo_app_168.clas.abap index 578ddd69..b89ce20c 100644 --- a/src/z2ui5_cl_demo_app_168.clas.abap +++ b/src/z2ui5_cl_demo_app_168.clas.abap @@ -26,8 +26,11 @@ CLASS z2ui5_cl_demo_app_168 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - IF CAST z2ui5_cl_pop_file_dl( lo_prev )->result( ). + DATA lo_prev TYPE REF TO z2ui5_if_app. + lo_prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_file_dl. + temp1 ?= lo_prev. + IF temp1->result( ) IS NOT INITIAL. client->message_box_display( `the input is downloaded` ). ENDIF. CATCH cx_root. @@ -38,12 +41,15 @@ CLASS z2ui5_cl_demo_app_168 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup File Download' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). @@ -58,7 +64,8 @@ CLASS z2ui5_cl_demo_app_168 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - DATA(lo_app) = z2ui5_cl_pop_file_dl=>factory( get_file( ) ). + DATA lo_app TYPE REF TO z2ui5_cl_pop_file_dl. + lo_app = z2ui5_cl_pop_file_dl=>factory( get_file( ) ). client->nav_app_call( lo_app ). WHEN 'BACK'. diff --git a/src/z2ui5_cl_demo_app_169.clas.abap b/src/z2ui5_cl_demo_app_169.clas.abap index a87426f7..830bd52a 100644 --- a/src/z2ui5_cl_demo_app_169.clas.abap +++ b/src/z2ui5_cl_demo_app_169.clas.abap @@ -16,7 +16,7 @@ CLASS z2ui5_cl_demo_app_169 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA check_editable_active TYPE abap_bool. DATA check_initialized TYPE abap_bool. @@ -32,14 +32,17 @@ CLASS z2ui5_cl_demo_app_169 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - JSON Export ITAB' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true ). - DATA(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( items = client->_bind_edit( t_tab ) )->header_toolbar( )->overflow_toolbar( @@ -81,13 +84,41 @@ CLASS z2ui5_cl_demo_app_169 IMPLEMENTATION. check_initialized = abap_true. check_editable_active = abap_false. - t_tab = VALUE #( - ( title = 'entry 01' value = 'red' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( title = 'entry 02' value = 'blue' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( title = 'entry 03' value = 'green' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( title = 'entry 04' value = 'orange' info = 'completed' descr = '' checkbox = abap_true ) - ( title = 'entry 05' value = 'grey' info = 'completed' descr = 'this is a description' checkbox = abap_true ) - ( ) ). + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'entry 01'. + temp2-value = 'red'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-checkbox = abap_true. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 02'. + temp2-value = 'blue'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-checkbox = abap_true. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 03'. + temp2-value = 'green'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-checkbox = abap_true. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 04'. + temp2-value = 'orange'. + temp2-info = 'completed'. + temp2-descr = ''. + temp2-checkbox = abap_true. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 05'. + temp2-value = 'grey'. + temp2-info = 'completed'. + temp2-descr = 'this is a description'. + temp2-checkbox = abap_true. + INSERT temp2 INTO TABLE temp1. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. set_view( ). diff --git a/src/z2ui5_cl_demo_app_170.clas.abap b/src/z2ui5_cl_demo_app_170.clas.abap index 79d9031e..0f94a036 100644 --- a/src/z2ui5_cl_demo_app_170.clas.abap +++ b/src/z2ui5_cl_demo_app_170.clas.abap @@ -24,14 +24,21 @@ CLASS z2ui5_cl_demo_app_170 IMPLEMENTATION. METHOD simple_popup1. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). - DATA(dialog) = popup->dialog( stretch = abap_true + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = popup->dialog( stretch = abap_true afterclose = client->_event( 'BTN_OK_1ND' ) )->content( ). - DATA(content) = dialog->icon_tab_bar( selectedkey = client->_bind_edit( mv_selected_key ) - select = client->_event_client( val = `POPUP_NAV_CONTAINER_TO` t_arg = VALUE #( ( `NavCon` ) ( `${$parameters>/selectedKey}` ) ) ) + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `NavCon` INTO TABLE temp1. + INSERT `${$parameters>/selectedKey}` INTO TABLE temp1. + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = dialog->icon_tab_bar( selectedkey = client->_bind_edit( mv_selected_key ) + select = client->_event_client( val = `POPUP_NAV_CONTAINER_TO` t_arg = temp1 ) headermode = `Inline` expanded = abap_true expandable = abap_false @@ -82,13 +89,16 @@ CLASS z2ui5_cl_demo_app_170 IMPLEMENTATION. METHOD simple_popup2. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). - DATA(dialog) = popup->dialog( + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = popup->dialog( afterclose = client->_event( 'BTN_OK_2ND' ) )->content( ). - DATA(content) = dialog->label( text = 'this is a second popup' ). + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = dialog->label( text = 'this is a second popup' ). dialog->get_parent( )->footer( )->overflow_toolbar( )->toolbar_spacer( @@ -104,12 +114,15 @@ CLASS z2ui5_cl_demo_app_170 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell( )->page( title = 'abap2UI5 - Popup To Popup' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->button( text = 'Open Popup...' press = client->_event( 'POPUP' ) ). diff --git a/src/z2ui5_cl_demo_app_171.clas.abap b/src/z2ui5_cl_demo_app_171.clas.abap index 5392c804..ee87aa78 100644 --- a/src/z2ui5_cl_demo_app_171.clas.abap +++ b/src/z2ui5_cl_demo_app_171.clas.abap @@ -10,7 +10,7 @@ CLASS z2ui5_cl_demo_app_171 IMPLEMENTATION. TRY. "first app start, - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. "init values here.. RETURN. @@ -18,9 +18,10 @@ CLASS z2ui5_cl_demo_app_171 IMPLEMENTATION. "callback after previous app. - IF client->check_on_navigated( ). + IF client->check_on_navigated( ) IS NOT INITIAL. - DATA(lo_app_prev) = client->get_app_prev( ). + DATA lo_app_prev TYPE REF TO z2ui5_if_app. + lo_app_prev = client->get_app_prev( ). "read attributes of previous app here... RETURN. ENDIF. @@ -29,7 +30,8 @@ CLASS z2ui5_cl_demo_app_171 IMPLEMENTATION. "handle events.. CASE client->get( )-event. WHEN 'OK'. - DATA(lt_arg) = client->get_event_arg( ). + DATA lt_arg TYPE string. + lt_arg = client->get_event_arg( ). "... WHEN 'CANCEL'. @@ -38,7 +40,8 @@ CLASS z2ui5_cl_demo_app_171 IMPLEMENTATION. ENDCASE. "error handling here.. - CATCH cx_root INTO DATA(lx). + DATA lx TYPE REF TO cx_root. + CATCH cx_root INTO lx. client->message_box_display( lx ). ENDTRY. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_172.clas.abap b/src/z2ui5_cl_demo_app_172.clas.abap index 4e4f0e66..f04a5b37 100644 --- a/src/z2ui5_cl_demo_app_172.clas.abap +++ b/src/z2ui5_cl_demo_app_172.clas.abap @@ -22,7 +22,8 @@ CLASS z2ui5_cl_demo_app_172 DEFINITION END OF ty_output . DATA check_initialized TYPE abap_bool . - DATA output TYPE STANDARD TABLE OF ty_output. + TYPES temp1_80db87fdfc TYPE STANDARD TABLE OF ty_output. +DATA output TYPE temp1_80db87fdfc. DATA client TYPE REF TO z2ui5_if_client. PROTECTED SECTION. @@ -90,7 +91,15 @@ CLASS z2ui5_cl_demo_app_172 IMPLEMENTATION. WHEN 'LINK_CLICK'. - lv_tab_index = lt_event_arguments[ 1 ]. + DATA temp1 LIKE LINE OF lt_event_arguments. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_event_arguments INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_tab_index = temp1. CONCATENATE 'Link in row' lv_tab_index 'clicked' INTO lv_message SEPARATED BY space. client->message_toast_display( lv_message ). @@ -100,11 +109,55 @@ CLASS z2ui5_cl_demo_app_172 IMPLEMENTATION. WHEN 'INPUT_CHANGE'. - DATA(lv_id_event) = lt_event_arguments[ 1 ]. - lv_tab_index = lt_event_arguments[ 2 ]. - DATA(ls_row_submit) = output[ lv_tab_index ]. - DATA(lv_id_parent) = lt_event_arguments[ 3 ]. - DATA(lv_column) = lt_event_arguments[ 4 ]. + DATA lv_id_event LIKE LINE OF lt_event_arguments. + DATA temp5 LIKE LINE OF lt_event_arguments. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE lt_event_arguments INDEX 1 INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_id_event = temp5. + DATA temp3 LIKE LINE OF lt_event_arguments. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_event_arguments INDEX 2 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_tab_index = temp3. + DATA ls_row_submit LIKE LINE OF output. + DATA temp7 LIKE LINE OF output. + DATA temp8 LIKE sy-tabix. + temp8 = sy-tabix. + READ TABLE output INDEX lv_tab_index INTO temp7. + sy-tabix = temp8. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + ls_row_submit = temp7. + DATA lv_id_parent LIKE LINE OF lt_event_arguments. + DATA temp9 LIKE LINE OF lt_event_arguments. + DATA temp10 LIKE sy-tabix. + temp10 = sy-tabix. + READ TABLE lt_event_arguments INDEX 3 INTO temp9. + sy-tabix = temp10. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_id_parent = temp9. + DATA lv_column LIKE LINE OF lt_event_arguments. + DATA temp11 LIKE LINE OF lt_event_arguments. + DATA temp12 LIKE sy-tabix. + temp12 = sy-tabix. + READ TABLE lt_event_arguments INDEX 4 INTO temp11. + sy-tabix = temp12. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_column = temp11. calculate_sum( lv_column ). @@ -126,14 +179,18 @@ CLASS z2ui5_cl_demo_app_172 IMPLEMENTATION. * +-------------------------------------------------------------------------------------- METHOD render_main_screen. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( id = `page` title = 'abap2UI5 - Demo ui.table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->header_content( )->link( )->get_parent( ). @@ -141,21 +198,26 @@ CLASS z2ui5_cl_demo_app_172 IMPLEMENTATION. page->_generic( name = `script` ns = `html` )->_cc_plain_xml( `sap.z2ui5.afterBE = () => { setTimeout( () => { let input = document.activeElement.childNodes[0].childNodes[0].childNodes[0].childNodes[0]; input.focus( ); input.select(); } , 100 ); }` ). - DATA(table) = page->ui_table( id = `tab` + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->ui_table( id = `tab` alternaterowcolors = 'true' visiblerowcountmode = 'Auto' fixedrowcount = '1' selectionmode = 'None' rows = client->_bind_edit( val = output ) ). - DATA(columns) = table->ui_columns( ). + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->ui_columns( ). columns->ui_column( width = '8rem' sortproperty = 'TEXT' filterproperty = 'TEXT' )->text( text = 'Text Column' )->ui_template( )->text( text = `{TEXT}` ). + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${INDEX}` INTO TABLE temp5. columns->ui_column( width = '8rem' sortproperty = 'LINK' filterproperty = 'LINK' )->text( text = 'Link Column' )->ui_template( )->link( text = `{LINK}` - press = client->_event( val = 'LINK_CLICK' t_arg = VALUE #( ( `${INDEX}`) ) ) ). + press = client->_event( val = 'LINK_CLICK' t_arg = temp5 ) ). columns->ui_column( width = '8rem' sortproperty = 'CURRENCY' filterproperty = 'CURRENCY' )->text( text = 'Currency Column' )->ui_template( )->text( @@ -166,19 +228,26 @@ CLASS z2ui5_cl_demo_app_172 IMPLEMENTATION. sortproperty = 'PERCENT1' filterproperty = 'PERCENT1' )->text( text = 'Percentage' )->ui_template( )->text( text = `{PERCENT1} %` ). + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$source>/id}` INTO TABLE temp7. + INSERT `${INDEX}` INTO TABLE temp7. + INSERT `$event.oSource.oParent.sId` INTO TABLE temp7. + INSERT `INPUT1` INTO TABLE temp7. columns->ui_column( width = '8rem' sortproperty = 'INPUT1' filterproperty = 'INPUT1' )->text( text = 'Input Column' )->ui_template( )->input( value = `{INPUT1}` enabled = `{BOOL}` - change = client->_event( val = 'INPUT_CHANGE' t_arg = VALUE #( - ( `${$source>/id}` ) "Access the id of the HTML element - ( `${INDEX}` ) "Access the value of the index column of the row where the user made a change - ( `$event.oSource.oParent.sId` ) "Access the id of the parent element - ( `INPUT1` ) "Pass the column name as simple string to the event - ) ) editable = abap_true + change = client->_event( val = 'INPUT_CHANGE' t_arg = temp7 ) editable = abap_true type = 'Number' ). + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `${$source>/id}` INTO TABLE temp9. + INSERT `${INDEX}` INTO TABLE temp9. + INSERT `$event.oSource.oParent.sId` INTO TABLE temp9. + INSERT `INPUT2` INTO TABLE temp9. columns->ui_column( width = '8rem' sortproperty = 'INPUT2' filterproperty = 'INPUT2' )->text( text = 'Input Column' @@ -187,27 +256,23 @@ CLASS z2ui5_cl_demo_app_172 IMPLEMENTATION. value = `{INPUT2}` enabled = `{BOOL}` change = client->_event( val = 'INPUT_CHANGE' - t_arg = VALUE #( - ( `${$source>/id}` ) - ( `${INDEX}` ) - ( `$event.oSource.oParent.sId` ) - ( `INPUT2` ) - ) ) + t_arg = temp9 ) submit = client->_event( val = 'INPUT_SUBMIT' ) editable = abap_true type = 'Number' ). + DATA temp11 TYPE string_table. + CLEAR temp11. + INSERT `${$source>/id}` INTO TABLE temp11. + INSERT `${INDEX}` INTO TABLE temp11. + INSERT `$event.oSource.oParent.sId` INTO TABLE temp11. + INSERT `INPUT3` INTO TABLE temp11. columns->ui_column( width = '8rem' sortproperty = 'INPUT3' filterproperty = 'INPUT3' )->text( text = 'Input Column' )->ui_template( )->input( value = `{INPUT3}` enabled = `{BOOL}` - change = client->_event( val = 'INPUT_CHANGE' t_arg = VALUE #( - ( `${$source>/id}` ) - ( `${INDEX}` ) - ( `$event.oSource.oParent.sId` ) - ( `INPUT3` ) - ) ) editable = abap_true + change = client->_event( val = 'INPUT_CHANGE' t_arg = temp11 ) editable = abap_true type = 'Number' ). client->view_display( view->stringify( ) ). diff --git a/src/z2ui5_cl_demo_app_173.clas.abap b/src/z2ui5_cl_demo_app_173.clas.abap index 6dd10a35..89643a5e 100644 --- a/src/z2ui5_cl_demo_app_173.clas.abap +++ b/src/z2ui5_cl_demo_app_173.clas.abap @@ -12,7 +12,7 @@ CLASS z2ui5_cl_demo_app_173 DEFINITION date TYPE string, age TYPE string, END OF ty_s_data, - ty_t_data TYPE STANDARD TABLE OF ty_s_data WITH EMPTY KEY. + ty_t_data TYPE STANDARD TABLE OF ty_s_data WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_layout, @@ -20,7 +20,7 @@ CLASS z2ui5_cl_demo_app_173 DEFINITION merge TYPE string, visible TYPE string, END OF ty_s_layout, - ty_t_layout TYPE STANDARD TABLE OF ty_s_layout WITH EMPTY KEY. + ty_t_layout TYPE STANDARD TABLE OF ty_s_layout WITH DEFAULT KEY. DATA mv_flag TYPE abap_bool. " VALUE abap_true. DATA mv_initialized TYPE abap_bool. @@ -43,13 +43,16 @@ CLASS Z2UI5_CL_DEMO_APP_173 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view = view->shell( )->page( id = `page_main` class = `sapUiContentPadding` title = 'abap2UI5 - Sample Templating I' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). view->table( items = client->_bind( mt_data ) )->columns( @@ -93,12 +96,35 @@ CLASS Z2UI5_CL_DEMO_APP_173 IMPLEMENTATION. client->_bind( mt_layout ). - mt_data = VALUE #( ( name = 'Theo' date = '01.01.2000' age = '5' ) - ( name = 'Lore' date = '01.01.2000' age = '1' ) ). - - mt_layout = VALUE #( ( fname = 'NAME' merge = 'false' visible = 'true' ) - ( fname = 'DATE' merge = 'false' visible = 'true' ) - ( fname = 'AGE' merge = 'false' visible = 'false' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_173=>ty_t_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-name = 'Theo'. + temp2-date = '01.01.2000'. + temp2-age = '5'. + INSERT temp2 INTO TABLE temp1. + temp2-name = 'Lore'. + temp2-date = '01.01.2000'. + temp2-age = '1'. + INSERT temp2 INTO TABLE temp1. + mt_data = temp1. + + DATA temp3 TYPE z2ui5_cl_demo_app_173=>ty_t_layout. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-fname = 'NAME'. + temp4-merge = 'false'. + temp4-visible = 'true'. + INSERT temp4 INTO TABLE temp3. + temp4-fname = 'DATE'. + temp4-merge = 'false'. + temp4-visible = 'true'. + INSERT temp4 INTO TABLE temp3. + temp4-fname = 'AGE'. + temp4-merge = 'false'. + temp4-visible = 'false'. + INSERT temp4 INTO TABLE temp3. + mt_layout = temp3. view_display( ). diff --git a/src/z2ui5_cl_demo_app_174.clas.abap b/src/z2ui5_cl_demo_app_174.clas.abap index ed5d1ab2..8fa49c61 100644 --- a/src/z2ui5_cl_demo_app_174.clas.abap +++ b/src/z2ui5_cl_demo_app_174.clas.abap @@ -11,7 +11,7 @@ CLASS z2ui5_cl_demo_app_174 DEFINITION PUBLIC. value TYPE string, descr TYPE string, END OF ty_row. - TYPES ty_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES ty_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. DATA mt_tab TYPE ty_tab. DATA mv_multiselect TYPE abap_bool. @@ -29,7 +29,7 @@ CLASS z2ui5_cl_demo_app_174 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. client->view_display( z2ui5_cl_xml_view=>factory( )->shell( @@ -59,12 +59,31 @@ CLASS z2ui5_cl_demo_app_174 IMPLEMENTATION. CASE client->get( )-event. WHEN 'POPUP'. - mt_tab = VALUE #( descr = 'this is a description' - ( zzselkz = mv_preselect title = 'title_01' value = 'value_01' ) - ( zzselkz = mv_preselect title = 'title_02' value = 'value_02' ) - ( zzselkz = mv_preselect title = 'title_03' value = 'value_03' ) - ( zzselkz = mv_preselect title = 'title_04' value = 'value_04' ) - ( zzselkz = mv_preselect title = 'title_05' value = 'value_05' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_174=>ty_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-descr = 'this is a description'. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_01'. + temp2-value = 'value_01'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_02'. + temp2-value = 'value_02'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_03'. + temp2-value = 'value_03'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_04'. + temp2-value = 'value_04'. + INSERT temp2 INTO TABLE temp1. + temp2-zzselkz = mv_preselect. + temp2-title = 'title_05'. + temp2-value = 'value_05'. + INSERT temp2 INTO TABLE temp1. + mt_tab = temp1. client->nav_app_call( z2ui5_cl_pop_to_select=>factory( i_tab = mt_tab @@ -77,20 +96,37 @@ CLASS z2ui5_cl_demo_app_174 IMPLEMENTATION. client->message_box_display( `Popup was cancelled` ). WHEN 'POPUP_CONFIRMED'. - DATA(lr) = client->get( )-r_event_data. - ASSIGN lr->* TO FIELD-SYMBOL(). - DATA(lt3) = CONV ty_tab( ). + DATA lr TYPE REF TO data. + lr = client->get( )-r_event_data. + FIELD-SYMBOLS TYPE data. + ASSIGN lr->* TO . + DATA temp3 TYPE ty_tab. + temp3 = . + DATA lt3 LIKE temp3. + lt3 = temp3. IF mv_multiselect = abap_false. - client->message_box_display( `callback after popup to select: ` && lt3[ 1 ]-title ). + DATA temp4 LIKE LINE OF lt3. + DATA temp5 LIKE sy-tabix. + temp5 = sy-tabix. + READ TABLE lt3 INDEX 1 INTO temp4. + sy-tabix = temp5. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + client->message_box_display( `callback after popup to select: ` && temp4-title ). ELSE. client->nav_app_call( z2ui5_cl_pop_table=>factory( i_tab = lt3 i_title = 'Selected rows' ) ). ENDIF. WHEN 'MULTISELECT_TOGGLE'. - mv_preselect = COND #( WHEN mv_multiselect = abap_false - THEN abap_false - ELSE mv_preselect ). + DATA temp6 TYPE abap_bool. + IF mv_multiselect = abap_false. + temp6 = abap_false. + ELSE. + temp6 = mv_preselect. + ENDIF. + mv_preselect = temp6. client->view_model_update( ). WHEN 'BACK'. diff --git a/src/z2ui5_cl_demo_app_175.clas.abap b/src/z2ui5_cl_demo_app_175.clas.abap index b30ca258..12f061cb 100644 --- a/src/z2ui5_cl_demo_app_175.clas.abap +++ b/src/z2ui5_cl_demo_app_175.clas.abap @@ -31,26 +31,34 @@ CLASS z2ui5_cl_demo_app_175 IMPLEMENTATION. METHOD display_view. - DATA(lr_view) = z2ui5_cl_xml_view=>factory( ). + DATA lr_view TYPE REF TO z2ui5_cl_xml_view. + lr_view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). lr_view = lr_view->shell( )->page( id = `page_main` title = 'abap2UI5 - Demo Wizard Control' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(lr_wizard) = lr_view->wizard( ). - DATA(lr_wiz_step1) = lr_wizard->wizard_step( title = 'Step1' + DATA lr_wizard TYPE REF TO z2ui5_cl_xml_view. + lr_wizard = lr_view->wizard( ). + DATA lr_wiz_step1 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step1 = lr_wizard->wizard_step( title = 'Step1' validated = abap_true ). lr_wiz_step1->message_strip( text = 'STEP1' ). - DATA(lr_wiz_step2) = lr_wizard->wizard_step( title = 'Step2' + DATA lr_wiz_step2 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step2 = lr_wizard->wizard_step( title = 'Step2' validated = abap_true ). lr_wiz_step2->message_strip( text = 'STEP2' ). - DATA(lr_wiz_step3) = lr_wizard->wizard_step( title = 'Step3' + DATA lr_wiz_step3 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step3 = lr_wizard->wizard_step( title = 'Step3' validated = abap_true ). lr_wiz_step3->message_strip( text = 'STEP3' ). - DATA(lr_wiz_step4) = lr_wizard->wizard_step( title = 'Step4' + DATA lr_wiz_step4 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step4 = lr_wizard->wizard_step( title = 'Step4' validated = abap_true ). lr_wiz_step4->message_strip( text = 'STEP4' ). diff --git a/src/z2ui5_cl_demo_app_176.clas.abap b/src/z2ui5_cl_demo_app_176.clas.abap index da1d7962..dbe370e6 100644 --- a/src/z2ui5_cl_demo_app_176.clas.abap +++ b/src/z2ui5_cl_demo_app_176.clas.abap @@ -10,7 +10,7 @@ CLASS z2ui5_cl_demo_app_176 DEFINITION PUBLIC. date TYPE string, age TYPE string, END OF ty_s_data, - ty_t_data TYPE STANDARD TABLE OF ty_s_data WITH EMPTY KEY. + ty_t_data TYPE STANDARD TABLE OF ty_s_data WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_layout, @@ -19,7 +19,7 @@ CLASS z2ui5_cl_demo_app_176 DEFINITION PUBLIC. visible TYPE string, binding TYPE string, END OF ty_s_layout, - ty_t_layout TYPE STANDARD TABLE OF ty_s_layout WITH EMPTY KEY. + ty_t_layout TYPE STANDARD TABLE OF ty_s_layout WITH DEFAULT KEY. DATA mt_layout TYPE ty_t_layout. DATA mt_data TYPE ty_t_data. @@ -42,14 +42,18 @@ CLASS z2ui5_cl_demo_app_176 IMPLEMENTATION. METHOD main_view. - DATA(lo_view) = z2ui5_cl_xml_view=>factory( ). + DATA lo_view TYPE REF TO z2ui5_cl_xml_view. + lo_view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = lo_view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( i_client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = lo_view->shell( )->page( title = `Main View` id = `test` navbuttonpress = i_client->_event( 'BACK' ) - shownavbutton = xsdbool( i_client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). i_client->view_display( lo_view->stringify( ) ). @@ -60,14 +64,41 @@ CLASS z2ui5_cl_demo_app_176 IMPLEMENTATION. i_client->_bind( mt_layout ). - mt_data = VALUE #( ( name = 'Theo' date = '01.01.2000' age = '5' ) - ( name = 'Lore' date = '01.01.2000' age = '1' ) ). - - mt_layout = VALUE #( ( fname = 'NAME' merge = 'false' visible = 'true' binding = '{NAME}' ) - ( fname = 'DATE' merge = 'false' visible = 'true' binding = '{DATE}' ) - ( fname = 'AGE' merge = 'false' visible = 'false' binding = '{AGE}' ) ). - - DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE z2ui5_cl_demo_app_176=>ty_t_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-name = 'Theo'. + temp2-date = '01.01.2000'. + temp2-age = '5'. + INSERT temp2 INTO TABLE temp1. + temp2-name = 'Lore'. + temp2-date = '01.01.2000'. + temp2-age = '1'. + INSERT temp2 INTO TABLE temp1. + mt_data = temp1. + + DATA temp3 TYPE z2ui5_cl_demo_app_176=>ty_t_layout. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-fname = 'NAME'. + temp4-merge = 'false'. + temp4-visible = 'true'. + temp4-binding = '{NAME}'. + INSERT temp4 INTO TABLE temp3. + temp4-fname = 'DATE'. + temp4-merge = 'false'. + temp4-visible = 'true'. + temp4-binding = '{DATE}'. + INSERT temp4 INTO TABLE temp3. + temp4-fname = 'AGE'. + temp4-merge = 'false'. + temp4-visible = 'false'. + temp4-binding = '{AGE}'. + INSERT temp4 INTO TABLE temp3. + mt_layout = temp3. + + DATA lo_view_nested TYPE REF TO z2ui5_cl_xml_view. + lo_view_nested = z2ui5_cl_xml_view=>factory( ). lo_view_nested->shell( )->page( `Nested View` )->table( items = i_client->_bind( mt_data ) diff --git a/src/z2ui5_cl_demo_app_177.clas.abap b/src/z2ui5_cl_demo_app_177.clas.abap index de91004f..7114031f 100644 --- a/src/z2ui5_cl_demo_app_177.clas.abap +++ b/src/z2ui5_cl_demo_app_177.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_177 DEFINITION PUBLIC. valuecolor TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_bab4bac0ae TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_bab4bac0ae. DATA check_initialized TYPE abap_bool. DATA check_ui5 TYPE abap_bool. DATA mv_key TYPE string. @@ -84,14 +85,19 @@ CLASS z2ui5_cl_demo_app_177 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Scroll Container with Table and Toolbar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(tab) = page->scroll_container( height = '70%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->scroll_container( height = '70%' vertical = abap_true )->table( growing = abap_true diff --git a/src/z2ui5_cl_demo_app_178.clas.abap b/src/z2ui5_cl_demo_app_178.clas.abap index 8c7caa6d..b6ed02df 100644 --- a/src/z2ui5_cl_demo_app_178.clas.abap +++ b/src/z2ui5_cl_demo_app_178.clas.abap @@ -51,7 +51,8 @@ CLASS z2ui5_cl_demo_app_178 IMPLEMENTATION. METHOD ui5_display_popup_tree_select. - DATA(dialog) = z2ui5_cl_xml_view=>factory_popup( + DATA dialog TYPE REF TO z2ui5_cl_xml_view. + dialog = z2ui5_cl_xml_view=>factory_popup( )->dialog( title = 'Choose Product here...' contentheight = '50%' contentwidth = '50%' @@ -83,11 +84,13 @@ CLASS z2ui5_cl_demo_app_178 IMPLEMENTATION. METHOD ui5_display_view. - DATA(lv_save_state_js) = `function saveState() {` && |\n| && + DATA lv_save_state_js TYPE string. + lv_save_state_js = `function saveState() {` && |\n| && ` var treeTable = sap.z2ui5.oViewPopup.Fragment.byId("popupId","tree");` && |\n| && ` sap.z2ui5.treeState = treeTable.getBinding('items').getCurrentTreeState();` && |\n| && ` }; `. - DATA(lv_reset_state_js) = `function setState() { ` && |\n| && + DATA lv_reset_state_js TYPE string. + lv_reset_state_js = `function setState() { ` && |\n| && ` var treeTable = sap.z2ui5.oViewPopup.Fragment.byId("popupId","tree");` && |\n| && ` if( sap.z2ui5.treeState == undefined ) {` && |\n| && ` sap.z2ui5.treeState = treeTable.getBinding('items').getCurrentTreeState();` && |\n| && @@ -97,12 +100,14 @@ CLASS z2ui5_cl_demo_app_178 IMPLEMENTATION. ` };` && |\n| && `};`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( ns = `html` name = `script` )->_cc_plain_xml( lv_save_state_js ). view->_generic( ns = `html` name = `script` )->_cc_plain_xml( lv_reset_state_js ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Tree - Open & Close Popup to see the control keeping expanded' navbuttonpress = client->_event( 'BACK' ) @@ -115,29 +120,51 @@ CLASS z2ui5_cl_demo_app_178 IMPLEMENTATION. METHOD ui5_initialize. + DATA temp1 TYPE z2ui5_cl_demo_app_178=>ty_prodh_nodes. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-text = 'Machines'. + temp2-prodh = '00100'. + DATA temp3 TYPE z2ui5_cl_demo_app_178=>ty_prodh_node_level1-nodes. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-text = 'Pumps'. + temp4-prodh = '0010000100'. + DATA temp7 TYPE z2ui5_cl_demo_app_178=>ty_prodh_node_level2-nodes. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-text = 'Pump 001'. + temp8-prodh = '001000010000000100'. + INSERT temp8 INTO TABLE temp7. + temp8-text = 'Pump 002'. + temp8-prodh = '001000010000000105'. + INSERT temp8 INTO TABLE temp7. + temp4-nodes = temp7. + INSERT temp4 INTO TABLE temp3. + temp2-nodes = temp3. + INSERT temp2 INTO TABLE temp1. + temp2-text = 'Paints'. + temp2-prodh = '00110'. + DATA temp5 TYPE z2ui5_cl_demo_app_178=>ty_prodh_node_level1-nodes. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-text = 'Gloss paints'. + temp6-prodh = '0011000105'. + DATA temp9 TYPE z2ui5_cl_demo_app_178=>ty_prodh_node_level2-nodes. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-text = 'Paint 001'. + temp10-prodh = '001100010500000100'. + INSERT temp10 INTO TABLE temp9. + temp10-text = 'Paint 002'. + temp10-prodh = '001100010500000105'. + INSERT temp10 INTO TABLE temp9. + temp6-nodes = temp9. + INSERT temp6 INTO TABLE temp5. + temp2-nodes = temp5. + INSERT temp2 INTO TABLE temp1. prodh_nodes = - VALUE #( ( text = 'Machines' - prodh = '00100' - nodes = VALUE #( ( text = 'Pumps' - prodh = '0010000100' - nodes = VALUE #( ( text = 'Pump 001' - prodh = '001000010000000100' ) - ( text = 'Pump 002' - prodh = '001000010000000105' ) - ) - ) ) - ) - ( text = 'Paints' - prodh = '00110' - nodes = VALUE #( ( text = 'Gloss paints' - prodh = '0011000105' - nodes = VALUE #( ( text = 'Paint 001' - prodh = '001100010500000100' ) - ( text = 'Paint 002' - prodh = '001100010500000105' ) - ) - ) ) - ) ). + temp1. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_179.clas.abap b/src/z2ui5_cl_demo_app_179.clas.abap index 56243de0..cf4f76c1 100644 --- a/src/z2ui5_cl_demo_app_179.clas.abap +++ b/src/z2ui5_cl_demo_app_179.clas.abap @@ -23,7 +23,8 @@ CLASS z2ui5_cl_demo_app_179 DEFINITION starttime TYPE string, endtime TYPE string, END OF ty_s_data. - DATA mt_data TYPE STANDARD TABLE OF ty_s_data WITH EMPTY KEY. + TYPES temp1_6cd5a9d875 TYPE STANDARD TABLE OF ty_s_data WITH DEFAULT KEY. +DATA mt_data TYPE temp1_6cd5a9d875. PROTECTED SECTION. @@ -45,7 +46,8 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. METHOD set_mock_data. - DATA(lv_mock) = `[` && |\n| && + DATA lv_mock TYPE string. + lv_mock = `[` && |\n| && ` {` && |\n| && ` "ObjectID": "rls-0-1",` && |\n| && ` "RelationID": "rls-0",` && |\n| && @@ -149,17 +151,26 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - view->_generic_property( VALUE #( n = `core:require` v = `{Helper:'z2ui5/Util'}` ) ). + DATA temp1 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp1. + temp1-n = `core:require`. + temp1-v = `{Helper:'z2ui5/Util'}`. + view->_generic_property( temp1 ). - DATA(page) = view->page( id = `page_main` + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'abap2UI5 - Gantt' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp2 class = 'sapUiContentPadding' ). - DATA(cont) = page->scroll_container( + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = page->scroll_container( * height = * width = * vertical = @@ -169,7 +180,8 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. * visible = ). - DATA(tool) = cont->container_toolbar( + DATA tool TYPE REF TO z2ui5_cl_xml_view. + tool = cont->container_toolbar( showsearchbutton = abap_true showdisplaytypebutton = abap_true showlegendbutton = abap_true @@ -184,16 +196,19 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. ). - DATA(gantt_container) = cont->gantt_chart_container( ). + DATA gantt_container TYPE REF TO z2ui5_cl_xml_view. + gantt_container = cont->gantt_chart_container( ). * gantt_charts - DATA(gantt) = gantt_container->gantt_chart_with_table( + DATA gantt TYPE REF TO z2ui5_cl_xml_view. + gantt = gantt_container->gantt_chart_with_table( id = `gantt` shapeselectionmode = `Single` isconnectordetailsvisible = abap_true ). - DATA(table) = gantt->gantt_table( )->tree_table( + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = gantt->gantt_table( )->tree_table( rows = `{path: '` && client->_bind( val = mt_data path = abap_true ) && `', parameters: {` && |\r\n| && ` operationMode: 'Server',` && |\r\n| && @@ -211,12 +226,14 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. - DATA(row_settings) = table->row_settings_template( )->gantt_row_settings( rowid = `{OBJECTID}` + DATA row_settings TYPE REF TO z2ui5_cl_xml_view. + row_settings = table->row_settings_template( )->gantt_row_settings( rowid = `{OBJECTID}` * shapes1 = `{path: 'TASK', templateShareable:false}` * shapes2 = `{path: 'SUBTASK', templateShareable:false}` relationships = `{path:'Relationships', templateShareable: 'true'}` ). - DATA(shapes) = row_settings->shapes1( ). + DATA shapes TYPE REF TO z2ui5_cl_xml_view. + shapes = row_settings->shapes1( ). shapes->base_rectangle( shapeid = `{OBJECTID}` time = `{= Helper.DateCreateObject(${STARTTIME}) }` @@ -226,7 +243,8 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. connectable = abap_true horizontaltextalignment = `Start` ). - DATA(relas) = row_settings->relationships( ). + DATA relas TYPE REF TO z2ui5_cl_xml_view. + relas = row_settings->relationships( ). relas->relationship( shapeid = `{RELATIONID}` type = `{RELATIONTYPE}` @@ -234,8 +252,10 @@ CLASS Z2UI5_CL_DEMO_APP_179 IMPLEMENTATION. predecessor = `{PREDECTASKID}` ). - DATA(columns) = table->ui_columns( ). - DATA(column) = columns->ui_column( + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->ui_columns( ). + DATA column TYPE REF TO z2ui5_cl_xml_view. + column = columns->ui_column( id = 'OBJECTNAME' ). column->ui_custom_data( )->core_custom_data( diff --git a/src/z2ui5_cl_demo_app_180.clas.abap b/src/z2ui5_cl_demo_app_180.clas.abap index 507152cd..b8ad8aa3 100644 --- a/src/z2ui5_cl_demo_app_180.clas.abap +++ b/src/z2ui5_cl_demo_app_180.clas.abap @@ -32,7 +32,10 @@ CLASS Z2UI5_CL_DEMO_APP_180 IMPLEMENTATION. WHEN 'CALL_EF'. mv_url = `https://www.google.com`. client->view_model_update( ). - client->follow_up_action( val = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( mv_url ) ) ) ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT mv_url INTO TABLE temp1. + client->follow_up_action( val = client->_event_client( val = client->cs_event-open_new_tab t_arg = temp1 ) ). WHEN 'BACK'. client->nav_app_leave( ). @@ -45,12 +48,16 @@ CLASS Z2UI5_CL_DEMO_APP_180 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `Client->FOLLOW_UP_ACTION use cases` class = `sapUiContentPadding` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page = page->vbox( ). page->button( text = `call frontend event from backend event` press = client->_event( `CALL_EF` ) ). diff --git a/src/z2ui5_cl_demo_app_181.clas.abap b/src/z2ui5_cl_demo_app_181.clas.abap index e15654fb..01656ec5 100644 --- a/src/z2ui5_cl_demo_app_181.clas.abap +++ b/src/z2ui5_cl_demo_app_181.clas.abap @@ -60,15 +60,68 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp7 TYPE xsdboolean. + temp7 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `Cards Demo` class = `sapUiContentPadding` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). - - DATA(card_1) = page->card( width = `300px` + shownavbutton = temp7 ). + + DATA temp1 TYPE t_cities. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-text = `Berlin`. + temp2-key = `BR`. + INSERT temp2 INTO TABLE temp1. + temp2-text = `London`. + temp2-key = `LN`. + INSERT temp2 INTO TABLE temp1. + temp2-text = `Madrid`. + temp2-key = `MD`. + INSERT temp2 INTO TABLE temp1. + temp2-text = `Prague`. + temp2-key = `PR`. + INSERT temp2 INTO TABLE temp1. + temp2-text = `Paris`. + temp2-key = `PS`. + INSERT temp2 INTO TABLE temp1. + temp2-text = `Sofia`. + temp2-key = `SF`. + INSERT temp2 INTO TABLE temp1. + temp2-text = `Vienna`. + temp2-key = `VN`. + INSERT temp2 INTO TABLE temp1. + DATA temp5 TYPE t_cities. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-text = `Berlin`. + temp6-key = `BR`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `London`. + temp6-key = `LN`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Madrid`. + temp6-key = `MD`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Prague`. + temp6-key = `PR`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Paris`. + temp6-key = `PS`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Sofia`. + temp6-key = `SF`. + INSERT temp6 INTO TABLE temp5. + temp6-text = `Vienna`. + temp6-key = `VN`. + INSERT temp6 INTO TABLE temp5. + DATA card_1 TYPE REF TO z2ui5_cl_xml_view. + card_1 = page->card( width = `300px` class = `sapUiMediumMargin` )->header( ns = `f` )->card_header( title = `Buy bus ticket on-line` @@ -82,26 +135,12 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION. )->hbox( justifycontent = `SpaceBetween` )->combobox( width = `120px` placeholder = `From City` - items = `{path:'` && client->_bind_local( val = VALUE t_cities( ( text = `Berlin` key = `BR` ) - ( text = `London` key = `LN` ) - ( text = `Madrid` key = `MD` ) - ( text = `Prague` key = `PR` ) - ( text = `Paris` key = `PS` ) - ( text = `Sofia` key = `SF` ) - ( text = `Vienna` key = `VN` ) - ) path = abap_true ) && `', sorter: { path: 'TEXT' } }` + items = `{path:'` && client->_bind_local( val = temp1 path = abap_true ) && `', sorter: { path: 'TEXT' } }` )->get( )->item( key = `{KEY}` text = `{TEXT}` )->get_parent( )->combobox( width = `120px` placeholder = `To City` - items = `{path:'` && client->_bind_local( val = VALUE t_cities( ( text = `Berlin` key = `BR` ) - ( text = `London` key = `LN` ) - ( text = `Madrid` key = `MD` ) - ( text = `Prague` key = `PR` ) - ( text = `Paris` key = `PS` ) - ( text = `Sofia` key = `SF` ) - ( text = `Vienna` key = `VN` ) - ) path = abap_true ) && `', sorter: { path: 'TEXT' } }` + items = `{path:'` && client->_bind_local( val = temp5 path = abap_true ) && `', sorter: { path: 'TEXT' } }` )->get( )->item( key = `{KEY}` text = `{TEXT}` )->get_parent( )->get_parent( @@ -115,7 +154,29 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION. class = `sapUiTinyMarginBegin` ). - DATA(card_2) = page->card( width = `300px` + DATA temp3 TYPE t_product_items. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-title = `Notebook HT`. + temp4-subtitle = `ID23452256-D44`. + temp4-revenue = `27.25K EUR`. + temp4-status = `success`. + temp4-status_schema = `Success`. + INSERT temp4 INTO TABLE temp3. + temp4-title = `Notebook XT`. + temp4-subtitle = `ID27852256-D47`. + temp4-revenue = `7.35K EUR`. + temp4-status = `exceeded`. + temp4-status_schema = `Error`. + INSERT temp4 INTO TABLE temp3. + temp4-title = `Notebook ST`. + temp4-subtitle = `ID123555587-I05`. + temp4-revenue = `22.89K EUR`. + temp4-status = `warning`. + temp4-status_schema = `Warning`. + INSERT temp4 INTO TABLE temp3. + DATA card_2 TYPE REF TO z2ui5_cl_xml_view. + card_2 = page->card( width = `300px` class = `sapUiMediumMargin` )->header( ns = `f` )->card_header( title = `Project Cloud Transformation` @@ -124,10 +185,7 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION. )->content( ns = `f` )->list( class = `sapUiSmallMarginBottom` showseparators = `None` - items = client->_bind_local( VALUE t_product_items( ( title = `Notebook HT` subtitle = `ID23452256-D44` revenue = `27.25K EUR` status = `success` status_schema = `Success` ) - ( title = `Notebook XT` subtitle = `ID27852256-D47` revenue = `7.35K EUR` status = `exceeded` status_schema = `Error` ) - ( title = `Notebook ST` subtitle = `ID123555587-I05` revenue = `22.89K EUR` status = `warning` status_schema = `Warning` ) - ) ) + items = client->_bind_local( temp3 ) )->custom_list_item( )->hbox( alignitems = `Center` justifycontent = `SpaceBetween` diff --git a/src/z2ui5_cl_demo_app_182.clas.abap b/src/z2ui5_cl_demo_app_182.clas.abap index 5c347b52..2414d5f1 100644 --- a/src/z2ui5_cl_demo_app_182.clas.abap +++ b/src/z2ui5_cl_demo_app_182.clas.abap @@ -58,8 +58,10 @@ CLASS Z2UI5_CL_DEMO_APP_182 IMPLEMENTATION. METHOD detail_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). - DATA(qv) = view->quick_view( placement = `Left` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). + DATA qv TYPE REF TO z2ui5_cl_xml_view. + qv = view->quick_view( placement = `Left` )->quick_view_page( header = `Employee` title = node-title @@ -78,10 +80,12 @@ CLASS Z2UI5_CL_DEMO_APP_182 IMPLEMENTATION. emailsubject = `Contact` && node-id ). IF node-team IS NOT INITIAL. + DATA temp1 TYPE string. + temp1 = node-team. qv = qv->get_parent( )->get_parent( )->quick_view_group( heading = `Team` )->quick_view_group_element( label = `Size` - value = CONV string( node-team ) ). + value = temp1 ). ENDIF. client->popover_display( @@ -98,11 +102,29 @@ CLASS Z2UI5_CL_DEMO_APP_182 IMPLEMENTATION. client->message_toast_display( 'LINE_PRESSED' ). WHEN 'DETAIL_POPOVER'. - DATA(lt_arg) = client->get( )-t_event_arg. - - READ TABLE mt_data-nodes INTO DATA(ls_node) WITH KEY id = lt_arg[ 2 ]. - - detail_popover( id = lt_arg[ 1 ] + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + + DATA ls_node TYPE z2ui5_cl_demo_app_182=>t_nodes2. + DATA temp1 LIKE LINE OF lt_arg. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_arg INDEX 2 INTO temp1. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + READ TABLE mt_data-nodes INTO ls_node WITH KEY id = temp1. + + DATA temp2 LIKE LINE OF lt_arg. + DATA temp3 LIKE sy-tabix. + temp3 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp2. + sy-tabix = temp3. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + detail_popover( id = temp2 node = ls_node ). WHEN 'BACK'. @@ -115,13 +137,22 @@ CLASS Z2UI5_CL_DEMO_APP_182 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->page( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( title = 'abap2UI5 - Network Graph - Org Tree' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). - - DATA(graph) = page->network_graph( enablewheelzoom = abap_false + shownavbutton = temp1 ). + + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${$source>/id}` INTO TABLE temp4. + INSERT `${ID}` INTO TABLE temp4. + DATA graph TYPE REF TO z2ui5_cl_xml_view. + graph = page->network_graph( enablewheelzoom = abap_false orientation = `TopBottom` nodes = client->_bind( mt_data-nodes ) lines = client->_bind( mt_data-lines ) @@ -165,14 +196,7 @@ CLASS Z2UI5_CL_DEMO_APP_182 IMPLEMENTATION. position = `Left` title = `Detail` icon = `sap-icon://employee` - press = client->_event( val = `DETAIL_POPOVER` t_arg = VALUE #( ( `${$source>/id}` ) - ( `${ID}` ) -* ( `${TEAM}` ) -* ( `${LOCATION}` ) -* ( `${POSITION}` ) -* ( `${EMAIL}` ) -* ( `${PHONE}` ) - ) ) + press = client->_event( val = `DETAIL_POPOVER` t_arg = temp4 ) )->get_parent( )->get_parent( )->get( )->get_parent( )->get_parent( )->_generic( ns = `networkgraph` @@ -202,62 +226,95 @@ CLASS Z2UI5_CL_DEMO_APP_182 IMPLEMENTATION. IF mv_initialized = abap_false. mv_initialized = abap_true. - mt_data = VALUE #( nodes = VALUE #( ( id = `Dinter` - title = `Sophie Dinter` - src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/female_IngallsB.jpg` - attributes = VALUE #( ( label = 35 value = `` ) ) - team = 13 - location = `Walldorf` - position = `lobal Solutions Manager` - email = `sophie.dinter@example.com` - phone = `+000 423 230 000` - ) - ( id = `Ninsei` - title = `Yamasaki Ninsei` - src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/male_GordonR.jpg` - attributes = VALUE #( ( label = 9 value = `` ) ) - supervisor = `Dinter` - team = 9 - location = `Walldorf` - position = `Lead Markets Manage` - email = `yamasaki.ninsei@example.com` - phone = `+000 423 230 002` - ) - ( id = `Mills` - title = `Henry Mills` - src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/male_MillerM.jpg` - attributes = VALUE #( ( label = 4 value = `` ) ) - supervisor = `Ninsei` - team = 4 - location = `Praha` - position = `Sales Manager` - email = `henry.mills@example.com` - phone = `+000 423 232 003` - ) - ( id = `Polak` - title = `Adam Polak` - src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/male_PlatteR.jpg` - supervisor = `Mills` - location = `Praha` - position = `Marketing Specialist` - email = `adam.polak@example.com` - phone = `+000 423 232 004` - ) - ( id = `Sykorova` - title = `Vlasta Sykorova` - src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/female_SpringS.jpg` - supervisor = `Mills` - location = `Praha` - position = `Human Assurance Officer` - email = `vlasta.sykorova@example.com` - phone = `+000 423 232 005` - ) - ) - lines = VALUE #( ( from = `Dinter` to = `Ninsei` ) - ( from = `Ninsei` to = `Mills` ) - ( from = `Mills` to = `Polak` ) - ( from = `Mills` to = `Sykorova` ) - ) ). + CLEAR mt_data. + DATA temp5 TYPE z2ui5_cl_demo_app_182=>tt_nodes2. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-id = `Dinter`. + temp6-title = `Sophie Dinter`. + temp6-src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/female_IngallsB.jpg`. + DATA temp1 TYPE z2ui5_cl_demo_app_182=>tt_attributes3. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-label = 35. + temp2-value = ``. + INSERT temp2 INTO TABLE temp1. + temp6-attributes = temp1. + temp6-team = 13. + temp6-location = `Walldorf`. + temp6-position = `lobal Solutions Manager`. + temp6-email = `sophie.dinter@example.com`. + temp6-phone = `+000 423 230 000`. + INSERT temp6 INTO TABLE temp5. + temp6-id = `Ninsei`. + temp6-title = `Yamasaki Ninsei`. + temp6-src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/male_GordonR.jpg`. + DATA temp3 TYPE z2ui5_cl_demo_app_182=>tt_attributes3. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-label = 9. + temp4-value = ``. + INSERT temp4 INTO TABLE temp3. + temp6-attributes = temp3. + temp6-supervisor = `Dinter`. + temp6-team = 9. + temp6-location = `Walldorf`. + temp6-position = `Lead Markets Manage`. + temp6-email = `yamasaki.ninsei@example.com`. + temp6-phone = `+000 423 230 002`. + INSERT temp6 INTO TABLE temp5. + temp6-id = `Mills`. + temp6-title = `Henry Mills`. + temp6-src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/male_MillerM.jpg`. + DATA temp9 TYPE z2ui5_cl_demo_app_182=>tt_attributes3. + CLEAR temp9. + DATA temp10 LIKE LINE OF temp9. + temp10-label = 4. + temp10-value = ``. + INSERT temp10 INTO TABLE temp9. + temp6-attributes = temp9. + temp6-supervisor = `Ninsei`. + temp6-team = 4. + temp6-location = `Praha`. + temp6-position = `Sales Manager`. + temp6-email = `henry.mills@example.com`. + temp6-phone = `+000 423 232 003`. + INSERT temp6 INTO TABLE temp5. + temp6-id = `Polak`. + temp6-title = `Adam Polak`. + temp6-src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/male_PlatteR.jpg`. + temp6-supervisor = `Mills`. + temp6-location = `Praha`. + temp6-position = `Marketing Specialist`. + temp6-email = `adam.polak@example.com`. + temp6-phone = `+000 423 232 004`. + INSERT temp6 INTO TABLE temp5. + temp6-id = `Sykorova`. + temp6-title = `Vlasta Sykorova`. + temp6-src = `https://ui5.sap.com/test-resources/sap/suite/ui/commons/demokit/images/people/female_SpringS.jpg`. + temp6-supervisor = `Mills`. + temp6-location = `Praha`. + temp6-position = `Human Assurance Officer`. + temp6-email = `vlasta.sykorova@example.com`. + temp6-phone = `+000 423 232 005`. + INSERT temp6 INTO TABLE temp5. + mt_data-nodes = temp5. + DATA temp7 TYPE z2ui5_cl_demo_app_182=>tt_lines4. + CLEAR temp7. + DATA temp8 LIKE LINE OF temp7. + temp8-from = `Dinter`. + temp8-to = `Ninsei`. + INSERT temp8 INTO TABLE temp7. + temp8-from = `Ninsei`. + temp8-to = `Mills`. + INSERT temp8 INTO TABLE temp7. + temp8-from = `Mills`. + temp8-to = `Polak`. + INSERT temp8 INTO TABLE temp7. + temp8-from = `Mills`. + temp8-to = `Sykorova`. + INSERT temp8 INTO TABLE temp7. + mt_data-lines = temp7. view_display( ). diff --git a/src/z2ui5_cl_demo_app_183.clas.abap b/src/z2ui5_cl_demo_app_183.clas.abap index 364095b2..f2e814cf 100644 --- a/src/z2ui5_cl_demo_app_183.clas.abap +++ b/src/z2ui5_cl_demo_app_183.clas.abap @@ -18,8 +18,9 @@ CLASS z2ui5_cl_demo_app_183 DEFINITION valuecolor TYPE string, END OF ty_row . - DATA - t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY . + TYPES temp1_2eadad6e11 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA + t_tab TYPE temp1_2eadad6e11 . DATA check_initialized TYPE abap_bool . DATA check_ui5 TYPE abap_bool . DATA mv_key TYPE string . @@ -62,7 +63,8 @@ CLASS z2ui5_cl_demo_app_183 IMPLEMENTATION. CASE client->get( )-event. WHEN 'GET_OPENED_COL'. - DATA(lt_arg) = client->get( )-t_event_arg. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. RETURN. WHEN 'ONSORT'. @@ -83,14 +85,19 @@ CLASS z2ui5_cl_demo_app_183 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - table with column menu (press a column header)' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). - DATA(tab) = page->scroll_container( height = '70%' + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->scroll_container( height = '70%' vertical = abap_true )->table( growing = abap_true @@ -126,9 +133,12 @@ CLASS z2ui5_cl_demo_app_183 IMPLEMENTATION. press = client->_event( 'SORT_ASCENDING' ) ). * column menu + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `$event.mParameters.openBy.getId()` INTO TABLE temp1. tab->dependents( )->column_menu( id = `menu` - beforeopen = client->_event( val = `GET_OPENED_COL` t_arg = VALUE #( ( `$event.mParameters.openBy.getId()` ) ) ) + beforeopen = client->_event( val = `GET_OPENED_COL` t_arg = temp1 ) * )->column_menu_quick_sort( change = client->_event( val = 'ONSORT' t_arg = VALUE #( ( `${$parameters>/item.getKey}` ) ) ) * )->column_menu_quick_sort( change = client->_event( val = 'ONSORT' t_arg = VALUE #( ( `$event` ) ) ) )->column_menu_quick_sort( change = client->_event( 'ONSORT' ) diff --git a/src/z2ui5_cl_demo_app_184.clas.abap b/src/z2ui5_cl_demo_app_184.clas.abap index 80baf78b..3703426f 100644 --- a/src/z2ui5_cl_demo_app_184.clas.abap +++ b/src/z2ui5_cl_demo_app_184.clas.abap @@ -58,7 +58,8 @@ CLASS z2ui5_cl_demo_app_184 IMPLEMENTATION. FIELD-SYMBOLS TYPE data. IF mo_parent_view IS INITIAL. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). ELSE. page = mo_parent_view->get( `Page` ). ENDIF. @@ -66,21 +67,25 @@ CLASS z2ui5_cl_demo_app_184 IMPLEMENTATION. ASSIGN mt_table->* TO . - DATA(table) = page->table( growing = 'true' + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->table( growing = 'true' width = 'auto' items = client->_bind( ) * headertext = mv_table ). - DATA(columns) = table->columns( ). + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->columns( ). - LOOP AT mt_comp INTO DATA(comp). + DATA comp LIKE LINE OF mt_comp. + LOOP AT mt_comp INTO comp. columns->column( )->text( comp-name ). ENDLOOP. - DATA(cells) = columns->get_parent( )->items( + DATA cells TYPE REF TO z2ui5_cl_xml_view. + cells = columns->get_parent( )->items( )->column_list_item( valign = 'Middle' type = 'Navigation' )->cells( ). @@ -126,9 +131,11 @@ CLASS z2ui5_cl_demo_app_184 IMPLEMENTATION. TRY. - DATA(new_struct_desc) = cl_abap_structdescr=>create( mt_comp ). + DATA new_struct_desc TYPE REF TO cl_abap_structdescr. + new_struct_desc = cl_abap_structdescr=>create( mt_comp ). - DATA(new_table_desc) = cl_abap_tabledescr=>create( p_line_type = new_struct_desc + DATA new_table_desc TYPE REF TO cl_abap_tabledescr. + new_table_desc = cl_abap_tabledescr=>create( p_line_type = new_struct_desc p_table_kind = cl_abap_tabledescr=>tablekind_std ). CREATE DATA mt_table TYPE HANDLE new_table_desc. @@ -140,7 +147,7 @@ CLASS z2ui5_cl_demo_app_184 IMPLEMENTATION. SELECT * FROM (mv_table) - INTO CORRESPONDING FIELDS OF TABLE @
+ INTO CORRESPONDING FIELDS OF TABLE
UP TO 100 ROWS. CATCH cx_root. @@ -160,27 +167,41 @@ CLASS z2ui5_cl_demo_app_184 IMPLEMENTATION. TRY. + DATA typedesc TYPE REF TO cl_abap_typedescr. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = mv_table - RECEIVING p_descr_ref = DATA(typedesc) + RECEIVING p_descr_ref = typedesc EXCEPTIONS type_not_found = 1 OTHERS = 2 ). - DATA(structdesc) = CAST cl_abap_structdescr( typedesc ). - DATA(comp) = structdesc->get_components( ). + DATA temp1 TYPE REF TO cl_abap_structdescr. + temp1 ?= typedesc. + DATA structdesc LIKE temp1. + structdesc = temp1. + DATA comp TYPE abap_component_tab. + comp = structdesc->get_components( ). - LOOP AT comp INTO DATA(com). + DATA com LIKE LINE OF comp. + LOOP AT comp INTO com. IF com-as_include = abap_false. APPEND com TO result. ENDIF. ENDLOOP. - CATCH cx_root INTO DATA(root). " TODO: variable is assigned but never used (ABAP cleaner) + DATA root TYPE REF TO cx_root. + CATCH cx_root INTO root. " TODO: variable is assigned but never used (ABAP cleaner) ENDTRY. - DATA(component) = VALUE cl_abap_structdescr=>component_table( - ( name = 'ROW_ID' - type = CAST #( cl_abap_datadescr=>describe_by_data( index ) ) ) ). + DATA temp2 TYPE cl_abap_structdescr=>component_table. + CLEAR temp2. + DATA temp3 LIKE LINE OF temp2. + temp3-name = 'ROW_ID'. + DATA temp4 TYPE REF TO cl_abap_datadescr. + temp4 ?= cl_abap_datadescr=>describe_by_data( index ). + temp3-type = temp4. + INSERT temp3 INTO TABLE temp2. + DATA component LIKE temp2. + component = temp2. APPEND LINES OF component TO result. diff --git a/src/z2ui5_cl_demo_app_185.clas.abap b/src/z2ui5_cl_demo_app_185.clas.abap index 28dda65f..651fa63d 100644 --- a/src/z2ui5_cl_demo_app_185.clas.abap +++ b/src/z2ui5_cl_demo_app_185.clas.abap @@ -62,8 +62,20 @@ CLASS Z2UI5_CL_DEMO_APP_185 IMPLEMENTATION. METHOD on_init. - mt_t002 = VALUE #( ( id = '1' class = 'Z2UI5_CL_DEMO_APP_184' count = '10' table = 'Z2UI5_T001') - ( id = '2' class = 'Z2UI5_CL_DEMO_APP_184' count = '12' table = 'Z2UI5_T002') ). + DATA temp1 TYPE z2ui5_cl_demo_app_185=>ty_t_t002. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = '1'. + temp2-class = 'Z2UI5_CL_DEMO_APP_184'. + temp2-count = '10'. + temp2-table = 'Z2UI5_T001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '2'. + temp2-class = 'Z2UI5_CL_DEMO_APP_184'. + temp2-count = '12'. + temp2-table = 'Z2UI5_T002'. + INSERT temp2 INTO TABLE temp1. + mt_t002 = temp1. mv_selectedkey = '1'. @@ -72,19 +84,26 @@ CLASS Z2UI5_CL_DEMO_APP_185 IMPLEMENTATION. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'Main App calling Subapps' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( mv_selectedkey ) select = client->_event( val = 'ONSELECTICONTABBAR' ) )->items( ). - LOOP AT mt_t002 REFERENCE INTO DATA(line). + DATA temp3 LIKE LINE OF mt_t002. + DATA line LIKE REF TO temp3. + LOOP AT mt_t002 REFERENCE INTO line. lo_items->icon_tab_filter( text = line->class count = line->count key = line->id ). @@ -100,7 +119,8 @@ CLASS Z2UI5_CL_DEMO_APP_185 IMPLEMENTATION. FIELD-SYMBOLS TYPE any. - READ TABLE mt_t002 REFERENCE INTO DATA(t002) + DATA t002 TYPE REF TO z2ui5_cl_demo_app_185=>ty_s_t002. + READ TABLE mt_t002 REFERENCE INTO t002 WITH KEY id = mv_selectedkey. IF sy-subrc <> 0. @@ -123,7 +143,8 @@ CLASS Z2UI5_CL_DEMO_APP_185 IMPLEMENTATION. render_main( ). - ASSIGN mo_app->('MO_PARENT_VIEW') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MO_PARENT_VIEW') TO . IF IS ASSIGNED. = mo_main_page. ENDIF. diff --git a/src/z2ui5_cl_demo_app_186.clas.abap b/src/z2ui5_cl_demo_app_186.clas.abap index 3fa5fd26..73bf64cd 100644 --- a/src/z2ui5_cl_demo_app_186.clas.abap +++ b/src/z2ui5_cl_demo_app_186.clas.abap @@ -54,7 +54,11 @@ CLASS Z2UI5_CL_DEMO_APP_186 IMPLEMENTATION. - client->follow_up_action( val = client->_event_client( val = client->cs_event-download_b64_file t_arg = VALUE #( ( file_content_64 ) ( file_name ) ) ) ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT file_content_64 INTO TABLE temp1. + INSERT file_name INTO TABLE temp1. + client->follow_up_action( val = client->_event_client( val = client->cs_event-download_b64_file t_arg = temp1 ) ). WHEN 'BACK'. @@ -70,14 +74,20 @@ CLASS Z2UI5_CL_DEMO_APP_186 IMPLEMENTATION. DATA lv_script TYPE string. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp1 title = 'abap2UI5 - Download Base64 File' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). page->flex_box( width = `100%` height = `600px` diff --git a/src/z2ui5_cl_demo_app_187.clas.abap b/src/z2ui5_cl_demo_app_187.clas.abap index 72159a90..163a8efa 100644 --- a/src/z2ui5_cl_demo_app_187.clas.abap +++ b/src/z2ui5_cl_demo_app_187.clas.abap @@ -11,7 +11,7 @@ CLASS z2ui5_cl_demo_app_187 IMPLEMENTATION. DATA ls_msg TYPE bapiret2. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. client->view_display( z2ui5_cl_xml_view=>factory( )->shell( )->page( @@ -35,20 +35,25 @@ CLASS z2ui5_cl_demo_app_187 IMPLEMENTATION. CASE client->get( )-event. WHEN 'SY'. - MESSAGE ID 'NET' TYPE 'E' NUMBER '001' INTO DATA(lv_dummy). + DATA lv_dummy TYPE string. + MESSAGE ID 'NET' TYPE 'E' NUMBER '001' INTO lv_dummy. client->message_box_display( sy ). WHEN 'BAPIRET'. - ls_msg = VALUE #( id = 'NET' number = '001' ). + CLEAR ls_msg. + ls_msg-id = 'NET'. + ls_msg-number = '001'. client->message_box_display( ls_msg ). WHEN 'CX_ROOT'. TRY. - DATA(lv_val) = 1 / 0. - CATCH cx_root INTO DATA(lx). + DATA lv_val TYPE i. + lv_val = 1 / 0. + DATA lx TYPE REF TO cx_root. + CATCH cx_root INTO lx. client->message_box_display( lx ). ENDTRY. diff --git a/src/z2ui5_cl_demo_app_189.clas.abap b/src/z2ui5_cl_demo_app_189.clas.abap index a6f1342c..98b709d5 100644 --- a/src/z2ui5_cl_demo_app_189.clas.abap +++ b/src/z2ui5_cl_demo_app_189.clas.abap @@ -43,11 +43,14 @@ CLASS z2ui5_cl_demo_app_189 IMPLEMENTATION. METHOD render. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Focus II' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->simple_form( )->content( ns = 'form' diff --git a/src/z2ui5_cl_demo_app_190.clas.abap b/src/z2ui5_cl_demo_app_190.clas.abap index 8767f735..431005f6 100644 --- a/src/z2ui5_cl_demo_app_190.clas.abap +++ b/src/z2ui5_cl_demo_app_190.clas.abap @@ -61,7 +61,8 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. FIELD-SYMBOLS TYPE data. IF mo_parent_view IS INITIAL. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). ELSE. page = mo_parent_view->get( `Page` ). ENDIF. @@ -69,21 +70,25 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. ASSIGN mt_table->* TO . - DATA(table) = page->table( growing = 'true' + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->table( growing = 'true' width = 'auto' items = client->_bind( ) * headertext = mv_table ). - DATA(columns) = table->columns( ). + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->columns( ). - LOOP AT mt_comp INTO DATA(comp). + DATA comp LIKE LINE OF mt_comp. + LOOP AT mt_comp INTO comp. columns->column( )->text( comp-name ). ENDLOOP. - DATA(cells) = columns->get_parent( )->items( + DATA cells TYPE REF TO z2ui5_cl_xml_view. + cells = columns->get_parent( )->items( )->column_list_item( valign = 'Middle' type = 'Navigation' )->cells( ). @@ -137,9 +142,11 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. TRY. - DATA(new_struct_desc) = cl_abap_structdescr=>create( mt_comp ). + DATA new_struct_desc TYPE REF TO cl_abap_structdescr. + new_struct_desc = cl_abap_structdescr=>create( mt_comp ). - DATA(new_table_desc) = cl_abap_tabledescr=>create( p_line_type = new_struct_desc + DATA new_table_desc TYPE REF TO cl_abap_tabledescr. + new_table_desc = cl_abap_tabledescr=>create( p_line_type = new_struct_desc p_table_kind = cl_abap_tabledescr=>tablekind_std ). CREATE DATA mt_table TYPE HANDLE new_table_desc. @@ -151,7 +158,7 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. SELECT * FROM (mv_table) - INTO CORRESPONDING FIELDS OF TABLE @
+ INTO CORRESPONDING FIELDS OF TABLE
UP TO 100 ROWS. CATCH cx_root. @@ -181,12 +188,20 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. DATA structdescr TYPE REF TO cl_abap_structdescr. DATA lt_fixval TYPE fixvalues. - LOOP AT mt_comp REFERENCE INTO DATA(dfies). - - comp = VALUE cl_abap_structdescr=>component_table( - BASE comp - ( name = dfies->name - type = CAST #( cl_abap_datadescr=>describe_by_data( lt_fixval ) ) ) ). + DATA temp1 LIKE LINE OF mt_comp. + DATA dfies LIKE REF TO temp1. + LOOP AT mt_comp REFERENCE INTO dfies. + + DATA temp2 TYPE cl_abap_structdescr=>component_table. + CLEAR temp2. + temp2 = comp. + DATA temp3 LIKE LINE OF temp2. + temp3-name = dfies->name. + DATA temp4 TYPE REF TO cl_abap_datadescr. + temp4 ?= cl_abap_datadescr=>describe_by_data( lt_fixval ). + temp3-type = temp4. + INSERT temp3 INTO TABLE temp2. + comp = temp2. ENDLOOP. structdescr = cl_abap_structdescr=>create( comp ). @@ -204,15 +219,21 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. TRY. + DATA typedesc TYPE REF TO cl_abap_typedescr. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = mv_table - RECEIVING p_descr_ref = DATA(typedesc) + RECEIVING p_descr_ref = typedesc EXCEPTIONS type_not_found = 1 OTHERS = 2 ). - DATA(structdesc) = CAST cl_abap_structdescr( typedesc ). - DATA(comp) = structdesc->get_components( ). + DATA temp4 TYPE REF TO cl_abap_structdescr. + temp4 ?= typedesc. + DATA structdesc LIKE temp4. + structdesc = temp4. + DATA comp TYPE abap_component_tab. + comp = structdesc->get_components( ). - LOOP AT comp INTO DATA(com). + DATA com LIKE LINE OF comp. + LOOP AT comp INTO com. IF com-as_include = abap_false. APPEND com TO result. ENDIF. @@ -222,9 +243,16 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. ENDTRY. - DATA(component) = VALUE cl_abap_structdescr=>component_table( - ( name = 'ROW_ID' - type = CAST #( cl_abap_datadescr=>describe_by_data( index ) ) ) ). + DATA temp5 TYPE cl_abap_structdescr=>component_table. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-name = 'ROW_ID'. + DATA temp7 TYPE REF TO cl_abap_datadescr. + temp7 ?= cl_abap_datadescr=>describe_by_data( index ). + temp6-type = temp7. + INSERT temp6 INTO TABLE temp5. + DATA component LIKE temp5. + component = temp5. APPEND LINES OF component TO result. diff --git a/src/z2ui5_cl_demo_app_191.clas.abap b/src/z2ui5_cl_demo_app_191.clas.abap index 07638ab4..bf90487d 100644 --- a/src/z2ui5_cl_demo_app_191.clas.abap +++ b/src/z2ui5_cl_demo_app_191.clas.abap @@ -62,10 +62,30 @@ CLASS Z2UI5_CL_DEMO_APP_191 IMPLEMENTATION. METHOD on_init. - mt_t002 = VALUE #( ( id = '1' class = 'Z2UI5_CL_DEMO_APP_190' count = '10' table = 'Z2UI5_T001' ) - ( id = '2' class = 'Z2UI5_CL_DEMO_APP_190' count = '20' table = 'Z2UI5_T002' ) - ( id = '3' class = 'Z2UI5_CL_DEMO_APP_190' count = '30' table = 'Z2UI5_TOOL_T_001' ) - ( id = '4' class = 'Z2UI5_CL_DEMO_APP_190' count = '40' table = 'Z2UI5_TOOL_T_002' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_191=>ty_t_t002. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = '1'. + temp2-class = 'Z2UI5_CL_DEMO_APP_190'. + temp2-count = '10'. + temp2-table = 'Z2UI5_T001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '2'. + temp2-class = 'Z2UI5_CL_DEMO_APP_190'. + temp2-count = '20'. + temp2-table = 'Z2UI5_T002'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '3'. + temp2-class = 'Z2UI5_CL_DEMO_APP_190'. + temp2-count = '30'. + temp2-table = 'Z2UI5_TOOL_T_001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '4'. + temp2-class = 'Z2UI5_CL_DEMO_APP_190'. + temp2-count = '40'. + temp2-table = 'Z2UI5_TOOL_T_002'. + INSERT temp2 INTO TABLE temp1. + mt_t002 = temp1. mv_selectedkey = '1'. @@ -74,19 +94,26 @@ CLASS Z2UI5_CL_DEMO_APP_191 IMPLEMENTATION. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'Main App calling Subapps' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( mv_selectedkey ) select = client->_event( val = 'ONSELECTICONTABBAR' ) )->items( ). - LOOP AT mt_t002 REFERENCE INTO DATA(line). + DATA temp3 LIKE LINE OF mt_t002. + DATA line LIKE REF TO temp3. + LOOP AT mt_t002 REFERENCE INTO line. lo_items->icon_tab_filter( text = line->class count = line->count key = line->id ). @@ -102,7 +129,8 @@ CLASS Z2UI5_CL_DEMO_APP_191 IMPLEMENTATION. FIELD-SYMBOLS TYPE any. - READ TABLE mt_t002 REFERENCE INTO DATA(t002) + DATA t002 TYPE REF TO z2ui5_cl_demo_app_191=>ty_s_t002. + READ TABLE mt_t002 REFERENCE INTO t002 WITH KEY id = mv_selectedkey. IF sy-subrc <> 0. @@ -125,7 +153,8 @@ CLASS Z2UI5_CL_DEMO_APP_191 IMPLEMENTATION. render_main( ). - ASSIGN mo_app->('MO_PARENT_VIEW') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MO_PARENT_VIEW') TO . IF IS ASSIGNED. = mo_main_page. ENDIF. diff --git a/src/z2ui5_cl_demo_app_192.clas.abap b/src/z2ui5_cl_demo_app_192.clas.abap index f115c3a2..5c24af93 100644 --- a/src/z2ui5_cl_demo_app_192.clas.abap +++ b/src/z2ui5_cl_demo_app_192.clas.abap @@ -11,18 +11,18 @@ CLASS z2ui5_cl_demo_app_192 DEFINITION PUBLIC. tabname TYPE char30, comp TYPE abap_componentdescr, END OF ty_s_key_value, - ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH EMPTY KEY. + ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_merged_data, t_kopf TYPE REF TO data, t_pos TYPE REF TO data, t_keyva TYPE ty_t_key_values, END OF ty_s_merged_data, - ty_t_merged_data TYPE STANDARD TABLE OF ty_s_merged_data WITH EMPTY KEY. + ty_t_merged_data TYPE STANDARD TABLE OF ty_s_merged_data WITH DEFAULT KEY. - DATA mt_new_data2 TYPE STANDARD TABLE OF REF TO z2ui5_cl_demo_app_193 WITH EMPTY KEY. + DATA mt_new_data2 TYPE STANDARD TABLE OF REF TO z2ui5_cl_demo_app_193 WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_out, @@ -30,7 +30,7 @@ CLASS z2ui5_cl_demo_app_192 DEFINITION PUBLIC. bb TYPE string, cc TYPE string, END OF ty_s_out, - ty_t_out TYPE STANDARD TABLE OF ty_s_out WITH EMPTY KEY. + ty_t_out TYPE STANDARD TABLE OF ty_s_out WITH DEFAULT KEY. DATA mt_out TYPE ty_t_out. @@ -60,7 +60,8 @@ CLASS z2ui5_cl_demo_app_192 IMPLEMENTATION. METHOD ui5_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->shell( )->page( title = 'xxx' navbuttonpress = client->_event( val = 'BACK' ) @@ -88,16 +89,28 @@ CLASS z2ui5_cl_demo_app_192 IMPLEMENTATION. FIELD-SYMBOLS TYPE STANDARD TABLE. FIELD-SYMBOLS TYPE any. - mt_out = VALUE #( ( aa = 'aa' bb = 'bb' cc = 'cc' ) - ( aa = 'a1' bb = 'b1' cc = 'c1' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_192=>ty_t_out. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-aa = 'aa'. + temp2-bb = 'bb'. + temp2-cc = 'cc'. + INSERT temp2 INTO TABLE temp1. + temp2-aa = 'a1'. + temp2-bb = 'b1'. + temp2-cc = 'c1'. + INSERT temp2 INTO TABLE temp1. + mt_out = temp1. - DATA(kopf) = REF #( mt_out ). + DATA kopf LIKE REF TO mt_out. + GET REFERENCE OF mt_out INTO kopf. LOOP AT kopf->* ASSIGNING . - DATA(lo_new_data) = NEW z2ui5_cl_demo_app_193( ). + DATA lo_new_data TYPE REF TO z2ui5_cl_demo_app_193. + CREATE OBJECT lo_new_data TYPE z2ui5_cl_demo_app_193. INSERT lo_new_data INTO TABLE mt_new_data2. lr_structdescr ?= cl_abap_structdescr=>describe_by_data( ). @@ -107,7 +120,7 @@ CLASS z2ui5_cl_demo_app_192 IMPLEMENTATION. ASSIGN lo_new_data->mt_kopf->* TO . APPEND INITIAL LINE TO ASSIGNING . - = CORRESPONDING #( ). + MOVE-CORRESPONDING TO . ENDLOOP. @@ -116,7 +129,8 @@ CLASS z2ui5_cl_demo_app_192 IMPLEMENTATION. METHOD xml_parse. - LOOP AT mt_new_data2 INTO DATA(lo_data). + DATA lo_data LIKE LINE OF mt_new_data2. + LOOP AT mt_new_data2 INTO lo_data. lo_data->xml_parse( ). ENDLOOP. @@ -125,7 +139,8 @@ CLASS z2ui5_cl_demo_app_192 IMPLEMENTATION. METHOD xml_stringify. - LOOP AT mt_new_data2 INTO DATA(lo_data). + DATA lo_data LIKE LINE OF mt_new_data2. + LOOP AT mt_new_data2 INTO lo_data. lo_data->xml_stringify( ). ENDLOOP. diff --git a/src/z2ui5_cl_demo_app_192.clas.locals_imp.abap b/src/z2ui5_cl_demo_app_192.clas.locals_imp.abap index 7c08e06c..1b5013a8 100644 --- a/src/z2ui5_cl_demo_app_192.clas.locals_imp.abap +++ b/src/z2ui5_cl_demo_app_192.clas.locals_imp.abap @@ -11,7 +11,7 @@ CLASS lcl_merged_data DEFINITION. tabname TYPE char30, comp TYPE abap_componentdescr, END OF ty_s_key_value, - ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH EMPTY KEY. + ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_merged_data, t_kopf TYPE REF TO data, diff --git a/src/z2ui5_cl_demo_app_193.clas.abap b/src/z2ui5_cl_demo_app_193.clas.abap index c51bf2e0..93ebc348 100644 --- a/src/z2ui5_cl_demo_app_193.clas.abap +++ b/src/z2ui5_cl_demo_app_193.clas.abap @@ -10,7 +10,7 @@ CLASS z2ui5_cl_demo_app_193 DEFINITION PUBLIC. tabname TYPE char30, comp TYPE abap_componentdescr, END OF ty_s_key_value, - ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH EMPTY KEY. + ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH DEFAULT KEY. DATA mt_kopf TYPE REF TO data. DATA mt_pos TYPE REF TO data. @@ -48,13 +48,15 @@ CLASS z2ui5_cl_demo_app_193 IMPLEMENTATION. METHOD xml_stringify. - ASSIGN mt_kopf->* TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE data. + ASSIGN mt_kopf->* TO . IF sy-subrc = 0. mt_kopf_xml = z2ui5_cl_util=>xml_srtti_stringify( ). CLEAR mt_kopf. ENDIF. - ASSIGN mt_pos->* TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE data. + ASSIGN mt_pos->* TO . IF sy-subrc = 0. mt_pos_xml = z2ui5_cl_util=>xml_srtti_stringify( ). CLEAR mt_pos. diff --git a/src/z2ui5_cl_demo_app_193.clas.locals_imp.abap b/src/z2ui5_cl_demo_app_193.clas.locals_imp.abap index 7c08e06c..1b5013a8 100644 --- a/src/z2ui5_cl_demo_app_193.clas.locals_imp.abap +++ b/src/z2ui5_cl_demo_app_193.clas.locals_imp.abap @@ -11,7 +11,7 @@ CLASS lcl_merged_data DEFINITION. tabname TYPE char30, comp TYPE abap_componentdescr, END OF ty_s_key_value, - ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH EMPTY KEY. + ty_t_key_values TYPE STANDARD TABLE OF ty_s_key_value WITH DEFAULT KEY. TYPES: BEGIN OF ty_s_merged_data, t_kopf TYPE REF TO data, diff --git a/src/z2ui5_cl_demo_app_194.clas.abap b/src/z2ui5_cl_demo_app_194.clas.abap index 59405173..4395c3f4 100644 --- a/src/z2ui5_cl_demo_app_194.clas.abap +++ b/src/z2ui5_cl_demo_app_194.clas.abap @@ -51,10 +51,13 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. WHEN 'BUTTON'. - LOOP AT mt_comp REFERENCE INTO DATA(comp). + DATA temp1 LIKE LINE OF mt_comp. + DATA comp LIKE REF TO temp1. + LOOP AT mt_comp REFERENCE INTO comp. ASSIGN ms_table_row->* TO . - ASSIGN COMPONENT comp->name OF STRUCTURE TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT comp->name OF STRUCTURE TO . IF IS NOT ASSIGNED. CONTINUE. ELSE. @@ -77,7 +80,8 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. FIELD-SYMBOLS TYPE data. IF mo_parent_view IS INITIAL. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). ELSE. page = mo_parent_view->get( `Page` ). ENDIF. @@ -85,21 +89,25 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. ASSIGN mt_table->* TO . - DATA(table) = page->table( growing = 'true' + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->table( growing = 'true' width = 'auto' items = client->_bind( ) * headertext = mv_table ). - DATA(columns) = table->columns( ). + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->columns( ). - LOOP AT mt_comp INTO DATA(comp). + DATA comp LIKE LINE OF mt_comp. + LOOP AT mt_comp INTO comp. columns->column( )->text( comp-name ). ENDLOOP. - DATA(cells) = columns->get_parent( )->items( + DATA cells TYPE REF TO z2ui5_cl_xml_view. + cells = columns->get_parent( )->items( )->column_list_item( valign = 'Middle' type = 'Navigation' )->cells( ). @@ -153,9 +161,11 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. TRY. - DATA(new_struct_desc) = cl_abap_structdescr=>create( mt_comp ). + DATA new_struct_desc TYPE REF TO cl_abap_structdescr. + new_struct_desc = cl_abap_structdescr=>create( mt_comp ). - DATA(new_table_desc) = cl_abap_tabledescr=>create( p_line_type = new_struct_desc + DATA new_table_desc TYPE REF TO cl_abap_tabledescr. + new_table_desc = cl_abap_tabledescr=>create( p_line_type = new_struct_desc p_table_kind = cl_abap_tabledescr=>tablekind_std ). CREATE DATA mt_table TYPE HANDLE new_table_desc. @@ -167,7 +177,7 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. SELECT * FROM (mv_table) - INTO CORRESPONDING FIELDS OF TABLE @
+ INTO CORRESPONDING FIELDS OF TABLE
UP TO 100 ROWS. CATCH cx_root. @@ -197,12 +207,20 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. DATA structdescr TYPE REF TO cl_abap_structdescr. DATA lt_fixval TYPE fixvalues. - LOOP AT mt_comp REFERENCE INTO DATA(dfies). - - comp = VALUE cl_abap_structdescr=>component_table( - BASE comp - ( name = dfies->name - type = CAST #( cl_abap_datadescr=>describe_by_data( lt_fixval ) ) ) ). + DATA temp2 LIKE LINE OF mt_comp. + DATA dfies LIKE REF TO temp2. + LOOP AT mt_comp REFERENCE INTO dfies. + + DATA temp3 TYPE cl_abap_structdescr=>component_table. + CLEAR temp3. + temp3 = comp. + DATA temp4 LIKE LINE OF temp3. + temp4-name = dfies->name. + DATA temp1 TYPE REF TO cl_abap_datadescr. + temp1 ?= cl_abap_datadescr=>describe_by_data( lt_fixval ). + temp4-type = temp1. + INSERT temp4 INTO TABLE temp3. + comp = temp3. ENDLOOP. structdescr = cl_abap_structdescr=>create( comp ). @@ -220,15 +238,21 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. TRY. + DATA typedesc TYPE REF TO cl_abap_typedescr. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = mv_table - RECEIVING p_descr_ref = DATA(typedesc) + RECEIVING p_descr_ref = typedesc EXCEPTIONS type_not_found = 1 OTHERS = 2 ). - DATA(structdesc) = CAST cl_abap_structdescr( typedesc ). - DATA(comp) = structdesc->get_components( ). + DATA temp5 TYPE REF TO cl_abap_structdescr. + temp5 ?= typedesc. + DATA structdesc LIKE temp5. + structdesc = temp5. + DATA comp TYPE abap_component_tab. + comp = structdesc->get_components( ). - LOOP AT comp INTO DATA(com). + DATA com LIKE LINE OF comp. + LOOP AT comp INTO com. IF com-as_include = abap_false. APPEND com TO result. ENDIF. @@ -238,9 +262,16 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. ENDTRY. - DATA(component) = VALUE cl_abap_structdescr=>component_table( - ( name = 'ROW_ID' - type = CAST #( cl_abap_datadescr=>describe_by_data( index ) ) ) ). + DATA temp6 TYPE cl_abap_structdescr=>component_table. + CLEAR temp6. + DATA temp7 LIKE LINE OF temp6. + temp7-name = 'ROW_ID'. + DATA temp2 TYPE REF TO cl_abap_datadescr. + temp2 ?= cl_abap_datadescr=>describe_by_data( index ). + temp7-type = temp2. + INSERT temp7 INTO TABLE temp6. + DATA component LIKE temp6. + component = temp6. APPEND LINES OF component TO result. diff --git a/src/z2ui5_cl_demo_app_195.clas.abap b/src/z2ui5_cl_demo_app_195.clas.abap index bfc69521..3407255a 100644 --- a/src/z2ui5_cl_demo_app_195.clas.abap +++ b/src/z2ui5_cl_demo_app_195.clas.abap @@ -62,10 +62,30 @@ CLASS Z2UI5_CL_DEMO_APP_195 IMPLEMENTATION. METHOD on_init. - mt_t002 = VALUE #( ( id = '1' class = 'Z2UI5_CL_DEMO_APP_194' count = '10' table = 'Z2UI5_T001') - ( id = '2' class = 'Z2UI5_CL_DEMO_APP_194' count = '20' table = 'Z2UI5_T002') - ( id = '3' class = 'Z2UI5_CL_DEMO_APP_194' count = '30' table = 'Z2UI5_TOOL_T_001') - ( id = '4' class = 'Z2UI5_CL_DEMO_APP_194' count = '40' table = 'Z2UI5_TOOL_T_002') ). + DATA temp1 TYPE z2ui5_cl_demo_app_195=>ty_t_t002. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = '1'. + temp2-class = 'Z2UI5_CL_DEMO_APP_194'. + temp2-count = '10'. + temp2-table = 'Z2UI5_T001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '2'. + temp2-class = 'Z2UI5_CL_DEMO_APP_194'. + temp2-count = '20'. + temp2-table = 'Z2UI5_T002'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '3'. + temp2-class = 'Z2UI5_CL_DEMO_APP_194'. + temp2-count = '30'. + temp2-table = 'Z2UI5_TOOL_T_001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '4'. + temp2-class = 'Z2UI5_CL_DEMO_APP_194'. + temp2-count = '40'. + temp2-table = 'Z2UI5_TOOL_T_002'. + INSERT temp2 INTO TABLE temp1. + mt_t002 = temp1. mv_selectedkey = '1'. @@ -74,19 +94,26 @@ CLASS Z2UI5_CL_DEMO_APP_195 IMPLEMENTATION. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'Main App calling Subapps' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( mv_selectedkey ) select = client->_event( val = 'ONSELECTICONTABBAR' ) )->items( ). - LOOP AT mt_t002 REFERENCE INTO DATA(line). + DATA temp3 LIKE LINE OF mt_t002. + DATA line LIKE REF TO temp3. + LOOP AT mt_t002 REFERENCE INTO line. lo_items->icon_tab_filter( text = line->class count = line->count key = line->id ). @@ -102,7 +129,8 @@ CLASS Z2UI5_CL_DEMO_APP_195 IMPLEMENTATION. FIELD-SYMBOLS TYPE any. - READ TABLE mt_t002 REFERENCE INTO DATA(t002) + DATA t002 TYPE REF TO z2ui5_cl_demo_app_195=>ty_s_t002. + READ TABLE mt_t002 REFERENCE INTO t002 WITH KEY id = mv_selectedkey. IF sy-subrc <> 0. @@ -125,7 +153,8 @@ CLASS Z2UI5_CL_DEMO_APP_195 IMPLEMENTATION. render_main( ). - ASSIGN mo_app->('MO_PARENT_VIEW') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MO_PARENT_VIEW') TO . IF IS ASSIGNED. = mo_main_page. ENDIF. diff --git a/src/z2ui5_cl_demo_app_196.clas.abap b/src/z2ui5_cl_demo_app_196.clas.abap index b651b25d..15617c5d 100644 --- a/src/z2ui5_cl_demo_app_196.clas.abap +++ b/src/z2ui5_cl_demo_app_196.clas.abap @@ -14,7 +14,8 @@ CLASS z2ui5_cl_demo_app_196 DEFINITION id TYPE string, END OF ty_shape. - DATA mt_shapes TYPE TABLE OF ty_shape. + TYPES temp1_0d13b3c262 TYPE TABLE OF ty_shape. +DATA mt_shapes TYPE temp1_0d13b3c262. PROTECTED SECTION. PRIVATE SECTION. @@ -35,73 +36,142 @@ CLASS Z2UI5_CL_DEMO_APP_196 IMPLEMENTATION. mv_slider_value = 0. - mt_shapes = VALUE #( - ( id = `arrow_down` ) - ( id = `arrow_left` ) - ( id = `arrow_right` ) - ( id = `arrow_up` ) - ( id = `attention_1` ) - ( id = `attention_2` ) - ( id = `building` ) - ( id = `bulb` ) - ( id = `bull` ) - ( id = `calendar` ) - ( id = `car` ) - ( id = `cart` ) - ( id = `cereals` ) - ( id = `circle` ) - ( id = `clock` ) - ( id = `cloud` ) - ( id = `conveyor` ) - ( id = `desk` ) - ( id = `document` ) - ( id = `documents` ) - ( id = `dollar` ) - ( id = `donut` ) - ( id = `drop` ) - ( id = `envelope` ) - ( id = `euro` ) - ( id = `factory` ) - ( id = `female` ) - ( id = `fish` ) - ( id = `flag` ) - ( id = `folder_1` ) - ( id = `folder_2` ) - ( id = `gear` ) - ( id = `heart` ) - ( id = `honey` ) - ( id = `house` ) - ( id = `information` ) - ( id = `letter` ) - ( id = `lung` ) - ( id = `machine` ) - ( id = `male` ) - ( id = `pen` ) - ( id = `person` ) - ( id = `pin` ) - ( id = `plane` ) - ( id = `printer` ) - ( id = `progress` ) - ( id = `question` ) - ( id = `robot` ) - ( id = `sandclock` ) - ( id = `speed` ) - ( id = `stomach` ) - ( id = `success` ) - ( id = `tank_diesel` ) - ( id = `tank_lpg` ) - ( id = `thermo` ) - ( id = `tool` ) - ( id = `transfusion` ) - ( id = `travel` ) - ( id = `turnip` ) - ( id = `vehicle_construction` ) - ( id = `vehicle_tank` ) - ( id = `vehicle_tractor` ) - ( id = `vehicle_truck_1` ) - ( id = `vehicle_truck_2` ) - ( id = `vehicle_truck_3` ) - ( id = `warehouse` ) ). + DATA temp1 LIKE mt_shapes. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = `arrow_down`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `arrow_left`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `arrow_right`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `arrow_up`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `attention_1`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `attention_2`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `building`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `bulb`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `bull`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `calendar`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `car`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `cart`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `cereals`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `circle`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `clock`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `cloud`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `conveyor`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `desk`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `document`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `documents`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `dollar`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `donut`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `drop`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `envelope`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `euro`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `factory`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `female`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `fish`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `flag`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `folder_1`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `folder_2`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `gear`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `heart`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `honey`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `house`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `information`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `letter`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `lung`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `machine`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `male`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `pen`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `person`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `pin`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `plane`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `printer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `progress`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `question`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `robot`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `sandclock`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `speed`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `stomach`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `success`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `tank_diesel`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `tank_lpg`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `thermo`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `tool`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `transfusion`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `travel`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `turnip`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `vehicle_construction`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `vehicle_tank`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `vehicle_tractor`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `vehicle_truck_1`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `vehicle_truck_2`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `vehicle_truck_3`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `warehouse`. + INSERT temp2 INTO TABLE temp1. + mt_shapes = temp1. ENDMETHOD. @@ -123,7 +193,8 @@ CLASS Z2UI5_CL_DEMO_APP_196 IMPLEMENTATION. DATA lv_script TYPE string. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.SICursorStyle:hover {` && ` cursor: pointer;` && @@ -134,14 +205,20 @@ CLASS Z2UI5_CL_DEMO_APP_196 IMPLEMENTATION. `.SIPanelStyle .sapMPanelContent{` && ` overflow: visible;` && `}` ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( abap_false = client->get( )-check_launchpad_active ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( - showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + showheader = temp1 title = 'abap2UI5 - Status Indicators Library' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). - DATA(panel) = page->panel( class = `sapUiResponsiveMargin SIPanelStyle` + DATA panel TYPE REF TO z2ui5_cl_xml_view. + panel = page->panel( class = `sapUiResponsiveMargin SIPanelStyle` width = `95%` ). panel->text( text = `Use the slider for adjusting the fill` ). panel->slider( class = `sapUiLargeMarginBottom` @@ -149,7 +226,8 @@ CLASS Z2UI5_CL_DEMO_APP_196 IMPLEMENTATION. value = client->_bind_edit( mv_slider_value ) )->get( )->responsive_scale( tickmarksbetweenlabels = `10` ). - DATA(fb) = panel->flex_box( wrap = `Wrap` + DATA fb TYPE REF TO z2ui5_cl_xml_view. + fb = panel->flex_box( wrap = `Wrap` items = client->_bind( mt_shapes ) ). fb->items( )->flex_box( direction = `Column` diff --git a/src/z2ui5_cl_demo_app_197.clas.abap b/src/z2ui5_cl_demo_app_197.clas.abap index 469a4c46..225ff21d 100644 --- a/src/z2ui5_cl_demo_app_197.clas.abap +++ b/src/z2ui5_cl_demo_app_197.clas.abap @@ -16,7 +16,7 @@ CLASS z2ui5_cl_demo_app_197 DEFINITION quantity TYPE i, END OF ty_s_tab . TYPES - ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY . + ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH DEFAULT KEY . DATA mt_table TYPE ty_t_table . DATA mt_table_full TYPE ty_t_table . @@ -40,14 +40,22 @@ CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'abap2UI5 - List Report Features' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). - DATA(facet) = page->facet_filter( id = `idFacetFilter` + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `$event.mParameters.selectedItems` INTO TABLE temp1. + DATA facet TYPE REF TO z2ui5_cl_xml_view. + facet = page->facet_filter( id = `idFacetFilter` type = `Light` showpersonalization = abap_true showreset = abap_true @@ -58,20 +66,23 @@ CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. listclose = client->_event( val = `FILTER` * t_arg = VALUE #( ( `${$parameters>/selectedAll}` ) ) ) * t_arg = VALUE #( ( `$event.mParameters` ) ) ) - t_arg = VALUE #( ( `$event.mParameters.selectedItems` ) ) ) + t_arg = temp1 ) )->facet_filter_item( text = `{PRODUCT}` ). - DATA(tab) = page->table( id = `tab` + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( id = `tab` items = client->_bind_edit( val = mt_table ) ). - DATA(lo_columns) = tab->columns( ). + DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. + lo_columns = tab->columns( ). lo_columns->column( )->text( text = `Product` ). lo_columns->column( )->text( text = `Date` ). lo_columns->column( )->text( text = `Name` ). lo_columns->column( )->text( text = `Location` ). lo_columns->column( )->text( text = `Quantity` ). - DATA(lo_cells) = tab->items( )->column_list_item( ). + DATA lo_cells TYPE REF TO z2ui5_cl_xml_view. + lo_cells = tab->items( )->column_list_item( ). lo_cells->link( id = `link` text = '{PRODUCT}' press = client->_event( val = `POPOVER_DETAIL` ) ). @@ -86,7 +97,8 @@ CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. METHOD z2ui5_if_app~main. - DATA lt_range TYPE RANGE OF string. + TYPES temp4 TYPE RANGE OF string. +DATA lt_range TYPE temp4. me->client = client. @@ -105,17 +117,36 @@ CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. - DATA(lt_arg) = client->get( )-t_event_arg. - DATA(lv_json) = lt_arg[ 1 ]. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + DATA lv_json LIKE LINE OF lt_arg. + DATA temp1 LIKE LINE OF lt_arg. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + lv_json = temp1. TRY. - DATA(lo_json) = z2ui5_cl_ajson=>parse( lv_json ). + DATA lo_json TYPE REF TO z2ui5_cl_ajson. + lo_json = z2ui5_cl_ajson=>parse( lv_json ). - DATA(l_members) = lo_json->members( '/' ). + DATA l_members TYPE string_table. + l_members = lo_json->members( '/' ). - LOOP AT l_members INTO DATA(l_member). - DATA(lv_val) = lo_json->get( '/' && l_member && '/mProperties/text' ). + DATA l_member LIKE LINE OF l_members. + LOOP AT l_members INTO l_member. + DATA lv_val TYPE string. + lv_val = lo_json->get( '/' && l_member && '/mProperties/text' ). - APPEND VALUE #( sign = 'I' option = 'EQ' low = lv_val ) TO lt_range. + DATA temp3 LIKE LINE OF lt_range. + CLEAR temp3. + temp3-sign = 'I'. + temp3-option = 'EQ'. + temp3-low = lv_val. + APPEND temp3 TO lt_range. ENDLOOP. @@ -124,7 +155,8 @@ CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. mt_table = mt_table_full. - LOOP AT mt_table INTO DATA(ls_tab). + DATA ls_tab LIKE LINE OF mt_table. + LOOP AT mt_table INTO ls_tab. IF ls_tab-product NOT IN lt_range. DELETE mt_table. ENDIF. @@ -142,55 +174,298 @@ CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. METHOD z2ui5_set_data. - mt_table = VALUE #( - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) - ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) - ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) - ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) - ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) - ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) - ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) ). + DATA temp4 TYPE z2ui5_cl_demo_app_197=>ty_t_table. + CLEAR temp4. + DATA temp5 LIKE LINE OF temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Peter`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 400. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'chair'. + temp5-create_date = `01.01.2022`. + temp5-create_by = `James`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 123. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'sofa'. + temp5-create_date = `01.05.2021`. + temp5-create_by = `Simone`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 700. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'computer'. + temp5-create_date = `27.01.2023`. + temp5-create_by = `Theo`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 200. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'printer'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Hannah`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 90. + INSERT temp5 INTO TABLE temp4. + temp5-product = 'table2'. + temp5-create_date = `01.01.2023`. + temp5-create_by = `Julia`. + temp5-storage_location = `AREA_001`. + temp5-quantity = 110. + INSERT temp5 INTO TABLE temp4. + mt_table = temp4. SORT mt_table BY product. mt_table_full = mt_table. diff --git a/src/z2ui5_cl_demo_app_199.clas.abap b/src/z2ui5_cl_demo_app_199.clas.abap index 861d3a17..9caf7ec5 100644 --- a/src/z2ui5_cl_demo_app_199.clas.abap +++ b/src/z2ui5_cl_demo_app_199.clas.abap @@ -50,27 +50,35 @@ CLASS z2ui5_cl_demo_app_199 IMPLEMENTATION. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). FIELD-SYMBOLS TYPE data. ASSIGN mt_table->* TO . - DATA(page) = view->page( id = `page_main` + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( id = `page_main` title = 'Refresh' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 class = 'sapUiContentPadding' ). - DATA(table) = page->table( growing = 'true' + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->table( growing = 'true' width = 'auto' items = client->_bind_edit( ) ). - DATA(columns) = table->columns( ). + DATA columns TYPE REF TO z2ui5_cl_xml_view. + columns = table->columns( ). - LOOP AT mt_comp INTO DATA(comp). + DATA comp LIKE LINE OF mt_comp. + LOOP AT mt_comp INTO comp. columns->column( )->text( comp-name ). ENDLOOP. - DATA(cells) = columns->get_parent( )->items( + DATA cells TYPE REF TO z2ui5_cl_xml_view. + cells = columns->get_parent( )->items( )->column_list_item( valign = 'Middle' type = 'Navigation' )->cells( ). @@ -121,8 +129,8 @@ CLASS z2ui5_cl_demo_app_199 IMPLEMENTATION. ASSIGN mt_table->* TO
. mt_comp = z2ui5_cl_util=>rtti_get_t_attri_by_any(
). - SELECT id, id_prev FROM z2ui5_t_01 - INTO CORRESPONDING FIELDS OF TABLE @
+ SELECT id id_prev FROM z2ui5_t_01 + INTO CORRESPONDING FIELDS OF TABLE
UP TO 2 ROWS. CATCH cx_root. diff --git a/src/z2ui5_cl_demo_app_201.clas.abap b/src/z2ui5_cl_demo_app_201.clas.abap index b58b7533..96be5c38 100644 --- a/src/z2ui5_cl_demo_app_201.clas.abap +++ b/src/z2ui5_cl_demo_app_201.clas.abap @@ -14,10 +14,12 @@ CLASS z2ui5_cl_demo_app_201 DEFINITION currencyshortname TYPE string, END OF ty_s_currency . - DATA - mt_suggestion_out TYPE STANDARD TABLE OF ty_s_currency . - DATA - mt_suggestion TYPE STANDARD TABLE OF ty_s_currency . + TYPES temp1_6794b3f377 TYPE STANDARD TABLE OF ty_s_currency. +DATA + mt_suggestion_out TYPE temp1_6794b3f377 . + TYPES temp2_6794b3f377 TYPE STANDARD TABLE OF ty_s_currency. +DATA + mt_suggestion TYPE temp2_6794b3f377 . DATA input TYPE string . PROTECTED SECTION. @@ -50,216 +52,1055 @@ CLASS Z2UI5_CL_DEMO_APP_201 IMPLEMENTATION. currencyshortname TYPE string, END OF ty_s_currency. - mt_suggestion = VALUE #( - ( language = 'E' currency = 'ADP' currencyname = 'Andorran Peseta --> (Old --> EUR)' currencyshortname = 'Peseta' ) - ( language = 'E' currency = 'AED' currencyname = 'United Arab Emirates Dirham' currencyshortname = 'Dirham' ) - ( language = 'E' currency = 'AFA' currencyname = 'Afghani (Old)' currencyshortname = 'Afghani' ) - ( language = 'E' currency = 'AFN' currencyname = 'Afghani' currencyshortname = 'Afghani' ) - ( language = 'E' currency = 'ALL' currencyname = 'Albanian Lek' currencyshortname = 'Lek' ) - ( language = 'E' currency = 'AMD' currencyname = 'Armenian Dram' currencyshortname = 'Dram' ) - ( language = 'E' currency = 'ANG' currencyname = 'West Indian Guilder' currencyshortname = 'W.Ind.Guilder' ) - ( language = 'E' currency = 'AOA' currencyname = 'Angolanische Kwanza' currencyshortname = 'Kwansa' ) - ( language = 'E' currency = 'AON' currencyname = 'Angolan New Kwanza (Old)' currencyshortname = 'New Kwanza' ) - ( language = 'E' currency = 'AOR' currencyname = 'Angolan Kwanza Reajustado (Old)' currencyshortname = 'Kwanza Reajust.' ) - ( language = 'E' currency = 'ARS' currencyname = 'Argentine Peso' currencyshortname = 'Arg. Peso' ) - ( language = 'E' currency = 'ATS' currencyname = 'Austrian Schilling (Old --> EUR)' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'AUD' currencyname = 'Australian Dollar' currencyshortname = 'Austr. Dollar' ) - ( language = 'E' currency = 'AWG' currencyname = 'Aruban Florin' currencyshortname = 'Aruban Florin' ) - ( language = 'E' currency = 'AZM' currencyname = 'Azerbaijani Manat (Old)' currencyshortname = 'Manat' ) - ( language = 'E' currency = 'AZN' currencyname = 'Azerbaijani Manat' currencyshortname = 'Manat' ) - ( language = 'E' currency = 'BAM' currencyname = 'Bosnia and Herzegovina Convertible Mark' currencyshortname = 'Convert. Mark' ) - ( language = 'E' currency = 'BBD' currencyname = 'Barbados Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'BDT' currencyname = 'Bangladesh Taka' currencyshortname = 'Taka' ) - ( language = 'E' currency = 'BEF' currencyname = 'Belgian Franc (Old --> EUR)' currencyshortname = 'Belgian Franc' ) - ( language = 'E' currency = 'BGN' currencyname = 'Bulgarian Lev' currencyshortname = 'Lev' ) - ( language = 'E' currency = 'BHD' currencyname = 'Bahraini Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'BIF' currencyname = 'Burundi Franc' currencyshortname = 'Burundi Franc' ) - ( language = 'E' currency = 'BMD' currencyname = 'Bermudan Dollar' currencyshortname = 'Bermudan Dollar' ) - ( language = 'E' currency = 'BND' currencyname = 'Brunei Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'BOB' currencyname = 'Boliviano' currencyshortname = 'Boliviano' ) - ( language = 'E' currency = 'BRL' currencyname = 'Brazilian Real' currencyshortname = 'Real' ) - ( language = 'E' currency = 'BSD' currencyname = 'Bahaman Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'BTN' currencyname = 'Bhutan Ngultrum' currencyshortname = 'Ngultrum' ) - ( language = 'E' currency = 'BWP' currencyname = 'Botswana Pula' currencyshortname = 'Pula' ) - ( language = 'E' currency = 'BYB' currencyname = 'Belarusian Ruble (Old)' currencyshortname = 'Belarus. Ruble' ) - ( language = 'E' currency = 'BYN' currencyname = 'Belarusian Ruble (New)' currencyshortname = 'Bela. Ruble N.' ) - ( language = 'E' currency = 'BYR' currencyname = 'Belarusian Ruble' currencyshortname = 'Ruble' ) - ( language = 'E' currency = 'BZD' currencyname = 'Belize Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'CAD' currencyname = 'Canadian Dollar' currencyshortname = 'Canadian Dollar' ) - ( language = 'E' currency = 'CDF' currencyname = 'Congolese Franc' currencyshortname = 'test data' ) - ( language = 'E' currency = 'CFP' currencyname = 'French Franc (Pacific Islands)' currencyshortname = 'Fr. Franc (Pac)' ) - ( language = 'E' currency = 'CHF' currencyname = 'Swiss Franc' currencyshortname = 'Swiss Franc' ) - ( language = 'E' currency = 'CLP' currencyname = 'Chilean Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'CNY' currencyname = 'Chinese Renminbi' currencyshortname = 'Renminbi' ) - ( language = 'E' currency = 'COP' currencyname = 'Colombian Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'CRC' currencyname = 'Costa Rica Colon' currencyshortname = 'Cost.Rica Colon' ) - ( language = 'E' currency = 'CSD' currencyname = 'Serbian Dinar (Old)' currencyshortname = 'Serbian Dinar' ) - ( language = 'E' currency = 'CUC' currencyname = 'Peso Convertible' currencyshortname = 'Peso Convertib.' ) - ( language = 'E' currency = 'CUP' currencyname = 'Cuban Peso' currencyshortname = 'Cuban Peso' ) - ( language = 'E' currency = 'CVE' currencyname = 'Cape Verde Escudo' currencyshortname = 'Escudo' ) - ( language = 'E' currency = 'CYP' currencyname = 'Cyprus Pound (Old --> EUR)' currencyshortname = 'Cyprus Pound' ) - ( language = 'E' currency = 'CZK' currencyname = 'Czech Krona' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'DEM' currencyname = 'German Mark (Old --> EUR)' currencyshortname = 'German Mark' ) - ( language = 'E' currency = 'DEM3' currencyname = '(Internal) German Mark (3 dec.places)' currencyshortname = '(Int.) DEM 3 DP' ) - ( language = 'E' currency = 'DJF' currencyname = 'Djibouti Franc' currencyshortname = 'Djibouti Franc' ) - ( language = 'E' currency = 'DKK' currencyname = 'Danish Krone' currencyshortname = 'Danish Krone' ) - ( language = 'E' currency = 'DOP' currencyname = 'Dominican Peso' currencyshortname = 'Dominican Peso' ) - ( language = 'E' currency = 'DZD' currencyname = 'Algerian Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'ECS' currencyname = 'Ecuadorian Sucre (Old --> USD)' currencyshortname = 'Sucre' ) - ( language = 'E' currency = 'EEK' currencyname = 'Estonian Krone (Old --> EUR)' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'EGP' currencyname = 'Egyptian Pound' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'ERN' currencyname = 'Eritrean Nafka' currencyshortname = 'Nakfa' ) - ( language = 'E' currency = 'ESP' currencyname = 'Spanish Peseta (Old --> EUR)' currencyshortname = 'Peseta' ) - ( language = 'E' currency = 'ETB' currencyname = 'Ethiopian Birr' currencyshortname = 'Birr' ) - ( language = 'E' currency = 'EUR' currencyname = 'European Euro' currencyshortname = 'Euro' ) - ( language = 'E' currency = 'FIM' currencyname = 'Finnish Markka (Old --> EUR)' currencyshortname = 'Finnish markka' ) - ( language = 'E' currency = 'FJD' currencyname = 'Fiji Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'FKP' currencyname = 'Falkland Pound' currencyshortname = 'Falkland Pound' ) - ( language = 'E' currency = 'FRF' currencyname = 'French Franc (Old --> EUR)' currencyshortname = 'French Franc' ) - ( language = 'E' currency = 'GBP' currencyname = 'British Pound' currencyshortname = 'Pound sterling' ) - ( language = 'E' currency = 'GEL' currencyname = 'Georgian Lari' currencyshortname = 'Lari' ) - ( language = 'E' currency = 'GHC' currencyname = 'Ghanaian Cedi (Old)' currencyshortname = 'Cedi' ) - ( language = 'E' currency = 'GHS' currencyname = 'Ghanian Cedi' currencyshortname = 'Cedi' ) - ( language = 'E' currency = 'GIP' currencyname = 'Gibraltar Pound' currencyshortname = 'Gibraltar Pound' ) - ( language = 'E' currency = 'GMD' currencyname = 'Gambian Dalasi' currencyshortname = 'Dalasi' ) - ( language = 'E' currency = 'GNF' currencyname = 'Guinean Franc' currencyshortname = 'Franc' ) - ( language = 'E' currency = 'GRD' currencyname = 'Greek Drachma (Old --> EUR)' currencyshortname = 'Drachma' ) - ( language = 'E' currency = 'GTQ' currencyname = 'Guatemalan Quetzal' currencyshortname = 'Quetzal' ) - ( language = 'E' currency = 'GWP' currencyname = 'Guinea Peso (Old --> SHP)' currencyshortname = 'Guinea Peso' ) - ( language = 'E' currency = 'GYD' currencyname = 'Guyana Dollar' currencyshortname = 'Guyana Dollar' ) - ( language = 'E' currency = 'HKD' currencyname = 'Hong Kong Dollar' currencyshortname = 'H.K.Dollar' ) - ( language = 'E' currency = 'HNL' currencyname = 'Honduran Lempira' currencyshortname = 'Lempira' ) - ( language = 'E' currency = 'HRK' currencyname = 'Croatian Kuna' currencyshortname = 'Kuna' ) - ( language = 'E' currency = 'HTG' currencyname = 'Haitian Gourde' currencyshortname = 'Gourde' ) - ( language = 'E' currency = 'HUF' currencyname = 'Hungarian Forint' currencyshortname = 'Forint' ) - ( language = 'E' currency = 'IDR' currencyname = 'Indonesian Rupiah' currencyshortname = 'Rupiah' ) - ( language = 'E' currency = 'IEP' currencyname = 'Irish Punt (Old --> EUR)' currencyshortname = 'Irish Punt' ) - ( language = 'E' currency = 'ILS' currencyname = 'Israeli Scheckel' currencyshortname = 'Scheckel' ) - ( language = 'E' currency = 'INR' currencyname = 'Indian Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'IQD' currencyname = 'Iraqui Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'IRR' currencyname = 'Iranian Rial' currencyshortname = 'Rial' ) - ( language = 'E' currency = 'ISK' currencyname = 'Iceland Krona' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'ITL' currencyname = 'Italian Lira (Old --> EUR)' currencyshortname = 'Lire' ) - ( language = 'E' currency = 'JMD' currencyname = 'Jamaican Dollar' currencyshortname = 'Jamaican Dollar' ) - ( language = 'E' currency = 'JOD' currencyname = 'Jordanian Dinar' currencyshortname = 'Jordanian Dinar' ) - ( language = 'E' currency = 'JPY' currencyname = 'Japanese Yen' currencyshortname = 'Yen' ) - ( language = 'E' currency = 'KES' currencyname = 'Kenyan Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'KGS' currencyname = 'Kyrgyzstan Som' currencyshortname = 'Som' ) - ( language = 'E' currency = 'KHR' currencyname = 'Cambodian Riel' currencyshortname = 'Riel' ) - ( language = 'E' currency = 'KMF' currencyname = 'Comoros Franc' currencyshortname = 'Comoros Franc' ) - ( language = 'E' currency = 'KPW' currencyname = 'North Korean Won' currencyshortname = 'N. Korean Won' ) - ( language = 'E' currency = 'KRW' currencyname = 'South Korean Won' currencyshortname = 'S.Korean Won' ) - ( language = 'E' currency = 'KWD' currencyname = 'Kuwaiti Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'KYD' currencyname = 'Cayman Dollar' currencyshortname = 'Cayman Dollar' ) - ( language = 'E' currency = 'KZT' currencyname = 'Kazakstanian Tenge' currencyshortname = 'Tenge' ) - ( language = 'E' currency = 'LAK' currencyname = 'Laotian Kip' currencyshortname = 'Kip' ) - ( language = 'E' currency = 'LBP' currencyname = 'Lebanese Pound' currencyshortname = 'Lebanese Pound' ) - ( language = 'E' currency = 'LKR' currencyname = 'Sri Lankan Rupee' currencyshortname = 'Sri Lanka Rupee' ) - ( language = 'E' currency = 'LRD' currencyname = 'Liberian Dollar' currencyshortname = 'Liberian Dollar' ) - ( language = 'E' currency = 'LSL' currencyname = 'Lesotho Loti' currencyshortname = 'Loti' ) - ( language = 'E' currency = 'LTL' currencyname = 'Lithuanian Lita' currencyshortname = 'Lita' ) - ( language = 'E' currency = 'LUF' currencyname = 'Luxembourg Franc (Old --> EUR)' currencyshortname = 'Lux. Franc' ) - ( language = 'E' currency = 'LVL' currencyname = 'Latvian Lat' currencyshortname = 'Lat' ) - ( language = 'E' currency = 'LYD' currencyname = 'Libyan Dinar' currencyshortname = 'Libyan Dinar' ) - ( language = 'E' currency = 'MAD' currencyname = 'Moroccan Dirham' currencyshortname = 'Dirham' ) - ( language = 'E' currency = 'MDL' currencyname = 'Moldavian Leu' currencyshortname = 'Leu' ) - ( language = 'E' currency = 'MGA' currencyname = 'Madagascan Ariary' currencyshortname = 'Madagasc.Ariary' ) - ( language = 'E' currency = 'MGF' currencyname = 'Madagascan Franc (Old' currencyshortname = 'Madagascan Fr.' ) - ( language = 'E' currency = 'MKD' currencyname = 'Macedonian Denar' currencyshortname = 'Maced. Denar' ) - ( language = 'E' currency = 'MMK' currencyname = 'Myanmar Kyat' currencyshortname = 'Kyat' ) - ( language = 'E' currency = 'MNT' currencyname = 'Mongolian Tugrik' currencyshortname = 'Tugrik' ) - ( language = 'E' currency = 'MOP' currencyname = 'Macao Pataca' currencyshortname = 'Pataca' ) - ( language = 'E' currency = 'MRO' currencyname = 'Mauritanian Ouguiya' currencyshortname = 'Ouguiya' ) - ( language = 'E' currency = 'MTL' currencyname = 'Maltese Lira (Old --> EUR)' currencyshortname = 'Lira' ) - ( language = 'E' currency = 'MUR' currencyname = 'Mauritian Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'MVR' currencyname = 'Maldive Rufiyaa' currencyshortname = 'Rufiyaa' ) - ( language = 'E' currency = 'MWK' currencyname = 'Malawi Kwacha' currencyshortname = 'Malawi Kwacha' ) - ( language = 'E' currency = 'MXN' currencyname = 'Mexican Pesos' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'MYR' currencyname = 'Malaysian Ringgit' currencyshortname = 'Ringgit' ) - ( language = 'E' currency = 'MZM' currencyname = 'Mozambique Metical (Old)' currencyshortname = 'Metical' ) - ( language = 'E' currency = 'MZN' currencyname = 'Mozambique Metical' currencyshortname = 'Metical' ) - ( language = 'E' currency = 'NAD' currencyname = 'Namibian Dollar' currencyshortname = 'Namibian Dollar' ) - ( language = 'E' currency = 'NGN' currencyname = 'Nigerian Naira' currencyshortname = 'Naira' ) - ( language = 'E' currency = 'NIO' currencyname = 'Nicaraguan Cordoba Oro' currencyshortname = 'Cordoba Oro' ) - ( language = 'E' currency = 'NLG' currencyname = 'Dutch Guilder (Old --> EUR)' currencyshortname = 'Guilder' ) - ( language = 'E' currency = 'NOK' currencyname = 'Norwegian Krone' currencyshortname = 'Norwegian Krone' ) - ( language = 'E' currency = 'NPR' currencyname = 'Nepalese Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'NZD' currencyname = 'New Zealand Dollars' currencyshortname = 'N.Zeal.Dollars' ) - ( language = 'E' currency = 'OMR' currencyname = 'Omani Rial' currencyshortname = 'Omani Rial' ) - ( language = 'E' currency = 'PAB' currencyname = 'Panamanian Balboa' currencyshortname = 'Balboa' ) - ( language = 'E' currency = 'PEN' currencyname = 'Peruvian New Sol' currencyshortname = 'New Sol' ) - ( language = 'E' currency = 'PGK' currencyname = 'Papua New Guinea Kina' currencyshortname = 'Kina' ) - ( language = 'E' currency = 'PHP' currencyname = 'Philippine Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'PKR' currencyname = 'Pakistani Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'PLN' currencyname = 'Polish Zloty (new)' currencyshortname = 'Zloty' ) - ( language = 'E' currency = 'PTE' currencyname = 'Portuguese Escudo (Old --> EUR)' currencyshortname = 'Escudo' ) - ( language = 'E' currency = 'PYG' currencyname = 'Paraguayan Guarani' currencyshortname = 'Guarani' ) - ( language = 'E' currency = 'QAR' currencyname = 'Qatar Rial' currencyshortname = 'Rial' ) - ( language = 'E' currency = 'RMB' currencyname = 'Chinese Yuan Renminbi' currencyshortname = 'Yuan Renminbi' ) - ( language = 'E' currency = 'ROL' currencyname = 'Romanian Leu (Old)' currencyshortname = 'Leu (Old)' ) - ( language = 'E' currency = 'RON' currencyname = 'Romanian Leu' currencyshortname = 'Leu' ) - ( language = 'E' currency = 'RSD' currencyname = 'Serbian Dinar' currencyshortname = 'Serbian Dinar' ) - ( language = 'E' currency = 'RUB' currencyname = 'Russian Ruble' currencyshortname = 'Ruble' ) - ( language = 'E' currency = 'RWF' currencyname = 'Rwandan Franc' currencyshortname = 'Franc' ) - ( language = 'E' currency = 'SAR' currencyname = 'Saudi Riyal' currencyshortname = 'Rial' ) - ( language = 'E' currency = 'SBD' currencyname = 'Solomon Islands Dollar' currencyshortname = 'Sol.Isl.Dollar' ) - ( language = 'E' currency = 'SCR' currencyname = 'Seychelles Rupee' currencyshortname = 'Rupee' ) - ( language = 'E' currency = 'SDD' currencyname = 'Sudanese Dinar (Old)' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'SDG' currencyname = 'Sudanese Pound' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'SDP' currencyname = 'Sudanese Pound (until 1992)' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'SEK' currencyname = 'Swedish Krona' currencyshortname = 'Swedish Krona' ) - ( language = 'E' currency = 'SGD' currencyname = 'Singapore Dollar' currencyshortname = 'Sing.Dollar' ) - ( language = 'E' currency = 'SHP' currencyname = 'St.Helena Pound' currencyshortname = 'St.Helena Pound' ) - ( language = 'E' currency = 'SIT' currencyname = 'Slovenian Tolar (Old --> EUR)' currencyshortname = 'Tolar' ) - ( language = 'E' currency = 'SKK' currencyname = 'Slovakian Krona (Old --> EUR)' currencyshortname = 'Krona' ) - ( language = 'E' currency = 'SLL' currencyname = 'Sierra Leone Leone' currencyshortname = 'Leone' ) - ( language = 'E' currency = 'SOS' currencyname = 'Somalian Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'SRD' currencyname = 'Surinam Dollar' currencyshortname = 'Surinam Doillar' ) - ( language = 'E' currency = 'SRG' currencyname = 'Surinam Guilder (Old)' currencyshortname = 'Surinam Guilder' ) - ( language = 'E' currency = 'SSP' currencyname = 'South Sudanese Pound' currencyshortname = 'Pound' ) - ( language = 'E' currency = 'STD' currencyname = 'Sao Tome / Principe Dobra' currencyshortname = 'Dobra' ) - ( language = 'E' currency = 'SVC' currencyname = 'El Salvador Colon' currencyshortname = 'Colon' ) - ( language = 'E' currency = 'SYP' currencyname = 'Syrian Pound' currencyshortname = 'Syrian Pound' ) - ( language = 'E' currency = 'SZL' currencyname = 'Swaziland Lilangeni' currencyshortname = 'Lilangeni' ) - ( language = 'E' currency = 'THB' currencyname = 'Thailand Baht' currencyshortname = 'Baht' ) - ( language = 'E' currency = 'TJR' currencyname = 'Tajikistani Ruble (Old)' currencyshortname = 'Ruble' ) - ( language = 'E' currency = 'TJS' currencyname = 'Tajikistani Somoni' currencyshortname = 'Somoni' ) - ( language = 'E' currency = 'TMM' currencyname = 'Turkmenistani Manat (Old)' currencyshortname = 'Manat (Old)' ) - ( language = 'E' currency = 'TMT' currencyname = 'Turkmenistani Manat' currencyshortname = 'Manat' ) - ( language = 'E' currency = 'TND' currencyname = 'Tunisian Dinar' currencyshortname = 'Dinar' ) - ( language = 'E' currency = 'TOP' currencyname = 'Tongan Pa''anga' currencyshortname = 'Pa''anga' ) - ( language = 'E' currency = 'TPE' currencyname = 'Timor Escudo --> USD' currencyshortname = 'Timor Escudo' ) - ( language = 'E' currency = 'TRL' currencyname = 'Turkish Lira (Old)' currencyshortname = 'Lira (Old)' ) - ( language = 'E' currency = 'TRY' currencyname = 'Turkish Lira' currencyshortname = 'Lira' ) - ( language = 'E' currency = 'TTD' currencyname = 'Trinidad and Tobago Dollar' currencyshortname = 'T.+ T. Dollar' ) - ( language = 'E' currency = 'TWD' currencyname = 'New Taiwan Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'TZS' currencyname = 'Tanzanian Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'UAH' currencyname = 'Ukraine Hryvnia' currencyshortname = 'Hryvnia' ) - ( language = 'E' currency = 'UGX' currencyname = 'Ugandan Shilling' currencyshortname = 'Shilling' ) - ( language = 'E' currency = 'USD' currencyname = 'United States Dollar' currencyshortname = 'US Dollar' ) - ( language = 'E' currency = 'USDN' currencyname = '(Internal) United States Dollar (5 Dec.)' currencyshortname = 'US Dollar' ) - ( language = 'E' currency = 'UYU' currencyname = 'Uruguayan Peso' currencyshortname = 'Peso' ) - ( language = 'E' currency = 'UZS' currencyname = 'Uzbekistan Som' currencyshortname = 'Total' ) - ( language = 'E' currency = 'VEB' currencyname = 'Venezuelan Bolivar (Old)' currencyshortname = 'Bolivar (Old)' ) - ( language = 'E' currency = 'VEF' currencyname = 'Venezuelan Bolivar' currencyshortname = 'Bolivar' ) - ( language = 'E' currency = 'VND' currencyname = 'Vietnamese Dong' currencyshortname = 'Dong' ) - ( language = 'E' currency = 'VUV' currencyname = 'Vanuatu Vatu' currencyshortname = 'Vatu' ) - ( language = 'E' currency = 'WST' currencyname = 'Samoan Tala' currencyshortname = 'Tala' ) - ( language = 'E' currency = 'XAF' currencyname = 'Gabon CFA Franc BEAC' currencyshortname = 'CFA Franc BEAC' ) - ( language = 'E' currency = 'XCD' currencyname = 'East Carribean Dollar' currencyshortname = 'Dollar' ) - ( language = 'E' currency = 'XEU' currencyname = 'European Currency Unit (E.C.U.)' currencyshortname = 'E.C.U.' ) - ( language = 'E' currency = 'XOF' currencyname = 'Benin CFA Franc BCEAO' currencyshortname = 'CFA Franc BCEAO' ) - ( language = 'E' currency = 'XPF' currencyname = 'CFP Franc' currencyshortname = 'Franc' ) - ( language = 'E' currency = 'YER' currencyname = 'Yemeni Ryal' currencyshortname = 'Yemeni Ryal' ) - ( language = 'E' currency = 'YUM' currencyname = 'New Yugoslavian Dinar (Old)' currencyshortname = 'New Dinar' ) - ( language = 'E' currency = 'ZAR' currencyname = 'South African Rand' currencyshortname = 'Rand' ) - ( language = 'E' currency = 'ZMK' currencyname = 'Zambian Kwacha (Old)' currencyshortname = 'Kwacha' ) - ( language = 'E' currency = 'ZMW' currencyname = 'Zambian Kwacha (New)' currencyshortname = 'Kwacha' ) - ( language = 'E' currency = 'ZRN' currencyname = 'Zaire (Old)' currencyshortname = 'Zaire' ) - ( language = 'E' currency = 'ZWD' currencyname = 'Zimbabwean Dollar (Old)' currencyshortname = 'Zimbabwe Dollar' ) - ( language = 'E' currency = 'ZWL' currencyname = 'Zimbabwean Dollar (New)' currencyshortname = 'Zimbabwe Dollar' ) - ( language = 'E' currency = 'ZWN' currencyname = 'Zimbabwean Dollar (Old)' currencyshortname = 'Zimbabwe Dollar' ) - ( language = 'E' currency = 'ZWR' currencyname = 'Zimbabwean Dollar (Old)' currencyshortname = 'Zimbabwe Dollar' ) ). + DATA temp1 LIKE mt_suggestion. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-language = 'E'. + temp2-currency = 'ADP'. + temp2-currencyname = 'Andorran Peseta --> (Old --> EUR)'. + temp2-currencyshortname = 'Peseta'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AED'. + temp2-currencyname = 'United Arab Emirates Dirham'. + temp2-currencyshortname = 'Dirham'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AFA'. + temp2-currencyname = 'Afghani (Old)'. + temp2-currencyshortname = 'Afghani'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AFN'. + temp2-currencyname = 'Afghani'. + temp2-currencyshortname = 'Afghani'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ALL'. + temp2-currencyname = 'Albanian Lek'. + temp2-currencyshortname = 'Lek'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AMD'. + temp2-currencyname = 'Armenian Dram'. + temp2-currencyshortname = 'Dram'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ANG'. + temp2-currencyname = 'West Indian Guilder'. + temp2-currencyshortname = 'W.Ind.Guilder'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AOA'. + temp2-currencyname = 'Angolanische Kwanza'. + temp2-currencyshortname = 'Kwansa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AON'. + temp2-currencyname = 'Angolan New Kwanza (Old)'. + temp2-currencyshortname = 'New Kwanza'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AOR'. + temp2-currencyname = 'Angolan Kwanza Reajustado (Old)'. + temp2-currencyshortname = 'Kwanza Reajust.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ARS'. + temp2-currencyname = 'Argentine Peso'. + temp2-currencyshortname = 'Arg. Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ATS'. + temp2-currencyname = 'Austrian Schilling (Old --> EUR)'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AUD'. + temp2-currencyname = 'Australian Dollar'. + temp2-currencyshortname = 'Austr. Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AWG'. + temp2-currencyname = 'Aruban Florin'. + temp2-currencyshortname = 'Aruban Florin'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AZM'. + temp2-currencyname = 'Azerbaijani Manat (Old)'. + temp2-currencyshortname = 'Manat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'AZN'. + temp2-currencyname = 'Azerbaijani Manat'. + temp2-currencyshortname = 'Manat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BAM'. + temp2-currencyname = 'Bosnia and Herzegovina Convertible Mark'. + temp2-currencyshortname = 'Convert. Mark'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BBD'. + temp2-currencyname = 'Barbados Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BDT'. + temp2-currencyname = 'Bangladesh Taka'. + temp2-currencyshortname = 'Taka'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BEF'. + temp2-currencyname = 'Belgian Franc (Old --> EUR)'. + temp2-currencyshortname = 'Belgian Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BGN'. + temp2-currencyname = 'Bulgarian Lev'. + temp2-currencyshortname = 'Lev'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BHD'. + temp2-currencyname = 'Bahraini Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BIF'. + temp2-currencyname = 'Burundi Franc'. + temp2-currencyshortname = 'Burundi Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BMD'. + temp2-currencyname = 'Bermudan Dollar'. + temp2-currencyshortname = 'Bermudan Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BND'. + temp2-currencyname = 'Brunei Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BOB'. + temp2-currencyname = 'Boliviano'. + temp2-currencyshortname = 'Boliviano'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BRL'. + temp2-currencyname = 'Brazilian Real'. + temp2-currencyshortname = 'Real'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BSD'. + temp2-currencyname = 'Bahaman Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BTN'. + temp2-currencyname = 'Bhutan Ngultrum'. + temp2-currencyshortname = 'Ngultrum'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BWP'. + temp2-currencyname = 'Botswana Pula'. + temp2-currencyshortname = 'Pula'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BYB'. + temp2-currencyname = 'Belarusian Ruble (Old)'. + temp2-currencyshortname = 'Belarus. Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BYN'. + temp2-currencyname = 'Belarusian Ruble (New)'. + temp2-currencyshortname = 'Bela. Ruble N.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BYR'. + temp2-currencyname = 'Belarusian Ruble'. + temp2-currencyshortname = 'Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'BZD'. + temp2-currencyname = 'Belize Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CAD'. + temp2-currencyname = 'Canadian Dollar'. + temp2-currencyshortname = 'Canadian Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CDF'. + temp2-currencyname = 'Congolese Franc'. + temp2-currencyshortname = 'test data'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CFP'. + temp2-currencyname = 'French Franc (Pacific Islands)'. + temp2-currencyshortname = 'Fr. Franc (Pac)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CHF'. + temp2-currencyname = 'Swiss Franc'. + temp2-currencyshortname = 'Swiss Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CLP'. + temp2-currencyname = 'Chilean Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CNY'. + temp2-currencyname = 'Chinese Renminbi'. + temp2-currencyshortname = 'Renminbi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'COP'. + temp2-currencyname = 'Colombian Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CRC'. + temp2-currencyname = 'Costa Rica Colon'. + temp2-currencyshortname = 'Cost.Rica Colon'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CSD'. + temp2-currencyname = 'Serbian Dinar (Old)'. + temp2-currencyshortname = 'Serbian Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CUC'. + temp2-currencyname = 'Peso Convertible'. + temp2-currencyshortname = 'Peso Convertib.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CUP'. + temp2-currencyname = 'Cuban Peso'. + temp2-currencyshortname = 'Cuban Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CVE'. + temp2-currencyname = 'Cape Verde Escudo'. + temp2-currencyshortname = 'Escudo'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CYP'. + temp2-currencyname = 'Cyprus Pound (Old --> EUR)'. + temp2-currencyshortname = 'Cyprus Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'CZK'. + temp2-currencyname = 'Czech Krona'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DEM'. + temp2-currencyname = 'German Mark (Old --> EUR)'. + temp2-currencyshortname = 'German Mark'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DEM3'. + temp2-currencyname = '(Internal) German Mark (3 dec.places)'. + temp2-currencyshortname = '(Int.) DEM 3 DP'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DJF'. + temp2-currencyname = 'Djibouti Franc'. + temp2-currencyshortname = 'Djibouti Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DKK'. + temp2-currencyname = 'Danish Krone'. + temp2-currencyshortname = 'Danish Krone'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DOP'. + temp2-currencyname = 'Dominican Peso'. + temp2-currencyshortname = 'Dominican Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'DZD'. + temp2-currencyname = 'Algerian Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ECS'. + temp2-currencyname = 'Ecuadorian Sucre (Old --> USD)'. + temp2-currencyshortname = 'Sucre'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'EEK'. + temp2-currencyname = 'Estonian Krone (Old --> EUR)'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'EGP'. + temp2-currencyname = 'Egyptian Pound'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ERN'. + temp2-currencyname = 'Eritrean Nafka'. + temp2-currencyshortname = 'Nakfa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ESP'. + temp2-currencyname = 'Spanish Peseta (Old --> EUR)'. + temp2-currencyshortname = 'Peseta'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ETB'. + temp2-currencyname = 'Ethiopian Birr'. + temp2-currencyshortname = 'Birr'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'EUR'. + temp2-currencyname = 'European Euro'. + temp2-currencyshortname = 'Euro'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FIM'. + temp2-currencyname = 'Finnish Markka (Old --> EUR)'. + temp2-currencyshortname = 'Finnish markka'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FJD'. + temp2-currencyname = 'Fiji Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FKP'. + temp2-currencyname = 'Falkland Pound'. + temp2-currencyshortname = 'Falkland Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'FRF'. + temp2-currencyname = 'French Franc (Old --> EUR)'. + temp2-currencyshortname = 'French Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GBP'. + temp2-currencyname = 'British Pound'. + temp2-currencyshortname = 'Pound sterling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GEL'. + temp2-currencyname = 'Georgian Lari'. + temp2-currencyshortname = 'Lari'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GHC'. + temp2-currencyname = 'Ghanaian Cedi (Old)'. + temp2-currencyshortname = 'Cedi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GHS'. + temp2-currencyname = 'Ghanian Cedi'. + temp2-currencyshortname = 'Cedi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GIP'. + temp2-currencyname = 'Gibraltar Pound'. + temp2-currencyshortname = 'Gibraltar Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GMD'. + temp2-currencyname = 'Gambian Dalasi'. + temp2-currencyshortname = 'Dalasi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GNF'. + temp2-currencyname = 'Guinean Franc'. + temp2-currencyshortname = 'Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GRD'. + temp2-currencyname = 'Greek Drachma (Old --> EUR)'. + temp2-currencyshortname = 'Drachma'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GTQ'. + temp2-currencyname = 'Guatemalan Quetzal'. + temp2-currencyshortname = 'Quetzal'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GWP'. + temp2-currencyname = 'Guinea Peso (Old --> SHP)'. + temp2-currencyshortname = 'Guinea Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'GYD'. + temp2-currencyname = 'Guyana Dollar'. + temp2-currencyshortname = 'Guyana Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HKD'. + temp2-currencyname = 'Hong Kong Dollar'. + temp2-currencyshortname = 'H.K.Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HNL'. + temp2-currencyname = 'Honduran Lempira'. + temp2-currencyshortname = 'Lempira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HRK'. + temp2-currencyname = 'Croatian Kuna'. + temp2-currencyshortname = 'Kuna'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HTG'. + temp2-currencyname = 'Haitian Gourde'. + temp2-currencyshortname = 'Gourde'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'HUF'. + temp2-currencyname = 'Hungarian Forint'. + temp2-currencyshortname = 'Forint'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IDR'. + temp2-currencyname = 'Indonesian Rupiah'. + temp2-currencyshortname = 'Rupiah'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IEP'. + temp2-currencyname = 'Irish Punt (Old --> EUR)'. + temp2-currencyshortname = 'Irish Punt'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ILS'. + temp2-currencyname = 'Israeli Scheckel'. + temp2-currencyshortname = 'Scheckel'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'INR'. + temp2-currencyname = 'Indian Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IQD'. + temp2-currencyname = 'Iraqui Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'IRR'. + temp2-currencyname = 'Iranian Rial'. + temp2-currencyshortname = 'Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ISK'. + temp2-currencyname = 'Iceland Krona'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ITL'. + temp2-currencyname = 'Italian Lira (Old --> EUR)'. + temp2-currencyshortname = 'Lire'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'JMD'. + temp2-currencyname = 'Jamaican Dollar'. + temp2-currencyshortname = 'Jamaican Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'JOD'. + temp2-currencyname = 'Jordanian Dinar'. + temp2-currencyshortname = 'Jordanian Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'JPY'. + temp2-currencyname = 'Japanese Yen'. + temp2-currencyshortname = 'Yen'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KES'. + temp2-currencyname = 'Kenyan Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KGS'. + temp2-currencyname = 'Kyrgyzstan Som'. + temp2-currencyshortname = 'Som'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KHR'. + temp2-currencyname = 'Cambodian Riel'. + temp2-currencyshortname = 'Riel'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KMF'. + temp2-currencyname = 'Comoros Franc'. + temp2-currencyshortname = 'Comoros Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KPW'. + temp2-currencyname = 'North Korean Won'. + temp2-currencyshortname = 'N. Korean Won'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KRW'. + temp2-currencyname = 'South Korean Won'. + temp2-currencyshortname = 'S.Korean Won'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KWD'. + temp2-currencyname = 'Kuwaiti Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KYD'. + temp2-currencyname = 'Cayman Dollar'. + temp2-currencyshortname = 'Cayman Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'KZT'. + temp2-currencyname = 'Kazakstanian Tenge'. + temp2-currencyshortname = 'Tenge'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LAK'. + temp2-currencyname = 'Laotian Kip'. + temp2-currencyshortname = 'Kip'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LBP'. + temp2-currencyname = 'Lebanese Pound'. + temp2-currencyshortname = 'Lebanese Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LKR'. + temp2-currencyname = 'Sri Lankan Rupee'. + temp2-currencyshortname = 'Sri Lanka Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LRD'. + temp2-currencyname = 'Liberian Dollar'. + temp2-currencyshortname = 'Liberian Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LSL'. + temp2-currencyname = 'Lesotho Loti'. + temp2-currencyshortname = 'Loti'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LTL'. + temp2-currencyname = 'Lithuanian Lita'. + temp2-currencyshortname = 'Lita'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LUF'. + temp2-currencyname = 'Luxembourg Franc (Old --> EUR)'. + temp2-currencyshortname = 'Lux. Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LVL'. + temp2-currencyname = 'Latvian Lat'. + temp2-currencyshortname = 'Lat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'LYD'. + temp2-currencyname = 'Libyan Dinar'. + temp2-currencyshortname = 'Libyan Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MAD'. + temp2-currencyname = 'Moroccan Dirham'. + temp2-currencyshortname = 'Dirham'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MDL'. + temp2-currencyname = 'Moldavian Leu'. + temp2-currencyshortname = 'Leu'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MGA'. + temp2-currencyname = 'Madagascan Ariary'. + temp2-currencyshortname = 'Madagasc.Ariary'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MGF'. + temp2-currencyname = 'Madagascan Franc (Old'. + temp2-currencyshortname = 'Madagascan Fr.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MKD'. + temp2-currencyname = 'Macedonian Denar'. + temp2-currencyshortname = 'Maced. Denar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MMK'. + temp2-currencyname = 'Myanmar Kyat'. + temp2-currencyshortname = 'Kyat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MNT'. + temp2-currencyname = 'Mongolian Tugrik'. + temp2-currencyshortname = 'Tugrik'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MOP'. + temp2-currencyname = 'Macao Pataca'. + temp2-currencyshortname = 'Pataca'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MRO'. + temp2-currencyname = 'Mauritanian Ouguiya'. + temp2-currencyshortname = 'Ouguiya'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MTL'. + temp2-currencyname = 'Maltese Lira (Old --> EUR)'. + temp2-currencyshortname = 'Lira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MUR'. + temp2-currencyname = 'Mauritian Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MVR'. + temp2-currencyname = 'Maldive Rufiyaa'. + temp2-currencyshortname = 'Rufiyaa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MWK'. + temp2-currencyname = 'Malawi Kwacha'. + temp2-currencyshortname = 'Malawi Kwacha'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MXN'. + temp2-currencyname = 'Mexican Pesos'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MYR'. + temp2-currencyname = 'Malaysian Ringgit'. + temp2-currencyshortname = 'Ringgit'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MZM'. + temp2-currencyname = 'Mozambique Metical (Old)'. + temp2-currencyshortname = 'Metical'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'MZN'. + temp2-currencyname = 'Mozambique Metical'. + temp2-currencyshortname = 'Metical'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NAD'. + temp2-currencyname = 'Namibian Dollar'. + temp2-currencyshortname = 'Namibian Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NGN'. + temp2-currencyname = 'Nigerian Naira'. + temp2-currencyshortname = 'Naira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NIO'. + temp2-currencyname = 'Nicaraguan Cordoba Oro'. + temp2-currencyshortname = 'Cordoba Oro'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NLG'. + temp2-currencyname = 'Dutch Guilder (Old --> EUR)'. + temp2-currencyshortname = 'Guilder'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NOK'. + temp2-currencyname = 'Norwegian Krone'. + temp2-currencyshortname = 'Norwegian Krone'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NPR'. + temp2-currencyname = 'Nepalese Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'NZD'. + temp2-currencyname = 'New Zealand Dollars'. + temp2-currencyshortname = 'N.Zeal.Dollars'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'OMR'. + temp2-currencyname = 'Omani Rial'. + temp2-currencyshortname = 'Omani Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PAB'. + temp2-currencyname = 'Panamanian Balboa'. + temp2-currencyshortname = 'Balboa'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PEN'. + temp2-currencyname = 'Peruvian New Sol'. + temp2-currencyshortname = 'New Sol'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PGK'. + temp2-currencyname = 'Papua New Guinea Kina'. + temp2-currencyshortname = 'Kina'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PHP'. + temp2-currencyname = 'Philippine Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PKR'. + temp2-currencyname = 'Pakistani Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PLN'. + temp2-currencyname = 'Polish Zloty (new)'. + temp2-currencyshortname = 'Zloty'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PTE'. + temp2-currencyname = 'Portuguese Escudo (Old --> EUR)'. + temp2-currencyshortname = 'Escudo'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'PYG'. + temp2-currencyname = 'Paraguayan Guarani'. + temp2-currencyshortname = 'Guarani'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'QAR'. + temp2-currencyname = 'Qatar Rial'. + temp2-currencyshortname = 'Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RMB'. + temp2-currencyname = 'Chinese Yuan Renminbi'. + temp2-currencyshortname = 'Yuan Renminbi'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ROL'. + temp2-currencyname = 'Romanian Leu (Old)'. + temp2-currencyshortname = 'Leu (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RON'. + temp2-currencyname = 'Romanian Leu'. + temp2-currencyshortname = 'Leu'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RSD'. + temp2-currencyname = 'Serbian Dinar'. + temp2-currencyshortname = 'Serbian Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RUB'. + temp2-currencyname = 'Russian Ruble'. + temp2-currencyshortname = 'Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'RWF'. + temp2-currencyname = 'Rwandan Franc'. + temp2-currencyshortname = 'Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SAR'. + temp2-currencyname = 'Saudi Riyal'. + temp2-currencyshortname = 'Rial'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SBD'. + temp2-currencyname = 'Solomon Islands Dollar'. + temp2-currencyshortname = 'Sol.Isl.Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SCR'. + temp2-currencyname = 'Seychelles Rupee'. + temp2-currencyshortname = 'Rupee'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SDD'. + temp2-currencyname = 'Sudanese Dinar (Old)'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SDG'. + temp2-currencyname = 'Sudanese Pound'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SDP'. + temp2-currencyname = 'Sudanese Pound (until 1992)'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SEK'. + temp2-currencyname = 'Swedish Krona'. + temp2-currencyshortname = 'Swedish Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SGD'. + temp2-currencyname = 'Singapore Dollar'. + temp2-currencyshortname = 'Sing.Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SHP'. + temp2-currencyname = 'St.Helena Pound'. + temp2-currencyshortname = 'St.Helena Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SIT'. + temp2-currencyname = 'Slovenian Tolar (Old --> EUR)'. + temp2-currencyshortname = 'Tolar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SKK'. + temp2-currencyname = 'Slovakian Krona (Old --> EUR)'. + temp2-currencyshortname = 'Krona'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SLL'. + temp2-currencyname = 'Sierra Leone Leone'. + temp2-currencyshortname = 'Leone'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SOS'. + temp2-currencyname = 'Somalian Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SRD'. + temp2-currencyname = 'Surinam Dollar'. + temp2-currencyshortname = 'Surinam Doillar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SRG'. + temp2-currencyname = 'Surinam Guilder (Old)'. + temp2-currencyshortname = 'Surinam Guilder'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SSP'. + temp2-currencyname = 'South Sudanese Pound'. + temp2-currencyshortname = 'Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'STD'. + temp2-currencyname = 'Sao Tome / Principe Dobra'. + temp2-currencyshortname = 'Dobra'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SVC'. + temp2-currencyname = 'El Salvador Colon'. + temp2-currencyshortname = 'Colon'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SYP'. + temp2-currencyname = 'Syrian Pound'. + temp2-currencyshortname = 'Syrian Pound'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'SZL'. + temp2-currencyname = 'Swaziland Lilangeni'. + temp2-currencyshortname = 'Lilangeni'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'THB'. + temp2-currencyname = 'Thailand Baht'. + temp2-currencyshortname = 'Baht'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TJR'. + temp2-currencyname = 'Tajikistani Ruble (Old)'. + temp2-currencyshortname = 'Ruble'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TJS'. + temp2-currencyname = 'Tajikistani Somoni'. + temp2-currencyshortname = 'Somoni'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TMM'. + temp2-currencyname = 'Turkmenistani Manat (Old)'. + temp2-currencyshortname = 'Manat (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TMT'. + temp2-currencyname = 'Turkmenistani Manat'. + temp2-currencyshortname = 'Manat'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TND'. + temp2-currencyname = 'Tunisian Dinar'. + temp2-currencyshortname = 'Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TOP'. + temp2-currencyname = 'Tongan Pa''anga'. + temp2-currencyshortname = 'Pa''anga'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TPE'. + temp2-currencyname = 'Timor Escudo --> USD'. + temp2-currencyshortname = 'Timor Escudo'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TRL'. + temp2-currencyname = 'Turkish Lira (Old)'. + temp2-currencyshortname = 'Lira (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TRY'. + temp2-currencyname = 'Turkish Lira'. + temp2-currencyshortname = 'Lira'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TTD'. + temp2-currencyname = 'Trinidad and Tobago Dollar'. + temp2-currencyshortname = 'T.+ T. Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TWD'. + temp2-currencyname = 'New Taiwan Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'TZS'. + temp2-currencyname = 'Tanzanian Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UAH'. + temp2-currencyname = 'Ukraine Hryvnia'. + temp2-currencyshortname = 'Hryvnia'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UGX'. + temp2-currencyname = 'Ugandan Shilling'. + temp2-currencyshortname = 'Shilling'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'USD'. + temp2-currencyname = 'United States Dollar'. + temp2-currencyshortname = 'US Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'USDN'. + temp2-currencyname = '(Internal) United States Dollar (5 Dec.)'. + temp2-currencyshortname = 'US Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UYU'. + temp2-currencyname = 'Uruguayan Peso'. + temp2-currencyshortname = 'Peso'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'UZS'. + temp2-currencyname = 'Uzbekistan Som'. + temp2-currencyshortname = 'Total'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VEB'. + temp2-currencyname = 'Venezuelan Bolivar (Old)'. + temp2-currencyshortname = 'Bolivar (Old)'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VEF'. + temp2-currencyname = 'Venezuelan Bolivar'. + temp2-currencyshortname = 'Bolivar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VND'. + temp2-currencyname = 'Vietnamese Dong'. + temp2-currencyshortname = 'Dong'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'VUV'. + temp2-currencyname = 'Vanuatu Vatu'. + temp2-currencyshortname = 'Vatu'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'WST'. + temp2-currencyname = 'Samoan Tala'. + temp2-currencyshortname = 'Tala'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XAF'. + temp2-currencyname = 'Gabon CFA Franc BEAC'. + temp2-currencyshortname = 'CFA Franc BEAC'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XCD'. + temp2-currencyname = 'East Carribean Dollar'. + temp2-currencyshortname = 'Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XEU'. + temp2-currencyname = 'European Currency Unit (E.C.U.)'. + temp2-currencyshortname = 'E.C.U.'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XOF'. + temp2-currencyname = 'Benin CFA Franc BCEAO'. + temp2-currencyshortname = 'CFA Franc BCEAO'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'XPF'. + temp2-currencyname = 'CFP Franc'. + temp2-currencyshortname = 'Franc'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'YER'. + temp2-currencyname = 'Yemeni Ryal'. + temp2-currencyshortname = 'Yemeni Ryal'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'YUM'. + temp2-currencyname = 'New Yugoslavian Dinar (Old)'. + temp2-currencyshortname = 'New Dinar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZAR'. + temp2-currencyname = 'South African Rand'. + temp2-currencyshortname = 'Rand'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZMK'. + temp2-currencyname = 'Zambian Kwacha (Old)'. + temp2-currencyshortname = 'Kwacha'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZMW'. + temp2-currencyname = 'Zambian Kwacha (New)'. + temp2-currencyshortname = 'Kwacha'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZRN'. + temp2-currencyname = 'Zaire (Old)'. + temp2-currencyshortname = 'Zaire'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWD'. + temp2-currencyname = 'Zimbabwean Dollar (Old)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWL'. + temp2-currencyname = 'Zimbabwean Dollar (New)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWN'. + temp2-currencyname = 'Zimbabwean Dollar (Old)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + temp2-language = 'E'. + temp2-currency = 'ZWR'. + temp2-currencyname = 'Zimbabwean Dollar (Old)'. + temp2-currencyshortname = 'Zimbabwe Dollar'. + INSERT temp2 INTO TABLE temp1. + mt_suggestion = temp1. ENDMETHOD. @@ -276,7 +1117,8 @@ CLASS Z2UI5_CL_DEMO_APP_201 IMPLEMENTATION. IF check_initialized = abap_false. * ---------- This script will skip the frontend suggestion filtering ------------------------------ - DATA(lv_script) = ` debugger;` && |\n| && + DATA lv_script TYPE string. + lv_script = ` debugger;` && |\n| && `function setInputFIlter(){` && |\n| && ` var inp = sap.z2ui5.oView.byId('suggInput');` && |\n| && ` inp.setFilterFunction(function(sValue, oItem){` && |\n| && @@ -308,7 +1150,8 @@ CLASS Z2UI5_CL_DEMO_APP_201 IMPLEMENTATION. * +-------------------------------------------------------------------------------------------------+ * +-------------------------------------------------------------------------------------- METHOD z2ui5_on_event. - DATA lt_range TYPE RANGE OF string. + TYPES temp5 TYPE RANGE OF string. +DATA lt_range TYPE temp5. CASE client->get( )-event. WHEN 'START'. @@ -316,10 +1159,18 @@ CLASS Z2UI5_CL_DEMO_APP_201 IMPLEMENTATION. WHEN 'ON_SUGGEST'. - lt_range = VALUE #( ( sign = 'I' option = 'CP' low = `*` && input && `*` ) ). + DATA temp3 LIKE lt_range. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-sign = 'I'. + temp4-option = 'CP'. + temp4-low = `*` && input && `*`. + INSERT temp4 INTO TABLE temp3. + lt_range = temp3. CLEAR mt_suggestion_out. - LOOP AT mt_suggestion INTO DATA(ls_sugg) + DATA ls_sugg LIKE LINE OF mt_suggestion. + LOOP AT mt_suggestion INTO ls_sugg WHERE currencyname IN lt_range. INSERT ls_sugg INTO TABLE mt_suggestion_out. ENDLOOP. @@ -342,16 +1193,21 @@ CLASS Z2UI5_CL_DEMO_APP_201 IMPLEMENTATION. * +-------------------------------------------------------------------------------------- METHOD z2ui5_view_display. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Live Suggestion Event' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(grid) = page->grid( 'L6 M12 S12' + DATA grid TYPE REF TO z2ui5_cl_xml_view. + grid = page->grid( 'L6 M12 S12' )->content( 'layout' ). - DATA(input) = grid->simple_form( 'Input' + DATA input TYPE REF TO z2ui5_cl_xml_view. + input = grid->simple_form( 'Input' )->content( 'form' )->label( 'Input with value help' )->input( diff --git a/src/z2ui5_cl_demo_app_202.clas.abap b/src/z2ui5_cl_demo_app_202.clas.abap index 1daf7e96..f7b7b2c0 100644 --- a/src/z2ui5_cl_demo_app_202.clas.abap +++ b/src/z2ui5_cl_demo_app_202.clas.abap @@ -23,7 +23,8 @@ CLASS Z2UI5_CL_DEMO_APP_202 IMPLEMENTATION. METHOD display_view. - DATA(lr_view) = z2ui5_cl_xml_view=>factory( ). + DATA lr_view TYPE REF TO z2ui5_cl_xml_view. + lr_view = z2ui5_cl_xml_view=>factory( ). lr_view->_generic( name = `script` ns = `html` )->_cc_plain_xml( `sap.z2ui5.decideNextStep = (stepId, nextStepId) => {debugger;` && |\n| && @@ -34,20 +35,25 @@ CLASS Z2UI5_CL_DEMO_APP_202 IMPLEMENTATION. ` step.setNextStep(nextStep);` && |\n| && `}` ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). lr_view = lr_view->shell( )->page( id = `page_main` title = 'abap2UI5 - Demo Wizard Control' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(lr_wizard) = lr_view->wizard( id = `wiz` + DATA lr_wizard TYPE REF TO z2ui5_cl_xml_view. + lr_wizard = lr_view->wizard( id = `wiz` enablebranching = abap_true ). - DATA(lr_wiz_step1) = lr_wizard->wizard_step( title = 'STEP1' + DATA lr_wiz_step1 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step1 = lr_wizard->wizard_step( title = 'STEP1' validated = abap_true nextstep = 'STEP2' ). lr_wiz_step1->message_strip( text = 'STEP1' ). - DATA(lr_wiz_step2) = lr_wizard->wizard_step( id = 'STEP2' + DATA lr_wiz_step2 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step2 = lr_wizard->wizard_step( id = 'STEP2' title = `STEP2` validated = abap_true subsequentsteps = 'STEP22, STEP23' ). @@ -63,21 +69,24 @@ CLASS Z2UI5_CL_DEMO_APP_202 IMPLEMENTATION. press = client->_event( `STEP23` ) ). - DATA(lr_wiz_step22) = lr_wizard->wizard_step( id = `STEP22` + DATA lr_wiz_step22 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step22 = lr_wizard->wizard_step( id = `STEP22` title = `STEP2.2` validated = abap_true ). lr_wiz_step22->message_strip( text = 'STEP22' ). - DATA(lr_wiz_step23) = lr_wizard->wizard_step( id = `STEP23` + DATA lr_wiz_step23 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step23 = lr_wizard->wizard_step( id = `STEP23` title = `STEP2.3` validated = abap_true ). lr_wiz_step23->message_strip( text = 'STEP23' ). - DATA(lr_wiz_step3) = lr_wizard->wizard_step( title = `STEP3` + DATA lr_wiz_step3 TYPE REF TO z2ui5_cl_xml_view. + lr_wiz_step3 = lr_wizard->wizard_step( title = `STEP3` validated = abap_true ). lr_wiz_step3->message_strip( text = 'STEP3' ). diff --git a/src/z2ui5_cl_demo_app_205.clas.abap b/src/z2ui5_cl_demo_app_205.clas.abap index 216e8015..99ba6be1 100644 --- a/src/z2ui5_cl_demo_app_205.clas.abap +++ b/src/z2ui5_cl_demo_app_205.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_205 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Flex Box - Basic Alignment` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( )->panel( headertext = `Upper left` )->flex_box( height = `100px` alignitems = `Start` diff --git a/src/z2ui5_cl_demo_app_206.clas.abap b/src/z2ui5_cl_demo_app_206.clas.abap index 8a9fe0f6..5f5524af 100644 --- a/src/z2ui5_cl_demo_app_206.clas.abap +++ b/src/z2ui5_cl_demo_app_206.clas.abap @@ -27,13 +27,17 @@ CLASS z2ui5_cl_demo_app_206 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Text - Max Lines' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->text( text = `Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && diff --git a/src/z2ui5_cl_demo_app_207.clas.abap b/src/z2ui5_cl_demo_app_207.clas.abap index d32b0f34..d0513c53 100644 --- a/src/z2ui5_cl_demo_app_207.clas.abap +++ b/src/z2ui5_cl_demo_app_207.clas.abap @@ -26,13 +26,17 @@ CLASS Z2UI5_CL_DEMO_APP_207 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Radio Button` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vbox( class = `sapUiSmallMargin` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( class = `sapUiSmallMargin` )->label( text = `Default RadioButton use` labelfor = `GroupA` )->radio_button_group( id = `GroupA` diff --git a/src/z2ui5_cl_demo_app_208.clas.abap b/src/z2ui5_cl_demo_app_208.clas.abap index 43cd0d5e..07f1645d 100644 --- a/src/z2ui5_cl_demo_app_208.clas.abap +++ b/src/z2ui5_cl_demo_app_208.clas.abap @@ -26,13 +26,17 @@ CLASS Z2UI5_CL_DEMO_APP_208 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Radio Button Group` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vbox( class = `sapUiSmallMargin` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( class = `sapUiSmallMargin` )->label( labelfor = `rbg1` text = `An example with 'matrix' layout` )->radio_button_group( id = `rbg1` diff --git a/src/z2ui5_cl_demo_app_209.clas.abap b/src/z2ui5_cl_demo_app_209.clas.abap index 5691bef5..d1b3ce8c 100644 --- a/src/z2ui5_cl_demo_app_209.clas.abap +++ b/src/z2ui5_cl_demo_app_209.clas.abap @@ -26,13 +26,17 @@ CLASS Z2UI5_CL_DEMO_APP_209 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: InfoLabel' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->scroll_container( vertical = abap_true + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->scroll_container( vertical = abap_true height = `100%` )->flex_box( direction = `Column` alignitems = `Start` diff --git a/src/z2ui5_cl_demo_app_210.clas.abap b/src/z2ui5_cl_demo_app_210.clas.abap index 8540109b..f85d7bdc 100644 --- a/src/z2ui5_cl_demo_app_210.clas.abap +++ b/src/z2ui5_cl_demo_app_210.clas.abap @@ -26,13 +26,17 @@ CLASS Z2UI5_CL_DEMO_APP_210 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Input - Types' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = `Text` diff --git a/src/z2ui5_cl_demo_app_211.clas.abap b/src/z2ui5_cl_demo_app_211.clas.abap index 21c92f15..094216ae 100644 --- a/src/z2ui5_cl_demo_app_211.clas.abap +++ b/src/z2ui5_cl_demo_app_211.clas.abap @@ -63,33 +63,53 @@ CLASS z2ui5_cl_demo_app_211 IMPLEMENTATION. METHOD on_init. - mt_t002 = VALUE #( class = 'Z2UI5_CL_DEMO_APP_212' - ( id = '1' count = '5' table = 'Z2UI5_T003' descr = 'Table 01' icon = 'sap-icon://add' ) -* ( id = '2' count = '10' table = 'Z2UI5_T003' descr = 'Table 01' icon = 'sap-icon://add' ) - ( id = '3' count = '15' table = 'Z2UI5_T004' descr = 'Table 02' icon = 'sap-icon://accept' ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_211=>ty_t_t002. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-class = 'Z2UI5_CL_DEMO_APP_212'. + temp2-id = '1'. + temp2-count = '5'. + temp2-table = 'Z2UI5_T003'. + temp2-descr = 'Table 01'. + temp2-icon = 'sap-icon://add'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '3'. + temp2-count = '15'. + temp2-table = 'Z2UI5_T004'. + temp2-descr = 'Table 02'. + temp2-icon = 'sap-icon://accept'. + INSERT temp2 INTO TABLE temp1. + mt_t002 = temp1. mv_selectedkey = '1'. ENDMETHOD. METHOD render_main. - DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( )->shell( ). - DATA(page) = view->page( id = `page_main` + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->page( id = `page_main` title = 'Customizing' navbuttonpress = client->_event( 'BACK' ) shownavbutton = abap_true class = 'sapUiContentPadding' ). - DATA(lo_items) = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' + DATA lo_items TYPE REF TO z2ui5_cl_xml_view. + lo_items = page->icon_tab_bar( class = 'sapUiResponsiveContentPadding' selectedkey = client->_bind_edit( mv_selectedkey ) select = client->_event( val = 'ONSELECTICONTABBAR' ) )->items( ). - LOOP AT mt_t002 REFERENCE INTO DATA(line). + DATA temp3 LIKE LINE OF mt_t002. + DATA line LIKE REF TO temp3. + LOOP AT mt_t002 REFERENCE INTO line. - DATA(text) = line->descr. - DATA(with_icon) = line->icon. + DATA text LIKE line->descr. + text = line->descr. + DATA with_icon LIKE line->icon. + with_icon = line->icon. lo_items->icon_tab_filter( icon = line->icon iconcolor = 'Positive' @@ -124,7 +144,8 @@ CLASS z2ui5_cl_demo_app_211 IMPLEMENTATION. METHOD render_sub_app. - READ TABLE mt_t002 REFERENCE INTO DATA(t002) + DATA t002 TYPE REF TO z2ui5_cl_demo_app_211=>ty_s_t002. + READ TABLE mt_t002 REFERENCE INTO t002 WITH KEY id = mv_selectedkey. IF sy-subrc <> 0. @@ -146,7 +167,8 @@ CLASS z2ui5_cl_demo_app_211 IMPLEMENTATION. render_main( ). - ASSIGN mo_app->('MO_PARENT_VIEW') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MO_PARENT_VIEW') TO . IF IS ASSIGNED. = mo_main_page. ENDIF. @@ -160,14 +182,16 @@ CLASS z2ui5_cl_demo_app_211 IMPLEMENTATION. ENDCASE. - ASSIGN mo_app->('MV_VIEW_DISPLAY') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MV_VIEW_DISPLAY') TO . IF = abap_true. = abap_false. client->view_display( mo_main_page->stringify( ) ). ENDIF. - ASSIGN mo_app->('MV_VIEW_MODEL_UPDATE') TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN mo_app->('MV_VIEW_MODEL_UPDATE') TO . IF = abap_true. = abap_false. diff --git a/src/z2ui5_cl_demo_app_212.clas.abap b/src/z2ui5_cl_demo_app_212.clas.abap index 9c58db60..e23dafbd 100644 --- a/src/z2ui5_cl_demo_app_212.clas.abap +++ b/src/z2ui5_cl_demo_app_212.clas.abap @@ -75,8 +75,10 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. METHOD row_select. - DATA(lt_arg) = client->get( )-t_event_arg. - READ TABLE lt_arg INTO DATA(ls_arg) INDEX 1. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. + DATA ls_arg TYPE string. + READ TABLE lt_arg INTO ls_arg INDEX 1. IF sy-subrc <> 0. RETURN. @@ -94,17 +96,21 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. ASSIGN mt_table->* TO . - ASSIGN [ index ] TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + READ TABLE INDEX index ASSIGNING . IF sy-subrc <> 0. RETURN. ENDIF. - LOOP AT mt_dfies INTO DATA(dfies). + DATA dfies LIKE LINE OF mt_dfies. + LOOP AT mt_dfies INTO dfies. - ASSIGN COMPONENT dfies-fieldname OF STRUCTURE TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT dfies-fieldname OF STRUCTURE TO . ASSIGN ms_table_row->* TO . - ASSIGN COMPONENT dfies-fieldname OF STRUCTURE TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT dfies-fieldname OF STRUCTURE TO . IF IS ASSIGNED AND IS ASSIGNED. = . @@ -123,18 +129,23 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. FIELD-SYMBOLS TYPE any. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). - DATA(content) = popup->dialog( contentwidth = '60%' + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = popup->dialog( contentwidth = '60%' )->simple_form( layout = 'ResponsiveGridLayout' editable = abap_true )->content( ns = 'form' ). " Gehe über alle Comps wenn wir im Edit sind dann sind keyfelder nicht eingabebereit. - LOOP AT mt_dfies REFERENCE INTO DATA(dfies). + DATA temp1 LIKE LINE OF mt_dfies. + DATA dfies LIKE REF TO temp1. + LOOP AT mt_dfies REFERENCE INTO dfies. ASSIGN ms_table_row->* TO . - ASSIGN COMPONENT dfies->fieldname OF STRUCTURE TO FIELD-SYMBOL(). + FIELD-SYMBOLS TYPE any. + ASSIGN COMPONENT dfies->fieldname OF STRUCTURE TO . IF IS NOT ASSIGNED. CONTINUE. ENDIF. @@ -174,19 +185,22 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. FIELD-SYMBOLS TYPE data. IF mo_parent_view IS INITIAL. - DATA(page) = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( ). ELSE. page = mo_parent_view->get( `Page` ). ENDIF. ASSIGN mt_table->* TO . - DATA(table) = page->table( growing = 'true' + DATA table TYPE REF TO z2ui5_cl_xml_view. + table = page->table( growing = 'true' width = 'auto' items = client->_bind_edit( val = ) ). " TODO: variable is assigned but never used (ABAP cleaner) - DATA(headder) = table->header_toolbar( + DATA headder TYPE REF TO z2ui5_cl_xml_view. + headder = table->header_toolbar( )->overflow_toolbar( )->toolbar_spacer( ). @@ -235,9 +249,11 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. TRY. - DATA(new_struct_desc) = cl_abap_structdescr=>create( mt_comp ). + DATA new_struct_desc TYPE REF TO cl_abap_structdescr. + new_struct_desc = cl_abap_structdescr=>create( mt_comp ). - DATA(new_table_desc) = cl_abap_tabledescr=>create( p_line_type = new_struct_desc + DATA new_table_desc TYPE REF TO cl_abap_tabledescr. + new_table_desc = cl_abap_tabledescr=>create( p_line_type = new_struct_desc p_table_kind = cl_abap_tabledescr=>tablekind_std ). CREATE DATA mt_table TYPE HANDLE new_table_desc. @@ -248,7 +264,7 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. SELECT * FROM (mv_table) - INTO CORRESPONDING FIELDS OF TABLE @
+ INTO CORRESPONDING FIELDS OF TABLE
UP TO 100 ROWS. CATCH cx_root. @@ -268,15 +284,21 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. TRY. TRY. + DATA typedesc TYPE REF TO cl_abap_typedescr. cl_abap_typedescr=>describe_by_name( EXPORTING p_name = mv_table - RECEIVING p_descr_ref = DATA(typedesc) + RECEIVING p_descr_ref = typedesc EXCEPTIONS type_not_found = 1 OTHERS = 2 ). - DATA(structdesc) = CAST cl_abap_structdescr( typedesc ). - DATA(comp) = structdesc->get_components( ). + DATA temp2 TYPE REF TO cl_abap_structdescr. + temp2 ?= typedesc. + DATA structdesc LIKE temp2. + structdesc = temp2. + DATA comp TYPE abap_component_tab. + comp = structdesc->get_components( ). - LOOP AT comp INTO DATA(com). + DATA com LIKE LINE OF comp. + LOOP AT comp INTO com. IF com-as_include = abap_false. APPEND com TO result. ENDIF. @@ -286,9 +308,16 @@ CLASS z2ui5_cl_demo_app_212 IMPLEMENTATION. ENDTRY. - DATA(component) = VALUE cl_abap_structdescr=>component_table( - ( name = 'ROW_ID' - type = CAST #( cl_abap_datadescr=>describe_by_data( index ) ) ) ). + DATA temp3 TYPE cl_abap_structdescr=>component_table. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-name = 'ROW_ID'. + DATA temp1 TYPE REF TO cl_abap_datadescr. + temp1 ?= cl_abap_datadescr=>describe_by_data( index ). + temp4-type = temp1. + INSERT temp4 INTO TABLE temp3. + DATA component LIKE temp3. + component = temp3. APPEND LINES OF component TO result. diff --git a/src/z2ui5_cl_demo_app_213.clas.abap b/src/z2ui5_cl_demo_app_213.clas.abap index ceac88e6..df2c9ed9 100644 --- a/src/z2ui5_cl_demo_app_213.clas.abap +++ b/src/z2ui5_cl_demo_app_213.clas.abap @@ -26,13 +26,17 @@ CLASS Z2UI5_CL_DEMO_APP_213 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Input - Password' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = `Password` labelfor = `passwordInput` ). diff --git a/src/z2ui5_cl_demo_app_214.clas.abap b/src/z2ui5_cl_demo_app_214.clas.abap index c77afc80..065820ae 100644 --- a/src/z2ui5_cl_demo_app_214.clas.abap +++ b/src/z2ui5_cl_demo_app_214.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_214 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Standalone Icon Tab Header' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->icon_tab_header( mode = `Inline` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->icon_tab_header( mode = `Inline` )->items( )->icon_tab_filter( key = `info` text = `Info` )->get_parent( diff --git a/src/z2ui5_cl_demo_app_215.clas.abap b/src/z2ui5_cl_demo_app_215.clas.abap index de4e8ee7..118001ac 100644 --- a/src/z2ui5_cl_demo_app_215.clas.abap +++ b/src/z2ui5_cl_demo_app_215.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_215 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Busy Indicator' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->busy_indicator( text = `... something is happening` class = `sapUiTinyMarginBottom` ). diff --git a/src/z2ui5_cl_demo_app_216.clas.abap b/src/z2ui5_cl_demo_app_216.clas.abap index d29d5c80..ef42ceae 100644 --- a/src/z2ui5_cl_demo_app_216.clas.abap +++ b/src/z2ui5_cl_demo_app_216.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_216 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Action List Item' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->list( headertext = `Actions` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->list( headertext = `Actions` )->action_list_item( text = `Reject` )->get_parent( )->action_list_item( text = `Accept` )->get_parent( )->action_list_item( text = `Email` )->get_parent( diff --git a/src/z2ui5_cl_demo_app_217.clas.abap b/src/z2ui5_cl_demo_app_217.clas.abap index 823b8709..577ae614 100644 --- a/src/z2ui5_cl_demo_app_217.clas.abap +++ b/src/z2ui5_cl_demo_app_217.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_217 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Placing a Title in OverflowToolbar/Toolbar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->overflow_toolbar( design = `Transparent` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->overflow_toolbar( design = `Transparent` height = `3rem` )->title( text = `Title Only` ). page->overflow_toolbar( design = `Transparent` diff --git a/src/z2ui5_cl_demo_app_218.clas.abap b/src/z2ui5_cl_demo_app_218.clas.abap index ab7b06f3..c9e7e27b 100644 --- a/src/z2ui5_cl_demo_app_218.clas.abap +++ b/src/z2ui5_cl_demo_app_218.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_218 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Flex Box - Opposing Alignment` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->panel( headertext = `Horizontally opposing flex items` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->panel( headertext = `Horizontally opposing flex items` )->flex_box( alignitems = `Start` justifycontent = `SpaceBetween` )->button( text = `1` diff --git a/src/z2ui5_cl_demo_app_219.clas.abap b/src/z2ui5_cl_demo_app_219.clas.abap index 144d0360..ecef23c8 100644 --- a/src/z2ui5_cl_demo_app_219.clas.abap +++ b/src/z2ui5_cl_demo_app_219.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_219 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Input List Item' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->list( headertext = `Input` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->list( headertext = `Input` )->input_list_item( label = `WLAN` )->switch( state = `true` )->get_parent( )->input_list_item( label = `Flight Mode` diff --git a/src/z2ui5_cl_demo_app_220.clas.abap b/src/z2ui5_cl_demo_app_220.clas.abap index 8bf5b717..2122cada 100644 --- a/src/z2ui5_cl_demo_app_220.clas.abap +++ b/src/z2ui5_cl_demo_app_220.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_220 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Rating Indicator' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` ). + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` ). layout->label( text = `Rating Indicator default size` labelfor = `RI_default` ). layout->rating_indicator( id = `RI_default` diff --git a/src/z2ui5_cl_demo_app_221.clas.abap b/src/z2ui5_cl_demo_app_221.clas.abap index b4fd904c..ab666072 100644 --- a/src/z2ui5_cl_demo_app_221.clas.abap +++ b/src/z2ui5_cl_demo_app_221.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_221 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Icon Tab Bar - Icons Only' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->icon_tab_bar( id = `idIconTabBarMulti` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->icon_tab_bar( id = `idIconTabBarMulti` expanded = `{device>/isNoPhone}` class = `sapUiResponsiveContentPadding` )->items( diff --git a/src/z2ui5_cl_demo_app_222.clas.abap b/src/z2ui5_cl_demo_app_222.clas.abap index 7ba2bb95..1a99cfa8 100644 --- a/src/z2ui5_cl_demo_app_222.clas.abap +++ b/src/z2ui5_cl_demo_app_222.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_222 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Icon Tab Bar - Text and Count' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->icon_tab_bar( id = `idIconTabBarFiori2` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->icon_tab_bar( id = `idIconTabBarFiori2` expanded = `{device>/isNoPhone}` class = `sapUiResponsiveContentPadding` )->items( diff --git a/src/z2ui5_cl_demo_app_223.clas.abap b/src/z2ui5_cl_demo_app_223.clas.abap index 44169c12..23e8714f 100644 --- a/src/z2ui5_cl_demo_app_223.clas.abap +++ b/src/z2ui5_cl_demo_app_223.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_223 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Icon Tab Bar - Inline Mode' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->icon_tab_bar( id = `idIconTabBarInlineMode` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->icon_tab_bar( id = `idIconTabBarInlineMode` headermode = `Inline` expanded = `{device>/isNoPhone}` class = `sapUiResponsiveContentPadding` diff --git a/src/z2ui5_cl_demo_app_224.clas.abap b/src/z2ui5_cl_demo_app_224.clas.abap index 39d6e0ce..2f3dc4b3 100644 --- a/src/z2ui5_cl_demo_app_224.clas.abap +++ b/src/z2ui5_cl_demo_app_224.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_224 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'Sample: Icon Tab Bar - Text Only' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->icon_tab_bar( id = `idIconTabBarNoIcons` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->icon_tab_bar( id = `idIconTabBarNoIcons` expanded = `{device>/isNoPhone}` class = `sapUiResponsiveContentPadding` )->items( diff --git a/src/z2ui5_cl_demo_app_225.clas.abap b/src/z2ui5_cl_demo_app_225.clas.abap index 39edfde9..1df170c7 100644 --- a/src/z2ui5_cl_demo_app_225.clas.abap +++ b/src/z2ui5_cl_demo_app_225.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_225 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Icon Tab Bar - Separator' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->label( wrapping = `true` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->label( wrapping = `true` text = `No icon(='') used as separator, the separator will be a vertical line.` class = `sapUiSmallMargin` ). diff --git a/src/z2ui5_cl_demo_app_226.clas.abap b/src/z2ui5_cl_demo_app_226.clas.abap index 7ac1cf76..ebcaed87 100644 --- a/src/z2ui5_cl_demo_app_226.clas.abap +++ b/src/z2ui5_cl_demo_app_226.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_226 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Icon Tab Bar - Sub tabs' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->label( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->label( wrapping = `true` text = `IconTabBar with filters with own content and sub tabs. The click area is split to allow the user to display the content or alternatively to expand/collapse the sub tabs.` class = `sapUiSmallMargin` ). diff --git a/src/z2ui5_cl_demo_app_227.clas.abap b/src/z2ui5_cl_demo_app_227.clas.abap index ff766197..cfad1a05 100644 --- a/src/z2ui5_cl_demo_app_227.clas.abap +++ b/src/z2ui5_cl_demo_app_227.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_227 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Page, Toolbar and Bar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(page_02) = page_01->page( title = `Title` + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( title = `Title` class = `sapUiContentPadding sapUiResponsivePadding--header sapUiResponsivePadding--subHeader sapUiResponsivePadding--content sapUiResponsivePadding--footer` shownavbutton = `true` )->header_content( diff --git a/src/z2ui5_cl_demo_app_228.clas.abap b/src/z2ui5_cl_demo_app_228.clas.abap index f1766624..94decf22 100644 --- a/src/z2ui5_cl_demo_app_228.clas.abap +++ b/src/z2ui5_cl_demo_app_228.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_228 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Numeric Content Without Margins' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->label( text = `Numeric content with margins` ). + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->label( text = `Numeric content with margins` ). layout->numeric_content( value = `65.5` scale = `MM` class = `sapUiSmallMargin` diff --git a/src/z2ui5_cl_demo_app_229.clas.abap b/src/z2ui5_cl_demo_app_229.clas.abap index 94b3d95c..19f3c78b 100644 --- a/src/z2ui5_cl_demo_app_229.clas.abap +++ b/src/z2ui5_cl_demo_app_229.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_229 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: ComboBox - Suggestions wrapping' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = `Product` labelfor = `wrappingComboBox` ). diff --git a/src/z2ui5_cl_demo_app_230.clas.abap b/src/z2ui5_cl_demo_app_230.clas.abap index 2e0793e8..787b38d4 100644 --- a/src/z2ui5_cl_demo_app_230.clas.abap +++ b/src/z2ui5_cl_demo_app_230.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_230 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Segmented Button in Input List Item' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->list( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->list( headertext = `Input List Item` )->input_list_item( label = `Battery Saving` )->segmented_button( selected_key = `SBYes` diff --git a/src/z2ui5_cl_demo_app_231.clas.abap b/src/z2ui5_cl_demo_app_231.clas.abap index 6d43048b..df1060d4 100644 --- a/src/z2ui5_cl_demo_app_231.clas.abap +++ b/src/z2ui5_cl_demo_app_231.clas.abap @@ -45,15 +45,23 @@ CLASS z2ui5_cl_demo_app_231 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - - view->_generic_property( VALUE #( n = `core:require` v = `{Helper:'z2ui5/Util'}` ) ). - - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + + DATA temp1 TYPE z2ui5_if_types=>ty_s_name_value. + CLEAR temp1. + temp1-n = `core:require`. + temp1-v = `{Helper:'z2ui5/Util'}`. + view->_generic_property( temp1 ). + + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Sample: Date Range Selection' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp3 ). page->header_content( )->link( @@ -61,56 +69,72 @@ CLASS z2ui5_cl_demo_app_231 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.DateRangeSelection/sample/sap.m.sample.DateRangeSelection' ). - DATA(vbox) = page->vbox( ). + DATA vbox TYPE REF TO z2ui5_cl_xml_view. + vbox = page->vbox( ). " DRS1 + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `DRS2` INTO TABLE temp2. vbox->label( text = `DateRangeSelection displayFormat 'yyyy/MM/dd', set via binding:` labelfor = `DRS1` )->date_range_selection( id = 'DRS1' displayformat = 'yyyy/MM/dd' - change = client->_event( val = 'handleChange' t_arg = VALUE #( ( `DRS2` ) ) ) + change = client->_event( val = 'handleChange' t_arg = temp2 ) datevalue = `{= Helper.DateCreateObject($` && client->_bind( drs1-start ) && ') }' seconddatevalue = `{= Helper.DateCreateObject($` && client->_bind( drs1-end ) && ') }' ). " DRS2 + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `DRS2` INTO TABLE temp4. vbox->label( text = `DateRangeSelection with minDate=2016-01-01 and maxDate=2016-12-31:` labelfor = `DRS2` )->date_range_selection( id = 'DRS2' mindate = `{= Helper.DateCreateObject($` && client->_bind( mindate ) && ') }' maxdate = `{= Helper.DateCreateObject($` && client->_bind( maxdate ) && ') }' - change = client->_event( val = 'handleChange' t_arg = VALUE #( ( `DRS2` ) ) ) + change = client->_event( val = 'handleChange' t_arg = temp4 ) datevalue = `{= Helper.DateCreateObject($` && client->_bind( drs2-start ) && ') }' seconddatevalue = `{= Helper.DateCreateObject($` && client->_bind( drs2-end ) && ') }' ). " DRS3 + DATA temp6 TYPE string_table. + CLEAR temp6. + INSERT `DRS3` INTO TABLE temp6. vbox->label( text = `DateRangeSelection with OK button in the footer and with shortcut for today:"` labelfor = `DRS3` )->date_range_selection( id = 'DRS3' showcurrentdatebutton = abap_true showfooter = abap_true - change = client->_event( val = 'handleChange' t_arg = VALUE #( ( `DRS3` ) ) ) + change = client->_event( val = 'handleChange' t_arg = temp6 ) datevalue = `{= Helper.DateCreateObject($` && client->_bind( drs3-start ) && ') }' seconddatevalue = `{= Helper.DateCreateObject($` && client->_bind( drs3-end ) && ') }' ). " DRS4 + DATA temp8 TYPE string_table. + CLEAR temp8. + INSERT `DRS4` INTO TABLE temp8. vbox->label( text = `DateRangeSelection with displayFormat 'MM/yyyy':` labelfor = `DRS3` )->date_range_selection( id = 'DRS4' - change = client->_event( val = 'handleChange' t_arg = VALUE #( ( `DRS4` ) ) ) + change = client->_event( val = 'handleChange' t_arg = temp8 ) displayformat = 'MM/yyyy' datevalue = `{= Helper.DateCreateObject($` && client->_bind( drs4-start ) && ') }' seconddatevalue = `{= Helper.DateCreateObject($` && client->_bind( drs4-end ) && ') }' ). " DRS5 + DATA temp10 TYPE string_table. + CLEAR temp10. + INSERT `DRS5` INTO TABLE temp10. vbox->label( text = `DateRangeSelection with displayFormat 'MM/yyyy':` labelfor = `DRS3` )->date_range_selection( id = 'DRS5' - change = client->_event( val = 'handleChange' t_arg = VALUE #( ( `DRS5` ) ) ) + change = client->_event( val = 'handleChange' t_arg = temp10 ) displayformat = 'yyyy' datevalue = `{= Helper.DateCreateObject($` && client->_bind( drs5-start ) && ') }' seconddatevalue = `{= Helper.DateCreateObject($` && client->_bind( drs5-end ) && ') }' ). @@ -152,12 +176,27 @@ CLASS z2ui5_cl_demo_app_231 IMPLEMENTATION. client->nav_app_leave( ). WHEN 'handleChange'. - DATA(args) = client->get( )-t_event_arg. - DATA(source) = args[ 1 ]. - - ASSIGN me->(source) TO FIELD-SYMBOL(). - - DATA(drs) = CORRESPONDING t_drs( ). + DATA args TYPE string_table. + args = client->get( )-t_event_arg. + DATA source LIKE LINE OF args. + DATA temp1 LIKE LINE OF args. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE args INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + source = temp1. + + FIELD-SYMBOLS TYPE any. + ASSIGN me->(source) TO . + + DATA temp12 TYPE t_drs. + CLEAR temp12. + MOVE-CORRESPONDING TO temp12. + DATA drs LIKE temp12. + drs = temp12. text = |Id: { source }\n| && |From: { drs-start }\n| diff --git a/src/z2ui5_cl_demo_app_232.clas.abap b/src/z2ui5_cl_demo_app_232.clas.abap index 5018817b..2cfbcaa6 100644 --- a/src/z2ui5_cl_demo_app_232.clas.abap +++ b/src/z2ui5_cl_demo_app_232.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_232 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'Sample: MultiInput - Suggestions wrapping' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = `Product` labelfor = `wrappingMultiInput` ). diff --git a/src/z2ui5_cl_demo_app_233.clas.abap b/src/z2ui5_cl_demo_app_233.clas.abap index 5c67ce75..07677cc9 100644 --- a/src/z2ui5_cl_demo_app_233.clas.abap +++ b/src/z2ui5_cl_demo_app_233.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_233 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'Sample: MultiComboBox - Suggestions wrapping' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = `Product` diff --git a/src/z2ui5_cl_demo_app_234.clas.abap b/src/z2ui5_cl_demo_app_234.clas.abap index 7c6608bd..7e32638e 100644 --- a/src/z2ui5_cl_demo_app_234.clas.abap +++ b/src/z2ui5_cl_demo_app_234.clas.abap @@ -27,13 +27,17 @@ CLASS z2ui5_cl_demo_app_234 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: TextArea - Value States' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` )->content( ns = `layout` diff --git a/src/z2ui5_cl_demo_app_235.clas.abap b/src/z2ui5_cl_demo_app_235.clas.abap index 6a970226..b521e3e3 100644 --- a/src/z2ui5_cl_demo_app_235.clas.abap +++ b/src/z2ui5_cl_demo_app_235.clas.abap @@ -26,13 +26,17 @@ CLASS z2ui5_cl_demo_app_235 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Toolbar vs Bar vs OverflowToolbar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(page_02) = page_01->page( + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( title = `Bar can center a Title.` titlelevel = `H2` class = `sapUiContentPadding` diff --git a/src/z2ui5_cl_demo_app_236.clas.abap b/src/z2ui5_cl_demo_app_236.clas.abap index 3af302bd..6e97318f 100644 --- a/src/z2ui5_cl_demo_app_236.clas.abap +++ b/src/z2ui5_cl_demo_app_236.clas.abap @@ -27,13 +27,17 @@ CLASS z2ui5_cl_demo_app_236 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: TextArea - Growing' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(layout) = page->vertical_layout( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` )->content( ns = `layout` diff --git a/src/z2ui5_cl_demo_app_237.clas.abap b/src/z2ui5_cl_demo_app_237.clas.abap index 0c707f03..64f0628c 100644 --- a/src/z2ui5_cl_demo_app_237.clas.abap +++ b/src/z2ui5_cl_demo_app_237.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_237 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Slider' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->header_content( )->button( id = `hint_icon` icon = `sap-icon://hint` @@ -43,7 +46,8 @@ CLASS z2ui5_cl_demo_app_237 IMPLEMENTATION. press = client->_event( 'POPOVER' ) )->get_parent( ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` )->text( text = `Slider without text field` class = `sapUiSmallMarginBottom` @@ -134,7 +138,8 @@ CLASS z2ui5_cl_demo_app_237 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` )->quick_view_page( pageid = `sampleInformationId` header = `Sample information` diff --git a/src/z2ui5_cl_demo_app_238.clas.abap b/src/z2ui5_cl_demo_app_238.clas.abap index b18917e6..c33721e4 100644 --- a/src/z2ui5_cl_demo_app_238.clas.abap +++ b/src/z2ui5_cl_demo_app_238.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_238 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Message Strip' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_238 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.MessageStrip/sample/sap.m.sample.MessageStrip' ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->message_strip( text = `Default (Information) with default icon and close button:` @@ -114,7 +118,8 @@ CLASS z2ui5_cl_demo_app_238 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` )->quick_view_page( pageid = `sampleInformationId` header = `Sample information` diff --git a/src/z2ui5_cl_demo_app_239.clas.abap b/src/z2ui5_cl_demo_app_239.clas.abap index 72be153d..ac332b5d 100644 --- a/src/z2ui5_cl_demo_app_239.clas.abap +++ b/src/z2ui5_cl_demo_app_239.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_239 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Check Box' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_239 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.CheckBox/sample/sap.m.sample.CheckBox' ). - DATA(layout) = page->vbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( )->checkbox( text = `Option a` selected = abap_true )->checkbox( text = `Option b` @@ -131,7 +135,8 @@ CLASS z2ui5_cl_demo_app_239 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_240.clas.abap b/src/z2ui5_cl_demo_app_240.clas.abap index 90aee3c9..f5de16d1 100644 --- a/src/z2ui5_cl_demo_app_240.clas.abap +++ b/src/z2ui5_cl_demo_app_240.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_240 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Switch` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_240 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Switch/sample/sap.m.sample.Switch' ). - DATA(layout) = page->vbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( class = `sapUiSmallMargin` )->hbox( )->switch( state = abap_true )->get( @@ -129,7 +133,8 @@ CLASS z2ui5_cl_demo_app_240 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_241.clas.abap b/src/z2ui5_cl_demo_app_241.clas.abap index aaf26512..ffeea815 100644 --- a/src/z2ui5_cl_demo_app_241.clas.abap +++ b/src/z2ui5_cl_demo_app_241.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_241 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Tile Content' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_241 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.TileContent/sample/sap.m.sample.TileContent' ). - DATA(layout) = page->grid( containerquery = abap_true + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->grid( containerquery = abap_true class = `sapUiSmallMarginTop` )->tile_content( footer = `Current Quarter` unit = `EUR` "class = `sapUiSmallMargin` @@ -94,7 +98,8 @@ CLASS z2ui5_cl_demo_app_241 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_242.clas.abap b/src/z2ui5_cl_demo_app_242.clas.abap index a31d6e1c..cf599bd8 100644 --- a/src/z2ui5_cl_demo_app_242.clas.abap +++ b/src/z2ui5_cl_demo_app_242.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_242 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: HTML' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -50,7 +53,8 @@ CLASS z2ui5_cl_demo_app_242 IMPLEMENTATION. href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.core.HTML/sample/sap.ui.core.sample.Html' ). - DATA(layout) = page->vertical_layout( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` )->content( ns = `layout` @@ -80,7 +84,8 @@ CLASS z2ui5_cl_demo_app_242 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_243.clas.abap b/src/z2ui5_cl_demo_app_243.clas.abap index 456aa233..e6b3e481 100644 --- a/src/z2ui5_cl_demo_app_243.clas.abap +++ b/src/z2ui5_cl_demo_app_243.clas.abap @@ -26,18 +26,22 @@ CLASS z2ui5_cl_demo_app_243 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Negative Margins' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 )->page( showheader = `false` class = `sapUiContentPadding` )->sub_header( )->toolbar( design = `Info` )->icon( src = `sap-icon://begin` )->text( text = `This sample demonstrates classes which let you to add negative margin at two opposite sides (begin/end).` )->get_parent( )->get_parent( ). - DATA(layout) = page->panel( class = `sapUiTinyNegativeMarginBeginEnd` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->panel( class = `sapUiTinyNegativeMarginBeginEnd` )->content( )->text( text = `This panel uses margin class 'sapUiTinyNegativeMarginBeginEnd' to add a -0.5rem space at the panel's left and right sides.` class = `sapMH4FontSize` )->get_parent( )->get_parent( diff --git a/src/z2ui5_cl_demo_app_244.clas.abap b/src/z2ui5_cl_demo_app_244.clas.abap index 82705471..1e645d1b 100644 --- a/src/z2ui5_cl_demo_app_244.clas.abap +++ b/src/z2ui5_cl_demo_app_244.clas.abap @@ -32,7 +32,8 @@ CLASS z2ui5_cl_demo_app_244 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.sapUiDemoFlexBoxSizeAdjustments .sapMFlexItem {` && + DATA css TYPE string. + css = `.sapUiDemoFlexBoxSizeAdjustments .sapMFlexItem {` && ` border: 1px dashed #000;` && ` margin: 0.1875rem;` && ` padding: 0.1875rem;` && @@ -44,15 +45,19 @@ CLASS z2ui5_cl_demo_app_244 IMPLEMENTATION. ` position: relative;` && `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Flex Box - Size Adjustments` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -66,7 +71,8 @@ CLASS z2ui5_cl_demo_app_244 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxSizeAdjustments' ). - DATA(layout) = page->vbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( )->panel( headertext = `Equal flexibility and content` class = `sapUiDemoFlexBoxSizeAdjustments` )->flex_box( alignitems = `Start` @@ -189,7 +195,8 @@ CLASS z2ui5_cl_demo_app_244 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_245.clas.abap b/src/z2ui5_cl_demo_app_245.clas.abap index c88ec954..d949092f 100644 --- a/src/z2ui5_cl_demo_app_245.clas.abap +++ b/src/z2ui5_cl_demo_app_245.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_245 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Flex Box - Direction & Order` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_245 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxDirectionOrder' ). - DATA(layout) = page->vbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( )->panel( headertext = `Reverse, horizontal` )->flex_box( direction = `RowReverse` alignitems = `Start` @@ -114,7 +118,8 @@ CLASS z2ui5_cl_demo_app_245 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_246.clas.abap b/src/z2ui5_cl_demo_app_246.clas.abap index 2457736d..61273bb9 100644 --- a/src/z2ui5_cl_demo_app_246.clas.abap +++ b/src/z2ui5_cl_demo_app_246.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_246 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Input - Suggestions wrapping' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_246 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Input/sample/sap.m.sample.InputWrapping' ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->label( text = `Product` labelfor = `wrappingInput` ). @@ -90,7 +94,8 @@ CLASS z2ui5_cl_demo_app_246 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_247.clas.abap b/src/z2ui5_cl_demo_app_247.clas.abap index 692a0748..dacb85df 100644 --- a/src/z2ui5_cl_demo_app_247.clas.abap +++ b/src/z2ui5_cl_demo_app_247.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_247 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Splitter Layout - 2 areas' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_247 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.layout.Splitter/sample/sap.ui.layout.sample.Splitter2' ). - DATA(layout) = page->splitter( height = `500px` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->splitter( height = `500px` )->button( width = `100%` text = `Content 1` )->get( )->layout_data( @@ -78,7 +82,8 @@ CLASS z2ui5_cl_demo_app_247 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_248.clas.abap b/src/z2ui5_cl_demo_app_248.clas.abap index de5f1b75..d10d38c4 100644 --- a/src/z2ui5_cl_demo_app_248.clas.abap +++ b/src/z2ui5_cl_demo_app_248.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_248 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Splitter Layout - 2 non-resizable areas' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_248 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.layout.Splitter/sample/sap.ui.layout.sample.Splitter3' ). - DATA(layout) = page->splitter( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->splitter( )->text( text = `Content 1` )->get( )->layout_data( )->splitter_layout_data( size = `30%` @@ -77,7 +81,8 @@ CLASS z2ui5_cl_demo_app_248 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_249.clas.abap b/src/z2ui5_cl_demo_app_249.clas.abap index 78c265d0..044f53cd 100644 --- a/src/z2ui5_cl_demo_app_249.clas.abap +++ b/src/z2ui5_cl_demo_app_249.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_249 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Splitter Layout - 3 areas' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_249 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.layout.Splitter/sample/sap.ui.layout.sample.Splitter4' ). - DATA(layout) = page->splitter( height = `500px` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->splitter( height = `500px` width = `100%` )->button( width = `100%` text = `Content 1` )->get( @@ -84,7 +88,8 @@ CLASS z2ui5_cl_demo_app_249 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_250.clas.abap b/src/z2ui5_cl_demo_app_250.clas.abap index 14a32446..d0c5ced4 100644 --- a/src/z2ui5_cl_demo_app_250.clas.abap +++ b/src/z2ui5_cl_demo_app_250.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_250 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: OverflowToolbar - Alignment' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_250 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.OverflowToolbar/sample/sap.m.sample.ToolbarAlignment' ). - DATA(page_02) = page_01->page( + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( )->invisible_text( ns = `core` id = `inputLabel` text = `Input label` )->get_parent( @@ -138,7 +142,8 @@ CLASS z2ui5_cl_demo_app_250 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_251.clas.abap b/src/z2ui5_cl_demo_app_251.clas.abap index a49f1bb4..2fe72972 100644 --- a/src/z2ui5_cl_demo_app_251.clas.abap +++ b/src/z2ui5_cl_demo_app_251.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_251 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Input - Description' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_251 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Input/sample/sap.m.sample.InputDescription' ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). layout->input( value = `10` @@ -107,7 +111,8 @@ CLASS z2ui5_cl_demo_app_251 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_252.clas.abap b/src/z2ui5_cl_demo_app_252.clas.abap index 7e39d35d..030f22b9 100644 --- a/src/z2ui5_cl_demo_app_252.clas.abap +++ b/src/z2ui5_cl_demo_app_252.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_252 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Flex Box - Render Type' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( @@ -50,7 +53,8 @@ CLASS z2ui5_cl_demo_app_252 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxRenderType' ). - DATA(layout) = page->vbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( )->panel( headertext = `Render Type - Div` )->flex_box( rendertype = `Div` )->button( text = `Some text` @@ -102,7 +106,8 @@ CLASS z2ui5_cl_demo_app_252 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_253.clas.abap b/src/z2ui5_cl_demo_app_253.clas.abap index 07b40ea8..18fb2670 100644 --- a/src/z2ui5_cl_demo_app_253.clas.abap +++ b/src/z2ui5_cl_demo_app_253.clas.abap @@ -31,7 +31,8 @@ CLASS z2ui5_cl_demo_app_253 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.equalColumns .columns {` && + DATA css TYPE string. + css = `.equalColumns .columns {` && ` min-height: 200px;` && `}` && `` && @@ -39,15 +40,19 @@ CLASS z2ui5_cl_demo_app_253 IMPLEMENTATION. ` padding: 0.5rem;` && `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Flex Box - Equal Height Cols` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -61,7 +66,8 @@ CLASS z2ui5_cl_demo_app_253 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxCols' ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding equalColumns` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding equalColumns` width = `100%` )->flex_box( class = `columns` )->text( text = `Although they have different amounts of text, both columns are of equal height.` )->get( @@ -102,7 +108,8 @@ CLASS z2ui5_cl_demo_app_253 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_254.clas.abap b/src/z2ui5_cl_demo_app_254.clas.abap index 219f1612..488e7688 100644 --- a/src/z2ui5_cl_demo_app_254.clas.abap +++ b/src/z2ui5_cl_demo_app_254.clas.abap @@ -31,7 +31,8 @@ CLASS z2ui5_cl_demo_app_254 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.nestedFlexboxes .item1 {` && + DATA css TYPE string. + css = `.nestedFlexboxes .item1 {` && ` padding: 1rem;` && ` background-color: #d1dbbd;` && `}` && @@ -59,15 +60,19 @@ CLASS z2ui5_cl_demo_app_254 IMPLEMENTATION. ` color: #32363a;` && `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Flex Box - Nested` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -81,7 +86,8 @@ CLASS z2ui5_cl_demo_app_254 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxNested' ). - DATA(layout) = page->hbox( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->hbox( fitcontainer = `abap_true` alignitems = `Stretch` class = `sapUiSmallMargin nestedFlexboxes` @@ -136,7 +142,8 @@ CLASS z2ui5_cl_demo_app_254 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_255.clas.abap b/src/z2ui5_cl_demo_app_255.clas.abap index 04a190d7..1563a90d 100644 --- a/src/z2ui5_cl_demo_app_255.clas.abap +++ b/src/z2ui5_cl_demo_app_255.clas.abap @@ -31,7 +31,8 @@ CLASS z2ui5_cl_demo_app_255 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.navigationExamples .code {` && + DATA css TYPE string. + css = `.navigationExamples .code {` && ` margin: 0 5%;` && ` font-family: Consolas, Courier, monospace;` && `}` && @@ -73,15 +74,19 @@ CLASS z2ui5_cl_demo_app_255 IMPLEMENTATION. `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Flex Box - Navigation Examples` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -95,7 +100,8 @@ CLASS z2ui5_cl_demo_app_255 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.FlexBox/sample/sap.m.sample.FlexBoxNav' ). - DATA(layout) = page->vbox( class = `navigationExamples` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vbox( class = `navigationExamples` )->panel( headertext = `Variable width` )->flex_box( class = `ne-flexbox1` @@ -143,7 +149,8 @@ CLASS z2ui5_cl_demo_app_255 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_256.clas.abap b/src/z2ui5_cl_demo_app_256.clas.abap index f3ec43c3..47100553 100644 --- a/src/z2ui5_cl_demo_app_256.clas.abap +++ b/src/z2ui5_cl_demo_app_256.clas.abap @@ -31,7 +31,8 @@ CLASS z2ui5_cl_demo_app_256 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.fixFlexFixedSize > .sapUiFixFlexFixed {` && + DATA css TYPE string. + css = `.fixFlexFixedSize > .sapUiFixFlexFixed {` && ` background: #D7E9FF;` && `}` && `.fixFlexFixedSize > .sapUiFixFlexFlexible {` && @@ -42,15 +43,19 @@ CLASS z2ui5_cl_demo_app_256 IMPLEMENTATION. `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Fix Flex - Fix container size` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -64,7 +69,8 @@ CLASS z2ui5_cl_demo_app_256 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.layout.FixFlex/sample/sap.ui.layout.sample.FixFlexFixedSize' ). - DATA(layout) = page->fix_flex( ns = `layout` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->fix_flex( ns = `layout` class = `fixFlexFixedSize` fixcontentsize = `150px` )->fix_content( ns = `layout` @@ -113,7 +119,8 @@ CLASS z2ui5_cl_demo_app_256 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_257.clas.abap b/src/z2ui5_cl_demo_app_257.clas.abap index 1e1cd3b8..2702ce1e 100644 --- a/src/z2ui5_cl_demo_app_257.clas.abap +++ b/src/z2ui5_cl_demo_app_257.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_257 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Generic Tag with Different Configurations' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_257 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.GenericTag/sample/sap.m.sample.GenericTag' ). - DATA(layout) = page->vertical_layout( + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` )->grid( class = `sapUiSmallMarginBottom` @@ -171,7 +175,8 @@ CLASS z2ui5_cl_demo_app_257 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_258.clas.abap b/src/z2ui5_cl_demo_app_258.clas.abap index 177ca3d1..9a7df1d1 100644 --- a/src/z2ui5_cl_demo_app_258.clas.abap +++ b/src/z2ui5_cl_demo_app_258.clas.abap @@ -75,25 +75,31 @@ CLASS Z2UI5_CL_DEMO_APP_258 IMPLEMENTATION. METHOD render_main_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). "Custom CSS view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.sapMPage>section { height: 100% }` && `#mainView--site_content { border-radius: 0.75em }` ). - DATA(page) = view->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->page( title = 'abap2UI5 - Sample: Side Navigation' navbuttonpress = client->_event( 'BACK' ) enablescrolling = abap_false class = 'sapUiResponsivePadding--header sapUiResponsivePadding--content sapUiResponsivePadding--footer' - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(content) = page->flex_box( width = '100%' + DATA content TYPE REF TO z2ui5_cl_xml_view. + content = page->flex_box( width = '100%' height = '90%' alignitems = 'Start' ). - DATA(navlist) = content->flex_box( width = '100%' + DATA navlist TYPE REF TO z2ui5_cl_xml_view. + navlist = content->flex_box( width = '100%' height = '100%' direction = 'Column' )->layout_data( )->flex_item_data( growfactor = '1' basesize = '0' )->get_parent( )->side_navigation( id = 'sideNavigation' @@ -144,7 +150,8 @@ CLASS Z2UI5_CL_DEMO_APP_258 IMPLEMENTATION. icon = 'sap-icon://chain-link' href = 'https://github.com/abap2UI5/abap2UI5' ). - DATA(site_content) = content->flex_box( id = 'site_content' + DATA site_content TYPE REF TO z2ui5_cl_xml_view. + site_content = content->flex_box( id = 'site_content' class = 'sapUiTinyMarginTop sapUiTinyMarginBegin' width = '100%' height = '100%' diff --git a/src/z2ui5_cl_demo_app_259.clas.abap b/src/z2ui5_cl_demo_app_259.clas.abap index f87154f6..776f4bd6 100644 --- a/src/z2ui5_cl_demo_app_259.clas.abap +++ b/src/z2ui5_cl_demo_app_259.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp13 TYPE xsdboolean. + temp13 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Button` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp13 ). page_01->header_content( )->button( id = `button_hint_id` @@ -50,20 +53,57 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Button/sample/sap.m.sample.Button' ). - DATA(page_02) = page_01->page( + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${$source>/id}` INTO TABLE temp2. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/id}` INTO TABLE temp3. + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${$source>/id}` INTO TABLE temp4. + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$source>/id}` INTO TABLE temp5. + DATA temp6 TYPE string_table. + CLEAR temp6. + INSERT `${$source>/id}` INTO TABLE temp6. + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$source>/id}` INTO TABLE temp7. + DATA temp8 TYPE string_table. + CLEAR temp8. + INSERT `${$source>/id}` INTO TABLE temp8. + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `${$source>/id}` INTO TABLE temp9. + DATA temp10 TYPE string_table. + CLEAR temp10. + INSERT `${$source>/id}` INTO TABLE temp10. + DATA temp11 TYPE string_table. + CLEAR temp11. + INSERT `${$source>/id}` INTO TABLE temp11. + DATA temp12 TYPE string_table. + CLEAR temp12. + INSERT `${$source>/id}` INTO TABLE temp12. + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( title = `Page` class = `sapUiContentPadding` )->custom_header( )->toolbar( )->button( type = `Back` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp1 ) )->toolbar_spacer( )->title( text = `Title` level = `H2` )->toolbar_spacer( )->button( icon = `sap-icon://edit` type = `Transparent` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp2 ) arialabelledby = `editButtonLabel` )->get_parent( )->get_parent( @@ -71,13 +111,13 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. )->toolbar( )->toolbar_spacer( )->button( text = `Default` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp3 ) )->button( type = `Reject` text = `Reject` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp4 ) )->button( icon = `sap-icon://action` type = `Transparent` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp5 ) arialabelledby = `actionButtonLabel` )->toolbar_spacer( )->get_parent( @@ -85,7 +125,7 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. )->content( )->hbox( )->button( text = `Default` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp6 ) ariadescribedby = `defaultButtonDescription genericButtonDescription`)->get( )->layout_data( )->flex_item_data( growfactor = `1` @@ -93,7 +133,7 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. )->get_parent( )->button( type = `Accept` text = `Accept` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp7 ) ariadescribedby = `acceptButtonDescription genericButtonDescription` )->get( )->layout_data( )->flex_item_data( growfactor = `1` @@ -101,14 +141,14 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. )->get_parent( )->button( type = `Reject` text = `Reject` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp8 ) ariadescribedby = `rejectButtonDescription genericButtonDescription` )->get( )->layout_data( )->flex_item_data( growfactor = `1` )->get_parent( )->get_parent( )->button( text = `Coming Soon` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp9 ) ariadescribedby = `comingSoonButtonDescription genericButtonDescription` enabled = abap_false )->get( )->layout_data( @@ -144,12 +184,12 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. )->toolbar_spacer( )->button( type = `Emphasized` text = `Emphasized` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp10 ) )->button( text = `Default` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp11 ) )->button( icon = `sap-icon://action` type = `Transparent` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) )->get_parent( + press = client->_event( val = `onPress` t_arg = temp12 ) )->get_parent( )->get_parent( )->get_parent( ). @@ -174,7 +214,8 @@ CLASS z2ui5_cl_demo_app_259 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_260.clas.abap b/src/z2ui5_cl_demo_app_260.clas.abap index ad1712c0..e23653d8 100644 --- a/src/z2ui5_cl_demo_app_260.clas.abap +++ b/src/z2ui5_cl_demo_app_260.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_260 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Nested Splitter Layouts - 7 Areas' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -49,7 +52,8 @@ CLASS z2ui5_cl_demo_app_260 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.layout.Splitter/sample/sap.ui.layout.sample.SplitterNested1' ). - DATA(layout) = page->splitter( height = `500px` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->splitter( height = `500px` orientation = `Vertical` )->splitter( )->get( )->layout_data( ns = `layout` @@ -114,7 +118,8 @@ CLASS z2ui5_cl_demo_app_260 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_261.clas.abap b/src/z2ui5_cl_demo_app_261.clas.abap index aed79d32..17c495bc 100644 --- a/src/z2ui5_cl_demo_app_261.clas.abap +++ b/src/z2ui5_cl_demo_app_261.clas.abap @@ -30,11 +30,14 @@ CLASS z2ui5_cl_demo_app_261 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: News Content' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -75,7 +78,8 @@ CLASS z2ui5_cl_demo_app_261 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_262.clas.abap b/src/z2ui5_cl_demo_app_262.clas.abap index eb9c7238..18c407c4 100644 --- a/src/z2ui5_cl_demo_app_262.clas.abap +++ b/src/z2ui5_cl_demo_app_262.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_262 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Numeric Content of Different Colors' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -105,7 +108,8 @@ CLASS z2ui5_cl_demo_app_262 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_263.clas.abap b/src/z2ui5_cl_demo_app_263.clas.abap index 598ca879..4b2c3532 100644 --- a/src/z2ui5_cl_demo_app_263.clas.abap +++ b/src/z2ui5_cl_demo_app_263.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_263 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Numeric Content with Icon' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -85,7 +88,8 @@ CLASS z2ui5_cl_demo_app_263 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_264.clas.abap b/src/z2ui5_cl_demo_app_264.clas.abap index 16e4289d..3585bc88 100644 --- a/src/z2ui5_cl_demo_app_264.clas.abap +++ b/src/z2ui5_cl_demo_app_264.clas.abap @@ -12,8 +12,9 @@ CLASS z2ui5_cl_demo_app_264 DEFINITION value_state TYPE string, END OF ty_a_data . - DATA - lt_a_data TYPE STANDARD TABLE OF ty_a_data . + TYPES temp1_389dcc5619 TYPE STANDARD TABLE OF ty_a_data. +DATA + lt_a_data TYPE temp1_389dcc5619 . DATA ls_a_data TYPE ty_a_data . DATA s_text TYPE string . DATA check_initialized TYPE abap_bool . @@ -41,11 +42,14 @@ CLASS z2ui5_cl_demo_app_264 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Step Input - Value States' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `hint_icon` @@ -89,7 +93,8 @@ CLASS z2ui5_cl_demo_app_264 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -114,12 +119,20 @@ CLASS z2ui5_cl_demo_app_264 IMPLEMENTATION. s_text = 'StepInput with valueState '. - lt_a_data = VALUE #( - ( value_state = 'None' ) - ( value_state = 'Information' ) - ( value_state = 'Success' ) - ( value_state = 'Warning' ) - ( value_state = 'Error' ) ). + DATA temp1 LIKE lt_a_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-value_state = 'None'. + INSERT temp2 INTO TABLE temp1. + temp2-value_state = 'Information'. + INSERT temp2 INTO TABLE temp1. + temp2-value_state = 'Success'. + INSERT temp2 INTO TABLE temp1. + temp2-value_state = 'Warning'. + INSERT temp2 INTO TABLE temp1. + temp2-value_state = 'Error'. + INSERT temp2 INTO TABLE temp1. + lt_a_data = temp1. " Use field symbols to concatenate the string and store it in the label column diff --git a/src/z2ui5_cl_demo_app_265.clas.abap b/src/z2ui5_cl_demo_app_265.clas.abap index dba3777a..f18f9176 100644 --- a/src/z2ui5_cl_demo_app_265.clas.abap +++ b/src/z2ui5_cl_demo_app_265.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_265 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Code Editor' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -86,7 +89,8 @@ CLASS z2ui5_cl_demo_app_265 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_266.clas.abap b/src/z2ui5_cl_demo_app_266.clas.abap index 32e8ed1a..b3bd3d37 100644 --- a/src/z2ui5_cl_demo_app_266.clas.abap +++ b/src/z2ui5_cl_demo_app_266.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp11 TYPE xsdboolean. + temp11 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Toggle Button` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp11 ). page_01->header_content( )->button( id = `button_hint_id` @@ -50,7 +53,48 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/#/entity/sap.m.ToggleButton/sample/sap.m.sample.ToggleButton' ). - DATA(page_02) = page_01->page( + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/pressed}` INTO TABLE temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${$source>/pressed}` INTO TABLE temp2. + INSERT `${$source>/id}` INTO TABLE temp2. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/pressed}` INTO TABLE temp3. + INSERT `${$source>/id}` INTO TABLE temp3. + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${$source>/pressed}` INTO TABLE temp4. + INSERT `${$source>/id}` INTO TABLE temp4. + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$source>/pressed}` INTO TABLE temp5. + INSERT `${$source>/id}` INTO TABLE temp5. + DATA temp6 TYPE string_table. + CLEAR temp6. + INSERT `${$source>/pressed}` INTO TABLE temp6. + INSERT `${$source>/id}` INTO TABLE temp6. + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$source>/pressed}` INTO TABLE temp7. + INSERT `${$source>/id}` INTO TABLE temp7. + DATA temp8 TYPE string_table. + CLEAR temp8. + INSERT `${$source>/pressed}` INTO TABLE temp8. + INSERT `${$source>/id}` INTO TABLE temp8. + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `${$source>/pressed}` INTO TABLE temp9. + INSERT `${$source>/id}` INTO TABLE temp9. + DATA temp10 TYPE string_table. + CLEAR temp10. + INSERT `${$source>/pressed}` INTO TABLE temp10. + INSERT `${$source>/id}` INTO TABLE temp10. + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( title = `Page` class = `sapUiContentPadding` )->custom_header( @@ -61,7 +105,7 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. )->get_parent( )->content_right( )->toggle_button( icon = `sap-icon://edit` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp1 ) )->get_parent( )->get_parent( )->get_parent( @@ -71,25 +115,25 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. )->toggle_button( text = `Pressed` enabled = abap_true pressed = abap_true - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp2 ) )->toggle_button( text = `Pressed & Disabled` enabled = abap_false pressed = abap_true - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp3 ) )->get_parent( )->content_right( )->toggle_button( icon = `sap-icon://action` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp4 ) )->toggle_button( icon = `sap-icon://home` enabled = abap_false - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp5 ) )->get_parent( )->get_parent( )->get_parent( )->hbox( )->toggle_button( text = `Disabled` enabled = `false` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) )->get( + press = client->_event( val = `onPress` t_arg = temp6 ) )->get( )->layout_data( )->flex_item_data( growfactor = `1` )->get_parent( @@ -97,7 +141,7 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. )->toggle_button( text = `Pressed` enabled = abap_true pressed = abap_true - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) )->get( + press = client->_event( val = `onPress` t_arg = temp7 ) )->get( )->layout_data( )->flex_item_data( growfactor = `1` )->get_parent( @@ -105,7 +149,7 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. )->toggle_button( icon = `sap-icon://action` enabled = abap_true pressed = abap_true - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) )->get( + press = client->_event( val = `onPress` t_arg = temp8 ) )->get( )->layout_data( )->flex_item_data( growfactor = `1` )->get_parent( @@ -117,9 +161,9 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. )->toggle_button( text = `Pressed & Disabled` enabled = abap_false pressed = abap_true - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp9 ) )->toggle_button( icon = `sap-icon://action` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/pressed}` ) ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp10 ) )->get_parent( )->get_parent( )->get_parent( ). @@ -149,7 +193,8 @@ CLASS z2ui5_cl_demo_app_266 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_267.clas.abap b/src/z2ui5_cl_demo_app_267.clas.abap index 3803dd33..431e8688 100644 --- a/src/z2ui5_cl_demo_app_267.clas.abap +++ b/src/z2ui5_cl_demo_app_267.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_267 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: MultiInput - Value States' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -100,7 +103,8 @@ CLASS z2ui5_cl_demo_app_267 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_268.clas.abap b/src/z2ui5_cl_demo_app_268.clas.abap index 09dde465..e57d0669 100644 --- a/src/z2ui5_cl_demo_app_268.clas.abap +++ b/src/z2ui5_cl_demo_app_268.clas.abap @@ -31,7 +31,8 @@ CLASS z2ui5_cl_demo_app_268 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.size1 {` && + DATA css TYPE string. + css = `.size1 {` && ` font-size : 1.5rem;` && `}` && `.size2 {` && @@ -64,15 +65,19 @@ CLASS z2ui5_cl_demo_app_268 IMPLEMENTATION. ` }` && `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: Icon` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -140,7 +145,8 @@ CLASS z2ui5_cl_demo_app_268 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_269.clas.abap b/src/z2ui5_cl_demo_app_269.clas.abap index cb43abdc..e2944379 100644 --- a/src/z2ui5_cl_demo_app_269.clas.abap +++ b/src/z2ui5_cl_demo_app_269.clas.abap @@ -29,13 +29,16 @@ CLASS z2ui5_cl_demo_app_269 IMPLEMENTATION. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->shell_bar( title = `Shell Bar` secondtitle = `with title mega menu` homeicon = `https://sapui5.hana.ondemand.com/sdk/resources/sap/ui/documentation/sdk/images/logo_sap.png` - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 showsearch = abap_true shownotifications = abap_true notificationsnumber = `2` @@ -54,7 +57,8 @@ CLASS z2ui5_cl_demo_app_269 IMPLEMENTATION. )->avatar( ns = `f` initials = 'UI' ). - DATA(xml) = view->stringify( ). + DATA xml TYPE string. + xml = view->stringify( ). client->view_display( xml ). diff --git a/src/z2ui5_cl_demo_app_270.clas.abap b/src/z2ui5_cl_demo_app_270.clas.abap index 335866f8..bd7601ed 100644 --- a/src/z2ui5_cl_demo_app_270.clas.abap +++ b/src/z2ui5_cl_demo_app_270.clas.abap @@ -23,11 +23,13 @@ CLASS z2ui5_cl_demo_app_270 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). client->view_display( z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Hello World App' - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp1 navbuttonpress = client->_event( 'BACK' ) )->simple_form( editable = abap_true )->content( ns = `form` diff --git a/src/z2ui5_cl_demo_app_271.clas.abap b/src/z2ui5_cl_demo_app_271.clas.abap index 80557705..879cf42d 100644 --- a/src/z2ui5_cl_demo_app_271.clas.abap +++ b/src/z2ui5_cl_demo_app_271.clas.abap @@ -35,11 +35,14 @@ CLASS z2ui5_cl_demo_app_271 IMPLEMENTATION. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: ImageContent' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -88,7 +91,8 @@ CLASS z2ui5_cl_demo_app_271 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_272.clas.abap b/src/z2ui5_cl_demo_app_272.clas.abap index 8911143c..3c02510b 100644 --- a/src/z2ui5_cl_demo_app_272.clas.abap +++ b/src/z2ui5_cl_demo_app_272.clas.abap @@ -35,11 +35,14 @@ CLASS z2ui5_cl_demo_app_272 IMPLEMENTATION. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Object Header - with Circle-shaped Image' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -89,7 +92,8 @@ CLASS z2ui5_cl_demo_app_272 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_273.clas.abap b/src/z2ui5_cl_demo_app_273.clas.abap index c3c934e0..bdcfeb48 100644 --- a/src/z2ui5_cl_demo_app_273.clas.abap +++ b/src/z2ui5_cl_demo_app_273.clas.abap @@ -35,11 +35,14 @@ CLASS z2ui5_cl_demo_app_273 IMPLEMENTATION. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: LightBox' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -219,7 +222,8 @@ CLASS z2ui5_cl_demo_app_273 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_274.clas.abap b/src/z2ui5_cl_demo_app_274.clas.abap index cfd31c87..5ea268e8 100644 --- a/src/z2ui5_cl_demo_app_274.clas.abap +++ b/src/z2ui5_cl_demo_app_274.clas.abap @@ -35,11 +35,14 @@ CLASS z2ui5_cl_demo_app_274 IMPLEMENTATION. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Slide Tile' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -110,7 +113,8 @@ CLASS z2ui5_cl_demo_app_274 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_275.clas.abap b/src/z2ui5_cl_demo_app_275.clas.abap index e1ca8fc7..6608cddc 100644 --- a/src/z2ui5_cl_demo_app_275.clas.abap +++ b/src/z2ui5_cl_demo_app_275.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_275 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Feed Content' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -84,7 +87,8 @@ CLASS z2ui5_cl_demo_app_275 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_276.clas.abap b/src/z2ui5_cl_demo_app_276.clas.abap index f02c5dd1..f60bc7b3 100644 --- a/src/z2ui5_cl_demo_app_276.clas.abap +++ b/src/z2ui5_cl_demo_app_276.clas.abap @@ -31,15 +31,19 @@ CLASS z2ui5_cl_demo_app_276 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.tileLayout {` && + DATA css TYPE string. + css = `.tileLayout {` && ` float: left;` && `}`. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Monitor Tile' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -92,7 +96,8 @@ CLASS z2ui5_cl_demo_app_276 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_277.clas.abap b/src/z2ui5_cl_demo_app_277.clas.abap index 5f219f28..0feff8be 100644 --- a/src/z2ui5_cl_demo_app_277.clas.abap +++ b/src/z2ui5_cl_demo_app_277.clas.abap @@ -34,19 +34,24 @@ CLASS z2ui5_cl_demo_app_277 IMPLEMENTATION. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(css) = `.tileLayout {` && + DATA css TYPE string. + css = `.tileLayout {` && ` float: left;` && `}`. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `style` ns = `html` )->_cc_plain_xml( css )->get_parent( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `abap2UI5 - Sample: KPI Tile` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -252,7 +257,8 @@ CLASS z2ui5_cl_demo_app_277 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_278.clas.abap b/src/z2ui5_cl_demo_app_278.clas.abap index aee390ba..b40780ce 100644 --- a/src/z2ui5_cl_demo_app_278.clas.abap +++ b/src/z2ui5_cl_demo_app_278.clas.abap @@ -31,18 +31,22 @@ CLASS z2ui5_cl_demo_app_278 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.tileLayout {` && + DATA css TYPE string. + css = `.tileLayout {` && ` float: left;` && `}`. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Feed and News Tile' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -104,7 +108,8 @@ CLASS z2ui5_cl_demo_app_278 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_279.clas.abap b/src/z2ui5_cl_demo_app_279.clas.abap index e8ec0b08..4a255620 100644 --- a/src/z2ui5_cl_demo_app_279.clas.abap +++ b/src/z2ui5_cl_demo_app_279.clas.abap @@ -28,14 +28,18 @@ CLASS z2ui5_cl_demo_app_279 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - data loss protection' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). - DATA(box) = page->flex_box( direction = `Row` + DATA box TYPE REF TO z2ui5_cl_xml_view. + box = page->flex_box( direction = `Row` alignitems = `Start` class = 'sapUiTinyMargin' ). @@ -80,7 +84,9 @@ CLASS z2ui5_cl_demo_app_279 IMPLEMENTATION. client->nav_app_leave( ). ENDIF. WHEN 'submit'. - dirty = xsdbool( text_input IS NOT INITIAL ). + DATA temp2 TYPE xsdboolean. + temp2 = boolc( text_input IS NOT INITIAL ). + dirty = temp2. WHEN 'reset'. CLEAR: dirty, @@ -125,8 +131,12 @@ CLASS z2ui5_cl_demo_app_279 IMPLEMENTATION. METHOD ui5_callback. TRY. - DATA(prev) = client->get_app( client->get( )-s_draft-id_prev_app ). - DATA(confirm_leave) = CAST z2ui5_cl_pop_to_confirm( prev )->result( ). + DATA prev TYPE REF TO z2ui5_if_app. + prev = client->get_app( client->get( )-s_draft-id_prev_app ). + DATA temp1 TYPE REF TO z2ui5_cl_pop_to_confirm. + temp1 ?= prev. + DATA confirm_leave TYPE abap_bool. + confirm_leave = temp1->result( ). CATCH cx_root. ENDTRY. diff --git a/src/z2ui5_cl_demo_app_280.clas.abap b/src/z2ui5_cl_demo_app_280.clas.abap index f11f7dc0..08041538 100644 --- a/src/z2ui5_cl_demo_app_280.clas.abap +++ b/src/z2ui5_cl_demo_app_280.clas.abap @@ -31,11 +31,14 @@ CLASS z2ui5_cl_demo_app_280 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Header Container - Vertical Mode' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -145,7 +148,8 @@ CLASS z2ui5_cl_demo_app_280 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_281.clas.abap b/src/z2ui5_cl_demo_app_281.clas.abap index 9f310e0c..64158c21 100644 --- a/src/z2ui5_cl_demo_app_281.clas.abap +++ b/src/z2ui5_cl_demo_app_281.clas.abap @@ -31,18 +31,22 @@ CLASS z2ui5_cl_demo_app_281 IMPLEMENTATION. METHOD display_view. - DATA(css) = `.tileLayout {` && + DATA css TYPE string. + css = `.tileLayout {` && ` float: left;` && `}`. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Tile Statuses' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -176,7 +180,8 @@ CLASS z2ui5_cl_demo_app_281 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_282.clas.abap b/src/z2ui5_cl_demo_app_282.clas.abap index 22b8753d..e8f74069 100644 --- a/src/z2ui5_cl_demo_app_282.clas.abap +++ b/src/z2ui5_cl_demo_app_282.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp13 TYPE xsdboolean. + temp13 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: InvisibleText` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp13 ). page_01->header_content( )->button( id = `button_hint_id` @@ -50,18 +53,55 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.ui.core.InvisibleText/sample/sap.ui.core.sample.InvisibleText' ). - DATA(page_02) = page_01->page( + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${$source>/id}` INTO TABLE temp2. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/id}` INTO TABLE temp3. + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${$source>/id}` INTO TABLE temp4. + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$source>/id}` INTO TABLE temp5. + DATA temp6 TYPE string_table. + CLEAR temp6. + INSERT `${$source>/id}` INTO TABLE temp6. + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$source>/id}` INTO TABLE temp7. + DATA temp8 TYPE string_table. + CLEAR temp8. + INSERT `${$source>/id}` INTO TABLE temp8. + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `${$source>/id}` INTO TABLE temp9. + DATA temp10 TYPE string_table. + CLEAR temp10. + INSERT `${$source>/id}` INTO TABLE temp10. + DATA temp11 TYPE string_table. + CLEAR temp11. + INSERT `${$source>/id}` INTO TABLE temp11. + DATA temp12 TYPE string_table. + CLEAR temp12. + INSERT `${$source>/id}` INTO TABLE temp12. + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( title = `Page` class = `sapUiContentPadding` )->custom_header( )->toolbar( )->button( type = `Back` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp1 ) )->toolbar_spacer( )->title( text = `Title` )->toolbar_spacer( )->button( icon = `sap-icon://edit` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp2 ) arialabelledby = `editButtonLabel` )->get_parent( )->get_parent( @@ -69,12 +109,12 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. )->toolbar( )->toolbar_spacer( )->button( text = `Default` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp3 ) )->button( type = `Reject` text = `Reject` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp4 ) )->button( icon = `sap-icon://action` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp5 ) arialabelledby = `actionButtonLabel` )->toolbar_spacer( )->get_parent( @@ -82,7 +122,7 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. )->content( )->hbox( )->button( text = `Default` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp6 ) ariadescribedby = `defaultButtonDescription genericButtonDescription` )->get( )->layout_data( )->flex_item_data( growfactor = `1` @@ -90,7 +130,7 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. )->get_parent( )->button( type = `Accept` text = `Accept` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp7 ) ariadescribedby = `acceptButtonDescription genericButtonDescription` )->get( )->layout_data( )->flex_item_data( growfactor = `1` @@ -98,14 +138,14 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. )->get_parent( )->button( type = `Reject` text = `Reject` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp8 ) ariadescribedby = `rejectButtonDescription genericButtonDescription` )->get( )->layout_data( )->flex_item_data( growfactor = `1` )->get_parent( )->get_parent( )->button( text = `Coming Soon` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp9 ) ariadescribedby = `comingSoonButtonDescription genericButtonDescription` enabled = abap_false )->get( )->layout_data( @@ -141,11 +181,11 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. )->toolbar_spacer( )->button( type = `Emphasized` text = `Emphasized` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp10 ) )->button( text = `Default` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp11 ) )->button( icon = `sap-icon://action` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/id}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp12 ) )->get_parent( )->get_parent( ). @@ -170,7 +210,8 @@ CLASS z2ui5_cl_demo_app_282 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_283.clas.abap b/src/z2ui5_cl_demo_app_283.clas.abap index 78c663bb..f79ccaa4 100644 --- a/src/z2ui5_cl_demo_app_283.clas.abap +++ b/src/z2ui5_cl_demo_app_283.clas.abap @@ -34,11 +34,14 @@ CLASS z2ui5_cl_demo_app_283 IMPLEMENTATION. " Define the base URL for the server DATA base_url TYPE string VALUE 'https://sapui5.hana.ondemand.com/'. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Feed Input' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). page->header_content( )->button( id = `button_hint_id` @@ -54,48 +57,69 @@ CLASS z2ui5_cl_demo_app_283 IMPLEMENTATION. page->label( text = `Without Icon` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/value}` INTO TABLE temp1. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp1 ) showicon = abap_false ). page->label( text = `With Icon Placeholder` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/value}` INTO TABLE temp3. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp3 ) showicon = abap_true ). page->label( text = `With Icon Placeholder` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$source>/value}` INTO TABLE temp5. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp5 ) showicon = abap_true icon = base_url && `test-resources/sap/m/images/george_washington.jpg` ). page->label( text = `Disabled` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$source>/value}` INTO TABLE temp7. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp7 ) enabled = abap_false showicon = abap_true icon = base_url && `test-resources/sap/m/images/george_washington.jpg` ). page->label( text = `Rows Set to 5` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp9 TYPE string_table. + CLEAR temp9. + INSERT `${$source>/value}` INTO TABLE temp9. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp9 ) rows = `5` ). page->label( text = `With Exceeded Text` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp11 TYPE string_table. + CLEAR temp11. + INSERT `${$source>/value}` INTO TABLE temp11. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp11 ) maxlength = `20` showexceededtext = abap_true ). page->label( text = `With Growing` class = `sapUiSmallMarginTop sapUiTinyMarginBottom` ). + DATA temp13 TYPE string_table. + CLEAR temp13. + INSERT `${$source>/value}` INTO TABLE temp13. page->feed_input( - post = client->_event( val = `onPost` t_arg = VALUE #( ( `${$source>/value}` ) ) ) + post = client->_event( val = `onPost` t_arg = temp13 ) growing = abap_true ). client->view_display( page->stringify( ) ). @@ -119,7 +143,8 @@ CLASS z2ui5_cl_demo_app_283 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_284.clas.abap b/src/z2ui5_cl_demo_app_284.clas.abap index 1d190b7b..2f0f8dce 100644 --- a/src/z2ui5_cl_demo_app_284.clas.abap +++ b/src/z2ui5_cl_demo_app_284.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_284 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Flexible sizing - Toolbar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -50,7 +53,8 @@ CLASS z2ui5_cl_demo_app_284 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Page/sample/sap.m.sample.PageListReportToolbar' ). - DATA(page_02) = page_01->page( enablescrolling = abap_true + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( enablescrolling = abap_true title = `Title` class = `sapUiResponsivePadding--header sapUiResponsivePadding--footer` )->content( @@ -138,7 +142,8 @@ CLASS z2ui5_cl_demo_app_284 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_285.clas.abap b/src/z2ui5_cl_demo_app_285.clas.abap index 3c5a4de3..b183a098 100644 --- a/src/z2ui5_cl_demo_app_285.clas.abap +++ b/src/z2ui5_cl_demo_app_285.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_285 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Flexible sizing - Icon Tab Bar' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -50,7 +53,8 @@ CLASS z2ui5_cl_demo_app_285 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Page/sample/sap.m.sample.PageListReportIconTabBar' ). - DATA(page_02) = page_01->page( title = `Title` + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( title = `Title` enablescrolling = abap_true class = `sapUiResponsivePadding--header sapUiResponsivePadding--footer` )->content( @@ -150,7 +154,8 @@ CLASS z2ui5_cl_demo_app_285 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_286.clas.abap b/src/z2ui5_cl_demo_app_286.clas.abap index 6b3ad0d4..19b955db 100644 --- a/src/z2ui5_cl_demo_app_286.clas.abap +++ b/src/z2ui5_cl_demo_app_286.clas.abap @@ -15,7 +15,8 @@ CLASS z2ui5_cl_demo_app_286 DEFINITION info TYPE string, END OF ty_name . - DATA lt_o_model TYPE TABLE OF ty_name. + TYPES temp1_e75f7e15cd TYPE TABLE OF ty_name. +DATA lt_o_model TYPE temp1_e75f7e15cd. DATA check_initialized TYPE abap_bool. PROTECTED SECTION. @@ -42,11 +43,14 @@ CLASS z2ui5_cl_demo_app_286 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Standard List Item - Info State Inverted' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -95,7 +99,8 @@ CLASS z2ui5_cl_demo_app_286 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -117,12 +122,38 @@ CLASS z2ui5_cl_demo_app_286 IMPLEMENTATION. check_initialized = abap_true. display_view( client ). - lt_o_model = VALUE #( - ( title = 'Title text' desc = 'Description text' icon = 'sap-icon://favorite' highlight = 'Success' info = 'Completed' ) - ( title = 'Title text' desc = 'Description text' icon = 'sap-icon://employee' highlight = 'Error' info = 'Incomplete' ) - ( title = 'Title text' icon = 'sap-icon://accept' highlight = 'Information' info = 'Information' ) - ( title = 'Title text' icon = 'sap-icon://activities' highlight = 'None' info = 'None' ) - ( title = 'Title text' desc = 'Description text' icon = 'sap-icon://badge' highlight = 'Warning' info = 'Warning' ) ). + DATA temp1 LIKE lt_o_model. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'Title text'. + temp2-desc = 'Description text'. + temp2-icon = 'sap-icon://favorite'. + temp2-highlight = 'Success'. + temp2-info = 'Completed'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Title text'. + temp2-desc = 'Description text'. + temp2-icon = 'sap-icon://employee'. + temp2-highlight = 'Error'. + temp2-info = 'Incomplete'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Title text'. + temp2-icon = 'sap-icon://accept'. + temp2-highlight = 'Information'. + temp2-info = 'Information'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Title text'. + temp2-icon = 'sap-icon://activities'. + temp2-highlight = 'None'. + temp2-info = 'None'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'Title text'. + temp2-desc = 'Description text'. + temp2-icon = 'sap-icon://badge'. + temp2-highlight = 'Warning'. + temp2-info = 'Warning'. + INSERT temp2 INTO TABLE temp1. + lt_o_model = temp1. ENDIF. on_event( client ). diff --git a/src/z2ui5_cl_demo_app_287.clas.abap b/src/z2ui5_cl_demo_app_287.clas.abap index 62a4dc92..9ddcd7f6 100644 --- a/src/z2ui5_cl_demo_app_287.clas.abap +++ b/src/z2ui5_cl_demo_app_287.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_287 DEFINITION wrapcharlimit TYPE i, END OF ty_name . - DATA lt_o_model TYPE TABLE OF ty_name. + TYPES temp1_96506d4817 TYPE TABLE OF ty_name. +DATA lt_o_model TYPE temp1_96506d4817. DATA check_initialized TYPE abap_bool. PROTECTED SECTION. @@ -43,11 +44,14 @@ CLASS z2ui5_cl_demo_app_287 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Standard List Item - Wrapping' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -98,7 +102,8 @@ CLASS z2ui5_cl_demo_app_287 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -121,35 +126,38 @@ CLASS z2ui5_cl_demo_app_287 IMPLEMENTATION. check_initialized = abap_true. display_view( client ). - lt_o_model = VALUE #( - ( title = `wrapCharLimit is set to Default. Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.` - desc = `Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.` - icon = `sap-icon://favorite` - highlight = `Success` - info = `Completed` - ) - ( title = `wrapCharLimit is set to 100. Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ` && - `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.` - desc = `Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.` - icon = `sap-icon://employee` - highlight = `Error` - info = `Incomplete` - wrapcharlimit = 100 - ) - ( title = `Title text` - desc = `Description text` - icon = `sap-icon://accept` - highlight = `Information` - info = `Information` - wrapcharlimit = 10 - ) ). + DATA temp1 LIKE lt_o_model. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = `wrapCharLimit is set to Default. Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.`. + temp2-desc = `Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat.`. + temp2-icon = `sap-icon://favorite`. + temp2-highlight = `Success`. + temp2-info = `Completed`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `wrapCharLimit is set to 100. Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ` && +`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.`. + temp2-desc = `Lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.`. + temp2-icon = `sap-icon://employee`. + temp2-highlight = `Error`. + temp2-info = `Incomplete`. + temp2-wrapcharlimit = 100. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Title text`. + temp2-desc = `Description text`. + temp2-icon = `sap-icon://accept`. + temp2-highlight = `Information`. + temp2-info = `Information`. + temp2-wrapcharlimit = 10. + INSERT temp2 INTO TABLE temp1. + lt_o_model = temp1. ENDIF. on_event( client ). diff --git a/src/z2ui5_cl_demo_app_288.clas.abap b/src/z2ui5_cl_demo_app_288.clas.abap index d5716a59..d1a4d2bf 100644 --- a/src/z2ui5_cl_demo_app_288.clas.abap +++ b/src/z2ui5_cl_demo_app_288.clas.abap @@ -15,9 +15,12 @@ CLASS z2ui5_cl_demo_app_288 DEFINITION DATA check_initialized TYPE abap_bool. DATA editable TYPE abap_bool. DATA enabled TYPE abap_bool. - DATA lt_product_collection TYPE TABLE OF ty_product_collection. - DATA lt_product_collection2 TYPE TABLE OF ty_product_collection. - DATA lt_product_collection3 TYPE TABLE OF ty_product_collection. + TYPES temp1_2e54214ed7 TYPE TABLE OF ty_product_collection. +DATA lt_product_collection TYPE temp1_2e54214ed7. + TYPES temp2_2e54214ed7 TYPE TABLE OF ty_product_collection. +DATA lt_product_collection2 TYPE temp2_2e54214ed7. + TYPES temp3_2e54214ed7 TYPE TABLE OF ty_product_collection. +DATA lt_product_collection3 TYPE temp3_2e54214ed7. DATA selected_product TYPE string. DATA selected_product2 TYPE string. DATA selected_product3 TYPE string. @@ -46,11 +49,14 @@ CLASS z2ui5_cl_demo_app_288 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Select` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -64,7 +70,8 @@ CLASS z2ui5_cl_demo_app_288 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Select/sample/sap.m.sample.Select' ). - DATA(page_02) = page_01->page( + DATA page_02 TYPE REF TO z2ui5_cl_xml_view. + page_02 = page_01->page( showheader = abap_false class = `sapUiContentPadding` )->sub_header( @@ -138,7 +145,8 @@ CLASS z2ui5_cl_demo_app_288 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -165,25 +173,67 @@ CLASS z2ui5_cl_demo_app_288 IMPLEMENTATION. selected_product3 = `HT-1001`. " Populate the internal tables - lt_product_collection = VALUE #( ( product_id = 'HT-1000' name = 'Notebook Basic 15' ) - ( product_id = 'HT-1001' name = 'Notebook Basic 17' ) - ( product_id = 'HT-1002' name = 'Notebook Basic 18' ) - ( product_id = 'HT-1003' name = 'Notebook Basic 19' ) - ( product_id = 'HT-1007' name = 'ITelO Vault' ) ). + DATA temp1 LIKE lt_product_collection. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product_id = 'HT-1000'. + temp2-name = 'Notebook Basic 15'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1001'. + temp2-name = 'Notebook Basic 17'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1002'. + temp2-name = 'Notebook Basic 18'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1003'. + temp2-name = 'Notebook Basic 19'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1007'. + temp2-name = 'ITelO Vault'. + INSERT temp2 INTO TABLE temp1. + lt_product_collection = temp1. SORT lt_product_collection BY name. - lt_product_collection2 = VALUE #( ( product_id = 'HT-1000' name = 'Notebook Basic 15' ) - ( product_id = 'HT-1001' name = 'Notebook Basic 17' ) - ( product_id = 'HT-1002' name = 'Notebook Basic 18' ) - ( product_id = 'HT-1003' name = 'Notebook Basic 19' ) - ( product_id = 'HT-1007' name = 'ITelO Vault' ) ). + DATA temp3 LIKE lt_product_collection2. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-product_id = 'HT-1000'. + temp4-name = 'Notebook Basic 15'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'HT-1001'. + temp4-name = 'Notebook Basic 17'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'HT-1002'. + temp4-name = 'Notebook Basic 18'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'HT-1003'. + temp4-name = 'Notebook Basic 19'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'HT-1007'. + temp4-name = 'ITelO Vault'. + INSERT temp4 INTO TABLE temp3. + lt_product_collection2 = temp3. SORT lt_product_collection2 BY name. - lt_product_collection3 = VALUE #( ( product_id = 'HT-1000' name = 'Notebook Basic 15' ) - ( product_id = 'HT-1001' name = 'Notebook Basic 17' ) - ( product_id = 'HT-1002' name = 'Notebook Basic 18' ) - ( product_id = 'HT-1003' name = 'Notebook Basic 19' ) - ( product_id = 'HT-1007' name = 'ITelO Vault' ) ). + DATA temp5 LIKE lt_product_collection3. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-product_id = 'HT-1000'. + temp6-name = 'Notebook Basic 15'. + INSERT temp6 INTO TABLE temp5. + temp6-product_id = 'HT-1001'. + temp6-name = 'Notebook Basic 17'. + INSERT temp6 INTO TABLE temp5. + temp6-product_id = 'HT-1002'. + temp6-name = 'Notebook Basic 18'. + INSERT temp6 INTO TABLE temp5. + temp6-product_id = 'HT-1003'. + temp6-name = 'Notebook Basic 19'. + INSERT temp6 INTO TABLE temp5. + temp6-product_id = 'HT-1007'. + temp6-name = 'ITelO Vault'. + INSERT temp6 INTO TABLE temp5. + lt_product_collection3 = temp5. SORT lt_product_collection3 BY name. editable = abap_true. diff --git a/src/z2ui5_cl_demo_app_289.clas.abap b/src/z2ui5_cl_demo_app_289.clas.abap index f035efd0..2542ff72 100644 --- a/src/z2ui5_cl_demo_app_289.clas.abap +++ b/src/z2ui5_cl_demo_app_289.clas.abap @@ -14,7 +14,8 @@ CLASS z2ui5_cl_demo_app_289 DEFINITION END OF ty_product. DATA check_initialized TYPE abap_bool. - DATA lt_a_data TYPE TABLE OF ty_product. + TYPES temp1_97fab6e42f TYPE TABLE OF ty_product. +DATA lt_a_data TYPE temp1_97fab6e42f. PROTECTED SECTION. @@ -40,11 +41,14 @@ CLASS z2ui5_cl_demo_app_289 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Object Marker in a table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). page->header_content( )->button( id = `button_hint_id` @@ -58,6 +62,9 @@ CLASS z2ui5_cl_demo_app_289 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.ObjectMarker/sample/sap.m.sample.ObjectMarker' ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${TYPE}` INTO TABLE temp1. page->table( id = `idProductsTable` items = client->_bind( lt_a_data ) )->columns( @@ -79,7 +86,7 @@ CLASS z2ui5_cl_demo_app_289 IMPLEMENTATION. )->object_marker( type = '{TYPE}' additionalinfo = '{ADDITIONALINFO}' - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${TYPE}` ) ) ) ). + press = client->_event( val = `onPress` t_arg = temp1 ) ). client->view_display( page->stringify( ) ). @@ -102,7 +109,8 @@ CLASS z2ui5_cl_demo_app_289 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -124,17 +132,42 @@ CLASS z2ui5_cl_demo_app_289 IMPLEMENTATION. check_initialized = abap_true. display_view( client ). - lt_a_data = VALUE #( - ( product = 'Power Projector 4713' type = 'Locked' ) - ( product = 'Power Projector 4713' type = 'LockedBy' additionalinfo = 'John Doe' ) - ( product = 'Power Projector 4713' type = 'LockedBy' ) - ( product = 'Gladiator MX' type = 'Draft' ) - ( product = 'Hurricane GX' type = 'Unsaved' ) - ( product = 'Hurricane GX' type = 'UnsavedBy' additionalinfo = 'John Doe' ) - ( product = 'Hurricane GX' type = 'UnsavedBy' ) - ( product = 'Hurricane GX' type = 'Unsaved' ) - ( product = 'Webcam' type = 'Favorite' ) - ( product = 'Deskjet Super Highspeed' type = 'Flagged' ) ). + DATA temp3 LIKE lt_a_data. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-product = 'Power Projector 4713'. + temp4-type = 'Locked'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Power Projector 4713'. + temp4-type = 'LockedBy'. + temp4-additionalinfo = 'John Doe'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Power Projector 4713'. + temp4-type = 'LockedBy'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Gladiator MX'. + temp4-type = 'Draft'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Hurricane GX'. + temp4-type = 'Unsaved'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Hurricane GX'. + temp4-type = 'UnsavedBy'. + temp4-additionalinfo = 'John Doe'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Hurricane GX'. + temp4-type = 'UnsavedBy'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Hurricane GX'. + temp4-type = 'Unsaved'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Webcam'. + temp4-type = 'Favorite'. + INSERT temp4 INTO TABLE temp3. + temp4-product = 'Deskjet Super Highspeed'. + temp4-type = 'Flagged'. + INSERT temp4 INTO TABLE temp3. + lt_a_data = temp3. ENDIF. diff --git a/src/z2ui5_cl_demo_app_290.clas.abap b/src/z2ui5_cl_demo_app_290.clas.abap index 016f4510..5e501f51 100644 --- a/src/z2ui5_cl_demo_app_290.clas.abap +++ b/src/z2ui5_cl_demo_app_290.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_290 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp5 TYPE xsdboolean. + temp5 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Object List Item - markers aggregation' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp5 ). page->header_content( )->button( id = `button_hint_id` @@ -50,12 +53,24 @@ CLASS z2ui5_cl_demo_app_290 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.ObjectListItem/sample/sap.m.sample.ObjectListItemMarkers' ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/title}` INTO TABLE temp1. + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${$source>/title}` INTO TABLE temp2. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/title}` INTO TABLE temp3. + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${$source>/title}` INTO TABLE temp4. page->list( headertext = `Products` )->object_list_item( title = `Gladiator MX` type = `Active` - press = client->_event( val = `onListItemPress` t_arg = VALUE #( ( `${$source>/title}` ) ) ) + press = client->_event( val = `onListItemPress` t_arg = temp1 ) number = `87.50` numberunit = `EUR` )->first_status( @@ -74,7 +89,7 @@ CLASS z2ui5_cl_demo_app_290 IMPLEMENTATION. )->object_list_item( title = `Hurricane GX` type = `Active` - press = client->_event( val = `onListItemPress` t_arg = VALUE #( ( `${$source>/title}` ) ) ) + press = client->_event( val = `onListItemPress` t_arg = temp2 ) number = `235` numberunit = `EUR` )->first_status( @@ -93,7 +108,7 @@ CLASS z2ui5_cl_demo_app_290 IMPLEMENTATION. )->object_list_item( title = `Power Projector 4713` type = `Active` - press = client->_event( val = `onListItemPress` t_arg = VALUE #( ( `${$source>/title}` ) ) ) + press = client->_event( val = `onListItemPress` t_arg = temp3 ) number = `135` numberunit = `EUR` )->first_status( @@ -113,7 +128,7 @@ CLASS z2ui5_cl_demo_app_290 IMPLEMENTATION. )->object_list_item( title = `Webcam` type = `Active` - press = client->_event( val = `onListItemPress` t_arg = VALUE #( ( `${$source>/title}` ) ) ) + press = client->_event( val = `onListItemPress` t_arg = temp4 ) number = `15` numberunit = `EUR` )->first_status( @@ -150,7 +165,8 @@ CLASS z2ui5_cl_demo_app_290 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_291.clas.abap b/src/z2ui5_cl_demo_app_291.clas.abap index ffc734a1..7e918ebd 100644 --- a/src/z2ui5_cl_demo_app_291.clas.abap +++ b/src/z2ui5_cl_demo_app_291.clas.abap @@ -36,11 +36,14 @@ CLASS z2ui5_cl_demo_app_291 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Message Strip with enableFormattedText' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -105,7 +108,8 @@ CLASS z2ui5_cl_demo_app_291 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_292.clas.abap b/src/z2ui5_cl_demo_app_292.clas.abap index 14bc5cdf..3848bc5d 100644 --- a/src/z2ui5_cl_demo_app_292.clas.abap +++ b/src/z2ui5_cl_demo_app_292.clas.abap @@ -32,11 +32,14 @@ CLASS Z2UI5_CL_DEMO_APP_292 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp8 TYPE xsdboolean. + temp8 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Breadcrumbs sample with current page link' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp8 ). page->header_content( )->button( id = `button_hint_id` @@ -50,6 +53,27 @@ CLASS Z2UI5_CL_DEMO_APP_292 IMPLEMENTATION. target = '_blank' href = 'https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.Breadcrumbs/sample/sap.m.sample.BreadcrumbsWithCurrentPageLink' ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/text}` INTO TABLE temp1. + DATA temp2 TYPE string_table. + CLEAR temp2. + INSERT `${$source>/text}` INTO TABLE temp2. + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/text}` INTO TABLE temp3. + DATA temp4 TYPE string_table. + CLEAR temp4. + INSERT `${$source>/text}` INTO TABLE temp4. + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${$source>/text}` INTO TABLE temp5. + DATA temp6 TYPE string_table. + CLEAR temp6. + INSERT `${$source>/text}` INTO TABLE temp6. + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$source>/text}` INTO TABLE temp7. page->vertical_layout( class = `sapUiContentPadding` width = `100%` @@ -58,19 +82,19 @@ CLASS Z2UI5_CL_DEMO_APP_292 IMPLEMENTATION. separatorstyle = `{/selected}` currentlocationtext = `Page 7` )->link( text = `Home` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp1 ) )->link( text = `Page 1` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp2 ) )->link( text = `Page 2` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp3 ) )->link( text = `Page 3` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp4 ) )->link( text = `Page 4` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp5 ) )->link( text = `Page 5` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp6 ) )->link( text = `Page 6` - press = client->_event( val = `onPress` t_arg = VALUE #( ( `${$source>/text}` ) ) ) + press = client->_event( val = `onPress` t_arg = temp7 ) )->get_parent( )->get_parent( ). @@ -111,7 +135,8 @@ CLASS Z2UI5_CL_DEMO_APP_292 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_293.clas.abap b/src/z2ui5_cl_demo_app_293.clas.abap index 43b1bd43..17742813 100644 --- a/src/z2ui5_cl_demo_app_293.clas.abap +++ b/src/z2ui5_cl_demo_app_293.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_293 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Link' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -109,7 +112,8 @@ CLASS z2ui5_cl_demo_app_293 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_294.clas.abap b/src/z2ui5_cl_demo_app_294.clas.abap index 34fa3af5..7cd524fb 100644 --- a/src/z2ui5_cl_demo_app_294.clas.abap +++ b/src/z2ui5_cl_demo_app_294.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_294 DEFINITION value_state_text TYPE string, END OF ty_a_data. - DATA lt_a_data TYPE STANDARD TABLE OF ty_a_data. + TYPES temp1_2fb714d2bc TYPE STANDARD TABLE OF ty_a_data. +DATA lt_a_data TYPE temp1_2fb714d2bc. DATA s_text TYPE string. DATA check_initialized TYPE abap_bool. @@ -42,11 +43,14 @@ CLASS z2ui5_cl_demo_app_294 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Date Picker - Value States' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -91,7 +95,8 @@ CLASS z2ui5_cl_demo_app_294 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -128,21 +133,35 @@ CLASS z2ui5_cl_demo_app_294 IMPLEMENTATION. s_text = 'DatePicker with valueState '. " Append entries to the internal table - APPEND VALUE #( label = s_text && 'None' - value_state = 'None' ) TO lt_a_data. - - APPEND VALUE #( label = s_text && 'Information' - value_state = 'Information' ) TO lt_a_data. - - APPEND VALUE #( label = s_text && 'Success' - value_state = 'Success' ) TO lt_a_data. - - APPEND VALUE #( label = s_text && 'Warning and long valueStateText' - value_state = 'Warning' - value_state_text = 'Warning message. This is an extra long text used as a warning message. ' && - 'It illustrates how the text wraps into two or more lines without truncation to show the full length of the message.' ) TO lt_a_data. - - APPEND VALUE #( label = s_text && 'Error' - value_state = 'Error' ) TO lt_a_data. + DATA temp1 TYPE z2ui5_cl_demo_app_294=>ty_a_data. + CLEAR temp1. + temp1-label = s_text && 'None'. + temp1-value_state = 'None'. + APPEND temp1 TO lt_a_data. + + DATA temp2 TYPE z2ui5_cl_demo_app_294=>ty_a_data. + CLEAR temp2. + temp2-label = s_text && 'Information'. + temp2-value_state = 'Information'. + APPEND temp2 TO lt_a_data. + + DATA temp3 TYPE z2ui5_cl_demo_app_294=>ty_a_data. + CLEAR temp3. + temp3-label = s_text && 'Success'. + temp3-value_state = 'Success'. + APPEND temp3 TO lt_a_data. + + DATA temp4 TYPE z2ui5_cl_demo_app_294=>ty_a_data. + CLEAR temp4. + temp4-label = s_text && 'Warning and long valueStateText'. + temp4-value_state = 'Warning'. + temp4-value_state_text = 'Warning message. This is an extra long text used as a warning message. ' && 'It illustrates how the text wraps into two or more lines without truncation to show the full length of the message.'. + APPEND temp4 TO lt_a_data. + + DATA temp5 TYPE z2ui5_cl_demo_app_294=>ty_a_data. + CLEAR temp5. + temp5-label = s_text && 'Error'. + temp5-value_state = 'Error'. + APPEND temp5 TO lt_a_data. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_295.clas.abap b/src/z2ui5_cl_demo_app_295.clas.abap index d883cb6d..9583cc5e 100644 --- a/src/z2ui5_cl_demo_app_295.clas.abap +++ b/src/z2ui5_cl_demo_app_295.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_295 DEFINITION value_state_text TYPE string, END OF ty_a_data. - DATA lt_a_data TYPE STANDARD TABLE OF ty_a_data. + TYPES temp1_cd0137150d TYPE STANDARD TABLE OF ty_a_data. +DATA lt_a_data TYPE temp1_cd0137150d. DATA s_text TYPE string. DATA check_initialized TYPE abap_bool. @@ -42,11 +43,14 @@ CLASS z2ui5_cl_demo_app_295 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Date Range Selection - Value States' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -89,7 +93,8 @@ CLASS z2ui5_cl_demo_app_295 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -126,13 +131,26 @@ CLASS z2ui5_cl_demo_app_295 IMPLEMENTATION. s_text = 'DateRangeSelection with valueState '. " Append entries to the internal table - lt_a_data = VALUE #( - ( label = s_text && 'None' value_state = 'None' ) - ( label = s_text && 'Information' value_state = 'Information' ) - ( label = s_text && 'Success' value_state = 'Success' ) - ( label = s_text && 'Warning and long valueStateText' value_state = 'Warning' - value_state_text = 'Warning message. This is an extra long text used as a warning message. ' && - 'It illustrates how the text wraps into two or more lines without truncation to show the full length of the message.' ) - ( label = s_text && 'Error' value_state = 'Error' ) ). + DATA temp1 LIKE lt_a_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-label = s_text && 'None'. + temp2-value_state = 'None'. + INSERT temp2 INTO TABLE temp1. + temp2-label = s_text && 'Information'. + temp2-value_state = 'Information'. + INSERT temp2 INTO TABLE temp1. + temp2-label = s_text && 'Success'. + temp2-value_state = 'Success'. + INSERT temp2 INTO TABLE temp1. + temp2-label = s_text && 'Warning and long valueStateText'. + temp2-value_state = 'Warning'. + temp2-value_state_text = 'Warning message. This is an extra long text used as a warning message. ' && +'It illustrates how the text wraps into two or more lines without truncation to show the full length of the message.'. + INSERT temp2 INTO TABLE temp1. + temp2-label = s_text && 'Error'. + temp2-value_state = 'Error'. + INSERT temp2 INTO TABLE temp1. + lt_a_data = temp1. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_296.clas.abap b/src/z2ui5_cl_demo_app_296.clas.abap index 326754dc..9c0b87ad 100644 --- a/src/z2ui5_cl_demo_app_296.clas.abap +++ b/src/z2ui5_cl_demo_app_296.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_296 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Search Field` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -86,7 +89,8 @@ CLASS z2ui5_cl_demo_app_296 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_297.clas.abap b/src/z2ui5_cl_demo_app_297.clas.abap index d0b628c9..d531b613 100644 --- a/src/z2ui5_cl_demo_app_297.clas.abap +++ b/src/z2ui5_cl_demo_app_297.clas.abap @@ -14,7 +14,8 @@ CLASS z2ui5_cl_demo_app_297 DEFINITION END OF ty_product_collection. DATA check_initialized TYPE abap_bool. - DATA lt_product_collection TYPE TABLE OF ty_product_collection. + TYPES temp1_c88952cc1a TYPE TABLE OF ty_product_collection. +DATA lt_product_collection TYPE temp1_c88952cc1a. DATA selected_product TYPE string. PROTECTED SECTION. @@ -42,11 +43,14 @@ CLASS z2ui5_cl_demo_app_297 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Select - with icons` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -95,7 +99,8 @@ CLASS z2ui5_cl_demo_app_297 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -132,17 +137,50 @@ CLASS z2ui5_cl_demo_app_297 IMPLEMENTATION. selected_product = `HT-1001`. " Populate the internal table - lt_product_collection = VALUE #( - ( product_id = 'HT-1001' name = 'Notebook Basic 17' icon = 'sap-icon://paper-plane' ) - ( product_id = 'HT-1002' name = 'Notebook Basic 18' icon = 'sap-icon://add-document' ) - ( product_id = 'HT-1003' name = 'Notebook Basic 19' icon = 'sap-icon://doctor' ) - ( product_id = 'HT-1007' name = 'ITelO Vault' icon = 'sap-icon://sys-find-next' ) - ( product_id = 'HT-1010' name = 'Notebook Professional 15' icon = 'sap-icon://add-product' ) - ( product_id = 'HT-1011' name = 'Notebook Professional 17' icon = 'sap-icon://add-product' ) - ( product_id = 'HT-1020' name = 'ITelO Vault Net' icon = 'sap-icon://add-product' ) - ( product_id = 'HT-1021' name = 'ITelO Vault SAT' icon = 'sap-icon://add-product' ) - ( product_id = 'HT-1022' name = 'Comfort Easy' icon = 'sap-icon://add-product' ) - ( product_id = 'HT-1023' name = 'Comfort Senior' icon = 'sap-icon://add-product' ) ). + DATA temp1 LIKE lt_product_collection. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product_id = 'HT-1001'. + temp2-name = 'Notebook Basic 17'. + temp2-icon = 'sap-icon://paper-plane'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1002'. + temp2-name = 'Notebook Basic 18'. + temp2-icon = 'sap-icon://add-document'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1003'. + temp2-name = 'Notebook Basic 19'. + temp2-icon = 'sap-icon://doctor'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1007'. + temp2-name = 'ITelO Vault'. + temp2-icon = 'sap-icon://sys-find-next'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1010'. + temp2-name = 'Notebook Professional 15'. + temp2-icon = 'sap-icon://add-product'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1011'. + temp2-name = 'Notebook Professional 17'. + temp2-icon = 'sap-icon://add-product'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1020'. + temp2-name = 'ITelO Vault Net'. + temp2-icon = 'sap-icon://add-product'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1021'. + temp2-name = 'ITelO Vault SAT'. + temp2-icon = 'sap-icon://add-product'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1022'. + temp2-name = 'Comfort Easy'. + temp2-icon = 'sap-icon://add-product'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1023'. + temp2-name = 'Comfort Senior'. + temp2-icon = 'sap-icon://add-product'. + INSERT temp2 INTO TABLE temp1. + lt_product_collection = temp1. SORT lt_product_collection BY name. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_298.clas.abap b/src/z2ui5_cl_demo_app_298.clas.abap index bd4ae2b2..db1673a0 100644 --- a/src/z2ui5_cl_demo_app_298.clas.abap +++ b/src/z2ui5_cl_demo_app_298.clas.abap @@ -13,7 +13,8 @@ CLASS z2ui5_cl_demo_app_298 DEFINITION END OF ty_product_collection. DATA check_initialized TYPE abap_bool. - DATA lt_a_products TYPE TABLE OF ty_product_collection. + TYPES temp1_aa49f476de TYPE TABLE OF ty_product_collection. +DATA lt_a_products TYPE temp1_aa49f476de. DATA selectedproducterrorcollection TYPE string. DATA selectedproductwrnngcollection TYPE string. DATA selectedproductsccsscollection TYPE string. @@ -44,11 +45,14 @@ CLASS z2ui5_cl_demo_app_298 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Select - Validation states` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -145,7 +149,8 @@ CLASS z2ui5_cl_demo_app_298 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -187,23 +192,58 @@ CLASS z2ui5_cl_demo_app_298 IMPLEMENTATION. selectedproductinforcollection = `HT-1007`. " Populate the internal table - lt_a_products = VALUE #( - ( product_id = 'HT-998' name = 'Notebook Basic 11' ) - ( product_id = 'HT-999' name = 'Notebook Basic 13' ) - ( product_id = 'HT-1000' name = 'Notebook Basic 15' ) - ( product_id = 'HT-1001' name = 'Notebook Basic 17' ) - ( product_id = 'HT-1002' name = 'Notebook Basic 18' ) - ( product_id = 'HT-1003' name = 'Notebook Basic 19' ) - ( product_id = 'HT-1007' name = 'ITelO Vault' ) - ( product_id = 'HT-1008' name = 'Notebook Professional 11' ) - ( product_id = 'HT-1009' name = 'Notebook Professional 13' ) - ( product_id = 'HT-1010' name = 'Notebook Professional 15' ) - ( product_id = 'HT-1011' name = 'Notebook Professional 17' ) - ( product_id = 'HT-1012' name = 'Notebook Professional 19' ) - ( product_id = 'HT-1020' name = 'ITelO Vault Net' ) - ( product_id = 'HT-1021' name = 'ITelO Vault SAT' ) - ( product_id = 'HT-1022' name = 'Comfort Easy' ) - ( product_id = 'HT-1023' name = 'Comfort Senior' ) ). + DATA temp1 LIKE lt_a_products. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product_id = 'HT-998'. + temp2-name = 'Notebook Basic 11'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-999'. + temp2-name = 'Notebook Basic 13'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1000'. + temp2-name = 'Notebook Basic 15'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1001'. + temp2-name = 'Notebook Basic 17'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1002'. + temp2-name = 'Notebook Basic 18'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1003'. + temp2-name = 'Notebook Basic 19'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1007'. + temp2-name = 'ITelO Vault'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1008'. + temp2-name = 'Notebook Professional 11'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1009'. + temp2-name = 'Notebook Professional 13'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1010'. + temp2-name = 'Notebook Professional 15'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1011'. + temp2-name = 'Notebook Professional 17'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1012'. + temp2-name = 'Notebook Professional 19'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1020'. + temp2-name = 'ITelO Vault Net'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1021'. + temp2-name = 'ITelO Vault SAT'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1022'. + temp2-name = 'Comfort Easy'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1023'. + temp2-name = 'Comfort Senior'. + INSERT temp2 INTO TABLE temp1. + lt_a_products = temp1. SORT lt_a_products BY name. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_299.clas.abap b/src/z2ui5_cl_demo_app_299.clas.abap index ec701eda..54dafc16 100644 --- a/src/z2ui5_cl_demo_app_299.clas.abap +++ b/src/z2ui5_cl_demo_app_299.clas.abap @@ -13,8 +13,10 @@ CLASS z2ui5_cl_demo_app_299 DEFINITION END OF ty_product_collection. DATA check_initialized TYPE abap_bool. - DATA lt_product_collection TYPE TABLE OF ty_product_collection. - DATA lt_product_collection2 TYPE TABLE OF ty_product_collection. + TYPES temp1_3750dc126e TYPE TABLE OF ty_product_collection. +DATA lt_product_collection TYPE temp1_3750dc126e. + TYPES temp2_3750dc126e TYPE TABLE OF ty_product_collection. +DATA lt_product_collection2 TYPE temp2_3750dc126e. PROTECTED SECTION. @@ -41,11 +43,14 @@ CLASS z2ui5_cl_demo_app_299 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Select - Wrapping text` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -95,7 +100,8 @@ CLASS z2ui5_cl_demo_app_299 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -130,21 +136,47 @@ CLASS z2ui5_cl_demo_app_299 IMPLEMENTATION. CLEAR lt_product_collection2. " Populating lt_product_collection - lt_product_collection = VALUE #( - ( product_id = 'HT-1001' name = 'Select option 1' ) - ( product_id = 'HT-1002' name = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.' ) - ( product_id = 'HT-1003' name = 'Select option 3' ) - ( product_id = 'HT-1007' name = 'Select option 4' ) - ( product_id = 'HT-1010' name = 'Select option 5' ) ). + DATA temp1 LIKE lt_product_collection. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product_id = 'HT-1001'. + temp2-name = 'Select option 1'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1002'. + temp2-name = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1003'. + temp2-name = 'Select option 3'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1007'. + temp2-name = 'Select option 4'. + INSERT temp2 INTO TABLE temp1. + temp2-product_id = 'HT-1010'. + temp2-name = 'Select option 5'. + INSERT temp2 INTO TABLE temp1. + lt_product_collection = temp1. SORT lt_product_collection BY name. " Populating lt_product_collection2 - lt_product_collection2 = VALUE #( - ( product_id = 'key1' name = 'Select option 1' ) - ( product_id = 'key2' name = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.' ) - ( product_id = 'key3' name = 'Select option 3' ) - ( product_id = 'key4' name = 'Select option 4' ) - ( product_id = 'key5' name = 'Select option 5' ) ). + DATA temp3 LIKE lt_product_collection2. + CLEAR temp3. + DATA temp4 LIKE LINE OF temp3. + temp4-product_id = 'key1'. + temp4-name = 'Select option 1'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'key2'. + temp4-name = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum is simply dummy text of the printing and typesetting industry.'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'key3'. + temp4-name = 'Select option 3'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'key4'. + temp4-name = 'Select option 4'. + INSERT temp4 INTO TABLE temp3. + temp4-product_id = 'key5'. + temp4-name = 'Select option 5'. + INSERT temp4 INTO TABLE temp3. + lt_product_collection2 = temp3. SORT lt_product_collection2 BY name. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_300.clas.abap b/src/z2ui5_cl_demo_app_300.clas.abap index d2cd6335..bb61e7bd 100644 --- a/src/z2ui5_cl_demo_app_300.clas.abap +++ b/src/z2ui5_cl_demo_app_300.clas.abap @@ -32,11 +32,14 @@ CLASS z2ui5_cl_demo_app_300 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Object Status` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -390,10 +393,13 @@ CLASS z2ui5_cl_demo_app_300 IMPLEMENTATION. WHEN 'CLICK_HINT_ICON'. z2ui5_display_popover( `button_hint_id` ). WHEN 'handleStatusPressed'. + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `OK ` INTO TABLE temp1. client->message_box_display( title = `Error description` type = `` "Keep this empty to use the custom title instead of the default message type as title text = `Product was damaged along transportation.` - actions = VALUE string_table( ( `OK ` ) ) ). "Add space after 'OK' to prevent the button type from being 'Emphasized' + actions = temp1 ). "Add space after 'OK' to prevent the button type from being 'Emphasized' ENDCASE. ENDMETHOD. @@ -401,7 +407,8 @@ CLASS z2ui5_cl_demo_app_300 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` diff --git a/src/z2ui5_cl_demo_app_301.clas.abap b/src/z2ui5_cl_demo_app_301.clas.abap index c9ef45d9..2e34c536 100644 --- a/src/z2ui5_cl_demo_app_301.clas.abap +++ b/src/z2ui5_cl_demo_app_301.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_301 DEFINITION END OF ty_product. DATA check_initialized TYPE abap_bool. - DATA lt_o_data TYPE TABLE OF ty_product. + TYPES temp1_86c020306c TYPE TABLE OF ty_product. +DATA lt_o_data TYPE temp1_86c020306c. PROTECTED SECTION. DATA client TYPE REF TO z2ui5_if_client. @@ -42,11 +43,14 @@ CLASS z2ui5_cl_demo_app_301 IMPLEMENTATION. METHOD display_view. - DATA(page_01) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page_01 TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page_01 = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = `abap2UI5 - Sample: Expandable Text` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page_01->header_content( )->button( id = `button_hint_id` @@ -109,7 +113,8 @@ CLASS z2ui5_cl_demo_app_301 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -142,35 +147,42 @@ CLASS z2ui5_cl_demo_app_301 IMPLEMENTATION. CLEAR lt_o_data. - lt_o_data = VALUE #( - ( name = 'Product 1' - attribute_1 = `The full text is displayed in place. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && - `et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr` - attribute_2 = 'Attribute related to label' - status = 'Some status' - overflow_mode = 'InPlace' ) - ( name = 'Product 2' - attribute_1 = `The full text is displayed in a popover. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && - `et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr` - attribute_2 = 'Attribute related to label' - status = 'Some status' - overflow_mode = 'Popover' ) - ( name = 'Product 3' - attribute_1 = `The full text is displayed in place. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && - `et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr` - attribute_2 = 'Attribute related to label' - status = 'Some status' - overflow_mode = 'InPlace' ) - ( name = 'Product 4' - attribute_1 = `The full text is displayed in a popover. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && - `At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && - `et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr` - attribute_2 = 'Attribute related to label' - status = 'Some status' - overflow_mode = 'Popover' ) ). + DATA temp1 LIKE lt_o_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-name = 'Product 1'. + temp2-attribute_1 = `The full text is displayed in place. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && +`et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr`. + temp2-attribute_2 = 'Attribute related to label'. + temp2-status = 'Some status'. + temp2-overflow_mode = 'InPlace'. + INSERT temp2 INTO TABLE temp1. + temp2-name = 'Product 2'. + temp2-attribute_1 = `The full text is displayed in a popover. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && +`et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr`. + temp2-attribute_2 = 'Attribute related to label'. + temp2-status = 'Some status'. + temp2-overflow_mode = 'Popover'. + INSERT temp2 INTO TABLE temp1. + temp2-name = 'Product 3'. + temp2-attribute_1 = `The full text is displayed in place. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && +`et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr`. + temp2-attribute_2 = 'Attribute related to label'. + temp2-status = 'Some status'. + temp2-overflow_mode = 'InPlace'. + INSERT temp2 INTO TABLE temp1. + temp2-name = 'Product 4'. + temp2-attribute_1 = `The full text is displayed in a popover. Lorem ipsum dolor sit amet, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. ` && +`At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore ` && +`et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadipscing elitr`. + temp2-attribute_2 = 'Attribute related to label'. + temp2-status = 'Some status'. + temp2-overflow_mode = 'Popover'. + INSERT temp2 INTO TABLE temp1. + lt_o_data = temp1. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_302.clas.abap b/src/z2ui5_cl_demo_app_302.clas.abap index cc1f26a9..18c45216 100644 --- a/src/z2ui5_cl_demo_app_302.clas.abap +++ b/src/z2ui5_cl_demo_app_302.clas.abap @@ -14,7 +14,8 @@ CLASS z2ui5_cl_demo_app_302 DEFINITION END OF ty_product. DATA check_initialized TYPE abap_bool. - DATA lt_a_data TYPE TABLE OF ty_product. + TYPES temp1_16f0541213 TYPE TABLE OF ty_product. +DATA lt_a_data TYPE temp1_16f0541213. PROTECTED SECTION. @@ -40,11 +41,14 @@ CLASS z2ui5_cl_demo_app_302 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Sample: Object Attribute inside Table' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->header_content( )->button( id = `button_hint_id` @@ -101,7 +105,8 @@ CLASS z2ui5_cl_demo_app_302 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). view->quick_view( placement = `Bottom` width = `auto` )->quick_view_page( pageid = `sampleInformationId` @@ -123,17 +128,40 @@ CLASS z2ui5_cl_demo_app_302 IMPLEMENTATION. check_initialized = abap_true. display_view( client ). - lt_a_data = VALUE #( - ( product = 'Power Projector 4713' supplier = 'Robert Brown Entertainment' ) - ( product = 'HT-1022' supplier = 'Pear Computing Services' ) - ( product = 'Ergo Screen E-III' supplier = 'DelBont Industries' ) - ( product = 'Gladiator MX' supplier = 'Asia High tech' ) - ( product = 'Hurricane GX' supplier = 'Telecomunicaciones Star' ) - ( product = 'Notebook Basic 17' supplier = 'Pear Computing Services' ) - ( product = 'ITelO Vault SAT' supplier = 'New Line Design' ) - ( product = 'Hurricane GX' supplier = 'Robert Brown Entertainment' ) - ( product = 'Webcam' supplier = 'Getränkegroßhandel Janssen' ) - ( product = 'Deskjet Super Highspeed' supplier = 'Vente Et Réparation de Ordinateur' ) ). + DATA temp1 LIKE lt_a_data. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-product = 'Power Projector 4713'. + temp2-supplier = 'Robert Brown Entertainment'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'HT-1022'. + temp2-supplier = 'Pear Computing Services'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Ergo Screen E-III'. + temp2-supplier = 'DelBont Industries'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Gladiator MX'. + temp2-supplier = 'Asia High tech'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Hurricane GX'. + temp2-supplier = 'Telecomunicaciones Star'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Notebook Basic 17'. + temp2-supplier = 'Pear Computing Services'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'ITelO Vault SAT'. + temp2-supplier = 'New Line Design'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Hurricane GX'. + temp2-supplier = 'Robert Brown Entertainment'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Webcam'. + temp2-supplier = 'Getränkegroßhandel Janssen'. + INSERT temp2 INTO TABLE temp1. + temp2-product = 'Deskjet Super Highspeed'. + temp2-supplier = 'Vente Et Réparation de Ordinateur'. + INSERT temp2 INTO TABLE temp1. + lt_a_data = temp1. ENDIF. on_event( client ). diff --git a/src/z2ui5_cl_demo_app_303.clas.abap b/src/z2ui5_cl_demo_app_303.clas.abap index cb49b631..00c140b4 100644 --- a/src/z2ui5_cl_demo_app_303.clas.abap +++ b/src/z2ui5_cl_demo_app_303.clas.abap @@ -9,11 +9,14 @@ ENDCLASS. CLASS z2ui5_cl_demo_app_303 IMPLEMENTATION. METHOD z2ui5_if_app~main. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(object_page_layout) = view->object_page_layout( showtitleinheadercontent = `Title` + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA object_page_layout TYPE REF TO z2ui5_cl_xml_view. + object_page_layout = view->object_page_layout( showtitleinheadercontent = `Title` uppercaseanchorbar = abap_false ). - DATA(header_title) = object_page_layout->header_title( + DATA header_title TYPE REF TO z2ui5_cl_xml_view. + header_title = object_page_layout->header_title( )->object_page_dyn_header_title( ). header_title->expanded_heading( @@ -46,7 +49,8 @@ CLASS z2ui5_cl_demo_app_303 IMPLEMENTATION. text = `Share` tooltip = `action` ). - DATA(header_content) = object_page_layout->header_content( ns = 'uxap' + DATA header_content TYPE REF TO z2ui5_cl_xml_view. + header_content = object_page_layout->header_content( ns = 'uxap' )->header_container_control( id = `headerContainer` scrollstep = `200` showdividers = abap_false ). @@ -172,7 +176,8 @@ CLASS z2ui5_cl_demo_app_303 IMPLEMENTATION. )->vbox( alignitems = `End` )->text( text = `4.1 out of 5` ). - DATA(section) = object_page_layout->sections( ). + DATA section TYPE REF TO z2ui5_cl_xml_view. + section = object_page_layout->sections( ). section->object_page_section( titleuppercase = abap_false id = `goalsSection` diff --git a/src/z2ui5_cl_demo_app_305.clas.abap b/src/z2ui5_cl_demo_app_305.clas.abap index 7785246b..929eff55 100644 --- a/src/z2ui5_cl_demo_app_305.clas.abap +++ b/src/z2ui5_cl_demo_app_305.clas.abap @@ -10,7 +10,7 @@ CLASS z2ui5_cl_demo_app_305 DEFINITION title TYPE string, value TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA t_tab TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. PROTECTED SECTION. DATA client TYPE REF TO z2ui5_if_client. @@ -23,8 +23,10 @@ CLASS z2ui5_cl_demo_app_305 IMPLEMENTATION. METHOD set_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Tables and cell colors' navbuttonpress = client->_event( 'BACK' ) @@ -58,7 +60,8 @@ CLASS z2ui5_cl_demo_app_305 IMPLEMENTATION. && ` background-color: yellow;` && `}` ). - DATA(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( items = client->_bind_edit( t_tab ) mode = 'MultiSelect' )->header_toolbar( @@ -94,14 +97,29 @@ CLASS z2ui5_cl_demo_app_305 IMPLEMENTATION. me->client = client. - IF client->check_on_init( ). - t_tab = VALUE #( - ( title = 'entry 01' value = 'red' ) - ( title = 'entry 02' value = 'blue' ) - ( title = 'entry 03' value = 'green' ) - ( title = 'entry 04' value = 'yellow' ) - ( title = 'entry 05' value = 'orange' ) - ( title = 'entry 06' value = 'grey' ) ). + IF client->check_on_init( ) IS NOT INITIAL. + DATA temp1 LIKE t_tab. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = 'entry 01'. + temp2-value = 'red'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 02'. + temp2-value = 'blue'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 03'. + temp2-value = 'green'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 04'. + temp2-value = 'yellow'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 05'. + temp2-value = 'orange'. + INSERT temp2 INTO TABLE temp1. + temp2-title = 'entry 06'. + temp2-value = 'grey'. + INSERT temp2 INTO TABLE temp1. + t_tab = temp1. set_view( ). ENDIF. diff --git a/src/z2ui5_cl_demo_app_306.clas.abap b/src/z2ui5_cl_demo_app_306.clas.abap index ba605e07..1c509f07 100644 --- a/src/z2ui5_cl_demo_app_306.clas.abap +++ b/src/z2ui5_cl_demo_app_306.clas.abap @@ -15,8 +15,10 @@ CLASS z2ui5_cl_demo_app_306 DEFINITION selected TYPE abap_bool, END OF ty_picture. - DATA mt_picture TYPE STANDARD TABLE OF ty_picture WITH EMPTY KEY. - DATA mt_picture_out TYPE STANDARD TABLE OF ty_picture WITH EMPTY KEY. + TYPES temp1_80bb85a5cb TYPE STANDARD TABLE OF ty_picture WITH DEFAULT KEY. +DATA mt_picture TYPE temp1_80bb85a5cb. + TYPES temp2_80bb85a5cb TYPE STANDARD TABLE OF ty_picture WITH DEFAULT KEY. +DATA mt_picture_out TYPE temp2_80bb85a5cb. DATA mv_pic_display TYPE string. DATA mv_check_init TYPE abap_bool. DATA mv_picture_base TYPE string. @@ -37,12 +39,17 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(cont) = view->shell( ). - DATA(page) = cont->page( title = 'abap2UI5 - Device Camera Picture' + DATA cont TYPE REF TO z2ui5_cl_xml_view. + cont = view->shell( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp3 TYPE xsdboolean. + temp3 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = cont->page( title = 'abap2UI5 - Device Camera Picture' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp3 )->header_content( )->link( text = 'Source_Code' target = '_blank' @@ -65,13 +72,17 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. selected = `{SELECTED}` ). IF mv_pic_display IS NOT INITIAL. + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-n = 'src'. + temp2-v = mv_pic_display. + INSERT temp2 INTO TABLE temp1. page->_generic( ns = 'html' name = 'center' )->_generic( ns = 'html' name = 'img' - t_prop = VALUE #( - ( n = 'src' v = mv_pic_display ) - ) ). + t_prop = temp1 ). ENDIF. client->view_display( view->stringify( ) ). @@ -92,7 +103,11 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. CASE client->get( )-event. WHEN 'CAPTURE'. - INSERT VALUE #( data = mv_picture_base time = sy-uzeit ) INTO TABLE mt_picture. + DATA temp3 TYPE z2ui5_cl_demo_app_306=>ty_picture. + CLEAR temp3. + temp3-data = mv_picture_base. + temp3-time = sy-uzeit. + INSERT temp3 INTO TABLE mt_picture. CLEAR mv_picture_base. client->view_model_update( ). @@ -100,10 +115,28 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. WHEN 'DISPLAY'. - DATA(lt_sel) = mt_picture_out. + DATA lt_sel LIKE mt_picture_out. + lt_sel = mt_picture_out. DELETE lt_sel WHERE selected = abap_false. - DATA(ls_sel) = lt_sel[ 1 ]. - mv_pic_display = mt_picture[ ls_sel-id ]-data. + DATA ls_sel LIKE LINE OF lt_sel. + DATA temp1 LIKE LINE OF lt_sel. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE lt_sel INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + ls_sel = temp1. + DATA temp4 LIKE LINE OF mt_picture. + DATA temp5 LIKE sy-tabix. + temp5 = sy-tabix. + READ TABLE mt_picture INDEX ls_sel-id INTO temp4. + sy-tabix = temp5. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + mv_pic_display = temp4-data. view_display( client ). WHEN 'BACK'. @@ -111,9 +144,16 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. ENDCASE. - mt_picture_out = VALUE #( ). - LOOP AT mt_picture INTO DATA(ls_pic). - INSERT VALUE #( name = `picture ` && sy-tabix id = sy-tabix ) INTO TABLE mt_picture_out. + DATA temp6 LIKE mt_picture_out. + CLEAR temp6. + mt_picture_out = temp6. + DATA ls_pic LIKE LINE OF mt_picture. + LOOP AT mt_picture INTO ls_pic. + DATA temp7 TYPE z2ui5_cl_demo_app_306=>ty_picture. + CLEAR temp7. + temp7-name = `picture ` && sy-tabix. + temp7-id = sy-tabix. + INSERT temp7 INTO TABLE mt_picture_out. ENDLOOP. ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_307.clas.abap b/src/z2ui5_cl_demo_app_307.clas.abap index 29338a63..9edee730 100644 --- a/src/z2ui5_cl_demo_app_307.clas.abap +++ b/src/z2ui5_cl_demo_app_307.clas.abap @@ -52,142 +52,178 @@ CLASS z2ui5_cl_demo_app_307 IMPLEMENTATION. ENDMETHOD. METHOD initialization. - items = VALUE #( - ( title = `Box title 1` - subtitle = `Subtitle 1` - counter = 5 - highlight = `Error` - unread = abap_true - type = `Active` ) - ( title = `Box title 2` - subtitle = `Subtitle 2` - counter = 15 - highlight = `Warning` - type = `Active` ) - ( title = `Box title 3` - subtitle = `Subtitle 3` - counter = 15734 - highlight = `None` - type = `Inactive` - busy = abap_true ) - ( title = `Box title 4` - subtitle = `Subtitle 4` - counter = 2 - highlight = `None` - type = `Inactive` ) - ( title = `Box title 5` - subtitle = `Subtitle 5` - counter = 1 - highlight = `Warning` - type = `Inactive` ) - ( title = `Box title 6 Box title Box title Box title Box title Box title` - subtitle = `Subtitle 6` - counter = 5 - highlight = `None` - type = `Active` ) - ( title = `Very long Box title that should wrap 7` - subtitle = `This is a long subtitle 7` - counter = 5 - highlight = `Error` - type = `DetailAndActive` ) - ( title = `Box title B 8` - subtitle = `Subtitle 8` - counter = 0 - highlight = `None` - type = `Navigation` ) - ( title = `Box title B 9 Box title B Box title B 9 Box title B 9Box title B 9title B 9 Box title B 9Box title B` - subtitle = `Subtitle 9` - highlight = `Success` - type = `Inactive` ) - ( title = `Box title B 10` - subtitle = `Subtitle 10` - highlight = `None` - type = `Active` ) - ( title = `Box title B 11` - subtitle = `Subtitle 11` - highlight = `None` - type = `Active` ) - ( title = `Box title B 12` - subtitle = `Subtitle 12` - highlight = `Information` - type = `Inactive` ) - ( title = `Box title 13` - subtitle = `Subtitle 13` - counter = 5 - highlight = `None` - type = `Navigation` ) - ( title = `Box title 14` - subtitle = `Subtitle 14` - highlight = `Success` - type = `DetailAndActive` ) - ( title = `Box title 15` - subtitle = `Subtitle 15` - highlight = `None` - type = `Inactive` ) - ( title = `Box title 16` - subtitle = `Subtitle 16` - counter = 37412578 - highlight = `None` - type = `Navigation` ) - ( title = `Box title 17` - subtitle = `Subtitle 17` - highlight = `Information` - type = `Inactive` ) - ( title = `Box title 18` - subtitle = `Subtitle 18` - highlight = `None` - type = `Inactive` ) - ( title = `Very long Box title that should wrap 19` - subtitle = `This is a long subtitle 19` - highlight = `None` - type = `Inactive` ) - ( title = `Box title B 20` - subtitle = `Subtitle 20` - counter = 1 - busy = abap_true - highlight = `Success` - type = `Inactive` ) - ( title = `Box title B 21` - subtitle = `Subtitle 21` - highlight = `None` - type = `Navigation` ) - ( title = `Box title B 22` - subtitle = `Subtitle 22` - counter = 5 - highlight = `None` - unread = abap_true - type = `Inactive` ) - ( title = `Box title B 23` - subtitle = `Subtitle 23` - counter = 3 - highlight = `None` - unread = abap_true - type = `Inactive` ) - ( title = `Box title B 24` - subtitle = `Subtitle 24` - counter = 5 - highlight = `Error` - type = `Inactive` ) - ( title = `Box title B 21` - subtitle = `Subtitle 21` - highlight = `None` - type = `Inactive` ) - ( title = `Box title B 22` - subtitle = `Subtitle 22` - highlight = `None` - unread = abap_true - type = `Navigation` ) - ( title = `Box title B 23` - subtitle = `Subtitle 23` - highlight = `None` - type = `Navigation` ) ). + DATA temp1 TYPE z2ui5_cl_demo_app_307=>ty_items. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-title = `Box title 1`. + temp2-subtitle = `Subtitle 1`. + temp2-counter = 5. + temp2-highlight = `Error`. + temp2-unread = abap_true. + temp2-type = `Active`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 2`. + temp2-subtitle = `Subtitle 2`. + temp2-counter = 15. + temp2-highlight = `Warning`. + temp2-type = `Active`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 3`. + temp2-subtitle = `Subtitle 3`. + temp2-counter = 15734. + temp2-highlight = `None`. + temp2-type = `Inactive`. + temp2-busy = abap_true. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 4`. + temp2-subtitle = `Subtitle 4`. + temp2-counter = 2. + temp2-highlight = `None`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 5`. + temp2-subtitle = `Subtitle 5`. + temp2-counter = 1. + temp2-highlight = `Warning`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 6 Box title Box title Box title Box title Box title`. + temp2-subtitle = `Subtitle 6`. + temp2-counter = 5. + temp2-highlight = `None`. + temp2-type = `Active`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Very long Box title that should wrap 7`. + temp2-subtitle = `This is a long subtitle 7`. + temp2-counter = 5. + temp2-highlight = `Error`. + temp2-type = `DetailAndActive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 8`. + temp2-subtitle = `Subtitle 8`. + temp2-counter = 0. + temp2-highlight = `None`. + temp2-type = `Navigation`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 9 Box title B Box title B 9 Box title B 9Box title B 9title B 9 Box title B 9Box title B`. + temp2-subtitle = `Subtitle 9`. + temp2-highlight = `Success`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 10`. + temp2-subtitle = `Subtitle 10`. + temp2-highlight = `None`. + temp2-type = `Active`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 11`. + temp2-subtitle = `Subtitle 11`. + temp2-highlight = `None`. + temp2-type = `Active`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 12`. + temp2-subtitle = `Subtitle 12`. + temp2-highlight = `Information`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 13`. + temp2-subtitle = `Subtitle 13`. + temp2-counter = 5. + temp2-highlight = `None`. + temp2-type = `Navigation`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 14`. + temp2-subtitle = `Subtitle 14`. + temp2-highlight = `Success`. + temp2-type = `DetailAndActive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 15`. + temp2-subtitle = `Subtitle 15`. + temp2-highlight = `None`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 16`. + temp2-subtitle = `Subtitle 16`. + temp2-counter = 37412578. + temp2-highlight = `None`. + temp2-type = `Navigation`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 17`. + temp2-subtitle = `Subtitle 17`. + temp2-highlight = `Information`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title 18`. + temp2-subtitle = `Subtitle 18`. + temp2-highlight = `None`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Very long Box title that should wrap 19`. + temp2-subtitle = `This is a long subtitle 19`. + temp2-highlight = `None`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 20`. + temp2-subtitle = `Subtitle 20`. + temp2-counter = 1. + temp2-busy = abap_true. + temp2-highlight = `Success`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 21`. + temp2-subtitle = `Subtitle 21`. + temp2-highlight = `None`. + temp2-type = `Navigation`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 22`. + temp2-subtitle = `Subtitle 22`. + temp2-counter = 5. + temp2-highlight = `None`. + temp2-unread = abap_true. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 23`. + temp2-subtitle = `Subtitle 23`. + temp2-counter = 3. + temp2-highlight = `None`. + temp2-unread = abap_true. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 24`. + temp2-subtitle = `Subtitle 24`. + temp2-counter = 5. + temp2-highlight = `Error`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 21`. + temp2-subtitle = `Subtitle 21`. + temp2-highlight = `None`. + temp2-type = `Inactive`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 22`. + temp2-subtitle = `Subtitle 22`. + temp2-highlight = `None`. + temp2-unread = abap_true. + temp2-type = `Navigation`. + INSERT temp2 INTO TABLE temp1. + temp2-title = `Box title B 23`. + temp2-subtitle = `Subtitle 23`. + temp2-highlight = `None`. + temp2-type = `Navigation`. + INSERT temp2 INTO TABLE temp1. + items = temp1. ENDMETHOD. METHOD display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_z2ui5( )->title( `Grid List with Drag and Drop` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$parameters>/draggedControl/oParent}.indexOfItem(${$parameters>/draggedControl})` INTO TABLE temp3. + INSERT `${$parameters>/droppedControl/oParent}.indexOfItem(${$parameters>/droppedControl})` INTO TABLE temp3. + INSERT `${$parameters>/dropPosition}` INTO TABLE temp3. view->panel( id = `panelForGridList` backgrounddesign = `Transparent` )->header_toolbar( @@ -206,10 +242,7 @@ CLASS z2ui5_cl_demo_app_307 IMPLEMENTATION. droplayout = `Horizontal` drop = client->_event( val = 'onDrop' - t_arg = VALUE #( - ( `${$parameters>/draggedControl/oParent}.indexOfItem(${$parameters>/draggedControl})` ) - ( `${$parameters>/droppedControl/oParent}.indexOfItem(${$parameters>/droppedControl})` ) - ( `${$parameters>/dropPosition}` ) ) ) + t_arg = temp3 ) )->get_parent( )->custom_layout( ns = 'f' )->grid_box_layout( boxminwidth = `17rem` @@ -235,12 +268,53 @@ CLASS z2ui5_cl_demo_app_307 IMPLEMENTATION. METHOD on_event. CASE client->get( )-event. WHEN 'onDrop'. - DATA(ondropparameters) = client->get( )-t_event_arg. + DATA ondropparameters TYPE string_table. + ondropparameters = client->get( )-t_event_arg. TRY. - DATA(drag_position) = CONV i( ondropparameters[ 1 ] ) + 1. - DATA(drop_position) = CONV i( ondropparameters[ 2 ] ) + 1. - DATA(insert_position) = ondropparameters[ 3 ]. - DATA(item) = items[ drag_position ]. + DATA temp5 TYPE i. + DATA temp1 LIKE LINE OF ondropparameters. + DATA temp2 LIKE sy-tabix. + temp2 = sy-tabix. + READ TABLE ondropparameters INDEX 1 INTO temp1. + sy-tabix = temp2. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + temp5 = temp1. + DATA drag_position TYPE i. + drag_position = temp5 + 1. + DATA temp6 TYPE i. + DATA temp3 LIKE LINE OF ondropparameters. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE ondropparameters INDEX 2 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + temp6 = temp3. + DATA drop_position TYPE i. + drop_position = temp6 + 1. + DATA insert_position LIKE LINE OF ondropparameters. + DATA temp7 LIKE LINE OF ondropparameters. + DATA temp8 LIKE sy-tabix. + temp8 = sy-tabix. + READ TABLE ondropparameters INDEX 3 INTO temp7. + sy-tabix = temp8. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + insert_position = temp7. + DATA item LIKE LINE OF items. + DATA temp9 LIKE LINE OF items. + DATA temp10 LIKE sy-tabix. + temp10 = sy-tabix. + READ TABLE items INDEX drag_position INTO temp9. + sy-tabix = temp10. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + item = temp9. CATCH cx_root. RETURN. ENDTRY. diff --git a/src/z2ui5_cl_demo_app_308.clas.abap b/src/z2ui5_cl_demo_app_308.clas.abap index 876559f9..e5883d2d 100644 --- a/src/z2ui5_cl_demo_app_308.clas.abap +++ b/src/z2ui5_cl_demo_app_308.clas.abap @@ -16,13 +16,17 @@ CLASS z2ui5_cl_demo_app_308 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). - - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + IF client->check_on_init( ) IS NOT INITIAL. + + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'Harvey Chart' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->harvey_ball_micro_chart( * colorpalette = diff --git a/src/z2ui5_cl_demo_app_309.clas.abap b/src/z2ui5_cl_demo_app_309.clas.abap index b3cda57d..47cd9660 100644 --- a/src/z2ui5_cl_demo_app_309.clas.abap +++ b/src/z2ui5_cl_demo_app_309.clas.abap @@ -45,15 +45,19 @@ CLASS Z2UI5_CL_DEMO_APP_309 IMPLEMENTATION. METHOD view_display. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( name = `script` ns = `html` )->_cc_plain_xml( `sap.z2ui5.afterBE = () => { alert("afterBE triggered !!"); }` ). - DATA(page) = view->shell( )->page( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = `Client->FOLLOW_UP_ACTION use cases` class = `sapUiContentPadding` navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page = page->vbox( ). page->get_parent( )->hbox( class = `sapUiSmallMargin` ). page->button( text = `call custom JS from EB` diff --git a/src/z2ui5_cl_demo_app_310.clas.abap b/src/z2ui5_cl_demo_app_310.clas.abap index b968194d..923897fd 100644 --- a/src/z2ui5_cl_demo_app_310.clas.abap +++ b/src/z2ui5_cl_demo_app_310.clas.abap @@ -70,11 +70,13 @@ CLASS z2ui5_cl_demo_app_310 IMPLEMENTATION. ENDCASE. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.my-style{ background: black !important; opacity: 0.6; color: white; }` ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - Messages' navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_311.clas.abap b/src/z2ui5_cl_demo_app_311.clas.abap index 0974f836..6c5b6776 100644 --- a/src/z2ui5_cl_demo_app_311.clas.abap +++ b/src/z2ui5_cl_demo_app_311.clas.abap @@ -13,7 +13,7 @@ CLASS z2ui5_cl_demo_app_311 DEFINITION PUBLIC. group TYPE string, END OF ty_msg. - DATA t_msg TYPE STANDARD TABLE OF ty_msg WITH EMPTY KEY. + DATA t_msg TYPE STANDARD TABLE OF ty_msg WITH DEFAULT KEY. DATA check_initialized TYPE abap_bool. METHODS z2ui5_display_view. @@ -36,7 +36,8 @@ CLASS Z2UI5_CL_DEMO_APP_311 IMPLEMENTATION. METHOD z2ui5_display_popover. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup->message_popover( items = client->_bind( t_msg ) @@ -59,7 +60,8 @@ CLASS Z2UI5_CL_DEMO_APP_311 IMPLEMENTATION. METHOD z2ui5_display_popup. - DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + DATA popup TYPE REF TO z2ui5_cl_xml_view. + popup = z2ui5_cl_xml_view=>factory_popup( ). popup = popup->dialog( title = `Messages` @@ -94,10 +96,12 @@ CLASS Z2UI5_CL_DEMO_APP_311 IMPLEMENTATION. METHOD z2ui5_display_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.sapMDialogScroll { height:100%; }` ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = view->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( val = 'BACK' ) @@ -138,11 +142,34 @@ CLASS Z2UI5_CL_DEMO_APP_311 IMPLEMENTATION. IF check_initialized = abap_false. check_initialized = abap_true. - t_msg = VALUE #( - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Error' group = 'group 01' ) - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Information' group = 'group 01' ) - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Information' group = 'group 02' ) - ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Success' group = 'group 03' ) ). + DATA temp1 LIKE t_msg. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Error'. + temp2-group = 'group 01'. + INSERT temp2 INTO TABLE temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Information'. + temp2-group = 'group 01'. + INSERT temp2 INTO TABLE temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Information'. + temp2-group = 'group 02'. + INSERT temp2 INTO TABLE temp1. + temp2-description = 'descr'. + temp2-subtitle = 'subtitle'. + temp2-title = 'title'. + temp2-type = 'Success'. + temp2-group = 'group 03'. + INSERT temp2 INTO TABLE temp1. + t_msg = temp1. z2ui5_display_view( ). diff --git a/src/z2ui5_cl_demo_app_312.clas.abap b/src/z2ui5_cl_demo_app_312.clas.abap index 70440a78..483245c7 100644 --- a/src/z2ui5_cl_demo_app_312.clas.abap +++ b/src/z2ui5_cl_demo_app_312.clas.abap @@ -54,19 +54,26 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. METHOD on_init. " ---------- Set vizframe chart data -------------------------------------------------------------- - mt_data_chart = VALUE #( ( week = 'Week 1 - 4' - revenue = '431000.22' - cost = '230000.00' ) - ( week = 'Week 5 - 8' - revenue = '494000.30' - cost = '238000.00' ) - ( week = 'Week 9 - 12' - revenue = '491000.17' - cost = '221000.00' ) - ( week = 'Week 13 - 16' - revenue = '536000.34' - cost = '280000.00' ) - ). + DATA temp1 TYPE z2ui5_cl_demo_app_312=>tt_data_chart. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-week = 'Week 1 - 4'. + temp2-revenue = '431000.22'. + temp2-cost = '230000.00'. + INSERT temp2 INTO TABLE temp1. + temp2-week = 'Week 5 - 8'. + temp2-revenue = '494000.30'. + temp2-cost = '238000.00'. + INSERT temp2 INTO TABLE temp1. + temp2-week = 'Week 9 - 12'. + temp2-revenue = '491000.17'. + temp2-cost = '221000.00'. + INSERT temp2 INTO TABLE temp1. + temp2-week = 'Week 13 - 16'. + temp2-revenue = '536000.34'. + temp2-cost = '280000.00'. + INSERT temp2 INTO TABLE temp1. + mt_data_chart = temp1. " ---------- Set vizframe properties (optional) --------------------------------------------------- mv_prop = |\{| && |\n| && |"plotArea": \{| && |\n| && @@ -95,125 +102,103 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. |\}|. " ---------- Set vizframe feed item values for value axis ----------------------------------------- - mt_feed_values = VALUE #( ( `Revenue` ) - ( `Cost` ) ). + DATA temp3 LIKE mt_feed_values. + CLEAR temp3. + INSERT `Revenue` INTO TABLE temp3. + INSERT `Cost` INTO TABLE temp3. + mt_feed_values = temp3. " ---------- Set viz type default ----------------------------------------------------------------- ms_screen-viztype = 'column'. ms_screen-viztypesel = 'column'. " ---------- Set VizFrame types ------------------------------------------------------------------- - mt_viztypes = VALUE #( ( n = 'column' - v = 'column' ) -* ( key = 'dual_column' -* text = 'dual_column' ) - ( n = 'bar' - v = 'bar' ) -* ( key = 'dual_bar' -* text = 'dual_bar' ) - ( n = 'stacked_bar' - v = 'stacked_bar' ) - ( n = 'stacked_column' - v = 'stacked_column' ) - ( n = 'line' - v = 'line' ) -* ( key = 'dual_line' -* text = 'dual_line' ) - ( n = 'combination' - v = 'combination' ) - ( n = 'bullet' - v = 'bullet' ) -* ( key = 'time_bullet' -* text = 'time_bullet' ) -* ( key = 'bubble' -* text = 'bubble' ) -* ( key = 'time_bubble' -* text = 'time_bubble' ) -* ( key = 'pie' -* text = 'pie' ) -* ( key = 'donut' -* text = 'donut' ) -* ( key = 'timeseries_column' -* text = 'timeseries_column' ) -* ( key = 'timeseries_line' -* text = 'timeseries_line' ) -* ( key = 'timeseries_scatter' -* text = 'timeseries_scatter' ) -* ( key = 'timeseries_bubble' -* text = 'timeseries_bubble' ) -* ( key = 'timeseries_stacked_column' -* text = 'timeseries_stacked_column' ) -* ( key = 'timeseries_100_stacked_column' -* text = 'timeseries_100_stacked_column' ) -* ( key = 'timeseries_bullet' -* text = 'timeseries_bullet' ) -* ( key = 'timeseries_waterfall' -* text = 'timeseries_waterfall' ) -* ( key = 'timeseries_stacked_combination scatter' -* text = 'timeseries_stacked_combination scatter' ) - ( n = 'vertical_bullet' - v = 'vertical_bullet' ) -* ( key = 'dual_stacked_bar' -* text = 'dual_stacked_bar' ) - ( n = '100_stacked_bar' - v = '100_stacked_bar' ) -* ( key = '100_dual_stacked_bar' -* text = '100_dual_stacked_bar' ) -* ( key = 'dual_stacked_column' -* text = 'dual_stacked_column' ) - ( n = '100_stacked_column' - v = '100_stacked_column' ) -* ( key = '100_dual_stacked_column' -* text = '100_dual_stacked_column' ) - ( n = 'stacked_combination' - v = 'stacked_combination' ) - ( n = 'horizontal_stacked_combination' - v = 'horizontal_stacked_combination' ) -* ( key = 'dual_stacked_combination' -* text = 'dual_stacked_combination' ) -* ( key = 'dual_horizontal_stacked_combination' -* text = 'dual_horizontal_stacked_combination' ) -* ( key = 'heatmap' -* text = 'heatmap' ) -* ( key = 'treemap' -* text = 'treemap' ) - ( n = 'waterfall' - v = 'waterfall' ) - ( n = 'horizontal_waterfall' - v = 'horizontal_waterfall' ) - ( n = 'area' - v = 'area' ) - ( n = 'radar' - v = 'radar' ) - ). + DATA temp5 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp5. + DATA temp6 LIKE LINE OF temp5. + temp6-n = 'column'. + temp6-v = 'column'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'bar'. + temp6-v = 'bar'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'stacked_bar'. + temp6-v = 'stacked_bar'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'stacked_column'. + temp6-v = 'stacked_column'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'line'. + temp6-v = 'line'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'combination'. + temp6-v = 'combination'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'bullet'. + temp6-v = 'bullet'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'vertical_bullet'. + temp6-v = 'vertical_bullet'. + INSERT temp6 INTO TABLE temp5. + temp6-n = '100_stacked_bar'. + temp6-v = '100_stacked_bar'. + INSERT temp6 INTO TABLE temp5. + temp6-n = '100_stacked_column'. + temp6-v = '100_stacked_column'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'stacked_combination'. + temp6-v = 'stacked_combination'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'horizontal_stacked_combination'. + temp6-v = 'horizontal_stacked_combination'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'waterfall'. + temp6-v = 'waterfall'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'horizontal_waterfall'. + temp6-v = 'horizontal_waterfall'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'area'. + temp6-v = 'area'. + INSERT temp6 INTO TABLE temp5. + temp6-n = 'radar'. + temp6-v = 'radar'. + INSERT temp6 INTO TABLE temp5. + mt_viztypes = temp5. ENDMETHOD. METHOD on_rendering. - DATA(lr_view) = z2ui5_cl_xml_view=>factory( )->shell( ). + DATA lr_view TYPE REF TO z2ui5_cl_xml_view. + lr_view = z2ui5_cl_xml_view=>factory( )->shell( ). " ---------- Set dynamic page --------------------------------------------------------------------- - DATA(lr_dyn_page) = lr_view->dynamic_page( showfooter = abap_false ). + DATA lr_dyn_page TYPE REF TO z2ui5_cl_xml_view. + lr_dyn_page = lr_view->dynamic_page( showfooter = abap_false ). " ---------- Get header title --------------------------------------------------------------------- - DATA(lr_header_title) = lr_dyn_page->title( ns = 'f' )->get( )->dynamic_page_title( ). + DATA lr_header_title TYPE REF TO z2ui5_cl_xml_view. + lr_header_title = lr_dyn_page->title( ns = 'f' )->get( )->dynamic_page_title( ). " ---------- Set header title text ---------------------------------------------------------------- lr_header_title->heading( ns = 'f' )->title( 'abap2UI5 - VizFrame Charts' ). " ---------- Get page header area ---------------------------------------------------------------- - DATA(lr_header) = lr_dyn_page->header( ns = 'f' )->dynamic_page_header( pinnable = abap_true )->content( ns = 'f' ). + DATA lr_header TYPE REF TO z2ui5_cl_xml_view. + lr_header = lr_dyn_page->header( ns = 'f' )->dynamic_page_header( pinnable = abap_true )->content( ns = 'f' ). lr_header->button( text = 'back' press = client->_event( 'BACK' ) visible = client->check_app_prev_stack( ) ). " ---------- Set Filter bar ----------------------------------------------------------------------- - DATA(lr_filter_bar) = lr_header->filter_bar( usetoolbar = 'false' )->filter_group_items( ). + DATA lr_filter_bar TYPE REF TO z2ui5_cl_xml_view. + lr_filter_bar = lr_header->filter_bar( usetoolbar = 'false' )->filter_group_items( ). " ---------- Set filter --------------------------------------------------------------------------- - DATA(lr_filter) = lr_filter_bar->filter_group_item( name = 'VizFrameType' + DATA lr_filter TYPE REF TO z2ui5_cl_xml_view. + lr_filter = lr_filter_bar->filter_group_item( name = 'VizFrameType' label = 'VizFrame type' groupname = |GroupVizFrameType| visibleinfilterbar = 'true' @@ -228,10 +213,15 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. text = '{V}' ). " ---------- Get page content area ---------------------------------------------------------------- - DATA(lr_content) = lr_dyn_page->content( ns = 'f' ). + DATA lr_content TYPE REF TO z2ui5_cl_xml_view. + lr_content = lr_dyn_page->content( ns = 'f' ). " ---------- Set vizframe chart ------------------------------------------------------------------- - DATA(lr_vizframe) = lr_content->viz_frame( + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `${$parameters>/data/0/data/}` INTO TABLE temp7. + DATA lr_vizframe TYPE REF TO z2ui5_cl_xml_view. + lr_vizframe = lr_content->viz_frame( id = 'idVizFrame' * legendvisible = * vizcustomizations = @@ -243,20 +233,24 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. * uiconfig = `{applicationSet:'fiori'}` * visible = selectdata = client->_event( val = 'EVT_DATA_SELECT' - t_arg = VALUE #( ( `${$parameters>/data/0/data/}` ) ) ) ). + t_arg = temp7 ) ). " ---------- Set vizframe dataset ----------------------------------------------------------------- - DATA(lr_dataset) = lr_vizframe->viz_dataset( ). + DATA lr_dataset TYPE REF TO z2ui5_cl_xml_view. + lr_dataset = lr_vizframe->viz_dataset( ). " ---------- Set vizframe flattened dataset -------------------------------------------------------- - DATA(lr_flatteneddataset) = lr_dataset->viz_flattened_dataset( data = client->_bind( me->mt_data_chart ) ). + DATA lr_flatteneddataset TYPE REF TO z2ui5_cl_xml_view. + lr_flatteneddataset = lr_dataset->viz_flattened_dataset( data = client->_bind( me->mt_data_chart ) ). " ---------- Set vizframe dimensions --------------------------------------------------------------- - DATA(lr_dimensions) = lr_flatteneddataset->viz_dimensions( ). + DATA lr_dimensions TYPE REF TO z2ui5_cl_xml_view. + lr_dimensions = lr_flatteneddataset->viz_dimensions( ). " ---------- Set vizframe dimension ---------------------------------------------------------------- " TODO: variable is assigned but never used (ABAP cleaner) - DATA(lr_dimensions_def) = lr_dimensions->viz_dimension_definition( + DATA lr_dimensions_def TYPE REF TO z2ui5_cl_xml_view. + lr_dimensions_def = lr_dimensions->viz_dimension_definition( * axis = * datatype = * displayvalue = @@ -266,11 +260,13 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. value = '{WEEK}' ). " ---------- Set vizframe measures ---------------------------------------------------------------- - DATA(lr_measures) = lr_flatteneddataset->viz_measures( ). + DATA lr_measures TYPE REF TO z2ui5_cl_xml_view. + lr_measures = lr_flatteneddataset->viz_measures( ). " ---------- Set vizframe measure definition 1 ---------------------------------------------------- " TODO: variable is assigned but never used (ABAP cleaner) - DATA(lr_measures_def1) = lr_measures->viz_measure_definition( + DATA lr_measures_def1 TYPE REF TO z2ui5_cl_xml_view. + lr_measures_def1 = lr_measures->viz_measure_definition( * format = * group = * identity = @@ -281,7 +277,8 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. " ---------- Set vizframe measure definition 2 ---------------------------------------------------- " TODO: variable is assigned but never used (ABAP cleaner) - DATA(lr_measures_def2) = lr_measures->viz_measure_definition( + DATA lr_measures_def2 TYPE REF TO z2ui5_cl_xml_view. + lr_measures_def2 = lr_measures->viz_measure_definition( * format = * group = * identity = @@ -291,18 +288,21 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. value = '{COST}' ). " ---------- Set vizframe feeds ------------------------------------------------------------------- - DATA(lr_feeds) = lr_vizframe->viz_feeds( ). + DATA lr_feeds TYPE REF TO z2ui5_cl_xml_view. + lr_feeds = lr_vizframe->viz_feeds( ). " ---------- Set vizframe feed for value axis ----------------------------------------------------- " TODO: variable is assigned but never used (ABAP cleaner) - DATA(lr_lr_feed_item1) = lr_feeds->viz_feed_item( id = 'valueAxisFeed' + DATA lr_lr_feed_item1 TYPE REF TO z2ui5_cl_xml_view. + lr_lr_feed_item1 = lr_feeds->viz_feed_item( id = 'valueAxisFeed' uid = 'valueAxis' type = 'Measure' values = client->_bind( me->mt_feed_values ) ). " ---------- Set vizframe feed for category axis -------------------------------------------------- " TODO: variable is assigned but never used (ABAP cleaner) - DATA(lr_lr_feed_item2) = lr_feeds->viz_feed_item( id = 'categoryAxisFeed' + DATA lr_lr_feed_item2 TYPE REF TO z2ui5_cl_xml_view. + lr_lr_feed_item2 = lr_feeds->viz_feed_item( id = 'categoryAxisFeed' uid = 'categoryAxis' type = 'Dimension' values = 'Week' ). @@ -315,7 +315,7 @@ CLASS z2ui5_cl_demo_app_312 IMPLEMENTATION. me->client = client. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. on_init( ). on_rendering( ). ELSE. diff --git a/src/z2ui5_cl_demo_app_313.clas.abap b/src/z2ui5_cl_demo_app_313.clas.abap index dbb4976c..310c6a7b 100644 --- a/src/z2ui5_cl_demo_app_313.clas.abap +++ b/src/z2ui5_cl_demo_app_313.clas.abap @@ -16,7 +16,8 @@ CLASS z2ui5_cl_demo_app_313 DEFINITION PUBLIC. valuecolor TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_4e59990452 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_4e59990452. DATA check_initialized TYPE abap_bool. DATA check_ui5 TYPE abap_bool. DATA mv_key TYPE string. @@ -31,15 +32,19 @@ CLASS z2ui5_cl_demo_app_313 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Smart Controls with Variants' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->smart_filter_bar( diff --git a/src/z2ui5_cl_demo_app_314.clas.abap b/src/z2ui5_cl_demo_app_314.clas.abap index 92a28cb4..86b3bf6d 100644 --- a/src/z2ui5_cl_demo_app_314.clas.abap +++ b/src/z2ui5_cl_demo_app_314.clas.abap @@ -14,7 +14,8 @@ CLASS z2ui5_cl_demo_app_314 DEFINITION PUBLIC. percentage TYPE p LENGTH 5 DECIMALS 2, valuecolor TYPE string, END OF ty_row. - DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + TYPES temp1_8f5bed27c2 TYPE STANDARD TABLE OF ty_row WITH DEFAULT KEY. +DATA t_tab TYPE temp1_8f5bed27c2. DATA mv_val TYPE string. PROTECTED SECTION. @@ -27,7 +28,7 @@ CLASS z2ui5_cl_demo_app_314 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. DO 10 TIMES. DATA ls_row TYPE ty_row. @@ -39,19 +40,24 @@ CLASS z2ui5_cl_demo_app_314 IMPLEMENTATION. INSERT ls_row INTO TABLE t_tab. ENDDO. - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp1 TYPE xsdboolean. + temp1 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Device Model, HTTP Model, OData Model' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp1 ). page->input( description = `device model` value = `{device>/resize/width}` enabled = abap_false ). mv_val = `input value with http model`. page->input( client->_bind_edit( val = mv_val switch_default_model = abap_true ) ). - DATA(tab) = page->table( client->_bind_edit( val = t_tab switch_default_model = abap_true ) ). + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( client->_bind_edit( val = t_tab switch_default_model = abap_true ) ). tab->header_toolbar( )->toolbar( diff --git a/src/z2ui5_cl_demo_app_315.clas.abap b/src/z2ui5_cl_demo_app_315.clas.abap index 02b7bada..6e97b9e0 100644 --- a/src/z2ui5_cl_demo_app_315.clas.abap +++ b/src/z2ui5_cl_demo_app_315.clas.abap @@ -13,16 +13,21 @@ CLASS z2ui5_cl_demo_app_315 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). - - DATA(view) = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( + IF client->check_on_init( ) IS NOT INITIAL. + + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - Table with odata source' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp2 ). - data(tab) = page->table( + DATA tab TYPE REF TO z2ui5_cl_xml_view. + tab = page->table( items = `{TRAVEL>/Currency}` growing = abap_true ). @@ -64,17 +69,21 @@ CLASS z2ui5_cl_demo_app_315 IMPLEMENTATION. client->view_display( val = view->stringify( ) switch_default_model_path = `` ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` INTO TABLE temp1. + INSERT `TRAVEL` INTO TABLE temp1. client->follow_up_action( client->_event_client( val = z2ui5_if_client=>cs_event-set_odata_model - t_arg = value #( - ( `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ) - ( `TRAVEL` ) ) ) ). + t_arg = temp1 ) ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `/sap/opu/odata/DMO/ui_flight_r_v2/` INTO TABLE temp3. + INSERT `FLIGHT` INTO TABLE temp3. client->follow_up_action( client->_event_client( val = z2ui5_if_client=>cs_event-set_odata_model - t_arg = value #( - ( `/sap/opu/odata/DMO/ui_flight_r_v2/` ) - ( `FLIGHT` ) ) ) ). + t_arg = temp3 ) ). ENDIF. diff --git a/src/z2ui5_cl_demo_app_316.clas.abap b/src/z2ui5_cl_demo_app_316.clas.abap index b30ad818..a4b91887 100644 --- a/src/z2ui5_cl_demo_app_316.clas.abap +++ b/src/z2ui5_cl_demo_app_316.clas.abap @@ -39,24 +39,31 @@ ENDCLASS. CLASS z2ui5_cl_demo_app_316 IMPLEMENTATION. METHOD display_view. - url = VALUE #( url = `http://www.sap.com` - new_window = `true` ). - email = VALUE #( email = `email@email.com` - subject = `subject` - body = `body` - new_window = `true` ). - - DATA(page) = z2ui5_cl_xml_view=>factory( + CLEAR url. + url-url = `http://www.sap.com`. + url-new_window = `true`. + CLEAR email. + email-email = `email@email.com`. + email-subject = `subject`. + email-body = `body`. + email-new_window = `true`. + + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp9 TYPE xsdboolean. + temp9 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = z2ui5_cl_xml_view=>factory( )->_z2ui5( )->title( `URL Helper Sample` )->shell( )->page( title = 'abap2UI5 - Sample: URL Helper' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp9 ). - DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` + DATA layout TYPE REF TO z2ui5_cl_xml_view. + layout = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ). - DATA(email_form) = layout->simple_form( title = `Trigger E-Mail` ). + DATA email_form TYPE REF TO z2ui5_cl_xml_view. + email_form = layout->simple_form( title = `Trigger E-Mail` ). email_form->label( text = `E-Mail` labelfor = `inputEmail` ). @@ -92,12 +99,18 @@ CLASS z2ui5_cl_demo_app_316 IMPLEMENTATION. growingmaxlines = '7' width = '100%' ). + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `TRIGGER_EMAIL` INTO TABLE temp1. + DATA temp2 LIKE LINE OF temp1. + temp2 = |${ client->_bind_edit( email ) }|. + INSERT temp2 INTO TABLE temp1. email_form->button( text = `Trigger Email` press = client->_event_client( val = client->cs_event-urlhelper - t_arg = VALUE #( ( `TRIGGER_EMAIL` ) - ( |${ client->_bind_edit( email ) }| ) ) ) ). + t_arg = temp1 ) ). - DATA(telephone_form) = layout->simple_form( title = `Trigger Telephone` ). + DATA telephone_form TYPE REF TO z2ui5_cl_xml_view. + telephone_form = layout->simple_form( title = `Trigger Telephone` ). telephone_form->label( text = `Telephone` labelfor = `inputTel` ). @@ -106,13 +119,19 @@ CLASS z2ui5_cl_demo_app_316 IMPLEMENTATION. type = `Tel` placeholder = `Enter telephone number` class = `sapUiSmallMarginBottom` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `TRIGGER_TEL` INTO TABLE temp3. + DATA temp4 LIKE LINE OF temp3. + temp4 = |${ client->_bind_edit( phone ) }|. + INSERT temp4 INTO TABLE temp3. telephone_form->button( text = `Trigger Telephone` press = client->_event_client( val = client->cs_event-urlhelper - t_arg = VALUE #( ( `TRIGGER_TEL` ) - ( |${ client->_bind_edit( phone ) }| ) ) ) ). + t_arg = temp3 ) ). - DATA(mobile_form) = layout->simple_form( title = `Trigger SMS` ). + DATA mobile_form TYPE REF TO z2ui5_cl_xml_view. + mobile_form = layout->simple_form( title = `Trigger SMS` ). mobile_form->label( text = `Number` labelfor = `inputNumber` ). @@ -121,12 +140,18 @@ CLASS z2ui5_cl_demo_app_316 IMPLEMENTATION. type = `Number` placeholder = `Enter a number` class = `sapUiSmallMarginBottom` ). + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `TRIGGER_SMS` INTO TABLE temp5. + DATA temp6 LIKE LINE OF temp5. + temp6 = |${ client->_bind_edit( mobile ) }|. + INSERT temp6 INTO TABLE temp5. mobile_form->button( text = `Trigger SMS` press = client->_event_client( val = client->cs_event-urlhelper - t_arg = VALUE #( ( `TRIGGER_SMS` ) - ( |${ client->_bind_edit( mobile ) }| ) ) ) ). + t_arg = temp5 ) ). - DATA(url_form) = layout->simple_form( title = `Redirect` ). + DATA url_form TYPE REF TO z2ui5_cl_xml_view. + url_form = layout->simple_form( title = `Redirect` ). url_form->label( text = `URL` labelfor = `inputUrl` ). url_form->input( id = `inputUrl` @@ -134,10 +159,15 @@ CLASS z2ui5_cl_demo_app_316 IMPLEMENTATION. type = `Url` placeholder = `Enter URL` class = `sapUiSmallMarginBottom` ). + DATA temp7 TYPE string_table. + CLEAR temp7. + INSERT `REDIRECT` INTO TABLE temp7. + DATA temp8 LIKE LINE OF temp7. + temp8 = |${ client->_bind_edit( url ) }|. + INSERT temp8 INTO TABLE temp7. url_form->button( text = `Redirect` press = client->_event_client( val = client->cs_event-urlhelper - t_arg = VALUE #( ( `REDIRECT` ) - ( |${ client->_bind_edit( url ) }| ) ) ) ). + t_arg = temp7 ) ). client->view_display( page->stringify( ) ). ENDMETHOD. diff --git a/src/z2ui5_cl_demo_app_317.clas.abap b/src/z2ui5_cl_demo_app_317.clas.abap index bfd849c9..f58d5d13 100644 --- a/src/z2ui5_cl_demo_app_317.clas.abap +++ b/src/z2ui5_cl_demo_app_317.clas.abap @@ -36,7 +36,7 @@ CLASS z2ui5_cl_demo_app_317 DEFINITION id_parent TYPE string, text TYPE string, END OF ty_S_node. - DATA mt_node TYPE STANDARD TABLE OF ty_S_node WITH EMPTY KEY. + DATA mt_node TYPE STANDARD TABLE OF ty_S_node WITH DEFAULT KEY. PROTECTED SECTION. METHODS build_tree. @@ -50,17 +50,44 @@ CLASS z2ui5_cl_demo_app_317 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_init( ). - - mt_node = VALUE #( - ( id = '01' id_parent = '' text = 'Machines' ) - ( id = '03' id_parent = '01' text = 'Pumps' ) - ( id = '04' id_parent = '03' text = 'Pump 001' ) - ( id = '05' id_parent = '03' text = 'Pump 002' ) - ( id = '02' id_parent = '' text = 'Paints' ) - ( id = '06' id_parent = '02' text = 'Gloss paints' ) - ( id = '07' id_parent = '06' text = 'Paint 001' ) - ( id = '08' id_parent = '06' text = 'Paint 002' ) ). + IF client->check_on_init( ) IS NOT INITIAL. + + DATA temp1 LIKE mt_node. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-id = '01'. + temp2-id_parent = ''. + temp2-text = 'Machines'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '03'. + temp2-id_parent = '01'. + temp2-text = 'Pumps'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '04'. + temp2-id_parent = '03'. + temp2-text = 'Pump 001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '05'. + temp2-id_parent = '03'. + temp2-text = 'Pump 002'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '02'. + temp2-id_parent = ''. + temp2-text = 'Paints'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '06'. + temp2-id_parent = '02'. + temp2-text = 'Gloss paints'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '07'. + temp2-id_parent = '06'. + temp2-text = 'Paint 001'. + INSERT temp2 INTO TABLE temp1. + temp2-id = '08'. + temp2-id_parent = '06'. + temp2-text = 'Paint 002'. + INSERT temp2 INTO TABLE temp1. + mt_node = temp1. build_tree( ). display_view( client ). @@ -73,7 +100,15 @@ CLASS z2ui5_cl_demo_app_317 IMPLEMENTATION. client->follow_up_action( `debugger; z2ui5.oView.byId( 'tree' ).expandToLevel(10);`). WHEN 'onDrop'. - mt_node[ id = client->get_event_arg( 1 ) ]-id_parent = client->get_event_arg( 2 ). + FIELD-SYMBOLS LIKE LINE OF mt_node. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE mt_node WITH KEY id = client->get_event_arg( 1 ) ASSIGNING . + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + -id_parent = client->get_event_arg( 2 ). build_tree( ). display_view( client ). ENDCASE. @@ -84,18 +119,29 @@ CLASS z2ui5_cl_demo_app_317 IMPLEMENTATION. METHOD build_tree. CLEAR mt_tree. - LOOP AT mt_node INTO DATA(ls_node) WHERE id_parent IS INITIAL. - - DATA(ls_root) = CORRESPONDING ty_node1( ls_node ). + DATA ls_node LIKE LINE OF mt_node. + LOOP AT mt_node INTO ls_node WHERE id_parent IS INITIAL. + + DATA temp5 TYPE ty_node1. + CLEAR temp5. + MOVE-CORRESPONDING ls_node TO temp5. + DATA ls_root LIKE temp5. + ls_root = temp5. INSERT ls_root INTO TABLE mt_tree. ENDLOOP. - LOOP AT mt_tree REFERENCE INTO DATA(lr_node). + DATA temp6 LIKE LINE OF mt_tree. + DATA lr_node LIKE REF TO temp6. + LOOP AT mt_tree REFERENCE INTO lr_node. LOOP AT mt_node INTO ls_node WHERE id_parent = lr_node->id. - DATA(ls_root2) = CORRESPONDING ty_node2( ls_node ). + DATA temp7 TYPE ty_node2. + CLEAR temp7. + MOVE-CORRESPONDING ls_node TO temp7. + DATA ls_root2 LIKE temp7. + ls_root2 = temp7. INSERT ls_root2 INTO TABLE lr_node->nodes. ENDLOOP. @@ -103,10 +149,16 @@ CLASS z2ui5_cl_demo_app_317 IMPLEMENTATION. LOOP AT mt_tree REFERENCE INTO lr_node. - LOOP AT lr_node->nodes REFERENCE INTO DATA(lr_node2). + DATA temp8 LIKE LINE OF lr_node->nodes. + DATA lr_node2 LIKE REF TO temp8. + LOOP AT lr_node->nodes REFERENCE INTO lr_node2. LOOP AT mt_node INTO ls_node WHERE id_parent = lr_node2->id. - DATA(ls_root3) = CORRESPONDING ty_node3( ls_node ). + DATA temp9 TYPE ty_node3. + CLEAR temp9. + MOVE-CORRESPONDING ls_node TO temp9. + DATA ls_root3 LIKE temp9. + ls_root3 = temp9. INSERT ls_root3 INTO TABLE lr_node2->nodes. ENDLOOP. @@ -116,10 +168,16 @@ CLASS z2ui5_cl_demo_app_317 IMPLEMENTATION. LOOP AT mt_tree REFERENCE INTO lr_node. LOOP AT lr_node->nodes REFERENCE INTO lr_node2. - LOOP AT lr_node2->nodes REFERENCE INTO DATA(lr_node3). + DATA temp10 LIKE LINE OF lr_node2->nodes. + DATA lr_node3 LIKE REF TO temp10. + LOOP AT lr_node2->nodes REFERENCE INTO lr_node3. LOOP AT mt_node INTO ls_node WHERE id_parent = lr_node3->id. - DATA(ls_root4) = CORRESPONDING ty_node4( ls_node ). + DATA temp11 TYPE ty_node4. + CLEAR temp11. + MOVE-CORRESPONDING ls_node TO temp11. + DATA ls_root4 LIKE temp11. + ls_root4 = temp11. INSERT ls_root4 INTO TABLE lr_node3->nodes. ENDLOOP. @@ -132,30 +190,33 @@ CLASS z2ui5_cl_demo_app_317 IMPLEMENTATION. METHOD display_view. - DATA(page) = z2ui5_cl_xml_view=>factory( )->page( ). + DATA page TYPE REF TO z2ui5_cl_xml_view. + page = z2ui5_cl_xml_view=>factory( )->page( ). page->_generic( name = `script` ns = `html` )->_cc_plain_xml( |function myFunction() \{ z2ui5.oView.byId('tree').expandToLevel(5); \}| ). - DATA(tree) = page->tree( items = client->_bind( mt_tree ) id = `tree` ). + DATA tree TYPE REF TO z2ui5_cl_xml_view. + tree = page->tree( items = client->_bind( mt_tree ) id = `tree` ). tree->items( )->standard_tree_item( title = '{TEXT}' )->get( )->custom_data( )->core_custom_data( key = 'ID' value = '{ID}'). + DATA temp12 TYPE string_table. + CLEAR temp12. + INSERT `${$parameters>/draggedControl/mAggregations/customData/0/mProperties/value}` INTO TABLE temp12. + INSERT `${$parameters>/droppedControl/mAggregations/customData/0/mProperties/value}` INTO TABLE temp12. tree->drag_drop_config( ns = `` )->Drag_Drop_Info( sourceAggregation = `items` targetAggregation = `items` dragStart = `Horizontal` drop = client->_event( val = 'onDrop' - t_arg = VALUE #( - ( `${$parameters>/draggedControl/mAggregations/customData/0/mProperties/value}` ) - ( `${$parameters>/droppedControl/mAggregations/customData/0/mProperties/value}` ) - ) ) ). + t_arg = temp12 ) ). client->follow_up_action( `myFunction()` ). client->view_display( page->stringify( ) ). diff --git a/src/z2ui5_cl_demo_app_318.clas.abap b/src/z2ui5_cl_demo_app_318.clas.abap index 273694a5..28d98df5 100644 --- a/src/z2ui5_cl_demo_app_318.clas.abap +++ b/src/z2ui5_cl_demo_app_318.clas.abap @@ -30,24 +30,41 @@ CLASS z2ui5_cl_demo_app_318 IMPLEMENTATION. ` ` && |\n| && ``. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). - DATA(page) = view->shell( )->page( title = 'abap2UI5 - File Editor' + DATA page TYPE REF TO z2ui5_cl_xml_view. + DATA temp6 TYPE xsdboolean. + temp6 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). + page = view->shell( )->page( title = 'abap2UI5 - File Editor' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + shownavbutton = temp6 ). - DATA(temp) = page->simple_form( title = 'File' + DATA temp TYPE REF TO z2ui5_cl_xml_view. + temp = page->simple_form( title = 'File' editable = abap_true )->content( `form` )->label( 'path' )->input( client->_bind_edit( mv_path ) )->label( 'Option' ). - lt_types = VALUE z2ui5_if_types=>ty_t_name_value( ). - LT_TYPES = VALUE #( FOR row IN z2ui5_cl_util=>source_get_file_types( ) ( - n = shift_right( shift_left( row ) ) - v = shift_right( shift_left( row ) ) ) ). - - DATA(temp3) = temp->input( value = client->_bind_edit( mv_type ) + DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp1. + lt_types = temp1. + DATA temp2 TYPE z2ui5_if_types=>ty_t_name_value. + CLEAR temp2. + DATA temp5 TYPE string_table. + temp5 = z2ui5_cl_util=>source_get_file_types( ). + DATA row LIKE LINE OF temp5. + LOOP AT temp5 INTO row. + DATA temp4 LIKE LINE OF temp2. + temp4-n = shift_right( shift_left( row ) ). + temp4-v = shift_right( shift_left( row ) ). + INSERT temp4 INTO TABLE temp2. + ENDLOOP. + LT_TYPES = temp2. + + DATA temp3 TYPE REF TO z2ui5_cl_xml_view. + temp3 = temp->input( value = client->_bind_edit( mv_type ) suggestionitems = client->_bind_local( LT_TYPES ) )->get( ). @@ -63,12 +80,14 @@ CLASS z2ui5_cl_demo_app_318 IMPLEMENTATION. editable = abap_true value = client->_bind( mv_editor ) ). + DATA temp7 TYPE xsdboolean. + temp7 = boolc( mv_editor IS NOT INITIAL ). page->footer( )->overflow_toolbar( )->toolbar_spacer( )->button( text = 'PDF' press = client->_event( 'PDF' ) type = 'Emphasized' - enabled = xsdbool( mv_editor IS NOT INITIAL ) ). + enabled = temp7 ). client->view_display( page->stringify( ) ). ENDMETHOD. @@ -204,7 +223,9 @@ CLASS z2ui5_cl_demo_app_318 IMPLEMENTATION. client->message_box_display( text = 'Upload successfull. File saved!' type = 'success' ). WHEN 'EDIT'. - mv_check_editable = xsdbool( mv_check_editable = abap_false ). + DATA temp8 TYPE xsdboolean. + temp8 = boolc( mv_check_editable = abap_false ). + mv_check_editable = temp8. client->view_model_update( ). WHEN 'CLEAR'. diff --git a/src/z2ui5_cl_demo_app_319.clas.abap b/src/z2ui5_cl_demo_app_319.clas.abap index 6dc8e5df..32b07f5a 100644 --- a/src/z2ui5_cl_demo_app_319.clas.abap +++ b/src/z2ui5_cl_demo_app_319.clas.abap @@ -8,7 +8,7 @@ CLASS z2ui5_cl_demo_app_319 DEFINITION PUBLIC. key TYPE string, text TYPE string, END OF t_token, - t_tokens TYPE STANDARD TABLE OF t_token WITH EMPTY KEY. + t_tokens TYPE STANDARD TABLE OF t_token WITH DEFAULT KEY. TYPES: BEGIN OF t_range, exclude TYPE boole_d, @@ -19,7 +19,7 @@ CLASS z2ui5_cl_demo_app_319 DEFINITION PUBLIC. tokenText TYPE string, tokenLongKey type string, END OF t_range, - t_ranges TYPE STANDARD TABLE OF t_range WITH EMPTY KEY. + t_ranges TYPE STANDARD TABLE OF t_range WITH DEFAULT KEY. DATA: BEGIN OF m_selection, BEGIN OF product_type, @@ -40,7 +40,7 @@ CLASS z2ui5_cl_demo_app_319 IMPLEMENTATION. m_client = client. - IF m_client->check_on_init( ). + IF m_client->check_on_init( ) IS NOT INITIAL. on_init( ). RETURN. ENDIF. @@ -51,9 +51,11 @@ CLASS z2ui5_cl_demo_app_319 IMPLEMENTATION. METHOD on_init. - DATA(l_view) = z2ui5_cl_xml_view=>factory( ). + DATA l_view TYPE REF TO z2ui5_cl_xml_view. + l_view = z2ui5_cl_xml_view=>factory( ). - DATA(l_page) = l_view->shell( )->page( title = 'SearchPage' + DATA l_page TYPE REF TO z2ui5_cl_xml_view. + l_page = l_view->shell( )->page( title = 'SearchPage' navbuttonpress = m_client->_event( 'BACK' ) shownavbutton = m_client->check_app_prev_stack( ) ). @@ -87,13 +89,20 @@ CLASS z2ui5_cl_demo_app_319 IMPLEMENTATION. WHEN 'BACK'. m_client->nav_app_leave( ). WHEN 'PRODTYPE_CHANGED'. - INSERT VALUE #( operation = 'EQ' value1 = 'EUR' keyField = 'CurrencyCode' tokenText = 'Euro (auto added line)' ) INTO TABLE m_selection-product_type-ranges. + DATA temp1 TYPE z2ui5_cl_demo_app_319=>t_range. + CLEAR temp1. + temp1-operation = 'EQ'. + temp1-value1 = 'EUR'. + temp1-keyField = 'CurrencyCode'. + temp1-tokenText = 'Euro (auto added line)'. + INSERT temp1 INTO TABLE m_selection-product_type-ranges. m_client->view_model_update( ). TRY. m_client->message_box_display( text = z2ui5_cl_ajson=>new( )->set( iv_path = '/' iv_val = m_selection-product_type-ranges )->stringify( ) title = 'range content' ). - CATCH z2ui5_cx_ajson_error INTO DATA(lx_ajson). + DATA lx_ajson TYPE REF TO z2ui5_cx_ajson_error. + CATCH z2ui5_cx_ajson_error INTO lx_ajson. m_client->message_toast_display( lx_ajson->get_text( ) ). ENDTRY. ENDCASE. diff --git a/src/z2ui5_cl_demo_app_320.clas.abap b/src/z2ui5_cl_demo_app_320.clas.abap index 677a95d2..cb39626e 100644 --- a/src/z2ui5_cl_demo_app_320.clas.abap +++ b/src/z2ui5_cl_demo_app_320.clas.abap @@ -52,35 +52,104 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. - IF client->check_on_init( ). - - items = VALUE #( - mobile = `+89181818181` - phone = `+2828282828` - email = `blabla@blabla` - ( id = `1` initials = `JD` name = `John Doe` tooltip = `1` jobPosition = `Marketing Manager` ) - ( id = `2` initials = `SP` name = `Sarah Parker` tooltip = `2` jobPosition = `Visual Designer` ) - ( id = `3` initials = `JG` name = `Jason Goldwell` tooltip = `3` jobPosition = `Software Developer` ) - ( id = `4` name = `Christian Bow` jobPosition = `Marketing Manager` tooltip = `4` ) - ( id = `5` - src = `https://sapui5.hana.ondemand.com/test-resources/sap/f/images/Woman_avatar_01.png` - tooltip = `5` - name = `Jessica Parker` - jobPosition = `Visual Designer` ) - ( id = `6` initials = `JB` name = `Jonathan Bale` jobPosition = `Software Developer` tooltip = `6` ) - ( id = `7` initials = `GS` name = `Gordon Smith` jobPosition = `Marketing Manager` tooltip = `7` ) - ( id = `8` fallbackIcon = `sap-icon =//person-placeholder` name = `Simon Jason` tooltip = `8` jobPosition = `Visual Designer` ) - ( id = `9` initials = `JS` name = `Jason Swan` jobPosition = `Software Developer` tooltip = `9` ) - ( id = `10` initials = `JC` name = `John Carter` jobPosition = `Marketing Manager` tooltip = `10` ) - ( id = `11` - src = `https://sapui5.hana.ondemand.com/test-resources/sap/f/images/Woman_avatar_02.png` - name = `Whitney Parker` - tooltip = `11` - jobPosition = `Visual Designer` ) - ( id = `12` fallbackIcon = `sap-icon =//person-placeholder` name = `Jason Goldwell` tooltip = `12` jobPosition = `Software Developer` ) - ( id = `13` initials = `CD` name = `Chris Doe` jobPosition = `Marketing Manager` tooltip = `13` ) - ( id = `14` initials = `SS` name = `Sarah Smith` jobPosition = `Visual Designer` tooltip = `14` ) - ( id = `15` initials = `DC` name = `David Copper` jobPosition = `Software Developer` tooltip = `15` ) ). + IF client->check_on_init( ) IS NOT INITIAL. + + DATA temp1 TYPE z2ui5_cl_demo_app_320=>ty_items. + CLEAR temp1. + DATA temp2 LIKE LINE OF temp1. + temp2-mobile = `+89181818181`. + temp2-phone = `+2828282828`. + temp2-email = `blabla@blabla`. + temp2-id = `1`. + temp2-initials = `JD`. + temp2-name = `John Doe`. + temp2-tooltip = `1`. + temp2-jobPosition = `Marketing Manager`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `2`. + temp2-initials = `SP`. + temp2-name = `Sarah Parker`. + temp2-tooltip = `2`. + temp2-jobPosition = `Visual Designer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `3`. + temp2-initials = `JG`. + temp2-name = `Jason Goldwell`. + temp2-tooltip = `3`. + temp2-jobPosition = `Software Developer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `4`. + temp2-name = `Christian Bow`. + temp2-jobPosition = `Marketing Manager`. + temp2-tooltip = `4`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `5`. + temp2-src = `https://sapui5.hana.ondemand.com/test-resources/sap/f/images/Woman_avatar_01.png`. + temp2-tooltip = `5`. + temp2-name = `Jessica Parker`. + temp2-jobPosition = `Visual Designer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `6`. + temp2-initials = `JB`. + temp2-name = `Jonathan Bale`. + temp2-jobPosition = `Software Developer`. + temp2-tooltip = `6`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `7`. + temp2-initials = `GS`. + temp2-name = `Gordon Smith`. + temp2-jobPosition = `Marketing Manager`. + temp2-tooltip = `7`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `8`. + temp2-fallbackIcon = `sap-icon =//person-placeholder`. + temp2-name = `Simon Jason`. + temp2-tooltip = `8`. + temp2-jobPosition = `Visual Designer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `9`. + temp2-initials = `JS`. + temp2-name = `Jason Swan`. + temp2-jobPosition = `Software Developer`. + temp2-tooltip = `9`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `10`. + temp2-initials = `JC`. + temp2-name = `John Carter`. + temp2-jobPosition = `Marketing Manager`. + temp2-tooltip = `10`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `11`. + temp2-src = `https://sapui5.hana.ondemand.com/test-resources/sap/f/images/Woman_avatar_02.png`. + temp2-name = `Whitney Parker`. + temp2-tooltip = `11`. + temp2-jobPosition = `Visual Designer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `12`. + temp2-fallbackIcon = `sap-icon =//person-placeholder`. + temp2-name = `Jason Goldwell`. + temp2-tooltip = `12`. + temp2-jobPosition = `Software Developer`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `13`. + temp2-initials = `CD`. + temp2-name = `Chris Doe`. + temp2-jobPosition = `Marketing Manager`. + temp2-tooltip = `13`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `14`. + temp2-initials = `SS`. + temp2-name = `Sarah Smith`. + temp2-jobPosition = `Visual Designer`. + temp2-tooltip = `14`. + INSERT temp2 INTO TABLE temp1. + temp2-id = `15`. + temp2-initials = `DC`. + temp2-name = `David Copper`. + temp2-jobPosition = `Software Developer`. + temp2-tooltip = `15`. + INSERT temp2 INTO TABLE temp1. + items = temp1. display_avatar_group_view( ). ENDIF. @@ -88,11 +157,28 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. ENDMETHOD. METHOD display_avatar_group_view. - DATA(view) = z2ui5_cl_xml_view=>factory( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). view->_z2ui5( )->title( `Avatar Group Sample` ). + DATA temp3 TYPE string_table. + CLEAR temp3. + INSERT `${$source>/id}` INTO TABLE temp3. + INSERT `${$parameters>/groupType}` INTO TABLE temp3. + INSERT `${$parameters>/overflowButtonPressed}` INTO TABLE temp3. + INSERT `${$parameters>/avatarsDisplayed}` INTO TABLE temp3. + INSERT `$event.getParameter("eventSource").getId()` INTO TABLE temp3. + INSERT `$event.oSource.indexOfItem($event.getParameter("eventSource"))` INTO TABLE temp3. + DATA temp1 TYPE string_table. + CLEAR temp1. + INSERT `${$source>/id}` INTO TABLE temp1. + INSERT `${$parameters>/groupType}` INTO TABLE temp1. + INSERT `${$parameters>/overflowButtonPressed}` INTO TABLE temp1. + INSERT `${$parameters>/avatarsDisplayed}` INTO TABLE temp1. + DATA temp2 TYPE xsdboolean. + temp2 = boolc( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). view->page( title = 'abap2UI5 - Sample: Avatar Group' navbuttonpress = client->_event( 'BACK' ) - shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + shownavbutton = temp2 )->slider( value = client->_bind_edit( viewPortPercentWidth ) )->vertical_layout( id = `vl1` width = |{ client->_bind_edit( viewPortPercentWidth ) }%| @@ -105,13 +191,7 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. avatarDisplaySize = `S` press = client->_event( val = `onIndividualPress` - t_arg = VALUE #( - ( `${$source>/id}` ) - ( `${$parameters>/groupType}` ) - ( `${$parameters>/overflowButtonPressed}` ) - ( `${$parameters>/avatarsDisplayed}` ) - ( `$event.getParameter("eventSource").getId()` ) - ( `$event.oSource.indexOfItem($event.getParameter("eventSource"))` ) ) ) + t_arg = temp3 ) items = client->_bind( items ) )->avatar_group_item( initials = `{INITIALS}` @@ -128,11 +208,7 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. tooltip = `Avatar Group` avatarDisplaySize = `M` press = client->_event( val = `onGroupPress` - t_arg = VALUE #( - ( `${$source>/id}` ) - ( `${$parameters>/groupType}` ) - ( `${$parameters>/overflowButtonPressed}` ) - ( `${$parameters>/avatarsDisplayed}` ) ) ) + t_arg = temp1 ) items = client->_bind( items ) )->avatar_group_item( initials = `{INITIALS}` fallbackIcon = `{FALLBACKICON}` @@ -141,7 +217,8 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. ENDMETHOD. METHOD display_individual_popover. - DATA(individual_popover) = z2ui5_cl_xml_view=>factory_popup( ). + DATA individual_popover TYPE REF TO z2ui5_cl_xml_view. + individual_popover = z2ui5_cl_xml_view=>factory_popup( ). individual_popover->popover( id = `individualPopover` class = `sapFAvatarGroupPopover` title = `Business card` @@ -175,9 +252,11 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. ENDMETHOD. METHOD display_group_popover. - DATA(view) = z2ui5_cl_xml_view=>factory_popup( ). + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory_popup( ). - DATA(nav_container) = view->popover( id = `groupPopover` + DATA nav_container TYPE REF TO z2ui5_cl_xml_view. + nav_container = view->popover( id = `groupPopover` class = `sapFAvatarGroupPopover` showheader = abap_false contentWidth = client->_bind( content_width ) @@ -185,6 +264,9 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. placement = `Bottom` )->nav_container( id = `navContainer` ). + DATA temp5 TYPE string_table. + CLEAR temp5. + INSERT `${ID}` INTO TABLE temp5. nav_container->page( id = `main` titleAlignment = `Center` title = |Team Members ({ lines( group_items ) })| @@ -202,7 +284,7 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. badgetooltip = `{NAME}` backgroundcolor = `{BACKGROUNDCOLOR}` press = client->_event( val = `onAvatarPress` - t_arg = VALUE #( ( `${ID}` ) ) ) + t_arg = temp5 ) )->get_parent( )->vbox( )->Text( text = `{NAME}` @@ -239,13 +321,23 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. ENDMETHOD. METHOD on_event. - DATA(lt_arg) = client->get( )-t_event_arg. + DATA lt_arg TYPE string_table. + lt_arg = client->get( )-t_event_arg. CASE client->get( )-event. WHEN 'BACK'. client->nav_app_leave( ). WHEN `onGroupPress`. - DATA(group_id) = lt_arg[ 1 ]. + DATA group_id LIKE LINE OF lt_arg. + DATA temp3 LIKE LINE OF lt_arg. + DATA temp4 LIKE sy-tabix. + temp4 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp3. + sy-tabix = temp4. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + group_id = temp3. group_items = items. content_height = calculate_content_height( lines( group_items ) ). content_width = '450px'. @@ -254,44 +346,118 @@ CLASS z2ui5_cl_demo_app_320 IMPLEMENTATION. client->popover_destroy( ). WHEN `onIndividualPress`. - DATA(overflow_button_pressed) = lt_arg[ 3 ]. - DATA(items_displayed) = lt_arg[ 4 ]. - DATA(item_id) = lt_arg[ 5 ]. - DATA(item_table_index) = lt_arg[ 6 ]. - - group_items = VALUE ty_items( FOR itm IN items FROM items_displayed + 1 - ( itm ) ). + DATA overflow_button_pressed LIKE LINE OF lt_arg. + DATA temp5 LIKE LINE OF lt_arg. + DATA temp6 LIKE sy-tabix. + temp6 = sy-tabix. + READ TABLE lt_arg INDEX 3 INTO temp5. + sy-tabix = temp6. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + overflow_button_pressed = temp5. + DATA items_displayed LIKE LINE OF lt_arg. + DATA temp8 LIKE LINE OF lt_arg. + DATA temp14 LIKE sy-tabix. + temp14 = sy-tabix. + READ TABLE lt_arg INDEX 4 INTO temp8. + sy-tabix = temp14. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + items_displayed = temp8. + DATA item_id LIKE LINE OF lt_arg. + DATA temp16 LIKE LINE OF lt_arg. + DATA temp17 LIKE sy-tabix. + temp17 = sy-tabix. + READ TABLE lt_arg INDEX 5 INTO temp16. + sy-tabix = temp17. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + item_id = temp16. + DATA item_table_index LIKE LINE OF lt_arg. + DATA temp18 LIKE LINE OF lt_arg. + DATA temp19 LIKE sy-tabix. + temp19 = sy-tabix. + READ TABLE lt_arg INDEX 6 INTO temp18. + sy-tabix = temp19. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + item_table_index = temp18. + + DATA temp7 TYPE ty_items. + CLEAR temp7. + DATA itm LIKE LINE OF items. + LOOP AT items INTO itm FROM items_displayed + 1. + INSERT itm INTO TABLE temp7. + ENDLOOP. + group_items = temp7. content_height = calculate_content_height( lines( group_items ) ). content_width = '450px'. IF overflow_button_pressed = abap_true. display_group_popover( id = item_id ). ELSE. - item = VALUE #( items[ item_table_index + 1 ] OPTIONAL ). + DATA temp9 TYPE z2ui5_cl_demo_app_320=>ty_item. + CLEAR temp9. + DATA temp10 TYPE z2ui5_cl_demo_app_320=>ty_item. + READ TABLE items INTO temp10 INDEX item_table_index + 1. + IF sy-subrc = 0. + temp9 = temp10. + ENDIF. + item = temp9. display_individual_popover( id = item_id ). ENDIF. client->popover_destroy( ). WHEN `onAvatarPress`. - DATA(id) = lt_arg[ 1 ]. - item = VALUE #( items[ id = id ] OPTIONAL ). + DATA id LIKE LINE OF lt_arg. + DATA temp20 LIKE LINE OF lt_arg. + DATA temp21 LIKE sy-tabix. + temp21 = sy-tabix. + READ TABLE lt_arg INDEX 1 INTO temp20. + sy-tabix = temp21. + IF sy-subrc <> 0. + ASSERT 1 = 0. + ENDIF. + id = temp20. + DATA temp11 TYPE z2ui5_cl_demo_app_320=>ty_item. + CLEAR temp11. + DATA temp12 TYPE z2ui5_cl_demo_app_320=>ty_item. + READ TABLE items INTO temp12 WITH KEY id = id. + IF sy-subrc = 0. + temp11 = temp12. + ENDIF. + item = temp11. content_height = `370px`. content_width = `250px`. client->popover_model_update( ). + DATA temp13 TYPE string_table. + CLEAR temp13. + INSERT `navContainer` INTO TABLE temp13. + INSERT `detail` INTO TABLE temp13. client->follow_up_action( client->_event_client( val = `POPOVER_NAV_CONTAINER_TO` - t_arg = VALUE #( ( `navContainer` ) ( `detail` ) ) ) ). + t_arg = temp13 ) ). WHEN `onNavBack`. content_height = calculate_content_height( lines( group_items ) ). content_width = `450px`. client->popover_model_update( ). + DATA temp15 TYPE string_table. + CLEAR temp15. + INSERT `navContainer` INTO TABLE temp15. + INSERT `main` INTO TABLE temp15. client->follow_up_action( client->_event_client( val = `POPOVER_NAV_CONTAINER_TO` - t_arg = VALUE #( ( `navContainer` ) ( `main` ) ) ) ). + t_arg = temp15 ) ). ENDCASE. ENDMETHOD. METHOD calculate_content_height. - result = |{ condense( CONV i( floor( ( lines / 2 ) ) * 68 + 48 ) ) }px|. + DATA temp17 TYPE i. + temp17 = floor( ( lines / 2 ) ) * 68 + 48. + result = |{ condense( temp17 ) }px|. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_321.clas.abap b/src/z2ui5_cl_demo_app_321.clas.abap index 93b1a159..c23fb87e 100644 --- a/src/z2ui5_cl_demo_app_321.clas.abap +++ b/src/z2ui5_cl_demo_app_321.clas.abap @@ -16,8 +16,9 @@ CLASS z2ui5_cl_demo_app_321 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_navigated( ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + IF client->check_on_navigated( ) IS NOT INITIAL. + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). client->view_display( val = view->shell( )->page( title = 'abap2UI5 - Navigation with app state' diff --git a/src/z2ui5_cl_demo_app_322.clas.abap b/src/z2ui5_cl_demo_app_322.clas.abap index 8d7d58f9..b2ca6a82 100644 --- a/src/z2ui5_cl_demo_app_322.clas.abap +++ b/src/z2ui5_cl_demo_app_322.clas.abap @@ -17,8 +17,9 @@ CLASS z2ui5_cl_demo_app_322 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_navigated( ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + IF client->check_on_navigated( ) IS NOT INITIAL. + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). client->view_display( val = view->shell( )->page( title = 'abap2UI5 - Navigation with app state' @@ -37,7 +38,7 @@ CLASS z2ui5_cl_demo_app_322 IMPLEMENTATION. press = client->_event_client( 'HISTORY_BACK' ) )->stringify( ) ). - IF client->check_app_prev_stack( ). + IF client->check_app_prev_stack( ) IS NOT INITIAL. client->set_push_state( `/head/pos/` && client->get( )-s_draft-id ). ENDIF. RETURN. diff --git a/src/z2ui5_cl_demo_app_323.clas.abap b/src/z2ui5_cl_demo_app_323.clas.abap index cc664eb4..84bc9391 100644 --- a/src/z2ui5_cl_demo_app_323.clas.abap +++ b/src/z2ui5_cl_demo_app_323.clas.abap @@ -17,8 +17,9 @@ CLASS z2ui5_cl_demo_app_323 IMPLEMENTATION. METHOD z2ui5_if_app~main. - IF client->check_on_navigated( ). - DATA(view) = z2ui5_cl_xml_view=>factory( ). + IF client->check_on_navigated( ) IS NOT INITIAL. + DATA view TYPE REF TO z2ui5_cl_xml_view. + view = z2ui5_cl_xml_view=>factory( ). client->view_display( val = view->shell( )->page( title = 'abap2UI5 - Navigation with app state' diff --git a/src/z2ui5_cl_demo_app_324.clas.abap b/src/z2ui5_cl_demo_app_324.clas.abap index 921e4d9c..49b05a28 100644 --- a/src/z2ui5_cl_demo_app_324.clas.abap +++ b/src/z2ui5_cl_demo_app_324.clas.abap @@ -21,7 +21,7 @@ CLASS z2ui5_cl_demo_app_324 IMPLEMENTATION. me->client = client. TRY. - IF client->check_on_init( ). + IF client->check_on_init( ) IS NOT INITIAL. client->view_display( z2ui5_cl_xml_view=>factory( )->page( shownavbutton = abap_true navbuttonpress = client->_event( 'BACK' ) @@ -37,7 +37,8 @@ CLASS z2ui5_cl_demo_app_324 IMPLEMENTATION. call_dynpro( ). ENDCASE. - CATCH cx_root INTO DATA(x). + DATA x TYPE REF TO cx_root. + CATCH cx_root INTO x. client->nav_app_call( z2ui5_cl_pop_error=>factory( x ) ). ENDTRY. @@ -48,7 +49,8 @@ CLASS z2ui5_cl_demo_app_324 IMPLEMENTATION. " of course this makes no sense in abap2UI5. " It's just to provoke "Sending of dynpro SAPLSPO1 0500 not possible" error. - DATA(fm) = 'POPUP_TO_CONFIRM'. + DATA fm TYPE c LENGTH 16. + fm = 'POPUP_TO_CONFIRM'. CALL FUNCTION fm EXPORTING text_question = 'Test'