diff --git a/.github/scripts/build-package-branch.mjs b/.github/scripts/build-package-branch.mjs index b526759..324f947 100644 --- a/.github/scripts/build-package-branch.mjs +++ b/.github/scripts/build-package-branch.mjs @@ -25,7 +25,7 @@ const SRC = 'src'; // package.devc.xml (abapGit needs the parent package) and the overview app, // which is the entry point on every branch - it lists all 30 samples and marks // the ones this checkout does not carry as "not on this system" -const SRC_ALWAYS = /^(package\.devc\.xml|z2ui5_cl_smpe_app_00\.clas\..*)$/; +const SRC_ALWAYS = /^(package\.devc\.xml|z2ui5_cl_smps_app_00\.clas\..*)$/; const branch = process.argv[2]; if (!branch) { @@ -116,7 +116,7 @@ ${pkg.note ? `\n${wrap(pkg.note)}\n` : ''} 3. Set up whatever the package builds on: **[src/${pkg.dir}/README.md](src/${pkg.dir}/README.md)** says so in one short section. 4. Start a sample with \`?app_start=\`, or start the overview with - \`?app_start=z2ui5_cl_smpe_app_00\`. + \`?app_start=z2ui5_cl_smps_app_00\`. The overview app ships on every branch and lists **all 30 samples** of the repository, not just this package's. The ones that are not on this branch are diff --git a/.github/scripts/check-overview.mjs b/.github/scripts/check-overview.mjs index 1b070de..c865fad 100644 --- a/.github/scripts/check-overview.mjs +++ b/.github/scripts/check-overview.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node // Keeps the overview app and the repository in sync. // -// z2ui5_cl_smpe_app_00 references every sample BY NAME and resolves it at +// z2ui5_cl_smps_app_00 references every sample BY NAME and resolves it at // runtime, so that it survives a package the system cannot activate and a // checkout that carries only part of this repository (see the class // documentation). The price is that the compiler no longer notices a renamed @@ -27,7 +27,7 @@ import { readFileSync, readdirSync, statSync } from 'node:fs'; import { join, basename } from 'node:path'; const SRC = 'src'; -const OVERVIEW = join(SRC, 'z2ui5_cl_smpe_app_00.clas.abap'); +const OVERVIEW = join(SRC, 'z2ui5_cl_smps_app_00.clas.abap'); const packages = JSON.parse(readFileSync(join('.github', 'packages.json'), 'utf8')); const PACKAGES = packages.map((entry) => entry.dir); @@ -40,18 +40,18 @@ const walk = (dir) => const files = walk(SRC); // a sample is an ABAP class implementing z2ui5_if_app - which leaves out -// z2ui5_cl_smpe_app_489_ws, the APC handler behind sample 489, and the +// z2ui5_cl_smps_app_489_ws, the APC handler behind sample 489, and the // overview itself const samples = files - .filter((path) => /^z2ui5_cl_smpe_app_.*\.clas\.abap$/.test(basename(path))) + .filter((path) => /^z2ui5_cl_smps_app_.*\.clas\.abap$/.test(basename(path))) .filter((path) => basename(path) !== basename(OVERVIEW)) .filter((path) => /INTERFACES\s+z2ui5_if_app\s*\./i.test(readFileSync(path, 'utf8'))) .map((path) => basename(path).replace('.clas.abap', '').toUpperCase()); -// every Z2UI5_CL_SMPE_* class name the overview carries as a string literal: +// every Z2UI5_CL_SMPS_* class name the overview carries as a string literal: // the samples in model_init and the two demo data classes in cs_class const overview = readFileSync(OVERVIEW, 'utf8'); -const listed = [...overview.matchAll(/`(Z2UI5_C[LX]_SMPE_[A-Z0-9_]+)`/g)].map((match) => match[1]); +const listed = [...overview.matchAll(/`(Z2UI5_C[LX]_SMPS_[A-Z0-9_]+)`/g)].map((match) => match[1]); const known = new Set( files diff --git a/.github/workflows/check-overview.yaml b/.github/workflows/check-overview.yaml index ddc3e23..f269810 100644 --- a/.github/workflows/check-overview.yaml +++ b/.github/workflows/check-overview.yaml @@ -1,6 +1,6 @@ name: check-overview -# The overview app z2ui5_cl_smpe_app_00 names every sample as a string and +# The overview app z2ui5_cl_smps_app_00 names every sample as a string and # resolves it at runtime, so that it survives a package the system cannot # activate and a checkout carrying only part of this repository. The compiler # therefore no longer notices a renamed or a newly added sample - this check diff --git a/README.md b/README.md index 894f300..bd2190d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![abap version](https://img.shields.io/badge/abap%20version-standard%20%28%E2%89%A5%201909%29-blue)](#setup) -[![namespace](https://img.shields.io/badge/namespace-z2ui5__cl__smpe-blue)](abaplint.jsonc) +[![namespace](https://img.shields.io/badge/namespace-z2ui5__cl__smps-blue)](abaplint.jsonc) [![dependency](https://img.shields.io/badge/dependency-abap2UI5-blue)](https://github.com/abap2UI5/abap2UI5)

@@ -42,7 +42,7 @@ for and try it out — the others can wait until you need them. | [`src/03`](src/03) | **[RAP](src/03/README.md)** — consume a business object with EML | ABAP Platform >= 1909; the BO ships with this repo | Cloud + Standard ≥ 7.54 (1909) | | [`src/04`](src/04) | **[RAP with Draft](src/04/README.md)** — use draft handling | as above | Cloud + Standard ≥ 7.54 (1909) | | [`src/05`](src/05) | **[Business Events](src/05/README.md)** — react to RAP events, log them, show them | as above | Cloud + Standard ≥ 7.56 (2021) | -| [`src/06`](src/06) | **[Stateful Sessions / Locks](src/06/README.md)** — sticky session, `ENQUEUE` | ABAP Standard (on-premise), the table `Z2UI5_T_SMPE_01` | Standard only, ≥ 7.40 SP08 | +| [`src/06`](src/06) | **[Stateful Sessions / Locks](src/06/README.md)** — sticky session, `ENQUEUE` | ABAP Standard (on-premise), the table `Z2UI5_T_SMPS_01` | Standard only, ≥ 7.40 SP08 | | [`src/07`](src/07) | **[AMC/APC](src/07/README.md)** — a news feed over WebSocket | on-premise APC/AMC, the ICF node `Z2UI5_APC_SMP_2` | Standard only, ≥ 7.50 | | [`src/08`](src/08) | **[MIME Play Audio](src/08/README.md)** — play a sound from the MIME repository | the ICF service `/SAP/PUBLIC/BC/ABAP/mime_demo` | Standard only, ≥ 7.50 | | [`src/09`](src/09) | **[Launchpad](src/09/README.md)** — startup parameters, shell title, cross-app navigation | a Fiori Launchpad with a tile pointing at abap2UI5 | Cloud + Standard ≥ 7.40 SP08 | @@ -103,13 +103,13 @@ of them. short section. 4. Start an app with `?app_start=`. -Every sample of the abap2UI5 sample scheme is called `Z2UI5_CL_SMPE_APP_`, and +Every sample of the abap2UI5 sample scheme is called `Z2UI5_CL_SMPS_APP_`, and the tables in the package READMEs give you the number, so sample `487` is -`?app_start=z2ui5_cl_smpe_app_487`. +`?app_start=z2ui5_cl_smps_app_487`. ## The overview app -You do not have to look a number up. `?app_start=z2ui5_cl_smpe_app_00` lists +You do not have to look a number up. `?app_start=z2ui5_cl_smps_app_00` lists **every sample of this repository**, one collapsible section per package, and starts each one in a new browser tab — so the overview stays where it is and several samples can run side by side. Its header button fills the demo data of @@ -158,20 +158,20 @@ pushed to one is gone at the next build. ## Namespace -Every object carries the token **`SMPE`** behind its type token — the scheme the +Every object carries the token **`SMPS`** behind its type token — the scheme the samples repository uses with its `SMP` token: ``` -Z2UI5_CL_SMPE_ classes, including the behavior pools and event handlers -Z2UI5_T_SMPE_ persistent tables -Z2UI5_D_SMPE_ draft tables -Z2UI5_E_SMPE_ data elements -Z2UI5_R_SMPE_ CDS entities and their behavior definitions -Z2UI5_SD_SMPE_ service definitions -Z2UI5_SB_SMPE_ service bindings +Z2UI5_CL_SMPS_ classes, including the behavior pools and event handlers +Z2UI5_T_SMPS_ persistent tables +Z2UI5_D_SMPS_ draft tables +Z2UI5_E_SMPS_ data elements +Z2UI5_R_SMPS_ CDS entities and their behavior definitions +Z2UI5_SD_SMPS_ service definitions +Z2UI5_SB_SMPS_ service bindings ``` -Runnable samples are `Z2UI5_CL_SMPE_APP_`, so the class name is what you pass to +Runnable samples are `Z2UI5_CL_SMPS_APP_`, so the class name is what you pass to `?app_start=`. Class names are capped at **25** characters, tables at **16**. Both limits and the diff --git a/abaplint.jsonc b/abaplint.jsonc index e87e372..d5311a6 100644 --- a/abaplint.jsonc +++ b/abaplint.jsonc @@ -1,7 +1,7 @@ { "global": { "files": "/src/**/*.*", - // z2ui5_cl_smpe_evt_tck is a RAP business event handler. Its two + // z2ui5_cl_smps_evt_tck is a RAP business event handler. Its two // constructs - CLASS ... DEFINITION PUBLIC FOR EVENTS OF in the // global class and METHODS ... FOR ENTITY EVENT FOR ~ // in the handler pool - have no grammar in abaplint, so the class pool @@ -15,8 +15,8 @@ // object_naming and xml_consistency still cover the object. Drop this // once abaplint parses the RAP event syntax. "noIssues": [ - "z2ui5_cl_smpe_evt_tck\\.clas\\.abap$", - "z2ui5_cl_smpe_evt_tck\\.clas\\.locals_imp\\.abap$" + "z2ui5_cl_smps_evt_tck\\.clas\\.abap$", + "z2ui5_cl_smps_evt_tck\\.clas\\.locals_imp\\.abap$" ] }, "dependencies": [ @@ -46,11 +46,11 @@ "line_length": { "length": 255 }, - // Every object carries the EML sample token SMPE behind its type token, + // Every object carries the stack sample token SMPS behind its type token, // the scheme the samples repository uses with its SMP token: - // Z2UI5_CL_SMPE_ classes, including the behavior pools - // Z2UI5_T_SMPE_ persistent tables - // Z2UI5_D_SMPE_ draft tables + // Z2UI5_CL_SMPS_ classes, including the behavior pools + // Z2UI5_T_SMPS_ persistent tables + // Z2UI5_D_SMPS_ draft tables // Class names are capped at 25 characters by the leading lookahead. ABAP // allows 30, but build_rename (see abap2UI5) replaces the namespace // z2ui5 (5 chars) with up to 9, which costs 4 - so 26 is the hard @@ -63,8 +63,8 @@ "object_naming": { "patternKind": "required", "severity": "Error", - "clas": "^(?=.{1,25}$)Z2UI5_C(L|X)_SMPE_", - "tabl": "^(?=.{1,16}$)Z2UI5_(T|D)_SMPE_" + "clas": "^(?=.{1,25}$)Z2UI5_C(L|X)_SMPS_", + "tabl": "^(?=.{1,16}$)Z2UI5_(T|D)_SMPS_" }, // enforces the per object type name length limits of the ABAP repository "allowed_object_naming": true, @@ -73,21 +73,21 @@ "check_include": true, // see the note at "superclass_final" below "check_syntax": { - "exclude": ["z2ui5_cl_smpe_app_489(_ws)?\\.clas\\."] + "exclude": ["z2ui5_cl_smps_app_489(_ws)?\\.clas\\."] }, "global_class": true, "definitions_top": false, "implement_methods": true, "method_implemented_twice": true, "parser_error": true, - // z2ui5_cl_smpe_app_489_ws inherits from cl_apc_wsp_ext_stateless_base. + // z2ui5_cl_smps_app_489_ws inherits from cl_apc_wsp_ext_stateless_base. // ABAP Push Channels are on-premise only and therefore absent from // steampunk-2305-api, the single API dependency of this repository, so // the superclass cannot be resolved. The class pool then fails to // activate for abaplint, which is why app_489 - the app driving the // channel - reports its references to it as unknown as well. "superclass_final": { - "exclude": ["z2ui5_cl_smpe_app_489_ws\\.clas\\."] + "exclude": ["z2ui5_cl_smps_app_489_ws\\.clas\\."] }, "unknown_types": true, "xml_consistency": true diff --git a/src/00/00/z2ui5_cl_smpe_context.clas.abap b/src/00/00/z2ui5_cl_smps_context.clas.abap similarity index 96% rename from src/00/00/z2ui5_cl_smpe_context.clas.abap rename to src/00/00/z2ui5_cl_smps_context.clas.abap index 0ceecc8..c435b79 100644 --- a/src/00/00/z2ui5_cl_smpe_context.clas.abap +++ b/src/00/00/z2ui5_cl_smps_context.clas.abap @@ -9,7 +9,7 @@ "! clearer written out in the app itself stays in the app - the local "! ty_s_travel structures for instance, which every app declares with just "! the fields it actually shows. -CLASS z2ui5_cl_smpe_context DEFINITION PUBLIC FINAL CREATE PRIVATE. +CLASS z2ui5_cl_smps_context DEFINITION PUBLIC FINAL CREATE PRIVATE. PUBLIC SECTION. @@ -61,7 +61,7 @@ CLASS z2ui5_cl_smpe_context DEFINITION PUBLIC FINAL CREATE PRIVATE. ENDCLASS. -CLASS z2ui5_cl_smpe_context IMPLEMENTATION. +CLASS z2ui5_cl_smps_context IMPLEMENTATION. METHOD msg_display. diff --git a/src/00/00/z2ui5_cl_smpe_context.clas.xml b/src/00/00/z2ui5_cl_smps_context.clas.xml similarity index 91% rename from src/00/00/z2ui5_cl_smpe_context.clas.xml rename to src/00/00/z2ui5_cl_smps_context.clas.xml index ad4dabf..119bc7a 100644 --- a/src/00/00/z2ui5_cl_smpe_context.clas.xml +++ b/src/00/00/z2ui5_cl_smps_context.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_CONTEXT + Z2UI5_CL_SMPS_CONTEXT E abap2UI5 EML sample - shared context 1 diff --git a/src/01/README.md b/src/01/README.md index 3e145e0..3abc11c 100644 --- a/src/01/README.md +++ b/src/01/README.md @@ -32,10 +32,10 @@ the sample keeps working. | Sample | Shows | |---|---| -| [`315`](z2ui5_cl_smpe_app_315.clas.abap) | two OData models in one view, one table bound to each | +| [`315`](z2ui5_cl_smps_app_315.clas.abap) | two OData models in one view, one table bound to each | -Start it with `?app_start=z2ui5_cl_smpe_app_315`, or from the overview app -`?app_start=z2ui5_cl_smpe_app_00`, which lists every sample of this repository. +Start it with `?app_start=z2ui5_cl_smps_app_315`, or from the overview app +`?app_start=z2ui5_cl_smps_app_00`, which lists every sample of this repository. `315` attaches **two** models in one view via `cs_event-set_odata_model`, each under its own name, and binds one table to each: `{TRAVEL>/Currency}` and diff --git a/src/01/z2ui5_cl_smpe_app_315.clas.abap b/src/01/z2ui5_cl_smps_app_315.clas.abap similarity index 96% rename from src/01/z2ui5_cl_smpe_app_315.clas.abap rename to src/01/z2ui5_cl_smps_app_315.clas.abap index 3025999..5e64dc1 100644 --- a/src/01/z2ui5_cl_smpe_app_315.clas.abap +++ b/src/01/z2ui5_cl_smps_app_315.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_315 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_315 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -8,7 +8,7 @@ CLASS z2ui5_cl_smpe_app_315 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_315 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_315 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/01/z2ui5_cl_smpe_app_315.clas.xml b/src/01/z2ui5_cl_smps_app_315.clas.xml similarity index 90% rename from src/01/z2ui5_cl_smpe_app_315.clas.xml rename to src/01/z2ui5_cl_smps_app_315.clas.xml index b87a5bc..7f8c629 100644 --- a/src/01/z2ui5_cl_smpe_app_315.clas.xml +++ b/src/01/z2ui5_cl_smps_app_315.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_315 + Z2UI5_CL_SMPS_APP_315 E Model - Use OData models 1 diff --git a/src/02/README.md b/src/02/README.md index a2563a1..97e43b4 100644 --- a/src/02/README.md +++ b/src/02/README.md @@ -28,18 +28,18 @@ written in — what they need is the service, not the platform. | Sample | Shows | Service | |---|---|---| -| [`313`](z2ui5_cl_smpe_app_313.clas.abap) | SmartFilterBar + SmartTable with variant management | `UI_PRODUCTLIST` | -| [`314`](z2ui5_cl_smpe_app_314.clas.abap) | switch the default model — device, HTTP and OData model side by side | `GWSAMPLE_BASIC` | -| [`319`](z2ui5_cl_smpe_app_319.clas.abap) | SmartMultiInput → an ABAP `SELECT-OPTIONS` range table | `UI_PRODUCTLIST` + value list annotations | -| [`475`](z2ui5_cl_smpe_app_475.clas.abap) | SmartField inside a SmartForm | `GWSAMPLE_BASIC` | -| [`476`](z2ui5_cl_smpe_app_476.clas.abap) | SmartForm, display/edit toggle | `GWSAMPLE_BASIC` | -| [`477`](z2ui5_cl_smpe_app_477.clas.abap) | SmartFilterBar driving a SmartTable | `GWSAMPLE_BASIC` | -| [`478`](z2ui5_cl_smpe_app_478.clas.abap) | page variant management | `GWSAMPLE_BASIC` | -| [`479`](z2ui5_cl_smpe_app_479.clas.abap) | SmartChart with NavigationPopover | an analytical service — you supply it | -| [`493`](z2ui5_cl_smpe_app_493.clas.abap) | classic FilterBar wired to variant management | none — the data is ABAP | - -Start any of them with `?app_start=z2ui5_cl_smpe_app_`, or from the overview -app `?app_start=z2ui5_cl_smpe_app_00`, which lists every sample of this repository. +| [`313`](z2ui5_cl_smps_app_313.clas.abap) | SmartFilterBar + SmartTable with variant management | `UI_PRODUCTLIST` | +| [`314`](z2ui5_cl_smps_app_314.clas.abap) | switch the default model — device, HTTP and OData model side by side | `GWSAMPLE_BASIC` | +| [`319`](z2ui5_cl_smps_app_319.clas.abap) | SmartMultiInput → an ABAP `SELECT-OPTIONS` range table | `UI_PRODUCTLIST` + value list annotations | +| [`475`](z2ui5_cl_smps_app_475.clas.abap) | SmartField inside a SmartForm | `GWSAMPLE_BASIC` | +| [`476`](z2ui5_cl_smps_app_476.clas.abap) | SmartForm, display/edit toggle | `GWSAMPLE_BASIC` | +| [`477`](z2ui5_cl_smps_app_477.clas.abap) | SmartFilterBar driving a SmartTable | `GWSAMPLE_BASIC` | +| [`478`](z2ui5_cl_smps_app_478.clas.abap) | page variant management | `GWSAMPLE_BASIC` | +| [`479`](z2ui5_cl_smps_app_479.clas.abap) | SmartChart with NavigationPopover | an analytical service — you supply it | +| [`493`](z2ui5_cl_smps_app_493.clas.abap) | classic FilterBar wired to variant management | none — the data is ABAP | + +Start any of them with `?app_start=z2ui5_cl_smps_app_`, or from the overview +app `?app_start=z2ui5_cl_smps_app_00`, which lists every sample of this repository. ## Two worth a closer look diff --git a/src/02/z2ui5_cl_smpe_app_313.clas.abap b/src/02/z2ui5_cl_smps_app_313.clas.abap similarity index 97% rename from src/02/z2ui5_cl_smpe_app_313.clas.abap rename to src/02/z2ui5_cl_smps_app_313.clas.abap index 0657a3d..3ce3155 100644 --- a/src/02/z2ui5_cl_smpe_app_313.clas.abap +++ b/src/02/z2ui5_cl_smps_app_313.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_313 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_313 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -24,7 +24,7 @@ CLASS z2ui5_cl_smpe_app_313 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_313 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_313 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_313.clas.xml b/src/02/z2ui5_cl_smps_app_313.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_313.clas.xml rename to src/02/z2ui5_cl_smps_app_313.clas.xml index 84b56b4..c2fc190 100644 --- a/src/02/z2ui5_cl_smpe_app_313.clas.xml +++ b/src/02/z2ui5_cl_smps_app_313.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_313 + Z2UI5_CL_SMPS_APP_313 E Smart Controls - Smart Table and Variants 1 diff --git a/src/02/z2ui5_cl_smpe_app_314.clas.abap b/src/02/z2ui5_cl_smps_app_314.clas.abap similarity index 97% rename from src/02/z2ui5_cl_smpe_app_314.clas.abap rename to src/02/z2ui5_cl_smps_app_314.clas.abap index dcf3bfa..879dd6d 100644 --- a/src/02/z2ui5_cl_smpe_app_314.clas.abap +++ b/src/02/z2ui5_cl_smps_app_314.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_314 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_314 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -23,7 +23,7 @@ CLASS z2ui5_cl_smpe_app_314 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_314 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_314 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_314.clas.xml b/src/02/z2ui5_cl_smps_app_314.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_314.clas.xml rename to src/02/z2ui5_cl_smps_app_314.clas.xml index c3eea6f..2652ec5 100644 --- a/src/02/z2ui5_cl_smpe_app_314.clas.xml +++ b/src/02/z2ui5_cl_smps_app_314.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_314 + Z2UI5_CL_SMPS_APP_314 E Smart Controls - Switch Default Model 1 diff --git a/src/02/z2ui5_cl_smpe_app_319.clas.abap b/src/02/z2ui5_cl_smps_app_319.clas.abap similarity index 99% rename from src/02/z2ui5_cl_smpe_app_319.clas.abap rename to src/02/z2ui5_cl_smps_app_319.clas.abap index 765b246..901a16a 100644 --- a/src/02/z2ui5_cl_smpe_app_319.clas.abap +++ b/src/02/z2ui5_cl_smps_app_319.clas.abap @@ -12,7 +12,7 @@ "! "! Needs SAPUI5 (sap.ui.comp is SAPUI5-only) and a reachable, value-list-annotated "! OData V2 service - see the OData service block in on_init. -CLASS z2ui5_cl_smpe_app_319 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_319 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -75,7 +75,7 @@ CLASS z2ui5_cl_smpe_app_319 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_319 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_319 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_319.clas.xml b/src/02/z2ui5_cl_smps_app_319.clas.xml similarity index 90% rename from src/02/z2ui5_cl_smpe_app_319.clas.xml rename to src/02/z2ui5_cl_smps_app_319.clas.xml index b7a0eb7..b0fdad3 100644 --- a/src/02/z2ui5_cl_smpe_app_319.clas.xml +++ b/src/02/z2ui5_cl_smps_app_319.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_319 + Z2UI5_CL_SMPS_APP_319 E Smart Controls - Smart Multi Input 1 diff --git a/src/02/z2ui5_cl_smpe_app_475.clas.abap b/src/02/z2ui5_cl_smps_app_475.clas.abap similarity index 96% rename from src/02/z2ui5_cl_smpe_app_475.clas.abap rename to src/02/z2ui5_cl_smps_app_475.clas.abap index 0ee9417..3826ea1 100644 --- a/src/02/z2ui5_cl_smpe_app_475.clas.abap +++ b/src/02/z2ui5_cl_smps_app_475.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_475 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_475 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -15,7 +15,7 @@ CLASS z2ui5_cl_smpe_app_475 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_475 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_475 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_475.clas.xml b/src/02/z2ui5_cl_smps_app_475.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_475.clas.xml rename to src/02/z2ui5_cl_smps_app_475.clas.xml index 545ef32..51774e8 100644 --- a/src/02/z2ui5_cl_smpe_app_475.clas.xml +++ b/src/02/z2ui5_cl_smps_app_475.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_475 + Z2UI5_CL_SMPS_APP_475 E Smart Controls - SmartField in a SmartForm 1 diff --git a/src/02/z2ui5_cl_smpe_app_476.clas.abap b/src/02/z2ui5_cl_smps_app_476.clas.abap similarity index 97% rename from src/02/z2ui5_cl_smpe_app_476.clas.abap rename to src/02/z2ui5_cl_smps_app_476.clas.abap index 80af4f8..aa37773 100644 --- a/src/02/z2ui5_cl_smpe_app_476.clas.abap +++ b/src/02/z2ui5_cl_smps_app_476.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_476 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_476 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -17,7 +17,7 @@ CLASS z2ui5_cl_smpe_app_476 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_476 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_476 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_476.clas.xml b/src/02/z2ui5_cl_smps_app_476.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_476.clas.xml rename to src/02/z2ui5_cl_smps_app_476.clas.xml index 0208440..224a213 100644 --- a/src/02/z2ui5_cl_smpe_app_476.clas.xml +++ b/src/02/z2ui5_cl_smps_app_476.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_476 + Z2UI5_CL_SMPS_APP_476 E Smart Controls - SmartForm, editable toggle 1 diff --git a/src/02/z2ui5_cl_smpe_app_477.clas.abap b/src/02/z2ui5_cl_smps_app_477.clas.abap similarity index 96% rename from src/02/z2ui5_cl_smpe_app_477.clas.abap rename to src/02/z2ui5_cl_smps_app_477.clas.abap index 9ee1d6a..d013a39 100644 --- a/src/02/z2ui5_cl_smpe_app_477.clas.abap +++ b/src/02/z2ui5_cl_smps_app_477.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_477 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_477 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -15,7 +15,7 @@ CLASS z2ui5_cl_smpe_app_477 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_477 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_477 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_477.clas.xml b/src/02/z2ui5_cl_smps_app_477.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_477.clas.xml rename to src/02/z2ui5_cl_smps_app_477.clas.xml index 93c6cb2..dbb6af7 100644 --- a/src/02/z2ui5_cl_smpe_app_477.clas.xml +++ b/src/02/z2ui5_cl_smps_app_477.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_477 + Z2UI5_CL_SMPS_APP_477 E Smart Controls - SmartFilterBar and SmartTable 1 diff --git a/src/02/z2ui5_cl_smpe_app_478.clas.abap b/src/02/z2ui5_cl_smps_app_478.clas.abap similarity index 97% rename from src/02/z2ui5_cl_smpe_app_478.clas.abap rename to src/02/z2ui5_cl_smps_app_478.clas.abap index a04acdc..07e39f3 100644 --- a/src/02/z2ui5_cl_smpe_app_478.clas.abap +++ b/src/02/z2ui5_cl_smps_app_478.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_478 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_478 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -15,7 +15,7 @@ CLASS z2ui5_cl_smpe_app_478 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_478 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_478 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_478.clas.xml b/src/02/z2ui5_cl_smps_app_478.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_478.clas.xml rename to src/02/z2ui5_cl_smps_app_478.clas.xml index 47bc202..33fc47e 100644 --- a/src/02/z2ui5_cl_smpe_app_478.clas.xml +++ b/src/02/z2ui5_cl_smps_app_478.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_478 + Z2UI5_CL_SMPS_APP_478 E Smart Controls - Page Variant Management 1 diff --git a/src/02/z2ui5_cl_smpe_app_479.clas.abap b/src/02/z2ui5_cl_smps_app_479.clas.abap similarity index 97% rename from src/02/z2ui5_cl_smpe_app_479.clas.abap rename to src/02/z2ui5_cl_smps_app_479.clas.abap index b952eaf..0d579a6 100644 --- a/src/02/z2ui5_cl_smpe_app_479.clas.abap +++ b/src/02/z2ui5_cl_smps_app_479.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_479 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_479 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -19,7 +19,7 @@ CLASS z2ui5_cl_smpe_app_479 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_479 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_479 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_479.clas.xml b/src/02/z2ui5_cl_smps_app_479.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_479.clas.xml rename to src/02/z2ui5_cl_smps_app_479.clas.xml index 68fdc87..13d29a0 100644 --- a/src/02/z2ui5_cl_smpe_app_479.clas.xml +++ b/src/02/z2ui5_cl_smps_app_479.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_479 + Z2UI5_CL_SMPS_APP_479 E Smart Controls - SmartChart with NavPopover 1 diff --git a/src/02/z2ui5_cl_smpe_app_493.clas.abap b/src/02/z2ui5_cl_smps_app_493.clas.abap similarity index 98% rename from src/02/z2ui5_cl_smpe_app_493.clas.abap rename to src/02/z2ui5_cl_smps_app_493.clas.abap index 58c6fff..fb61288 100644 --- a/src/02/z2ui5_cl_smpe_app_493.clas.abap +++ b/src/02/z2ui5_cl_smps_app_493.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_493 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_493 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -34,7 +34,7 @@ CLASS z2ui5_cl_smpe_app_493 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_493 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_493 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/02/z2ui5_cl_smpe_app_493.clas.xml b/src/02/z2ui5_cl_smps_app_493.clas.xml similarity index 91% rename from src/02/z2ui5_cl_smpe_app_493.clas.xml rename to src/02/z2ui5_cl_smps_app_493.clas.xml index 7a5da45..b904414 100644 --- a/src/02/z2ui5_cl_smpe_app_493.clas.xml +++ b/src/02/z2ui5_cl_smps_app_493.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_493 + Z2UI5_CL_SMPS_APP_493 E Smart Controls - classic FilterBar variants 1 diff --git a/src/03/01/z2ui5_cl_smpe_bp_trv.clas.abap b/src/03/01/z2ui5_cl_smps_bp_trv.clas.abap similarity index 61% rename from src/03/01/z2ui5_cl_smpe_bp_trv.clas.abap rename to src/03/01/z2ui5_cl_smps_bp_trv.clas.abap index 9b7c34e..674bec1 100644 --- a/src/03/01/z2ui5_cl_smpe_bp_trv.clas.abap +++ b/src/03/01/z2ui5_cl_smps_bp_trv.clas.abap @@ -1,14 +1,14 @@ "!

abap2UI5 EML sample - behavior pool

-"! Behavior pool of the business object z2ui5_r_smpe_trv. The implementation +"! Behavior pool of the business object z2ui5_r_smps_trv. The implementation "! lives in the local types include, that is where RAP expects the handler -"! classes - see z2ui5_cl_smpe_bp_trv.clas.locals_imp.abap. +"! classes - see z2ui5_cl_smps_bp_trv.clas.locals_imp.abap. "! "! FOR BEHAVIOR OF is what makes this a behavior pool instead of an ordinary "! abstract final class. Without it RAP finds no handler at all and every EML "! statement dies on the first one it looks for - the global authorization. -CLASS z2ui5_cl_smpe_bp_trv DEFINITION PUBLIC ABSTRACT FINAL FOR BEHAVIOR OF z2ui5_r_smpe_trv. +CLASS z2ui5_cl_smps_bp_trv DEFINITION PUBLIC ABSTRACT FINAL FOR BEHAVIOR OF z2ui5_r_smps_trv. ENDCLASS. -CLASS z2ui5_cl_smpe_bp_trv IMPLEMENTATION. +CLASS z2ui5_cl_smps_bp_trv IMPLEMENTATION. ENDCLASS. diff --git a/src/03/01/z2ui5_cl_smpe_bp_trv.clas.locals_imp.abap b/src/03/01/z2ui5_cl_smps_bp_trv.clas.locals_imp.abap similarity index 93% rename from src/03/01/z2ui5_cl_smpe_bp_trv.clas.locals_imp.abap rename to src/03/01/z2ui5_cl_smps_bp_trv.clas.locals_imp.abap index edd7851..7541fea 100644 --- a/src/03/01/z2ui5_cl_smpe_bp_trv.clas.locals_imp.abap +++ b/src/03/01/z2ui5_cl_smps_bp_trv.clas.locals_imp.abap @@ -63,7 +63,7 @@ CLASS lhc_travel IMPLEMENTATION. " Good enough for a sample: a productive business object would use a " number range object instead of MAX( ), which is not safe against two " users creating at the very same moment. - SELECT SINGLE FROM z2ui5_t_smpe_trv + SELECT SINGLE FROM z2ui5_t_smps_trv FIELDS MAX( travel_id ) INTO @DATA(max_id). @@ -83,7 +83,7 @@ CLASS lhc_travel IMPLEMENTATION. " IN LOCAL MODE bypasses feature control and the readonly flags of the " behavior definition - which is exactly why a determination may write " fields the caller is not allowed to touch - READ ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel FIELDS ( bookingfee currencycode overallstatus ) WITH CORRESPONDING #( keys ) @@ -94,7 +94,7 @@ CLASS lhc_travel IMPLEMENTATION. RETURN. ENDIF. - MODIFY ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel UPDATE FIELDS ( overallstatus totalprice currencycode ) WITH VALUE #( FOR travel IN travels @@ -113,7 +113,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD validatecustomer. - READ ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel FIELDS ( customerid ) WITH CORRESPONDING #( keys ) @@ -139,7 +139,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD validatedates. - READ ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel FIELDS ( begindate enddate ) WITH CORRESPONDING #( keys ) @@ -167,7 +167,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD accepttravel. - MODIFY ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel UPDATE FIELDS ( overallstatus ) WITH VALUE #( FOR key IN keys @@ -179,7 +179,7 @@ CLASS lhc_travel IMPLEMENTATION. " an action with `result [1] $self` returns the changed instance, so the " caller does not have to read it again - READ ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel ALL FIELDS WITH CORRESPONDING #( keys ) RESULT DATA(travels). @@ -193,7 +193,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD rejecttravel. - MODIFY ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel UPDATE FIELDS ( overallstatus ) WITH VALUE #( FOR key IN keys @@ -203,7 +203,7 @@ CLASS lhc_travel IMPLEMENTATION. reported = CORRESPONDING #( DEEP update_reported ). - READ ENTITIES OF z2ui5_r_smpe_trv IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trv IN LOCAL MODE ENTITY travel ALL FIELDS WITH CORRESPONDING #( keys ) RESULT DATA(travels). diff --git a/src/03/01/z2ui5_cl_smpe_bp_trv.clas.xml b/src/03/01/z2ui5_cl_smps_bp_trv.clas.xml similarity index 84% rename from src/03/01/z2ui5_cl_smpe_bp_trv.clas.xml rename to src/03/01/z2ui5_cl_smps_bp_trv.clas.xml index 073b3cb..dd5d181 100644 --- a/src/03/01/z2ui5_cl_smpe_bp_trv.clas.xml +++ b/src/03/01/z2ui5_cl_smps_bp_trv.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_BP_TRV + Z2UI5_CL_SMPS_BP_TRV E abap2UI5 EML sample - behavior pool 06 @@ -11,7 +11,7 @@ X X X - Z2UI5_R_SMPE_TRV + Z2UI5_R_SMPS_TRV diff --git a/src/03/01/z2ui5_cl_smpe_data_trv.clas.abap b/src/03/01/z2ui5_cl_smps_data_trv.clas.abap similarity index 90% rename from src/03/01/z2ui5_cl_smpe_data_trv.clas.abap rename to src/03/01/z2ui5_cl_smps_data_trv.clas.abap index 8aefeda..097ea74 100644 --- a/src/03/01/z2ui5_cl_smpe_data_trv.clas.abap +++ b/src/03/01/z2ui5_cl_smps_data_trv.clas.abap @@ -1,14 +1,14 @@ "!

abap2UI5 EML sample - demo data

-"! Demo data for the business object z2ui5_r_smpe_trv. +"! Demo data for the business object z2ui5_r_smps_trv. "! "! Run it in ADT with F9 - it is a console application - or press the button "! in one of the sample apps, which calls the same methods. "! "! Everything goes through the business object with EML, never with an INSERT -"! into z2ui5_t_smpe_trv. An INSERT would skip the determination +"! into z2ui5_t_smps_trv. An INSERT would skip the determination "! setInitialValues, so the rows would carry no status and no total price - "! data this business object could never have produced itself. -CLASS z2ui5_cl_smpe_data_trv DEFINITION PUBLIC FINAL CREATE PUBLIC. +CLASS z2ui5_cl_smps_data_trv DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. @@ -37,7 +37,7 @@ CLASS z2ui5_cl_smpe_data_trv DEFINITION PUBLIC FINAL CREATE PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_data_trv IMPLEMENTATION. +CLASS z2ui5_cl_smps_data_trv IMPLEMENTATION. METHOD if_oo_adt_classrun~main. @@ -55,7 +55,7 @@ CLASS z2ui5_cl_smpe_data_trv IMPLEMENTATION. METHOD data_generate. - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel CREATE FIELDS ( agencyid customerid begindate enddate bookingfee currencycode description ) WITH VALUE #( currencycode = 'EUR' @@ -91,7 +91,7 @@ CLASS z2ui5_cl_smpe_data_trv IMPLEMENTATION. ENDIF. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). @@ -107,7 +107,7 @@ CLASS z2ui5_cl_smpe_data_trv IMPLEMENTATION. METHOD data_delete. - SELECT FROM z2ui5_r_smpe_trv + SELECT FROM z2ui5_r_smps_trv FIELDS TravelId INTO TABLE @DATA(t_keys). @@ -116,7 +116,7 @@ CLASS z2ui5_cl_smpe_data_trv IMPLEMENTATION. RETURN. ENDIF. - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel DELETE FROM VALUE #( FOR s_key IN t_keys ( travelid = s_key-travelid ) ) FAILED DATA(s_failed). diff --git a/src/03/01/z2ui5_cl_smpe_data_trv.clas.xml b/src/03/01/z2ui5_cl_smps_data_trv.clas.xml similarity index 90% rename from src/03/01/z2ui5_cl_smpe_data_trv.clas.xml rename to src/03/01/z2ui5_cl_smps_data_trv.clas.xml index 63e06b9..f6f04bb 100644 --- a/src/03/01/z2ui5_cl_smpe_data_trv.clas.xml +++ b/src/03/01/z2ui5_cl_smps_data_trv.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_DATA_TRV + Z2UI5_CL_SMPS_DATA_TRV E abap2UI5 EML sample - demo data 1 diff --git a/src/03/01/z2ui5_r_smpe_trv.bdef.asbdef b/src/03/01/z2ui5_r_smps_trv.bdef.asbdef similarity index 88% rename from src/03/01/z2ui5_r_smpe_trv.bdef.asbdef rename to src/03/01/z2ui5_r_smps_trv.bdef.asbdef index bccad30..97f87d1 100644 --- a/src/03/01/z2ui5_r_smpe_trv.bdef.asbdef +++ b/src/03/01/z2ui5_r_smps_trv.bdef.asbdef @@ -1,12 +1,12 @@ // Managed business object without draft. Everything the abap2UI5 apps -// z2ui5_cl_smpe_app_01 and z2ui5_cl_smpe_app_05 call with EML is declared here - +// z2ui5_cl_smps_app_01 and z2ui5_cl_smps_app_05 call with EML is declared here - // the runtime executes the validations, the determination and the feature // control no matter who triggers the operation. -managed implementation in class z2ui5_cl_smpe_bp_trv unique; +managed implementation in class z2ui5_cl_smps_bp_trv unique; strict ( 2 ); -define behavior for z2ui5_r_smpe_trv alias Travel -persistent table z2ui5_t_smpe_trv +define behavior for z2ui5_r_smps_trv alias Travel +persistent table z2ui5_t_smps_trv lock master authorization master ( global ) etag master LastChangedAt @@ -38,7 +38,7 @@ early numbering action acceptTravel result [1] $self; action rejectTravel result [1] $self; - mapping for z2ui5_t_smpe_trv + mapping for z2ui5_t_smps_trv { TravelId = travel_id; AgencyId = agency_id; diff --git a/src/03/01/z2ui5_r_smpe_trv.bdef.xml b/src/03/01/z2ui5_r_smps_trv.bdef.xml similarity index 84% rename from src/03/01/z2ui5_r_smpe_trv.bdef.xml rename to src/03/01/z2ui5_r_smps_trv.bdef.xml index 881458a..d6a6077 100644 --- a/src/03/01/z2ui5_r_smpe_trv.bdef.xml +++ b/src/03/01/z2ui5_r_smps_trv.bdef.xml @@ -3,31 +3,31 @@ - Z2UI5_R_SMPE_TRV + Z2UI5_R_SMPS_TRV BDEF/BDO abap2UI5 EML sample - travel 60 EN - ./z2ui5_r_smpe_trv/source/main/versions + ./z2ui5_r_smps_trv/source/main/versions http://www.sap.com/adt/relations/versions Historic versions - /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smpe_trv + /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smps_trv http://www.sap.com/adt/relations/informationsystem/abaplanguageversions application/vnd.sap.adt.nameditems.v1+xml Allowed ABAP language versions - ./z2ui5_r_smpe_trv/source/main + ./z2ui5_r_smps_trv/source/main http://www.sap.com/adt/relations/source text/plain Source Content - ./z2ui5_r_smpe_trv/source/main + ./z2ui5_r_smps_trv/source/main http://www.sap.com/adt/relations/source text/html Source Content (HTML) @@ -35,7 +35,7 @@ EN X - ./z2ui5_r_smpe_trv/source/main + ./z2ui5_r_smps_trv/source/main ABAP_SOURCE true true diff --git a/src/03/01/z2ui5_r_smpe_trv.ddls.asddls b/src/03/01/z2ui5_r_smps_trv.ddls.asddls similarity index 94% rename from src/03/01/z2ui5_r_smpe_trv.ddls.asddls rename to src/03/01/z2ui5_r_smps_trv.ddls.asddls index 8d66c4f..e631d6d 100644 --- a/src/03/01/z2ui5_r_smpe_trv.ddls.asddls +++ b/src/03/01/z2ui5_r_smps_trv.ddls.asddls @@ -1,8 +1,8 @@ @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'abap2UI5 EML sample - travel' @Metadata.ignorePropagatedAnnotations: true -define root view entity z2ui5_r_smpe_trv - as select from z2ui5_t_smpe_trv +define root view entity z2ui5_r_smps_trv + as select from z2ui5_t_smps_trv { key travel_id as TravelId, diff --git a/src/03/01/z2ui5_r_smpe_trv.ddls.baseinfo b/src/03/01/z2ui5_r_smps_trv.ddls.baseinfo similarity index 63% rename from src/03/01/z2ui5_r_smpe_trv.ddls.baseinfo rename to src/03/01/z2ui5_r_smps_trv.ddls.baseinfo index e21b026..eb04144 100644 --- a/src/03/01/z2ui5_r_smpe_trv.ddls.baseinfo +++ b/src/03/01/z2ui5_r_smps_trv.ddls.baseinfo @@ -1,7 +1,7 @@ { "BASEINFO": { "FROM": [ - "Z2UI5_T_SMPE_TRV" + "Z2UI5_T_SMPS_TRV" ] } } diff --git a/src/03/01/z2ui5_r_smpe_trv.ddls.xml b/src/03/01/z2ui5_r_smps_trv.ddls.xml similarity index 90% rename from src/03/01/z2ui5_r_smpe_trv.ddls.xml rename to src/03/01/z2ui5_r_smps_trv.ddls.xml index a1e3988..60d6ca8 100644 --- a/src/03/01/z2ui5_r_smpe_trv.ddls.xml +++ b/src/03/01/z2ui5_r_smps_trv.ddls.xml @@ -3,7 +3,7 @@ - Z2UI5_R_SMPE_TRV + Z2UI5_R_SMPS_TRV E abap2UI5 EML sample - travel W diff --git a/src/03/01/z2ui5_t_smpe_trv.tabl.xml b/src/03/01/z2ui5_t_smps_trv.tabl.xml similarity index 96% rename from src/03/01/z2ui5_t_smpe_trv.tabl.xml rename to src/03/01/z2ui5_t_smps_trv.tabl.xml index 2e5856c..8fce371 100644 --- a/src/03/01/z2ui5_t_smpe_trv.tabl.xml +++ b/src/03/01/z2ui5_t_smps_trv.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_T_SMPE_TRV + Z2UI5_T_SMPS_TRV E TRANSP X @@ -13,7 +13,7 @@ 1 - Z2UI5_T_SMPE_TRV + Z2UI5_T_SMPS_TRV A 0 APPL1 @@ -89,7 +89,7 @@ 0 P 000009 - Z2UI5_T_SMPE_TRV + Z2UI5_T_SMPS_TRV CURRENCY_CODE X CURR @@ -102,7 +102,7 @@ 0 P 000009 - Z2UI5_T_SMPE_TRV + Z2UI5_T_SMPS_TRV CURRENCY_CODE X CURR diff --git a/src/03/README.md b/src/03/README.md index 35c43f9..c863502 100644 --- a/src/03/README.md +++ b/src/03/README.md @@ -27,19 +27,19 @@ The draft enabled half lives next door in [`04` RAP with Draft](../04/README.md) — this package alone, without the other eight on your system. ABAP Platform >= 1909 or a BTP ABAP Environment. The business object -`Z2UI5_R_SMPE_TRV` and its table come with this package ([`src/03/01`](01)), so +`Z2UI5_R_SMPS_TRV` and its table come with this package ([`src/03/01`](01)), so nothing else has to be installed. ## Start here -Run [`00 overview`](../z2ui5_cl_smpe_app_00.clas.abap) — -`?app_start=z2ui5_cl_smpe_app_00`. It lists every sample of this repository, the +Run [`00 overview`](../z2ui5_cl_smps_app_00.clas.abap) — +`?app_start=z2ui5_cl_smps_app_00`. It lists every sample of this repository, the RAP ones included, and opens each in a new browser tab, so the overview stays open and several samples can run side by side. *Regenerate Demo Data* in its header fills both business objects. -Fill the tables before the first run: execute `Z2UI5_CL_SMPE_DATA_TRV` (and -`Z2UI5_CL_SMPE_DATA_TRD` for the draft package) with F9 in ADT, or press +Fill the tables before the first run: execute `Z2UI5_CL_SMPS_DATA_TRV` (and +`Z2UI5_CL_SMPS_DATA_TRD` for the draft package) with F9 in ADT, or press *Regenerate Demo Data* in the overview — *Generate Demo Data* in a single sample does the same for its own business object. Both offer `data_generate( )`, `data_delete( )` and `data_reset( )`. @@ -50,7 +50,7 @@ produce. ## The business object -`Z2UI5_R_SMPE_TRV` manages a **travel**. It is an ordinary managed RAP BO — small on +`Z2UI5_R_SMPS_TRV` manages a **travel**. It is an ordinary managed RAP BO — small on purpose, but not so small that consuming it is uninteresting. | Field | | @@ -86,11 +86,11 @@ reading order. | You want to | Statement | Sample | |---|---|---| -| read an instance | `READ ENTITIES` | [`01`](z2ui5_cl_smpe_app_01.clas.abap) | -| create one | `MODIFY … CREATE` → `MAPPED` | [`02`](z2ui5_cl_smpe_app_02.clas.abap) | -| change fields | `MODIFY … UPDATE FIELDS` | [`03`](z2ui5_cl_smpe_app_03.clas.abap) | -| delete one | `MODIFY … DELETE FROM` | [`04`](z2ui5_cl_smpe_app_04.clas.abap) | -| show BO messages in the UI | `msg_get_collect( )` | [`context`](../00/00/z2ui5_cl_smpe_context.clas.abap) | +| read an instance | `READ ENTITIES` | [`01`](z2ui5_cl_smps_app_01.clas.abap) | +| create one | `MODIFY … CREATE` → `MAPPED` | [`02`](z2ui5_cl_smps_app_02.clas.abap) | +| change fields | `MODIFY … UPDATE FIELDS` | [`03`](z2ui5_cl_smps_app_03.clas.abap) | +| delete one | `MODIFY … DELETE FROM` | [`04`](z2ui5_cl_smps_app_04.clas.abap) | +| show BO messages in the UI | `msg_get_collect( )` | [`context`](../00/00/z2ui5_cl_smps_context.clas.abap) | **The complete app** shows the next step: everything the single statements teach, now in one screen with popups, message handling and a refresh — roughly three times @@ -99,14 +99,14 @@ made sense: | | | | |---|---|---| -| call a BO action, save and catch what failed | `MODIFY … EXECUTE`, `COMMIT ENTITIES RESPONSE OF` | [`05` manage travels](z2ui5_cl_smpe_app_05.clas.abap) | +| call a BO action, save and catch what failed | `MODIFY … EXECUTE`, `COMMIT ENTITIES RESPONSE OF` | [`05` manage travels](z2ui5_cl_smps_app_05.clas.abap) | ## The snippets **Read** — no SELECT, no OData. ```abap -READ ENTITIES OF z2ui5_r_smpe_trv +READ ENTITIES OF z2ui5_r_smps_trv ENTITY travel ALL FIELDS WITH VALUE #( ( travelid = travel_id ) ) RESULT DATA(t_result) @@ -119,7 +119,7 @@ simply has one row less. The response is what you check, never `sy-subrc`. **Create** — the `%cid` is yours; the key the BO assigns comes back under it. ```abap -MODIFY ENTITIES OF z2ui5_r_smpe_trv +MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel CREATE FIELDS ( agencyid customerid begindate enddate ) WITH VALUE #( ( %cid = `CREATE_1` agencyid = '070001' customerid = '000001' ) ) @@ -144,7 +144,7 @@ EXECUTE acceptTravel FROM VALUE #( ( travelid = travel_id ) ) **Save** — validations run here, not at the `MODIFY`. ```abap -COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv +COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv FAILED DATA(s_failed) REPORTED DATA(s_reported). ``` diff --git a/src/03/z2ui5_cl_smpe_app_01.clas.abap b/src/03/z2ui5_cl_smps_app_01.clas.abap similarity index 93% rename from src/03/z2ui5_cl_smpe_app_01.clas.abap rename to src/03/z2ui5_cl_smps_app_01.clas.abap index 01eab6e..b946522 100644 --- a/src/03/z2ui5_cl_smpe_app_01.clas.abap +++ b/src/03/z2ui5_cl_smps_app_01.clas.abap @@ -1,7 +1,7 @@ "!

abap2UI5 - EML sample 01 - read travel

"! Reads one instance by its key. "! -"! READ ENTITIES OF z2ui5_r_smpe_trv +"! READ ENTITIES OF z2ui5_r_smps_trv "! ENTITY travel "! ALL FIELDS WITH VALUE #( ( travelid = travel_id ) ) "! RESULT DATA(t_result) @@ -10,7 +10,7 @@ "! Worth knowing: a key that does not exist is not an exception. It comes back "! in FAILED and RESULT stays empty, so the response is what you check - never "! sy-subrc. -CLASS z2ui5_cl_smpe_app_01 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_01 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -39,7 +39,7 @@ CLASS z2ui5_cl_smpe_app_01 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_01 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_01 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -61,7 +61,7 @@ CLASS z2ui5_cl_smpe_app_01 IMPLEMENTATION. " rather than hard coded: the demo data only starts at 1 on an empty " table, and after a few creates and deletes the lowest key is a " different one. - SELECT SINGLE FROM z2ui5_r_smpe_trv + SELECT SINGLE FROM z2ui5_r_smps_trv FIELDS MIN( TravelId ) INTO @DATA(first_id). @@ -73,7 +73,7 @@ CLASS z2ui5_cl_smpe_app_01 IMPLEMENTATION. METHOD data_read. - READ ENTITIES OF z2ui5_r_smpe_trv + READ ENTITIES OF z2ui5_r_smps_trv ENTITY travel ALL FIELDS WITH VALUE #( ( travelid = travel_id ) ) RESULT DATA(t_result) @@ -95,7 +95,7 @@ CLASS z2ui5_cl_smpe_app_01 IMPLEMENTATION. begin_date = |{ s_result-begindate DATE = ISO }| end_date = |{ s_result-enddate DATE = ISO }| total_price = |{ s_result-totalprice } { s_result-currencycode }| - overall_status = z2ui5_cl_smpe_context=>status_get_text( s_result-overallstatus ) + overall_status = z2ui5_cl_smps_context=>status_get_text( s_result-overallstatus ) description = |{ s_result-description }| ). ENDIF. @@ -114,7 +114,7 @@ CLASS z2ui5_cl_smpe_app_01 IMPLEMENTATION. navbuttonpress = client->_event_nav_app_leave( ) shownavbutton = client->check_app_prev_stack( ) )->simple_form( - title = `READ ENTITIES OF Z2UI5_R_SMPE_TRV` + title = `READ ENTITIES OF Z2UI5_R_SMPS_TRV` editable = abap_true )->content( `form` )->label( `Travel ID` diff --git a/src/03/z2ui5_cl_smpe_app_01.clas.xml b/src/03/z2ui5_cl_smps_app_01.clas.xml similarity index 91% rename from src/03/z2ui5_cl_smpe_app_01.clas.xml rename to src/03/z2ui5_cl_smps_app_01.clas.xml index 93b100f..2d9c205 100644 --- a/src/03/z2ui5_cl_smpe_app_01.clas.xml +++ b/src/03/z2ui5_cl_smps_app_01.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_01 + Z2UI5_CL_SMPS_APP_01 E abap2UI5 - EML sample 01 - read travel 1 diff --git a/src/03/z2ui5_cl_smpe_app_02.clas.abap b/src/03/z2ui5_cl_smps_app_02.clas.abap similarity index 92% rename from src/03/z2ui5_cl_smpe_app_02.clas.abap rename to src/03/z2ui5_cl_smps_app_02.clas.abap index 079db8d..8f6b239 100644 --- a/src/03/z2ui5_cl_smpe_app_02.clas.abap +++ b/src/03/z2ui5_cl_smps_app_02.clas.abap @@ -3,7 +3,7 @@ "! object does not know the key yet, so it reports the new one back under that "! %cid in MAPPED. "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trv +"! MODIFY ENTITIES OF z2ui5_r_smps_trv "! ENTITY travel "! CREATE FIELDS ( agencyid customerid begindate enddate ... ) "! WITH VALUE #( ( %cid = `CREATE_1` agencyid = ... ) ) @@ -11,14 +11,14 @@ "! FAILED DATA(s_failed) "! REPORTED DATA(s_reported). "! -"! COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv +"! COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv "! FAILED DATA(s_failed_commit) "! REPORTED DATA(s_reported_commit). "! "! Worth knowing: nothing reaches the database before the COMMIT, and the "! validations only run there - a CREATE that came back clean can still fail at "! the COMMIT. That is why both responses are evaluated. -CLASS z2ui5_cl_smpe_app_02 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_02 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -47,7 +47,7 @@ CLASS z2ui5_cl_smpe_app_02 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_02 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_02 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -82,7 +82,7 @@ CLASS z2ui5_cl_smpe_app_02 IMPLEMENTATION. " CREATE hands the new instance to the transactional buffer. The %cid is " a temporary id chosen by the caller: the business object does not know " the key yet, so MAPPED reports it back under that %cid. - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel CREATE FIELDS ( agencyid customerid begindate enddate bookingfee currencycode description ) WITH VALUE #( ( %cid = `CREATE_1` @@ -100,20 +100,20 @@ CLASS z2ui5_cl_smpe_app_02 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. " nothing is persisted before the COMMIT - and the validations of the " business object only run now, so this is where they can still fail - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). IF s_failed_commit IS NOT INITIAL. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported_commit-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported_commit-travel ). RETURN. ENDIF. @@ -136,7 +136,7 @@ CLASS z2ui5_cl_smpe_app_02 IMPLEMENTATION. navbuttonpress = client->_event_nav_app_leave( ) shownavbutton = client->check_app_prev_stack( ) )->simple_form( - title = `MODIFY ENTITIES OF Z2UI5_R_SMPE_TRV ... CREATE` + title = `MODIFY ENTITIES OF Z2UI5_R_SMPS_TRV ... CREATE` editable = abap_true )->content( `form` )->label( `Agency ID` diff --git a/src/03/z2ui5_cl_smpe_app_02.clas.xml b/src/03/z2ui5_cl_smps_app_02.clas.xml similarity index 91% rename from src/03/z2ui5_cl_smpe_app_02.clas.xml rename to src/03/z2ui5_cl_smps_app_02.clas.xml index a617c64..a1f6b6f 100644 --- a/src/03/z2ui5_cl_smpe_app_02.clas.xml +++ b/src/03/z2ui5_cl_smps_app_02.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_02 + Z2UI5_CL_SMPS_APP_02 E abap2UI5 - EML sample 02 - create travel 1 diff --git a/src/03/z2ui5_cl_smpe_app_03.clas.abap b/src/03/z2ui5_cl_smps_app_03.clas.abap similarity index 89% rename from src/03/z2ui5_cl_smpe_app_03.clas.abap rename to src/03/z2ui5_cl_smps_app_03.clas.abap index 4372e78..265ebde 100644 --- a/src/03/z2ui5_cl_smpe_app_03.clas.abap +++ b/src/03/z2ui5_cl_smps_app_03.clas.abap @@ -2,7 +2,7 @@ "! Changes single fields of one instance. UPDATE FIELDS names what may be "! written, everything else stays untouched. "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trv +"! MODIFY ENTITIES OF z2ui5_r_smps_trv "! ENTITY travel "! UPDATE FIELDS ( description ) "! WITH VALUE #( ( travelid = travel_id @@ -13,7 +13,7 @@ "! Worth knowing: fields the behavior definition marks readonly are refused. "! TotalPrice and OverallStatus belong to the business object, not to the "! caller - try it and read what comes back in REPORTED. -CLASS z2ui5_cl_smpe_app_03 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_03 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -37,7 +37,7 @@ CLASS z2ui5_cl_smpe_app_03 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_03 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_03 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -56,7 +56,7 @@ CLASS z2ui5_cl_smpe_app_03 IMPLEMENTATION. " a plain SELECT on the CDS view - reading does not need EML, the list " is only here so there is something to change - SELECT FROM z2ui5_r_smpe_trv + SELECT FROM z2ui5_r_smps_trv FIELDS TravelId, CustomerId, Description @@ -80,7 +80,7 @@ CLASS z2ui5_cl_smpe_app_03 IMPLEMENTATION. " UPDATE FIELDS names exactly the fields that are changed - everything " else on the instance stays untouched, which is why no read is needed " before the change - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel UPDATE FIELDS ( description ) WITH VALUE #( ( travelid = travel_id @@ -91,18 +91,18 @@ CLASS z2ui5_cl_smpe_app_03 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). IF s_failed_commit IS NOT INITIAL. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported_commit-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported_commit-travel ). RETURN. ENDIF. @@ -125,7 +125,7 @@ CLASS z2ui5_cl_smpe_app_03 IMPLEMENTATION. )->table( client->_bind( t_travels ) ). table->header_toolbar( )->toolbar( - )->title( `MODIFY ENTITIES OF Z2UI5_R_SMPE_TRV ... UPDATE` ). + )->title( `MODIFY ENTITIES OF Z2UI5_R_SMPS_TRV ... UPDATE` ). table->columns( )->column( )->text( `ID` )->get_parent( diff --git a/src/03/z2ui5_cl_smpe_app_03.clas.xml b/src/03/z2ui5_cl_smps_app_03.clas.xml similarity index 91% rename from src/03/z2ui5_cl_smpe_app_03.clas.xml rename to src/03/z2ui5_cl_smps_app_03.clas.xml index 33ad2d0..99430fc 100644 --- a/src/03/z2ui5_cl_smpe_app_03.clas.xml +++ b/src/03/z2ui5_cl_smps_app_03.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_03 + Z2UI5_CL_SMPS_APP_03 E abap2UI5 - EML sample 03 - update travel 1 diff --git a/src/03/z2ui5_cl_smpe_app_04.clas.abap b/src/03/z2ui5_cl_smps_app_04.clas.abap similarity index 88% rename from src/03/z2ui5_cl_smpe_app_04.clas.abap rename to src/03/z2ui5_cl_smps_app_04.clas.abap index 70cf1e1..2c527b6 100644 --- a/src/03/z2ui5_cl_smpe_app_04.clas.abap +++ b/src/03/z2ui5_cl_smps_app_04.clas.abap @@ -1,7 +1,7 @@ "!

abap2UI5 - EML sample 04 - delete travel

"! Deletes one instance. "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trv +"! MODIFY ENTITIES OF z2ui5_r_smps_trv "! ENTITY travel "! DELETE FROM VALUE #( ( travelid = travel_id ) ) "! FAILED DATA(s_failed) @@ -10,7 +10,7 @@ "! Worth knowing: DELETE FROM takes the key only, there is no field list. And "! like every other operation it only asks the transactional buffer - the row "! is gone after the COMMIT, not before. -CLASS z2ui5_cl_smpe_app_04 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_04 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -34,7 +34,7 @@ CLASS z2ui5_cl_smpe_app_04 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_04 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_04 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -51,7 +51,7 @@ CLASS z2ui5_cl_smpe_app_04 IMPLEMENTATION. METHOD data_read. - SELECT FROM z2ui5_r_smpe_trv + SELECT FROM z2ui5_r_smps_trv FIELDS TravelId, CustomerId, Description @@ -73,7 +73,7 @@ CLASS z2ui5_cl_smpe_app_04 IMPLEMENTATION. " DELETE only needs the key - and it can still fail, e.g. when the " business object refuses the deletion or the instance is locked - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel DELETE FROM VALUE #( ( travelid = travel_id ) ) FAILED DATA(s_failed) @@ -82,18 +82,18 @@ CLASS z2ui5_cl_smpe_app_04 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). IF s_failed_commit IS NOT INITIAL. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported_commit-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported_commit-travel ). RETURN. ENDIF. @@ -116,7 +116,7 @@ CLASS z2ui5_cl_smpe_app_04 IMPLEMENTATION. )->table( client->_bind( t_travels ) ). table->header_toolbar( )->toolbar( - )->title( `MODIFY ENTITIES OF Z2UI5_R_SMPE_TRV ... DELETE` ). + )->title( `MODIFY ENTITIES OF Z2UI5_R_SMPS_TRV ... DELETE` ). table->columns( )->column( )->text( `ID` )->get_parent( diff --git a/src/03/z2ui5_cl_smpe_app_04.clas.xml b/src/03/z2ui5_cl_smps_app_04.clas.xml similarity index 91% rename from src/03/z2ui5_cl_smpe_app_04.clas.xml rename to src/03/z2ui5_cl_smps_app_04.clas.xml index 27605a7..46305df 100644 --- a/src/03/z2ui5_cl_smpe_app_04.clas.xml +++ b/src/03/z2ui5_cl_smps_app_04.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_04 + Z2UI5_CL_SMPS_APP_04 E abap2UI5 - EML sample 04 - delete travel 1 diff --git a/src/03/z2ui5_cl_smpe_app_05.clas.abap b/src/03/z2ui5_cl_smps_app_05.clas.abap similarity index 91% rename from src/03/z2ui5_cl_smpe_app_05.clas.abap rename to src/03/z2ui5_cl_smps_app_05.clas.abap index 9ae0287..67c95ae 100644 --- a/src/03/z2ui5_cl_smpe_app_05.clas.abap +++ b/src/03/z2ui5_cl_smps_app_05.clas.abap @@ -6,16 +6,16 @@ "! "! What it adds beyond them is the action call and the save with a response: "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trv +"! MODIFY ENTITIES OF z2ui5_r_smps_trv "! ENTITY travel "! EXECUTE acceptTravel FROM VALUE #( ( travelid = travel_id ) ) "! FAILED DATA(s_failed) "! REPORTED DATA(s_reported). "! -"! COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv +"! COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv "! FAILED DATA(s_failed_commit) "! REPORTED DATA(s_reported_commit). -CLASS z2ui5_cl_smpe_app_05 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_05 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -68,7 +68,7 @@ CLASS z2ui5_cl_smpe_app_05 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_05 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -100,7 +100,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. on_event_generate( ). WHEN `CREATE`. " the popup opens on a set that passes both validations, so Create - " goes through on the first press - see z2ui5_cl_smpe_app_02, which + " goes through on the first press - see z2ui5_cl_smps_app_02, which " also explains why the end date needs the CONV d( ) DATA(end_date) = CONV d( sy-datum + 14 ). @@ -133,7 +133,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. " the demo data lives with the business object it belongs to, so every " app and the ADT console application create exactly the same set - client->message_toast_display( z2ui5_cl_smpe_data_trv=>data_reset( ) ). + client->message_toast_display( z2ui5_cl_smps_data_trv=>data_reset( ) ). data_read( ). client->view_model_update( ). @@ -142,7 +142,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. METHOD on_event_create. - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel CREATE FIELDS ( agencyid customerid begindate enddate bookingfee currencycode description ) WITH VALUE #( ( %cid = `CREATE_TRAVEL_1` @@ -160,7 +160,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -182,7 +182,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. DATA(travel_id) = client->get_event_arg( 1 ). DATA(s_travel) = t_travels[ travel_id = travel_id ]. - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel UPDATE FIELDS ( description ) WITH VALUE #( ( travelid = travel_id @@ -193,7 +193,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -213,7 +213,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. DATA(travel_id) = client->get_event_arg( 1 ). - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel EXECUTE acceptTravel FROM VALUE #( ( travelid = travel_id ) ) FAILED DATA(s_failed) @@ -222,7 +222,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -242,7 +242,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. DATA(travel_id) = client->get_event_arg( 1 ). - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel EXECUTE rejectTravel FROM VALUE #( ( travelid = travel_id ) ) FAILED DATA(s_failed) @@ -251,7 +251,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -271,7 +271,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. DATA(travel_id) = client->get_event_arg( 1 ). - MODIFY ENTITIES OF z2ui5_r_smpe_trv + MODIFY ENTITIES OF z2ui5_r_smps_trv ENTITY travel DELETE FROM VALUE #( ( travelid = travel_id ) ) FAILED DATA(s_failed) @@ -280,7 +280,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -298,7 +298,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. METHOD data_read. - SELECT FROM z2ui5_r_smpe_trv + SELECT FROM z2ui5_r_smps_trv FIELDS TravelId, CustomerId, BeginDate, @@ -317,8 +317,8 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. begin_date = |{ s_result-begindate DATE = ISO }| end_date = |{ s_result-enddate DATE = ISO }| total_price = |{ s_result-totalprice } { s_result-currencycode }| - overall_status = z2ui5_cl_smpe_context=>status_get_text( s_result-overallstatus ) - status_state = z2ui5_cl_smpe_context=>status_get_state( s_result-overallstatus ) + overall_status = z2ui5_cl_smps_context=>status_get_text( s_result-overallstatus ) + status_state = z2ui5_cl_smps_context=>status_get_state( s_result-overallstatus ) description = |{ s_result-description }| ) ). ENDMETHOD. @@ -326,7 +326,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. METHOD data_save. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trv + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trv FAILED DATA(s_failed) REPORTED DATA(s_reported). @@ -334,7 +334,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. result = abap_true. ELSE. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). ENDIF. ENDMETHOD. @@ -352,7 +352,7 @@ CLASS z2ui5_cl_smpe_app_05 IMPLEMENTATION. DATA(table) = page->table( client->_bind( t_travels ) ). table->header_toolbar( )->toolbar( - )->title( `Travels (Z2UI5_R_SMPE_TRV)` + )->title( `Travels (Z2UI5_R_SMPS_TRV)` )->toolbar_spacer( )->button( text = `Create` diff --git a/src/03/z2ui5_cl_smpe_app_05.clas.xml b/src/03/z2ui5_cl_smps_app_05.clas.xml similarity index 91% rename from src/03/z2ui5_cl_smpe_app_05.clas.xml rename to src/03/z2ui5_cl_smps_app_05.clas.xml index 8720fc0..1fd64a6 100644 --- a/src/03/z2ui5_cl_smpe_app_05.clas.xml +++ b/src/03/z2ui5_cl_smps_app_05.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_05 + Z2UI5_CL_SMPS_APP_05 E abap2UI5 - EML sample 05 - manage travels 1 diff --git a/src/04/01/z2ui5_cl_smpe_bp_trd.clas.abap b/src/04/01/z2ui5_cl_smps_bp_trd.clas.abap similarity index 62% rename from src/04/01/z2ui5_cl_smpe_bp_trd.clas.abap rename to src/04/01/z2ui5_cl_smps_bp_trd.clas.abap index ba5e2db..7bb0711 100644 --- a/src/04/01/z2ui5_cl_smpe_bp_trd.clas.abap +++ b/src/04/01/z2ui5_cl_smps_bp_trd.clas.abap @@ -1,14 +1,14 @@ "!

abap2UI5 EML sample - behavior pool (draft)

-"! Behavior pool of the business object z2ui5_r_smpe_trd. The implementation +"! Behavior pool of the business object z2ui5_r_smps_trd. The implementation "! lives in the local types include, that is where RAP expects the handler -"! classes - see z2ui5_cl_smpe_bp_trd.clas.locals_imp.abap. +"! classes - see z2ui5_cl_smps_bp_trd.clas.locals_imp.abap. "! "! FOR BEHAVIOR OF is what makes this a behavior pool instead of an ordinary "! abstract final class. Without it RAP finds no handler at all and every EML "! statement dies on the first one it looks for - the global authorization. -CLASS z2ui5_cl_smpe_bp_trd DEFINITION PUBLIC ABSTRACT FINAL FOR BEHAVIOR OF z2ui5_r_smpe_trd. +CLASS z2ui5_cl_smps_bp_trd DEFINITION PUBLIC ABSTRACT FINAL FOR BEHAVIOR OF z2ui5_r_smps_trd. ENDCLASS. -CLASS z2ui5_cl_smpe_bp_trd IMPLEMENTATION. +CLASS z2ui5_cl_smps_bp_trd IMPLEMENTATION. ENDCLASS. diff --git a/src/04/01/z2ui5_cl_smpe_bp_trd.clas.locals_imp.abap b/src/04/01/z2ui5_cl_smps_bp_trd.clas.locals_imp.abap similarity index 91% rename from src/04/01/z2ui5_cl_smpe_bp_trd.clas.locals_imp.abap rename to src/04/01/z2ui5_cl_smps_bp_trd.clas.locals_imp.abap index ef99814..c254f19 100644 --- a/src/04/01/z2ui5_cl_smpe_bp_trd.clas.locals_imp.abap +++ b/src/04/01/z2ui5_cl_smps_bp_trd.clas.locals_imp.abap @@ -58,7 +58,7 @@ CLASS lhc_travel IMPLEMENTATION. " IN LOCAL MODE bypasses feature control and the readonly flags of the " behavior definition - which is exactly why a determination may write " fields the caller is not allowed to touch - READ ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel FIELDS ( bookingfee currencycode overallstatus ) WITH CORRESPONDING #( keys ) @@ -69,7 +69,7 @@ CLASS lhc_travel IMPLEMENTATION. RETURN. ENDIF. - MODIFY ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel UPDATE FIELDS ( overallstatus totalprice currencycode ) WITH VALUE #( FOR travel IN travels @@ -91,7 +91,7 @@ CLASS lhc_travel IMPLEMENTATION. " The readable number is only handed out when the draft really becomes " active - a discarded draft must not burn one. `on save` determinations " run during Activate, which is exactly that moment. - READ ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel FIELDS ( travelid ) WITH CORRESPONDING #( keys ) @@ -102,11 +102,11 @@ CLASS lhc_travel IMPLEMENTATION. RETURN. ENDIF. - SELECT SINGLE FROM z2ui5_t_smpe_trd + SELECT SINGLE FROM z2ui5_t_smps_trd FIELDS MAX( travel_id ) INTO @DATA(max_id). - MODIFY ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel UPDATE FIELDS ( travelid ) WITH VALUE #( FOR travel IN travels INDEX INTO i @@ -121,7 +121,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD validatecustomer. - READ ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel FIELDS ( customerid ) WITH CORRESPONDING #( keys ) @@ -147,7 +147,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD validatedates. - READ ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel FIELDS ( begindate enddate ) WITH CORRESPONDING #( keys ) @@ -175,7 +175,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD accepttravel. - MODIFY ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel UPDATE FIELDS ( overallstatus ) WITH VALUE #( FOR key IN keys @@ -187,7 +187,7 @@ CLASS lhc_travel IMPLEMENTATION. " an action with `result [1] $self` returns the changed instance, so the " caller does not have to read it again - READ ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel ALL FIELDS WITH CORRESPONDING #( keys ) RESULT DATA(travels). @@ -201,7 +201,7 @@ CLASS lhc_travel IMPLEMENTATION. METHOD rejecttravel. - MODIFY ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel UPDATE FIELDS ( overallstatus ) WITH VALUE #( FOR key IN keys @@ -211,7 +211,7 @@ CLASS lhc_travel IMPLEMENTATION. reported = CORRESPONDING #( DEEP update_reported ). - READ ENTITIES OF z2ui5_r_smpe_trd IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_trd IN LOCAL MODE ENTITY travel ALL FIELDS WITH CORRESPONDING #( keys ) RESULT DATA(travels). diff --git a/src/04/01/z2ui5_cl_smpe_bp_trd.clas.xml b/src/04/01/z2ui5_cl_smps_bp_trd.clas.xml similarity index 84% rename from src/04/01/z2ui5_cl_smpe_bp_trd.clas.xml rename to src/04/01/z2ui5_cl_smps_bp_trd.clas.xml index 3f85a22..297eb22 100644 --- a/src/04/01/z2ui5_cl_smpe_bp_trd.clas.xml +++ b/src/04/01/z2ui5_cl_smps_bp_trd.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_BP_TRD + Z2UI5_CL_SMPS_BP_TRD E abap2UI5 EML sample - behavior pool (draft) 06 @@ -11,7 +11,7 @@ X X X - Z2UI5_R_SMPE_TRD + Z2UI5_R_SMPS_TRD diff --git a/src/04/01/z2ui5_cl_smpe_data_trd.clas.abap b/src/04/01/z2ui5_cl_smps_data_trd.clas.abap similarity index 91% rename from src/04/01/z2ui5_cl_smpe_data_trd.clas.abap rename to src/04/01/z2ui5_cl_smps_data_trd.clas.abap index d4fd75a..a6577be 100644 --- a/src/04/01/z2ui5_cl_smpe_data_trd.clas.abap +++ b/src/04/01/z2ui5_cl_smps_data_trd.clas.abap @@ -1,14 +1,14 @@ "!

abap2UI5 EML sample - demo data (draft)

-"! Demo data for the draft enabled business object z2ui5_r_smpe_trd. +"! Demo data for the draft enabled business object z2ui5_r_smps_trd. "! "! Run it in ADT with F9 - it is a console application - or press the button "! in one of the sample apps, which calls the same methods. "! "! Writing the tables by hand would hurt here: the draft table -"! z2ui5_d_smpe_trd carries the admin fields of SYCH_BDL_DRAFT_ADMIN_INC. +"! z2ui5_d_smps_trd carries the admin fields of SYCH_BDL_DRAFT_ADMIN_INC. "! Creating a draft and activating it is both correct and shorter - and it is "! the lifecycle the samples teach. -CLASS z2ui5_cl_smpe_data_trd DEFINITION PUBLIC FINAL CREATE PUBLIC. +CLASS z2ui5_cl_smps_data_trd DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. INTERFACES if_oo_adt_classrun. @@ -34,7 +34,7 @@ CLASS z2ui5_cl_smpe_data_trd DEFINITION PUBLIC FINAL CREATE PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. +CLASS z2ui5_cl_smps_data_trd IMPLEMENTATION. METHOD if_oo_adt_classrun~main. @@ -53,7 +53,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. METHOD data_generate. " a new instance of a draft enabled business object is born as a draft - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel CREATE FIELDS ( agencyid customerid begindate enddate bookingfee currencycode description ) WITH VALUE #( %is_draft = if_abap_behv=>mk-on @@ -91,7 +91,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. COMMIT ENTITIES. " Activate runs the validations, so anything wrong surfaces here - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Activate FROM VALUE #( FOR s_new IN s_mapped-travel ( %key-traveluuid = s_new-traveluuid ) ) @@ -104,7 +104,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. RETURN. ENDIF. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trd + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trd FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). @@ -120,7 +120,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. METHOD data_delete. - SELECT FROM z2ui5_r_smpe_trd + SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid INTO TABLE @DATA(t_keys). @@ -139,7 +139,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. " " Reading the keys with %is_draft = mk-on is the same trick sample 06 " uses: what comes back in RESULT has a draft. - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid ) WITH VALUE #( FOR s_row IN t_keys ( %tky = VALUE #( traveluuid = s_row-traveluuid @@ -148,7 +148,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. IF t_drafts IS NOT INITIAL. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Discard FROM VALUE #( FOR s_draft IN t_drafts ( %key-traveluuid = s_draft-traveluuid ) ) @@ -164,7 +164,7 @@ CLASS z2ui5_cl_smpe_data_trd IMPLEMENTATION. ENDIF. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel DELETE FROM VALUE #( FOR s_key IN t_keys ( %tky = VALUE #( traveluuid = s_key-traveluuid diff --git a/src/04/01/z2ui5_cl_smpe_data_trd.clas.xml b/src/04/01/z2ui5_cl_smps_data_trd.clas.xml similarity index 90% rename from src/04/01/z2ui5_cl_smpe_data_trd.clas.xml rename to src/04/01/z2ui5_cl_smps_data_trd.clas.xml index 8074b9e..004ed9c 100644 --- a/src/04/01/z2ui5_cl_smpe_data_trd.clas.xml +++ b/src/04/01/z2ui5_cl_smps_data_trd.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_DATA_TRD + Z2UI5_CL_SMPS_DATA_TRD E abap2UI5 EML sample - demo data (draft) 1 diff --git a/src/04/01/z2ui5_d_smpe_trd.tabl.xml b/src/04/01/z2ui5_d_smps_trd.tabl.xml similarity index 97% rename from src/04/01/z2ui5_d_smpe_trd.tabl.xml rename to src/04/01/z2ui5_d_smps_trd.tabl.xml index 6ad77fb..2ac7e1b 100644 --- a/src/04/01/z2ui5_d_smpe_trd.tabl.xml +++ b/src/04/01/z2ui5_d_smps_trd.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_D_SMPE_TRD + Z2UI5_D_SMPS_TRD E TRANSP X @@ -14,7 +14,7 @@ 1 - Z2UI5_D_SMPE_TRD + Z2UI5_D_SMPS_TRD A 0 APPL1 @@ -100,7 +100,7 @@ 0 P 000009 - Z2UI5_D_SMPE_TRD + Z2UI5_D_SMPS_TRD CURRENCYCODE X CURR @@ -113,7 +113,7 @@ 0 P 000009 - Z2UI5_D_SMPE_TRD + Z2UI5_D_SMPS_TRD CURRENCYCODE X CURR diff --git a/src/04/01/z2ui5_r_smpe_trd.bdef.asbdef b/src/04/01/z2ui5_r_smps_trd.bdef.asbdef similarity index 88% rename from src/04/01/z2ui5_r_smpe_trd.bdef.asbdef rename to src/04/01/z2ui5_r_smps_trd.bdef.asbdef index 563ea42..ad4898f 100644 --- a/src/04/01/z2ui5_r_smpe_trd.bdef.asbdef +++ b/src/04/01/z2ui5_r_smps_trd.bdef.asbdef @@ -1,14 +1,14 @@ // Draft enabled managed business object. with draft plus draft table is // all it takes - the runtime then offers the four draft actions Edit, Activate, // Discard and Resume plus the determine action Prepare, which the abap2UI5 app -// z2ui5_cl_smpe_app_10 calls with EML exactly like a Fiori Elements app would. -managed implementation in class z2ui5_cl_smpe_bp_trd unique; +// z2ui5_cl_smps_app_10 calls with EML exactly like a Fiori Elements app would. +managed implementation in class z2ui5_cl_smps_bp_trd unique; strict ( 1 ); with draft; -define behavior for z2ui5_r_smpe_trd alias Travel -persistent table z2ui5_t_smpe_trd -draft table z2ui5_d_smpe_trd +define behavior for z2ui5_r_smps_trd alias Travel +persistent table z2ui5_t_smps_trd +draft table z2ui5_d_smps_trd lock master total etag LastChangedAt authorization master ( global ) etag master LocalLastChangedAt @@ -48,7 +48,7 @@ etag master LocalLastChangedAt validation validateDates; } - mapping for z2ui5_t_smpe_trd + mapping for z2ui5_t_smps_trd { TravelUuid = travel_uuid; TravelId = travel_id; diff --git a/src/04/01/z2ui5_r_smpe_trd.bdef.xml b/src/04/01/z2ui5_r_smps_trd.bdef.xml similarity index 84% rename from src/04/01/z2ui5_r_smpe_trd.bdef.xml rename to src/04/01/z2ui5_r_smps_trd.bdef.xml index 8e62fa1..6f851b8 100644 --- a/src/04/01/z2ui5_r_smpe_trd.bdef.xml +++ b/src/04/01/z2ui5_r_smps_trd.bdef.xml @@ -3,31 +3,31 @@ - Z2UI5_R_SMPE_TRD + Z2UI5_R_SMPS_TRD BDEF/BDO abap2UI5 EML sample - travel (draft) 60 EN - ./z2ui5_r_smpe_trd/source/main/versions + ./z2ui5_r_smps_trd/source/main/versions http://www.sap.com/adt/relations/versions Historic versions - /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smpe_trd + /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smps_trd http://www.sap.com/adt/relations/informationsystem/abaplanguageversions application/vnd.sap.adt.nameditems.v1+xml Allowed ABAP language versions - ./z2ui5_r_smpe_trd/source/main + ./z2ui5_r_smps_trd/source/main http://www.sap.com/adt/relations/source text/plain Source Content - ./z2ui5_r_smpe_trd/source/main + ./z2ui5_r_smps_trd/source/main http://www.sap.com/adt/relations/source text/html Source Content (HTML) @@ -35,7 +35,7 @@ EN X - ./z2ui5_r_smpe_trd/source/main + ./z2ui5_r_smps_trd/source/main ABAP_SOURCE true true diff --git a/src/04/01/z2ui5_r_smpe_trd.ddls.asddls b/src/04/01/z2ui5_r_smps_trd.ddls.asddls similarity index 95% rename from src/04/01/z2ui5_r_smpe_trd.ddls.asddls rename to src/04/01/z2ui5_r_smps_trd.ddls.asddls index 334b13a..b38b111 100644 --- a/src/04/01/z2ui5_r_smpe_trd.ddls.asddls +++ b/src/04/01/z2ui5_r_smps_trd.ddls.asddls @@ -1,8 +1,8 @@ @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'abap2UI5 EML sample - travel (draft)' @Metadata.ignorePropagatedAnnotations: true -define root view entity z2ui5_r_smpe_trd - as select from z2ui5_t_smpe_trd +define root view entity z2ui5_r_smps_trd + as select from z2ui5_t_smps_trd { // the key of a draft enabled business object is a UUID: the draft and // the active instance share it, only %is_draft tells them apart diff --git a/src/04/01/z2ui5_r_smpe_trd.ddls.baseinfo b/src/04/01/z2ui5_r_smps_trd.ddls.baseinfo similarity index 63% rename from src/04/01/z2ui5_r_smpe_trd.ddls.baseinfo rename to src/04/01/z2ui5_r_smps_trd.ddls.baseinfo index f06f108..ac8ac35 100644 --- a/src/04/01/z2ui5_r_smpe_trd.ddls.baseinfo +++ b/src/04/01/z2ui5_r_smps_trd.ddls.baseinfo @@ -1,7 +1,7 @@ { "BASEINFO": { "FROM": [ - "Z2UI5_T_SMPE_TRD" + "Z2UI5_T_SMPS_TRD" ] } } diff --git a/src/04/01/z2ui5_r_smpe_trd.ddls.xml b/src/04/01/z2ui5_r_smps_trd.ddls.xml similarity index 90% rename from src/04/01/z2ui5_r_smpe_trd.ddls.xml rename to src/04/01/z2ui5_r_smps_trd.ddls.xml index acc7b14..f0a1cf0 100644 --- a/src/04/01/z2ui5_r_smpe_trd.ddls.xml +++ b/src/04/01/z2ui5_r_smps_trd.ddls.xml @@ -3,7 +3,7 @@ - Z2UI5_R_SMPE_TRD + Z2UI5_R_SMPS_TRD E abap2UI5 EML sample - travel (draft) W diff --git a/src/04/01/z2ui5_t_smpe_trd.tabl.xml b/src/04/01/z2ui5_t_smps_trd.tabl.xml similarity index 97% rename from src/04/01/z2ui5_t_smpe_trd.tabl.xml rename to src/04/01/z2ui5_t_smps_trd.tabl.xml index 62a4884..ab8af6d 100644 --- a/src/04/01/z2ui5_t_smpe_trd.tabl.xml +++ b/src/04/01/z2ui5_t_smps_trd.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_T_SMPE_TRD + Z2UI5_T_SMPS_TRD E TRANSP X @@ -13,7 +13,7 @@ 1 - Z2UI5_T_SMPE_TRD + Z2UI5_T_SMPS_TRD A 0 APPL1 @@ -99,7 +99,7 @@ 0 P 000009 - Z2UI5_T_SMPE_TRD + Z2UI5_T_SMPS_TRD CURRENCY_CODE X CURR @@ -112,7 +112,7 @@ 0 P 000009 - Z2UI5_T_SMPE_TRD + Z2UI5_T_SMPS_TRD CURRENCY_CODE X CURR diff --git a/src/04/README.md b/src/04/README.md index ac920b3..8293a2e 100644 --- a/src/04/README.md +++ b/src/04/README.md @@ -2,7 +2,7 @@ *[← all packages](../../README.md)* -`Z2UI5_R_SMPE_TRD` is the business object of [`03` RAP](../03/README.md) **with +`Z2UI5_R_SMPS_TRD` is the business object of [`03` RAP](../03/README.md) **with draft**. Everything you read there still applies — this package adds the one mechanism that makes drafts work, and four samples that use it. @@ -21,8 +21,8 @@ whole lifecycle fits in a handful of statements. ABAP Platform >= 1909 or a BTP ABAP Environment. The draft enabled business object and its two tables come with this package ([`src/04/01`](01)). -Fill the table with `Z2UI5_CL_SMPE_DATA_TRD` (F9 in ADT) or press *Regenerate Demo -Data* in the overview app `?app_start=z2ui5_cl_smpe_app_00`. +Fill the table with `Z2UI5_CL_SMPS_DATA_TRD` (F9 in ADT) or press *Regenerate Demo +Data* in the overview app `?app_start=z2ui5_cl_smps_app_00`. ## What changes with draft @@ -39,10 +39,10 @@ first. | You want to | Statement | Sample | |---|---|---| -| see which instances have a draft | `READ … %is_draft = mk-on` | [`06`](z2ui5_cl_smpe_app_06.clas.abap) | -| enter draft mode | `EXECUTE Edit` / `Resume` | [`07`](z2ui5_cl_smpe_app_07.clas.abap) | -| change a draft | `UPDATE … %is_draft = mk-on` | [`08`](z2ui5_cl_smpe_app_08.clas.abap) | -| leave draft mode | `EXECUTE Activate` / `Discard` | [`09`](z2ui5_cl_smpe_app_09.clas.abap) | +| see which instances have a draft | `READ … %is_draft = mk-on` | [`06`](z2ui5_cl_smps_app_06.clas.abap) | +| enter draft mode | `EXECUTE Edit` / `Resume` | [`07`](z2ui5_cl_smps_app_07.clas.abap) | +| change a draft | `UPDATE … %is_draft = mk-on` | [`08`](z2ui5_cl_smps_app_08.clas.abap) | +| leave draft mode | `EXECUTE Activate` / `Discard` | [`09`](z2ui5_cl_smps_app_09.clas.abap) | Start at `06` — it carries the one trick the other three reuse. @@ -52,7 +52,7 @@ looks like: | | | | |---|---|---| -| the whole draft lifecycle | everything from 06–09 | [`10` manage travels with draft](z2ui5_cl_smpe_app_10.clas.abap) | +| the whole draft lifecycle | everything from 06–09 | [`10` manage travels with draft](z2ui5_cl_smps_app_10.clas.abap) | ## The snippets @@ -61,7 +61,7 @@ so `%is_draft` is the only thing separating them. Everything that comes back in `RESULT` has a draft, the rest lands in `FAILED`. ```abap -READ ENTITIES OF z2ui5_r_smpe_trd +READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid ) WITH VALUE #( FOR s_row IN t_result ( %tky = VALUE #( traveluuid = s_row-traveluuid diff --git a/src/04/z2ui5_cl_smpe_app_06.clas.abap b/src/04/z2ui5_cl_smps_app_06.clas.abap similarity index 93% rename from src/04/z2ui5_cl_smpe_app_06.clas.abap rename to src/04/z2ui5_cl_smps_app_06.clas.abap index 592380d..314a93f 100644 --- a/src/04/z2ui5_cl_smpe_app_06.clas.abap +++ b/src/04/z2ui5_cl_smps_app_06.clas.abap @@ -4,7 +4,7 @@ "! travels have a draft?": everything that comes back in RESULT has one, "! everything else lands in FAILED. "! -"! READ ENTITIES OF z2ui5_r_smpe_trd +"! READ ENTITIES OF z2ui5_r_smps_trd "! ENTITY travel "! FIELDS ( travelid ) WITH VALUE #( FOR s_row IN t_result "! ( %tky = VALUE #( traveluuid = s_row-traveluuid @@ -14,7 +14,7 @@ "! "! Worth knowing: every other draft sample of this repository builds on this "! one trick. Start here. -CLASS z2ui5_cl_smpe_app_06 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_06 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -40,7 +40,7 @@ CLASS z2ui5_cl_smpe_app_06 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_06 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_06 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -54,7 +54,7 @@ CLASS z2ui5_cl_smpe_app_06 IMPLEMENTATION. data_read( ). client->view_model_update( ). WHEN `GENERATE`. - client->message_toast_display( z2ui5_cl_smpe_data_trd=>data_reset( ) ). + client->message_toast_display( z2ui5_cl_smps_data_trd=>data_reset( ) ). data_read( ). client->view_model_update( ). ENDCASE. @@ -66,7 +66,7 @@ CLASS z2ui5_cl_smpe_app_06 IMPLEMENTATION. METHOD data_read. " the CDS view returns the active instances - a draft is not in there - SELECT FROM z2ui5_r_smpe_trd + SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid, TravelId, CustomerId, @@ -81,7 +81,7 @@ CLASS z2ui5_cl_smpe_app_06 IMPLEMENTATION. " question "which travels have a draft?": every key that comes back in " RESULT has one, everything else lands in FAILED. That is the whole " trick, and every other draft sample of this repository relies on it. - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid ) WITH VALUE #( FOR s_row IN t_result ( %tky = VALUE #( traveluuid = s_row-traveluuid @@ -94,7 +94,7 @@ CLASS z2ui5_cl_smpe_app_06 IMPLEMENTATION. travel_id = |{ s_result-travelid ALPHA = OUT }| customer_id = |{ s_result-customerid ALPHA = OUT }| description = |{ s_result-description }| - status = z2ui5_cl_smpe_context=>status_get_text( s_result-overallstatus ) + status = z2ui5_cl_smps_context=>status_get_text( s_result-overallstatus ) draft_text = COND #( WHEN line_exists( t_drafts[ KEY entity traveluuid = s_result-traveluuid ] ) THEN `Draft` ELSE `-` ) draft_state = COND #( WHEN line_exists( t_drafts[ KEY entity traveluuid = s_result-traveluuid ] ) diff --git a/src/04/z2ui5_cl_smpe_app_06.clas.xml b/src/04/z2ui5_cl_smps_app_06.clas.xml similarity index 91% rename from src/04/z2ui5_cl_smpe_app_06.clas.xml rename to src/04/z2ui5_cl_smps_app_06.clas.xml index ecbe044..f7b772d 100644 --- a/src/04/z2ui5_cl_smpe_app_06.clas.xml +++ b/src/04/z2ui5_cl_smps_app_06.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_06 + Z2UI5_CL_SMPS_APP_06 E abap2UI5 - EML sample 06 - which travels have a draft 1 diff --git a/src/04/z2ui5_cl_smpe_app_07.clas.abap b/src/04/z2ui5_cl_smps_app_07.clas.abap similarity index 91% rename from src/04/z2ui5_cl_smpe_app_07.clas.abap rename to src/04/z2ui5_cl_smps_app_07.clas.abap index f5c476b..5136c54 100644 --- a/src/04/z2ui5_cl_smpe_app_07.clas.abap +++ b/src/04/z2ui5_cl_smps_app_07.clas.abap @@ -2,7 +2,7 @@ "! Edit copies the active instance into a new draft, Resume picks up a draft "! that already exists. "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trd +"! MODIFY ENTITIES OF z2ui5_r_smps_trd "! ENTITY travel "! EXECUTE Edit FROM VALUE #( ( %key-traveluuid = uuid ) ) "! FAILED s_failed @@ -19,7 +19,7 @@ "! the active one, Resume from the draft - so there is no %is_draft here. And "! Edit on an instance that already has a draft fails, which is why this sample "! asks first (sample 06) and calls Resume instead. -CLASS z2ui5_cl_smpe_app_07 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_07 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -49,7 +49,7 @@ CLASS z2ui5_cl_smpe_app_07 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_07 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -66,8 +66,8 @@ CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. METHOD draft_open. - DATA s_failed TYPE RESPONSE FOR FAILED EARLY z2ui5_r_smpe_trd. - DATA s_reported TYPE RESPONSE FOR REPORTED EARLY z2ui5_r_smpe_trd. + DATA s_failed TYPE RESPONSE FOR FAILED EARLY z2ui5_r_smps_trd. + DATA s_reported TYPE RESPONSE FOR REPORTED EARLY z2ui5_r_smps_trd. DATA(uuid) = client->get_event_arg( 1 ). @@ -76,7 +76,7 @@ CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. " No draft yet. Edit copies the active instance into a new draft. " Only the key is passed: a draft action already knows which of the " two instances it works on - Edit always starts from the active one. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Edit FROM VALUE #( ( %key-traveluuid = uuid ) ) FAILED s_failed @@ -91,7 +91,7 @@ CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. " the existing draft instead, so the user continues exactly where the " last session ended. Again only the key: Resume addresses the draft " by definition. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Resume FROM VALUE #( ( %key-traveluuid = uuid ) ) FAILED s_failed @@ -108,18 +108,18 @@ CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trd + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trd FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). IF s_failed_commit IS NOT INITIAL. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported_commit-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported_commit-travel ). RETURN. ENDIF. @@ -133,7 +133,7 @@ CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. METHOD data_read. - SELECT FROM z2ui5_r_smpe_trd + SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid, TravelId, Description @@ -141,9 +141,9 @@ CLASS z2ui5_cl_smpe_app_07 IMPLEMENTATION. INTO TABLE @DATA(t_result) UP TO 20 ROWS. - " see z2ui5_cl_smpe_app_06 for what this read does - the description is + " see z2ui5_cl_smps_app_06 for what this read does - the description is " read along so the table can show the draft next to the active instance - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid description ) WITH VALUE #( FOR s_row IN t_result ( %tky = VALUE #( traveluuid = s_row-traveluuid diff --git a/src/04/z2ui5_cl_smpe_app_07.clas.xml b/src/04/z2ui5_cl_smps_app_07.clas.xml similarity index 91% rename from src/04/z2ui5_cl_smpe_app_07.clas.xml rename to src/04/z2ui5_cl_smps_app_07.clas.xml index d53bac4..0886775 100644 --- a/src/04/z2ui5_cl_smpe_app_07.clas.xml +++ b/src/04/z2ui5_cl_smps_app_07.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_07 + Z2UI5_CL_SMPS_APP_07 E abap2UI5 - EML sample 07 - enter draft mode 1 diff --git a/src/04/z2ui5_cl_smpe_app_08.clas.abap b/src/04/z2ui5_cl_smps_app_08.clas.abap similarity index 91% rename from src/04/z2ui5_cl_smpe_app_08.clas.abap rename to src/04/z2ui5_cl_smps_app_08.clas.abap index d5f4def..d637fe0 100644 --- a/src/04/z2ui5_cl_smpe_app_08.clas.abap +++ b/src/04/z2ui5_cl_smps_app_08.clas.abap @@ -2,7 +2,7 @@ "! An ordinary UPDATE. The only thing that makes it a draft update is "! %is_draft = mk-on in the key. "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trd +"! MODIFY ENTITIES OF z2ui5_r_smps_trd "! ENTITY travel "! UPDATE FIELDS ( description ) "! WITH VALUE #( ( %tky = VALUE #( traveluuid = uuid @@ -15,7 +15,7 @@ "! and the active instance stays untouched until someone activates the draft "! (sample 09). Validations do not run yet either - a draft may be "! incomplete. -CLASS z2ui5_cl_smpe_app_08 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_08 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -39,7 +39,7 @@ CLASS z2ui5_cl_smpe_app_08 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_08 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_08 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -61,7 +61,7 @@ CLASS z2ui5_cl_smpe_app_08 IMPLEMENTATION. " An ordinary UPDATE - the only thing that makes it a draft update is " %is_draft = mk-on in the key. The active instance stays untouched. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel UPDATE FIELDS ( description ) WITH VALUE #( ( %tky = VALUE #( traveluuid = uuid @@ -73,22 +73,22 @@ CLASS z2ui5_cl_smpe_app_08 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. - " The COMMIT writes the draft into the draft table z2ui5_d_smpe_trd. + " The COMMIT writes the draft into the draft table z2ui5_d_smps_trd. " Note what does NOT happen here: no validation runs. A draft may be " incomplete or plainly wrong and still be saved - it survives the " session and even a logoff. The validations wait for Activate. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trd + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trd FAILED DATA(s_failed_commit) REPORTED DATA(s_reported_commit). IF s_failed_commit IS NOT INITIAL. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported_commit-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported_commit-travel ). RETURN. ENDIF. @@ -102,7 +102,7 @@ CLASS z2ui5_cl_smpe_app_08 IMPLEMENTATION. METHOD data_read. - SELECT FROM z2ui5_r_smpe_trd + SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid ORDER BY TravelId INTO TABLE @DATA(t_result) @@ -110,7 +110,7 @@ CLASS z2ui5_cl_smpe_app_08 IMPLEMENTATION. " read the DRAFT instances, not the active ones - so the form below " shows what is currently in the draft, which is what gets changed - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid description ) WITH VALUE #( FOR s_row IN t_result ( %tky = VALUE #( traveluuid = s_row-traveluuid diff --git a/src/04/z2ui5_cl_smpe_app_08.clas.xml b/src/04/z2ui5_cl_smps_app_08.clas.xml similarity index 91% rename from src/04/z2ui5_cl_smpe_app_08.clas.xml rename to src/04/z2ui5_cl_smps_app_08.clas.xml index b291b12..04321a1 100644 --- a/src/04/z2ui5_cl_smpe_app_08.clas.xml +++ b/src/04/z2ui5_cl_smps_app_08.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_08 + Z2UI5_CL_SMPS_APP_08 E abap2UI5 - EML sample 08 - change and save a draft 1 diff --git a/src/04/z2ui5_cl_smpe_app_09.clas.abap b/src/04/z2ui5_cl_smps_app_09.clas.abap similarity index 91% rename from src/04/z2ui5_cl_smpe_app_09.clas.abap rename to src/04/z2ui5_cl_smps_app_09.clas.abap index e7cd9d0..38baf83 100644 --- a/src/04/z2ui5_cl_smpe_app_09.clas.abap +++ b/src/04/z2ui5_cl_smps_app_09.clas.abap @@ -1,7 +1,7 @@ "!

abap2UI5 - EML sample 09 - leave draft mode

"! Activate turns the draft into the active instance, Discard throws it away. "! -"! MODIFY ENTITIES OF z2ui5_r_smpe_trd +"! MODIFY ENTITIES OF z2ui5_r_smps_trd "! ENTITY travel "! EXECUTE Activate FROM VALUE #( ( %key-traveluuid = uuid ) ) "! FAILED DATA(s_failed) @@ -11,7 +11,7 @@ "! draft stays a draft and says why. Discard leaves the active instance exactly "! as it was. Both are draft actions like Edit and Resume - key only, no "! %is_draft. -CLASS z2ui5_cl_smpe_app_09 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_09 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -40,7 +40,7 @@ CLASS z2ui5_cl_smpe_app_09 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_09 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -69,7 +69,7 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. " declared `on save`, and for a draft business object activation is that " save. An invalid draft therefore stays a draft: it is not lost, the " messages come back in REPORTED and the user can fix it and try again. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Activate FROM VALUE #( ( %key-traveluuid = uuid ) ) FAILED DATA(s_failed) @@ -78,7 +78,7 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -101,7 +101,7 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. " Discard deletes the draft and nothing else. The active instance is " untouched, which is the whole point: the user throws away the changes, " not the travel. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Discard FROM VALUE #( ( %key-traveluuid = uuid ) ) FAILED DATA(s_failed) @@ -110,7 +110,7 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -128,7 +128,7 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. METHOD data_save. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trd + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trd FAILED DATA(s_failed) REPORTED DATA(s_reported). @@ -136,7 +136,7 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. result = abap_true. ELSE. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). ENDIF. ENDMETHOD. @@ -144,13 +144,13 @@ CLASS z2ui5_cl_smpe_app_09 IMPLEMENTATION. METHOD data_read. - SELECT FROM z2ui5_r_smpe_trd + SELECT FROM z2ui5_r_smps_trd FIELDS TravelUuid ORDER BY TravelId INTO TABLE @DATA(t_result) UP TO 20 ROWS. - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid description ) WITH VALUE #( FOR s_row IN t_result ( %tky = VALUE #( traveluuid = s_row-traveluuid diff --git a/src/04/z2ui5_cl_smpe_app_09.clas.xml b/src/04/z2ui5_cl_smps_app_09.clas.xml similarity index 91% rename from src/04/z2ui5_cl_smpe_app_09.clas.xml rename to src/04/z2ui5_cl_smps_app_09.clas.xml index 346547e..2543287 100644 --- a/src/04/z2ui5_cl_smpe_app_09.clas.xml +++ b/src/04/z2ui5_cl_smps_app_09.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_09 + Z2UI5_CL_SMPS_APP_09 E abap2UI5 - EML sample 09 - leave draft mode 1 diff --git a/src/04/z2ui5_cl_smpe_app_10.clas.abap b/src/04/z2ui5_cl_smps_app_10.clas.abap similarity index 91% rename from src/04/z2ui5_cl_smpe_app_10.clas.abap rename to src/04/z2ui5_cl_smps_app_10.clas.abap index 44c0b58..c57a452 100644 --- a/src/04/z2ui5_cl_smpe_app_10.clas.abap +++ b/src/04/z2ui5_cl_smps_app_10.clas.abap @@ -5,7 +5,7 @@ "! "! It repeats what those four show, nothing more. Read them first, then come "! here to see how the pieces sit together in one app. -CLASS z2ui5_cl_smpe_app_10 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_10 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -65,7 +65,7 @@ CLASS z2ui5_cl_smpe_app_10 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_10 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -112,7 +112,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD on_event_generate. - client->message_toast_display( z2ui5_cl_smpe_data_trd=>data_reset( ) ). + client->message_toast_display( z2ui5_cl_smps_data_trd=>data_reset( ) ). data_read( ). client->view_model_update( ). @@ -121,8 +121,8 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD on_event_edit. - DATA s_failed TYPE RESPONSE FOR FAILED EARLY z2ui5_r_smpe_trd. - DATA s_reported TYPE RESPONSE FOR REPORTED EARLY z2ui5_r_smpe_trd. + DATA s_failed TYPE RESPONSE FOR FAILED EARLY z2ui5_r_smps_trd. + DATA s_reported TYPE RESPONSE FOR REPORTED EARLY z2ui5_r_smps_trd. DATA(uuid) = client->get_event_arg( 1 ). @@ -130,7 +130,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. " no draft yet: the draft action Edit copies the active instance " into a new draft instance - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Edit FROM VALUE #( ( %key-traveluuid = uuid ) ) FAILED s_failed @@ -140,7 +140,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. " a draft already exists: the draft action Resume reactivates it, " so the user continues exactly where the last session ended - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Resume FROM VALUE #( ( %key-traveluuid = uuid ) ) FAILED s_failed @@ -151,7 +151,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -170,7 +170,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD on_event_save_draft. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel UPDATE FIELDS ( agencyid customerid begindate enddate bookingfee currencycode description ) WITH VALUE #( ( %tky = VALUE #( traveluuid = s_draft-travel_uuid @@ -188,7 +188,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -208,7 +208,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. " the validations of the business object run during activation - " an invalid draft stays a draft and the messages are displayed - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Activate FROM VALUE #( ( %key-traveluuid = s_draft-travel_uuid ) ) FAILED DATA(s_failed) @@ -217,7 +217,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -236,7 +236,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD on_event_discard. - MODIFY ENTITIES OF z2ui5_r_smpe_trd + MODIFY ENTITIES OF z2ui5_r_smps_trd ENTITY travel EXECUTE Discard FROM VALUE #( ( %key-traveluuid = s_draft-travel_uuid ) ) FAILED DATA(s_failed) @@ -245,7 +245,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. IF s_failed-travel IS NOT INITIAL. ROLLBACK ENTITIES. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). RETURN. ENDIF. @@ -264,7 +264,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD draft_read. - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel ALL FIELDS WITH VALUE #( ( %tky = VALUE #( traveluuid = uuid %is_draft = if_abap_behv=>mk-on ) ) ) @@ -287,7 +287,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD data_read. - SELECT FROM z2ui5_r_smpe_trd + SELECT FROM z2ui5_r_smps_trd FIELDS traveluuid, travelid, customerid, @@ -303,7 +303,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. " a draft instance shares the key of its active instance - reading " the keys with %is_draft = on reveals which travels have a draft - READ ENTITIES OF z2ui5_r_smpe_trd + READ ENTITIES OF z2ui5_r_smps_trd ENTITY travel FIELDS ( travelid ) WITH VALUE #( FOR s_row IN t_result ( %tky = VALUE #( traveluuid = s_row-traveluuid @@ -318,8 +318,8 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. begin_date = |{ s_result-begindate DATE = ISO }| end_date = |{ s_result-enddate DATE = ISO }| total_price = |{ s_result-totalprice } { s_result-currencycode }| - overall_status = z2ui5_cl_smpe_context=>status_get_text( s_result-overallstatus ) - status_state = z2ui5_cl_smpe_context=>status_get_state( s_result-overallstatus ) + overall_status = z2ui5_cl_smps_context=>status_get_text( s_result-overallstatus ) + status_state = z2ui5_cl_smps_context=>status_get_state( s_result-overallstatus ) has_draft = xsdbool( line_exists( t_drafts[ KEY entity traveluuid = s_result-traveluuid ] ) ) draft_text = COND #( WHEN line_exists( t_drafts[ KEY entity traveluuid = s_result-traveluuid ] ) THEN `Draft` ) ) ). @@ -329,7 +329,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. METHOD data_save. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_trd + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_trd FAILED DATA(s_failed) REPORTED DATA(s_reported). @@ -337,7 +337,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. result = abap_true. ELSE. - z2ui5_cl_smpe_context=>msg_display( client = client val = s_reported-travel ). + z2ui5_cl_smps_context=>msg_display( client = client val = s_reported-travel ). ENDIF. ENDMETHOD. @@ -355,7 +355,7 @@ CLASS z2ui5_cl_smpe_app_10 IMPLEMENTATION. DATA(table) = page->table( client->_bind( t_travels ) ). table->header_toolbar( )->toolbar( - )->title( `Travels (Z2UI5_R_SMPE_TRD)` + )->title( `Travels (Z2UI5_R_SMPS_TRD)` )->toolbar_spacer( )->button( text = `Generate Demo Data` diff --git a/src/04/z2ui5_cl_smpe_app_10.clas.xml b/src/04/z2ui5_cl_smps_app_10.clas.xml similarity index 91% rename from src/04/z2ui5_cl_smpe_app_10.clas.xml rename to src/04/z2ui5_cl_smps_app_10.clas.xml index 7fb04b2..e8ae761 100644 --- a/src/04/z2ui5_cl_smpe_app_10.clas.xml +++ b/src/04/z2ui5_cl_smps_app_10.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_10 + Z2UI5_CL_SMPS_APP_10 E abap2UI5 - EML sample 10 - draft handling 1 diff --git a/src/05/01/z2ui5_cl_smpe_bp_tck.clas.abap b/src/05/01/z2ui5_cl_smpe_bp_tck.clas.abap deleted file mode 100644 index 57a893c..0000000 --- a/src/05/01/z2ui5_cl_smpe_bp_tck.clas.abap +++ /dev/null @@ -1,7 +0,0 @@ -CLASS z2ui5_cl_smpe_bp_tck DEFINITION - PUBLIC ABSTRACT FINAL - FOR BEHAVIOR OF z2ui5_r_smpe_tck. -ENDCLASS. - -CLASS z2ui5_cl_smpe_bp_tck IMPLEMENTATION. -ENDCLASS. diff --git a/src/05/01/z2ui5_cl_smpe_evt_tck.clas.abap b/src/05/01/z2ui5_cl_smpe_evt_tck.clas.abap deleted file mode 100644 index 4a704ff..0000000 --- a/src/05/01/z2ui5_cl_smpe_evt_tck.clas.abap +++ /dev/null @@ -1,7 +0,0 @@ -CLASS z2ui5_cl_smpe_evt_tck DEFINITION - PUBLIC - FOR EVENTS OF z2ui5_r_smpe_tck. -ENDCLASS. - -CLASS z2ui5_cl_smpe_evt_tck IMPLEMENTATION. -ENDCLASS. diff --git a/src/05/01/z2ui5_cl_smps_bp_tck.clas.abap b/src/05/01/z2ui5_cl_smps_bp_tck.clas.abap new file mode 100644 index 0000000..b41393c --- /dev/null +++ b/src/05/01/z2ui5_cl_smps_bp_tck.clas.abap @@ -0,0 +1,7 @@ +CLASS z2ui5_cl_smps_bp_tck DEFINITION + PUBLIC ABSTRACT FINAL + FOR BEHAVIOR OF z2ui5_r_smps_tck. +ENDCLASS. + +CLASS z2ui5_cl_smps_bp_tck IMPLEMENTATION. +ENDCLASS. diff --git a/src/05/01/z2ui5_cl_smpe_bp_tck.clas.locals_imp.abap b/src/05/01/z2ui5_cl_smps_bp_tck.clas.locals_imp.abap similarity index 89% rename from src/05/01/z2ui5_cl_smpe_bp_tck.clas.locals_imp.abap rename to src/05/01/z2ui5_cl_smps_bp_tck.clas.locals_imp.abap index 047f45a..7acb9b3 100644 --- a/src/05/01/z2ui5_cl_smpe_bp_tck.clas.locals_imp.abap +++ b/src/05/01/z2ui5_cl_smps_bp_tck.clas.locals_imp.abap @@ -17,7 +17,7 @@ CLASS lhc_ticket IMPLEMENTATION. ENDMETHOD. METHOD manageadmin. - READ ENTITIES OF z2ui5_r_smpe_tck IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_tck IN LOCAL MODE ENTITY Ticket FIELDS ( CreatedAt ) WITH CORRESPONDING #( keys ) RESULT DATA(lt_tickets). @@ -27,7 +27,7 @@ CLASS lhc_ticket IMPLEMENTATION. DATA(lv_user) = cl_abap_context_info=>get_user_technical_name( ). " Always maintain change data - MODIFY ENTITIES OF z2ui5_r_smpe_tck IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_tck IN LOCAL MODE ENTITY Ticket UPDATE FIELDS ( ChangedBy LastChangedAt LocalLastChangedAt ) WITH VALUE #( FOR t IN lt_tickets ( @@ -37,7 +37,7 @@ CLASS lhc_ticket IMPLEMENTATION. LocalLastChangedAt = lv_now ) ). " Set creation data only where still initial (i.e. on create) - MODIFY ENTITIES OF z2ui5_r_smpe_tck IN LOCAL MODE + MODIFY ENTITIES OF z2ui5_r_smps_tck IN LOCAL MODE ENTITY Ticket UPDATE FIELDS ( CreatedBy CreatedAt ) WITH VALUE #( FOR t IN lt_tickets WHERE ( CreatedAt IS INITIAL ) ( @@ -58,20 +58,20 @@ CLASS lsc_ticket IMPLEMENTATION. METHOD save_modified. " ---- Notification event: fired on CREATE (carries key only) ---- IF create-ticket IS NOT INITIAL. - RAISE ENTITY EVENT z2ui5_r_smpe_tck~TicketCreated + RAISE ENTITY EVENT z2ui5_r_smps_tck~TicketCreated FROM VALUE #( FOR c IN create-ticket ( %key = VALUE #( TicketUUID = c-TicketUUID ) ) ). ENDIF. " ---- Data event: fired on UPDATE (carries enriched payload) ---- IF update-ticket IS NOT INITIAL. - READ ENTITIES OF z2ui5_r_smpe_tck IN LOCAL MODE + READ ENTITIES OF z2ui5_r_smps_tck IN LOCAL MODE ENTITY Ticket FIELDS ( Title Priority Status ChangedBy LastChangedAt ) WITH CORRESPONDING #( update-ticket ) RESULT DATA(lt_current). - RAISE ENTITY EVENT z2ui5_r_smpe_tck~StatusChanged + RAISE ENTITY EVENT z2ui5_r_smps_tck~StatusChanged FROM VALUE #( FOR t IN lt_current ( %key = VALUE #( TicketUUID = t-TicketUUID ) %param = VALUE #( Title = t-Title diff --git a/src/05/01/z2ui5_cl_smpe_bp_tck.clas.xml b/src/05/01/z2ui5_cl_smps_bp_tck.clas.xml similarity index 84% rename from src/05/01/z2ui5_cl_smpe_bp_tck.clas.xml rename to src/05/01/z2ui5_cl_smps_bp_tck.clas.xml index d36cdb9..f1a2462 100644 --- a/src/05/01/z2ui5_cl_smpe_bp_tck.clas.xml +++ b/src/05/01/z2ui5_cl_smps_bp_tck.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_BP_TCK + Z2UI5_CL_SMPS_BP_TCK E RAP Events Demo - Ticket Behavior Pool 06 @@ -11,7 +11,7 @@ X X X - Z2UI5_R_SMPE_TCK + Z2UI5_R_SMPS_TCK diff --git a/src/05/01/z2ui5_cl_smps_evt_tck.clas.abap b/src/05/01/z2ui5_cl_smps_evt_tck.clas.abap new file mode 100644 index 0000000..8ff3b9a --- /dev/null +++ b/src/05/01/z2ui5_cl_smps_evt_tck.clas.abap @@ -0,0 +1,7 @@ +CLASS z2ui5_cl_smps_evt_tck DEFINITION + PUBLIC + FOR EVENTS OF z2ui5_r_smps_tck. +ENDCLASS. + +CLASS z2ui5_cl_smps_evt_tck IMPLEMENTATION. +ENDCLASS. diff --git a/src/05/01/z2ui5_cl_smpe_evt_tck.clas.locals_imp.abap b/src/05/01/z2ui5_cl_smps_evt_tck.clas.locals_imp.abap similarity index 84% rename from src/05/01/z2ui5_cl_smpe_evt_tck.clas.locals_imp.abap rename to src/05/01/z2ui5_cl_smps_evt_tck.clas.locals_imp.abap index 5900b2b..0c0a388 100644 --- a/src/05/01/z2ui5_cl_smpe_evt_tck.clas.locals_imp.abap +++ b/src/05/01/z2ui5_cl_smps_evt_tck.clas.locals_imp.abap @@ -1,16 +1,16 @@ CLASS lhe_ticket DEFINITION INHERITING FROM cl_abap_behavior_event_handler. PRIVATE SECTION. METHODS on_ticket_created FOR ENTITY EVENT - ticketcreated FOR z2ui5_r_smpe_tck~TicketCreated. + ticketcreated FOR z2ui5_r_smps_tck~TicketCreated. METHODS on_status_changed FOR ENTITY EVENT - statuschanged FOR z2ui5_r_smpe_tck~StatusChanged. + statuschanged FOR z2ui5_r_smps_tck~StatusChanged. ENDCLASS. CLASS lhe_ticket IMPLEMENTATION. METHOD on_ticket_created. - DATA lt_log TYPE STANDARD TABLE OF z2ui5_t_smpe_log. + DATA lt_log TYPE STANDARD TABLE OF z2ui5_t_smps_log. DATA lv_now TYPE timestampl. GET TIME STAMP FIELD lv_now. @@ -31,12 +31,12 @@ CLASS lhe_ticket IMPLEMENTATION. ENDTRY. IF lt_log IS NOT INITIAL. - INSERT z2ui5_t_smpe_log FROM TABLE @lt_log. + INSERT z2ui5_t_smps_log FROM TABLE @lt_log. ENDIF. ENDMETHOD. METHOD on_status_changed. - DATA lt_log TYPE STANDARD TABLE OF z2ui5_t_smpe_log. + DATA lt_log TYPE STANDARD TABLE OF z2ui5_t_smps_log. DATA lv_now TYPE timestampl. GET TIME STAMP FIELD lv_now. @@ -59,7 +59,7 @@ CLASS lhe_ticket IMPLEMENTATION. ENDTRY. IF lt_log IS NOT INITIAL. - INSERT z2ui5_t_smpe_log FROM TABLE @lt_log. + INSERT z2ui5_t_smps_log FROM TABLE @lt_log. ENDIF. ENDMETHOD. diff --git a/src/05/01/z2ui5_cl_smpe_evt_tck.clas.xml b/src/05/01/z2ui5_cl_smps_evt_tck.clas.xml similarity index 84% rename from src/05/01/z2ui5_cl_smpe_evt_tck.clas.xml rename to src/05/01/z2ui5_cl_smps_evt_tck.clas.xml index 8b91ee4..17d2542 100644 --- a/src/05/01/z2ui5_cl_smpe_evt_tck.clas.xml +++ b/src/05/01/z2ui5_cl_smps_evt_tck.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_EVT_TCK + Z2UI5_CL_SMPS_EVT_TCK E RAP Events Demo - Local Event Consumer (writes log) 07 @@ -11,7 +11,7 @@ X X X - Z2UI5_R_SMPE_TCK + Z2UI5_R_SMPS_TCK diff --git a/src/05/01/z2ui5_d_smpe_tck.tabl.xml b/src/05/01/z2ui5_d_smps_tck.tabl.xml similarity index 85% rename from src/05/01/z2ui5_d_smpe_tck.tabl.xml rename to src/05/01/z2ui5_d_smps_tck.tabl.xml index 009a535..133fce7 100644 --- a/src/05/01/z2ui5_d_smpe_tck.tabl.xml +++ b/src/05/01/z2ui5_d_smps_tck.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_D_SMPE_TCK + Z2UI5_D_SMPS_TCK E TRANSP X @@ -13,7 +13,7 @@ 1 - Z2UI5_D_SMPE_TCK + Z2UI5_D_SMPS_TCK A 0 APPL1 @@ -31,26 +31,26 @@ TICKETUUID X - Z2UI5_E_SMPE_TCK_UUID + Z2UI5_E_SMPS_TCK_UUID 0 X E TITLE - Z2UI5_E_SMPE_TITLE + Z2UI5_E_SMPS_TITLE 0 E PRIORITY - Z2UI5_E_SMPE_PRIORITY + Z2UI5_E_SMPS_PRIORITY 0 E STATUS - Z2UI5_E_SMPE_STATUS + Z2UI5_E_SMPS_STATUS 0 E @@ -62,7 +62,7 @@ CREATEDAT - Z2UI5_E_SMPE_CREATED_AT + Z2UI5_E_SMPS_CREATED_AT 0 E @@ -74,13 +74,13 @@ LASTCHANGEDAT - Z2UI5_E_SMPE_CHANGED_AT + Z2UI5_E_SMPS_CHANGED_AT 0 E LOCALLASTCHANGEDAT - Z2UI5_E_SMPE_CHANGED_AT + Z2UI5_E_SMPS_CHANGED_AT 0 E diff --git a/src/05/01/z2ui5_e_smpe_changed_at.dtel.xml b/src/05/01/z2ui5_e_smps_changed_at.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_changed_at.dtel.xml rename to src/05/01/z2ui5_e_smps_changed_at.dtel.xml index fad937b..e3f883e 100644 --- a/src/05/01/z2ui5_e_smpe_changed_at.dtel.xml +++ b/src/05/01/z2ui5_e_smps_changed_at.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_CHANGED_AT + Z2UI5_E_SMPS_CHANGED_AT E TZNTSTMPL 55 diff --git a/src/05/01/z2ui5_e_smpe_created_at.dtel.xml b/src/05/01/z2ui5_e_smps_created_at.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_created_at.dtel.xml rename to src/05/01/z2ui5_e_smps_created_at.dtel.xml index c2b3497..e368fb0 100644 --- a/src/05/01/z2ui5_e_smpe_created_at.dtel.xml +++ b/src/05/01/z2ui5_e_smps_created_at.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_CREATED_AT + Z2UI5_E_SMPS_CREATED_AT E TZNTSTMPL 55 diff --git a/src/05/01/z2ui5_e_smpe_evt_name.dtel.xml b/src/05/01/z2ui5_e_smps_evt_name.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_evt_name.dtel.xml rename to src/05/01/z2ui5_e_smps_evt_name.dtel.xml index 663a161..1330312 100644 --- a/src/05/01/z2ui5_e_smpe_evt_name.dtel.xml +++ b/src/05/01/z2ui5_e_smps_evt_name.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_EVT_NAME + Z2UI5_E_SMPS_EVT_NAME E CHAR40 55 diff --git a/src/05/01/z2ui5_e_smpe_log_text.dtel.xml b/src/05/01/z2ui5_e_smps_log_text.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_log_text.dtel.xml rename to src/05/01/z2ui5_e_smps_log_text.dtel.xml index 17030c3..df0fb90 100644 --- a/src/05/01/z2ui5_e_smpe_log_text.dtel.xml +++ b/src/05/01/z2ui5_e_smps_log_text.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_LOG_TEXT + Z2UI5_E_SMPS_LOG_TEXT E TEXT255 55 diff --git a/src/05/01/z2ui5_e_smpe_log_uuid.dtel.xml b/src/05/01/z2ui5_e_smps_log_uuid.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_log_uuid.dtel.xml rename to src/05/01/z2ui5_e_smps_log_uuid.dtel.xml index 39b4aed..3a1b990 100644 --- a/src/05/01/z2ui5_e_smpe_log_uuid.dtel.xml +++ b/src/05/01/z2ui5_e_smps_log_uuid.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_LOG_UUID + Z2UI5_E_SMPS_LOG_UUID E SYSUUID_X16 55 diff --git a/src/05/01/z2ui5_e_smpe_priority.dtel.xml b/src/05/01/z2ui5_e_smps_priority.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_priority.dtel.xml rename to src/05/01/z2ui5_e_smps_priority.dtel.xml index 0a76201..425cab4 100644 --- a/src/05/01/z2ui5_e_smpe_priority.dtel.xml +++ b/src/05/01/z2ui5_e_smps_priority.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_PRIORITY + Z2UI5_E_SMPS_PRIORITY E CHAR1 55 diff --git a/src/05/01/z2ui5_e_smpe_status.dtel.xml b/src/05/01/z2ui5_e_smps_status.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_status.dtel.xml rename to src/05/01/z2ui5_e_smps_status.dtel.xml index 403c324..cfa5352 100644 --- a/src/05/01/z2ui5_e_smpe_status.dtel.xml +++ b/src/05/01/z2ui5_e_smps_status.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_STATUS + Z2UI5_E_SMPS_STATUS E CHAR10 55 diff --git a/src/05/01/z2ui5_e_smpe_tck_uuid.dtel.xml b/src/05/01/z2ui5_e_smps_tck_uuid.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_tck_uuid.dtel.xml rename to src/05/01/z2ui5_e_smps_tck_uuid.dtel.xml index 6734d23..6d22ef4 100644 --- a/src/05/01/z2ui5_e_smpe_tck_uuid.dtel.xml +++ b/src/05/01/z2ui5_e_smps_tck_uuid.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_TCK_UUID + Z2UI5_E_SMPS_TCK_UUID E SYSUUID_X16 55 diff --git a/src/05/01/z2ui5_e_smpe_title.dtel.xml b/src/05/01/z2ui5_e_smps_title.dtel.xml similarity index 93% rename from src/05/01/z2ui5_e_smpe_title.dtel.xml rename to src/05/01/z2ui5_e_smps_title.dtel.xml index 598d748..6eff831 100644 --- a/src/05/01/z2ui5_e_smpe_title.dtel.xml +++ b/src/05/01/z2ui5_e_smps_title.dtel.xml @@ -3,7 +3,7 @@ - Z2UI5_E_SMPE_TITLE + Z2UI5_E_SMPS_TITLE E TEXT80 55 diff --git a/src/05/01/z2ui5_r_smpe_tck_c.ddls.baseinfo b/src/05/01/z2ui5_r_smpe_tck_c.ddls.baseinfo deleted file mode 100644 index 75709d0..0000000 --- a/src/05/01/z2ui5_r_smpe_tck_c.ddls.baseinfo +++ /dev/null @@ -1,7 +0,0 @@ -{ - "BASEINFO": { - "FROM": [ - "Z2UI5_R_SMPE_TCK" - ] - } -} diff --git a/src/05/01/z2ui5_r_smpe_tck_stat.ddls.asddls b/src/05/01/z2ui5_r_smpe_tck_stat.ddls.asddls deleted file mode 100644 index dd5974b..0000000 --- a/src/05/01/z2ui5_r_smpe_tck_stat.ddls.asddls +++ /dev/null @@ -1,9 +0,0 @@ -@EndUserText.label: 'RAP Events Demo - Status Changed Payload' -define abstract entity Z2UI5_R_SMPE_TCK_STAT -{ - Title : z2ui5_e_smpe_title; - Priority : z2ui5_e_smpe_priority; - Status : z2ui5_e_smpe_status; - ChangedBy : syuname; - ChangedAt : timestampl; -} diff --git a/src/05/01/z2ui5_r_smpe_log.ddls.asddls b/src/05/01/z2ui5_r_smps_log.ddls.asddls similarity index 95% rename from src/05/01/z2ui5_r_smpe_log.ddls.asddls rename to src/05/01/z2ui5_r_smps_log.ddls.asddls index 7abecc1..c1ed0d5 100644 --- a/src/05/01/z2ui5_r_smpe_log.ddls.asddls +++ b/src/05/01/z2ui5_r_smps_log.ddls.asddls @@ -3,8 +3,8 @@ @UI.headerInfo: { typeName: 'Event', typeNamePlural: 'Event Log', title: { type: #STANDARD, value: 'EventName' } } -define root view entity Z2UI5_R_SMPE_LOG - as select from z2ui5_t_smpe_log +define root view entity Z2UI5_R_SMPS_LOG + as select from z2ui5_t_smps_log { @UI.facet: [ { id: 'EventInfo', purpose: #STANDARD, diff --git a/src/05/01/z2ui5_r_smpe_log.ddls.baseinfo b/src/05/01/z2ui5_r_smps_log.ddls.baseinfo similarity index 63% rename from src/05/01/z2ui5_r_smpe_log.ddls.baseinfo rename to src/05/01/z2ui5_r_smps_log.ddls.baseinfo index 642155b..46f30db 100644 --- a/src/05/01/z2ui5_r_smpe_log.ddls.baseinfo +++ b/src/05/01/z2ui5_r_smps_log.ddls.baseinfo @@ -1,7 +1,7 @@ { "BASEINFO": { "FROM": [ - "Z2UI5_T_SMPE_LOG" + "Z2UI5_T_SMPS_LOG" ] } } diff --git a/src/05/01/z2ui5_r_smpe_log.ddls.xml b/src/05/01/z2ui5_r_smps_log.ddls.xml similarity index 90% rename from src/05/01/z2ui5_r_smpe_log.ddls.xml rename to src/05/01/z2ui5_r_smps_log.ddls.xml index 20250bc..74385bb 100644 --- a/src/05/01/z2ui5_r_smpe_log.ddls.xml +++ b/src/05/01/z2ui5_r_smps_log.ddls.xml @@ -3,7 +3,7 @@ - Z2UI5_R_SMPE_LOG + Z2UI5_R_SMPS_LOG E RAP Events Demo - Event Log W diff --git a/src/05/01/z2ui5_r_smpe_tck.bdef.asbdef b/src/05/01/z2ui5_r_smps_tck.bdef.asbdef similarity index 84% rename from src/05/01/z2ui5_r_smpe_tck.bdef.asbdef rename to src/05/01/z2ui5_r_smps_tck.bdef.asbdef index 3fa41d9..8af81e2 100644 --- a/src/05/01/z2ui5_r_smpe_tck.bdef.asbdef +++ b/src/05/01/z2ui5_r_smps_tck.bdef.asbdef @@ -1,10 +1,10 @@ -managed with additional save implementation in class z2ui5_cl_smpe_bp_tck unique; +managed with additional save implementation in class z2ui5_cl_smps_bp_tck unique; strict ( 2 ); with draft; -define behavior for Z2UI5_R_SMPE_TCK alias Ticket -persistent table z2ui5_t_smpe_tck -draft table z2ui5_d_smpe_tck +define behavior for Z2UI5_R_SMPS_TCK alias Ticket +persistent table z2ui5_t_smps_tck +draft table z2ui5_d_smps_tck lock master total etag LastChangedAt authorization master ( global ) etag master LocalLastChangedAt @@ -21,7 +21,7 @@ etag master LocalLastChangedAt // Notification event (key only) - fired on CREATE event TicketCreated; // Data event (enriched payload) - fired on UPDATE - event StatusChanged parameter Z2UI5_R_SMPE_TCK_STAT; + event StatusChanged parameter Z2UI5_R_SMPS_TCK_STAT; // ---- Draft actions (mandatory with 'with draft' + 'strict') ---- draft action Resume; @@ -32,7 +32,7 @@ etag master LocalLastChangedAt determination manageAdmin on modify { create; field Title, Priority, Status; } - mapping for z2ui5_t_smpe_tck + mapping for z2ui5_t_smps_tck { TicketUUID = ticket_uuid; Title = title; diff --git a/src/05/01/z2ui5_r_smpe_tck.bdef.xml b/src/05/01/z2ui5_r_smps_tck.bdef.xml similarity index 84% rename from src/05/01/z2ui5_r_smpe_tck.bdef.xml rename to src/05/01/z2ui5_r_smps_tck.bdef.xml index a1118b2..5a88989 100644 --- a/src/05/01/z2ui5_r_smpe_tck.bdef.xml +++ b/src/05/01/z2ui5_r_smps_tck.bdef.xml @@ -3,31 +3,31 @@ - Z2UI5_R_SMPE_TCK + Z2UI5_R_SMPS_TCK BDEF/BDO RAP Events Demo - Ticket Behavior 60 EN - ./z2ui5_r_smpe_tck/source/main/versions + ./z2ui5_r_smps_tck/source/main/versions http://www.sap.com/adt/relations/versions Historic versions - /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smpe_tck + /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smps_tck http://www.sap.com/adt/relations/informationsystem/abaplanguageversions application/vnd.sap.adt.nameditems.v1+xml Allowed ABAP language versions - ./z2ui5_r_smpe_tck/source/main + ./z2ui5_r_smps_tck/source/main http://www.sap.com/adt/relations/source text/plain Source Content - ./z2ui5_r_smpe_tck/source/main + ./z2ui5_r_smps_tck/source/main http://www.sap.com/adt/relations/source text/html Source Content (HTML) @@ -35,7 +35,7 @@ EN X - ./z2ui5_r_smpe_tck/source/main + ./z2ui5_r_smps_tck/source/main ABAP_SOURCE true true diff --git a/src/05/01/z2ui5_r_smpe_tck.ddls.asddls b/src/05/01/z2ui5_r_smps_tck.ddls.asddls similarity index 90% rename from src/05/01/z2ui5_r_smpe_tck.ddls.asddls rename to src/05/01/z2ui5_r_smps_tck.ddls.asddls index 90c400c..5718462 100644 --- a/src/05/01/z2ui5_r_smpe_tck.ddls.asddls +++ b/src/05/01/z2ui5_r_smps_tck.ddls.asddls @@ -1,7 +1,7 @@ @EndUserText.label: 'RAP Events Demo - Ticket (Interface)' @AccessControl.authorizationCheck: #NOT_REQUIRED -define root view entity Z2UI5_R_SMPE_TCK - as select from z2ui5_t_smpe_tck +define root view entity Z2UI5_R_SMPS_TCK + as select from z2ui5_t_smps_tck { key ticket_uuid as TicketUUID, title as Title, diff --git a/src/05/01/z2ui5_r_smpe_tck.ddls.baseinfo b/src/05/01/z2ui5_r_smps_tck.ddls.baseinfo similarity index 63% rename from src/05/01/z2ui5_r_smpe_tck.ddls.baseinfo rename to src/05/01/z2ui5_r_smps_tck.ddls.baseinfo index da67f11..479ed8d 100644 --- a/src/05/01/z2ui5_r_smpe_tck.ddls.baseinfo +++ b/src/05/01/z2ui5_r_smps_tck.ddls.baseinfo @@ -1,7 +1,7 @@ { "BASEINFO": { "FROM": [ - "Z2UI5_T_SMPE_TCK" + "Z2UI5_T_SMPS_TCK" ] } } diff --git a/src/05/01/z2ui5_r_smpe_tck.ddls.xml b/src/05/01/z2ui5_r_smps_tck.ddls.xml similarity index 90% rename from src/05/01/z2ui5_r_smpe_tck.ddls.xml rename to src/05/01/z2ui5_r_smps_tck.ddls.xml index 2f122cf..c955bc7 100644 --- a/src/05/01/z2ui5_r_smpe_tck.ddls.xml +++ b/src/05/01/z2ui5_r_smps_tck.ddls.xml @@ -3,7 +3,7 @@ - Z2UI5_R_SMPE_TCK + Z2UI5_R_SMPS_TCK E RAP Events Demo - Ticket (Interface) W diff --git a/src/05/01/z2ui5_r_smpe_tck_c.bdef.asbdef b/src/05/01/z2ui5_r_smps_tck_c.bdef.asbdef similarity index 78% rename from src/05/01/z2ui5_r_smpe_tck_c.bdef.asbdef rename to src/05/01/z2ui5_r_smps_tck_c.bdef.asbdef index 8679354..f9e24af 100644 --- a/src/05/01/z2ui5_r_smpe_tck_c.bdef.asbdef +++ b/src/05/01/z2ui5_r_smps_tck_c.bdef.asbdef @@ -2,7 +2,7 @@ projection; strict ( 2 ); use draft; -define behavior for Z2UI5_R_SMPE_TCK_C alias Ticket +define behavior for Z2UI5_R_SMPS_TCK_C alias Ticket { use create; use update; diff --git a/src/05/01/z2ui5_r_smpe_tck_c.bdef.xml b/src/05/01/z2ui5_r_smps_tck_c.bdef.xml similarity index 84% rename from src/05/01/z2ui5_r_smpe_tck_c.bdef.xml rename to src/05/01/z2ui5_r_smps_tck_c.bdef.xml index a1eb4a6..0687952 100644 --- a/src/05/01/z2ui5_r_smpe_tck_c.bdef.xml +++ b/src/05/01/z2ui5_r_smps_tck_c.bdef.xml @@ -3,31 +3,31 @@ - Z2UI5_R_SMPE_TCK_C + Z2UI5_R_SMPS_TCK_C BDEF/BDO RAP Events Demo - Ticket Projection Behavior 60 EN - ./z2ui5_r_smpe_tck_c/source/main/versions + ./z2ui5_r_smps_tck_c/source/main/versions http://www.sap.com/adt/relations/versions Historic versions - /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smpe_tck_c + /sap/bc/adt/repository/informationsystem/abaplanguageversions?uri=%2Fsap%2Fbc%2Fadt%2Fbo%2Fbehaviordefinitions%2Fz2ui5_r_smps_tck_c http://www.sap.com/adt/relations/informationsystem/abaplanguageversions application/vnd.sap.adt.nameditems.v1+xml Allowed ABAP language versions - ./z2ui5_r_smpe_tck_c/source/main + ./z2ui5_r_smps_tck_c/source/main http://www.sap.com/adt/relations/source text/plain Source Content - ./z2ui5_r_smpe_tck_c/source/main + ./z2ui5_r_smps_tck_c/source/main http://www.sap.com/adt/relations/source text/html Source Content (HTML) @@ -35,7 +35,7 @@ EN X - ./z2ui5_r_smpe_tck_c/source/main + ./z2ui5_r_smps_tck_c/source/main ABAP_SOURCE true true diff --git a/src/05/01/z2ui5_r_smpe_tck_c.ddls.asddls b/src/05/01/z2ui5_r_smps_tck_c.ddls.asddls similarity index 95% rename from src/05/01/z2ui5_r_smpe_tck_c.ddls.asddls rename to src/05/01/z2ui5_r_smps_tck_c.ddls.asddls index 69eaf33..0f81715 100644 --- a/src/05/01/z2ui5_r_smpe_tck_c.ddls.asddls +++ b/src/05/01/z2ui5_r_smps_tck_c.ddls.asddls @@ -4,9 +4,9 @@ typeNamePlural: 'Tickets', title: { type: #STANDARD, value: 'Title' }, description: { type: #STANDARD, value: 'Status' } } -define root view entity Z2UI5_R_SMPE_TCK_C +define root view entity Z2UI5_R_SMPS_TCK_C provider contract transactional_query - as projection on Z2UI5_R_SMPE_TCK + as projection on Z2UI5_R_SMPS_TCK { @UI.facet: [ { id: 'GeneralInfo', purpose: #STANDARD, diff --git a/src/05/01/z2ui5_r_smps_tck_c.ddls.baseinfo b/src/05/01/z2ui5_r_smps_tck_c.ddls.baseinfo new file mode 100644 index 0000000..4c2aec8 --- /dev/null +++ b/src/05/01/z2ui5_r_smps_tck_c.ddls.baseinfo @@ -0,0 +1,7 @@ +{ + "BASEINFO": { + "FROM": [ + "Z2UI5_R_SMPS_TCK" + ] + } +} diff --git a/src/05/01/z2ui5_r_smpe_tck_c.ddls.xml b/src/05/01/z2ui5_r_smps_tck_c.ddls.xml similarity index 89% rename from src/05/01/z2ui5_r_smpe_tck_c.ddls.xml rename to src/05/01/z2ui5_r_smps_tck_c.ddls.xml index 31cbde3..47962d5 100644 --- a/src/05/01/z2ui5_r_smpe_tck_c.ddls.xml +++ b/src/05/01/z2ui5_r_smps_tck_c.ddls.xml @@ -3,7 +3,7 @@ - Z2UI5_R_SMPE_TCK_C + Z2UI5_R_SMPS_TCK_C E RAP Events Demo - Ticket P diff --git a/src/05/01/z2ui5_r_smps_tck_stat.ddls.asddls b/src/05/01/z2ui5_r_smps_tck_stat.ddls.asddls new file mode 100644 index 0000000..c1c6563 --- /dev/null +++ b/src/05/01/z2ui5_r_smps_tck_stat.ddls.asddls @@ -0,0 +1,9 @@ +@EndUserText.label: 'RAP Events Demo - Status Changed Payload' +define abstract entity Z2UI5_R_SMPS_TCK_STAT +{ + Title : z2ui5_e_smps_title; + Priority : z2ui5_e_smps_priority; + Status : z2ui5_e_smps_status; + ChangedBy : syuname; + ChangedAt : timestampl; +} diff --git a/src/05/01/z2ui5_r_smpe_tck_stat.ddls.baseinfo b/src/05/01/z2ui5_r_smps_tck_stat.ddls.baseinfo similarity index 100% rename from src/05/01/z2ui5_r_smpe_tck_stat.ddls.baseinfo rename to src/05/01/z2ui5_r_smps_tck_stat.ddls.baseinfo diff --git a/src/05/01/z2ui5_r_smpe_tck_stat.ddls.xml b/src/05/01/z2ui5_r_smps_tck_stat.ddls.xml similarity index 89% rename from src/05/01/z2ui5_r_smpe_tck_stat.ddls.xml rename to src/05/01/z2ui5_r_smps_tck_stat.ddls.xml index e9d66fb..fcc1393 100644 --- a/src/05/01/z2ui5_r_smpe_tck_stat.ddls.xml +++ b/src/05/01/z2ui5_r_smps_tck_stat.ddls.xml @@ -3,7 +3,7 @@ - Z2UI5_R_SMPE_TCK_STAT + Z2UI5_R_SMPS_TCK_STAT E RAP Events Demo - Status Changed Payload A diff --git a/src/05/01/z2ui5_sb_smpe_tck.g4ba.xml b/src/05/01/z2ui5_sb_smps_tck.g4ba.xml similarity index 81% rename from src/05/01/z2ui5_sb_smpe_tck.g4ba.xml rename to src/05/01/z2ui5_sb_smps_tck.g4ba.xml index 18ff571..cb57144 100644 --- a/src/05/01/z2ui5_sb_smpe_tck.g4ba.xml +++ b/src/05/01/z2ui5_sb_smps_tck.g4ba.xml @@ -4,7 +4,7 @@ <_-IWBEP_-I_V4_MSGA> <_-IWBEP_-I_V4_MSGA> - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK /IWBEP/COMMON DEFAULT 031 @@ -12,15 +12,15 @@ <_-IWBEP_-I_V4_MSGR> <_-IWBEP_-I_V4_MSGR> - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK 031 SADL - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK <_-IWBEP_-I_V4_MSGT> <_-IWBEP_-I_V4_MSGT> - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK E RAP Events Demo Binding (UI, OData V4) diff --git a/src/05/01/z2ui5_sb_smpe_tck.srvb.xml b/src/05/01/z2ui5_sb_smps_tck.srvb.xml similarity index 83% rename from src/05/01/z2ui5_sb_smpe_tck.srvb.xml rename to src/05/01/z2ui5_sb_smps_tck.srvb.xml index d9297c5..338af2e 100644 --- a/src/05/01/z2ui5_sb_smpe_tck.srvb.xml +++ b/src/05/01/z2ui5_sb_smps_tck.srvb.xml @@ -4,27 +4,27 @@ - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK SRVB/SVB RAP Events Demo Binding (UI, OData V4) - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK ODATA V4 - Z2UI5_SB_SMPE_TCK + Z2UI5_SB_SMPS_TCK 0001 NOT_RELEASED - /sap/bc/adt/ddic/srvd/sources/z2ui5_sd_smpe_tck + /sap/bc/adt/ddic/srvd/sources/z2ui5_sd_smps_tck SRVD/SRV - Z2UI5_SD_SMPE_TCK + Z2UI5_SD_SMPS_TCK diff --git a/src/05/01/z2ui5_sd_smpe_tck.srvd.srvdsrv b/src/05/01/z2ui5_sd_smpe_tck.srvd.srvdsrv deleted file mode 100644 index 1d36bf4..0000000 --- a/src/05/01/z2ui5_sd_smpe_tck.srvd.srvdsrv +++ /dev/null @@ -1,5 +0,0 @@ -@EndUserText.label: 'RAP Events Demo Service' -define service Z2UI5_SD_SMPE_TCK { - expose Z2UI5_R_SMPE_TCK_C as Ticket; - expose Z2UI5_R_SMPE_LOG as EventLog; -} diff --git a/src/05/01/z2ui5_sd_smps_tck.srvd.srvdsrv b/src/05/01/z2ui5_sd_smps_tck.srvd.srvdsrv new file mode 100644 index 0000000..085ea5f --- /dev/null +++ b/src/05/01/z2ui5_sd_smps_tck.srvd.srvdsrv @@ -0,0 +1,5 @@ +@EndUserText.label: 'RAP Events Demo Service' +define service Z2UI5_SD_SMPS_TCK { + expose Z2UI5_R_SMPS_TCK_C as Ticket; + expose Z2UI5_R_SMPS_LOG as EventLog; +} diff --git a/src/05/01/z2ui5_sd_smpe_tck.srvd.xml b/src/05/01/z2ui5_sd_smps_tck.srvd.xml similarity index 87% rename from src/05/01/z2ui5_sd_smpe_tck.srvd.xml rename to src/05/01/z2ui5_sd_smps_tck.srvd.xml index c7bc63c..49b77ee 100644 --- a/src/05/01/z2ui5_sd_smpe_tck.srvd.xml +++ b/src/05/01/z2ui5_sd_smps_tck.srvd.xml @@ -3,12 +3,12 @@ - Z2UI5_SD_SMPE_TCK + Z2UI5_SD_SMPS_TCK SRVD/SRV RAP Events Demo Service EN EN - ./z2ui5_sd_smpe_tck/source/main + ./z2ui5_sd_smps_tck/source/main ABAP_SOURCE ABAP Development Tools S diff --git a/src/05/01/z2ui5_t_smpe_log.tabl.xml b/src/05/01/z2ui5_t_smps_log.tabl.xml similarity index 83% rename from src/05/01/z2ui5_t_smpe_log.tabl.xml rename to src/05/01/z2ui5_t_smps_log.tabl.xml index b141bf2..d2d6a6c 100644 --- a/src/05/01/z2ui5_t_smpe_log.tabl.xml +++ b/src/05/01/z2ui5_t_smps_log.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_T_SMPE_LOG + Z2UI5_T_SMPS_LOG E TRANSP X @@ -12,7 +12,7 @@ 1 - Z2UI5_T_SMPE_LOG + Z2UI5_T_SMPS_LOG A 0 APPL1 @@ -30,26 +30,26 @@ LOG_UUID X - Z2UI5_E_SMPE_LOG_UUID + Z2UI5_E_SMPS_LOG_UUID 0 X E TICKET_UUID - Z2UI5_E_SMPE_TCK_UUID + Z2UI5_E_SMPS_TCK_UUID 0 E EVENT_NAME - Z2UI5_E_SMPE_EVT_NAME + Z2UI5_E_SMPS_EVT_NAME 0 E LOG_TEXT - Z2UI5_E_SMPE_LOG_TEXT + Z2UI5_E_SMPS_LOG_TEXT 0 E @@ -61,7 +61,7 @@ CREATED_AT - Z2UI5_E_SMPE_CREATED_AT + Z2UI5_E_SMPS_CREATED_AT 0 E diff --git a/src/05/01/z2ui5_t_smpe_tck.tabl.xml b/src/05/01/z2ui5_t_smps_tck.tabl.xml similarity index 83% rename from src/05/01/z2ui5_t_smpe_tck.tabl.xml rename to src/05/01/z2ui5_t_smps_tck.tabl.xml index 19942eb..1504b4b 100644 --- a/src/05/01/z2ui5_t_smpe_tck.tabl.xml +++ b/src/05/01/z2ui5_t_smps_tck.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_T_SMPE_TCK + Z2UI5_T_SMPS_TCK E TRANSP X @@ -12,7 +12,7 @@ 1 - Z2UI5_T_SMPE_TCK + Z2UI5_T_SMPS_TCK A 0 APPL1 @@ -30,26 +30,26 @@ TICKET_UUID X - Z2UI5_E_SMPE_TCK_UUID + Z2UI5_E_SMPS_TCK_UUID 0 X E TITLE - Z2UI5_E_SMPE_TITLE + Z2UI5_E_SMPS_TITLE 0 E PRIORITY - Z2UI5_E_SMPE_PRIORITY + Z2UI5_E_SMPS_PRIORITY 0 E STATUS - Z2UI5_E_SMPE_STATUS + Z2UI5_E_SMPS_STATUS 0 E @@ -61,7 +61,7 @@ CREATED_AT - Z2UI5_E_SMPE_CREATED_AT + Z2UI5_E_SMPS_CREATED_AT 0 E @@ -73,13 +73,13 @@ LAST_CHANGED_AT - Z2UI5_E_SMPE_CHANGED_AT + Z2UI5_E_SMPS_CHANGED_AT 0 E LOCAL_LAST_CHANGED_AT - Z2UI5_E_SMPE_CHANGED_AT + Z2UI5_E_SMPS_CHANGED_AT 0 E diff --git a/src/05/README.md b/src/05/README.md index 075fd9c..dfa1870 100644 --- a/src/05/README.md +++ b/src/05/README.md @@ -25,7 +25,7 @@ a younger RAP feature than EML itself: if `RAISE ENTITY EVENT` does not activate your system, this package is simply out of reach for now, and nothing else in this repository is affected. -The overview app `z2ui5_cl_smpe_app_00` lists these two samples like any others and +The overview app `z2ui5_cl_smps_app_00` lists these two samples like any others and does not depend on them: it looks every sample up at runtime, so on a release without business events the two rows are shown with their Open button disabled instead of taking the overview down. @@ -37,12 +37,12 @@ table fills itself as you create tickets. | Sample | Role | |---|---| -| [`11`](z2ui5_cl_smpe_app_11.clas.abap) | create tickets through the BO — every create and update raises an event | -| [`12`](z2ui5_cl_smpe_app_12.clas.abap) | the event log the handler writes, newest first | +| [`11`](z2ui5_cl_smps_app_11.clas.abap) | create tickets through the BO — every create and update raises an event | +| [`12`](z2ui5_cl_smps_app_12.clas.abap) | the event log the handler writes, newest first | -Start them with `?app_start=z2ui5_cl_smpe_app_11` and -`?app_start=z2ui5_cl_smpe_app_12`, or from the overview app -`?app_start=z2ui5_cl_smpe_app_00`, whose Open button puts each in its own tab. Open +Start them with `?app_start=z2ui5_cl_smps_app_11` and +`?app_start=z2ui5_cl_smps_app_12`, or from the overview app +`?app_start=z2ui5_cl_smps_app_00`, whose Open button puts each in its own tab. Open both in two browser tabs, create a ticket in the first, press refresh in the second — the log entry the handler wrote is there. @@ -52,7 +52,7 @@ created the ticket. That is what the refresh button is for. ## The two kinds of event -The behavior definition [`z2ui5_r_smpe_tck.bdef.asbdef`](01/z2ui5_r_smpe_tck.bdef.asbdef) +The behavior definition [`z2ui5_r_smps_tck.bdef.asbdef`](01/z2ui5_r_smps_tck.bdef.asbdef) declares one of each — the distinction is the whole point of the sample: ```abap @@ -60,28 +60,28 @@ declares one of each — the distinction is the whole point of the sample: event TicketCreated; " data event: an enriched payload, typed by an abstract entity -event StatusChanged parameter Z2UI5_R_SMPE_TCK_STAT; +event StatusChanged parameter Z2UI5_R_SMPS_TCK_STAT; ``` A **notification** event says *something happened to this instance* and leaves it to the consumer to read the current state. A **data** event carries the state along, so the consumer needs no second read — at the price of shipping data that may already be stale by the time it is handled. The payload type is an ordinary abstract entity, -[`Z2UI5_R_SMPE_TCK_STAT`](01/z2ui5_r_smpe_tck_stat.ddls.asddls). +[`Z2UI5_R_SMPS_TCK_STAT`](01/z2ui5_r_smps_tck_stat.ddls.asddls). ## Who raises them The additional save of the behavior pool, -[`Z2UI5_CL_SMPE_BP_TCK`](01/z2ui5_cl_smpe_bp_tck.clas.locals_imp.abap) — +[`Z2UI5_CL_SMPS_BP_TCK`](01/z2ui5_cl_smps_bp_tck.clas.locals_imp.abap) — `save_modified` sees what the transaction changed and raises accordingly: ```abap " on create - key only -RAISE ENTITY EVENT z2ui5_r_smpe_tck~TicketCreated +RAISE ENTITY EVENT z2ui5_r_smps_tck~TicketCreated FROM VALUE #( FOR c IN create-ticket ( %key = VALUE #( TicketUUID = c-TicketUUID ) ) ). " on update - key plus payload in %param -RAISE ENTITY EVENT z2ui5_r_smpe_tck~StatusChanged +RAISE ENTITY EVENT z2ui5_r_smps_tck~StatusChanged FROM VALUE #( FOR t IN lt_current ( %key = VALUE #( TicketUUID = t-TicketUUID ) %param = VALUE #( Title = t-Title Status = t-Status … ) ) ). @@ -89,16 +89,16 @@ RAISE ENTITY EVENT z2ui5_r_smpe_tck~StatusChanged ## Who listens -A separate class, [`Z2UI5_CL_SMPE_EVT_TCK`](01/z2ui5_cl_smpe_evt_tck.clas.locals_imp.abap), +A separate class, [`Z2UI5_CL_SMPS_EVT_TCK`](01/z2ui5_cl_smps_evt_tck.clas.locals_imp.abap), inheriting from `CL_ABAP_BEHAVIOR_EVENT_HANDLER`. It subscribes per event, receives the instances as a table, and writes them into the log: ```abap METHODS on_ticket_created FOR ENTITY EVENT - ticketcreated FOR z2ui5_r_smpe_tck~TicketCreated. + ticketcreated FOR z2ui5_r_smps_tck~TicketCreated. METHODS on_status_changed FOR ENTITY EVENT - statuschanged FOR z2ui5_r_smpe_tck~StatusChanged. + statuschanged FOR z2ui5_r_smps_tck~StatusChanged. ``` Nothing registers this class anywhere — the `FOR ENTITY EVENT` declaration *is* the @@ -110,14 +110,14 @@ the business object changing a line. | Object | Role | |---|---| -| `Z2UI5_T_SMPE_TCK`, `Z2UI5_D_SMPE_TCK` | the ticket table and its draft table | -| [`Z2UI5_R_SMPE_TCK`](01/z2ui5_r_smpe_tck.ddls.asddls) + [`.bdef`](01/z2ui5_r_smpe_tck.bdef.asbdef) | the root view entity and the behavior with the two events | -| [`Z2UI5_CL_SMPE_BP_TCK`](01/z2ui5_cl_smpe_bp_tck.clas.locals_imp.abap) | behavior pool — determination and the additional save that raises | -| [`Z2UI5_R_SMPE_TCK_STAT`](01/z2ui5_r_smpe_tck_stat.ddls.asddls) | the abstract entity typing the data event payload | -| [`Z2UI5_CL_SMPE_EVT_TCK`](01/z2ui5_cl_smpe_evt_tck.clas.locals_imp.abap) | the event handler, writes the log | -| `Z2UI5_T_SMPE_LOG` + [`Z2UI5_R_SMPE_LOG`](01/z2ui5_r_smpe_log.ddls.asddls) | the log table and its CDS view | -| [`Z2UI5_R_SMPE_TCK_C`](01/z2ui5_r_smpe_tck_c.ddls.asddls), `Z2UI5_SD_SMPE_TCK`, `Z2UI5_SB_SMPE_TCK` | projection, service definition and an OData V4 binding | -| [`Z2UI5_CL_SMPE_APP_11`](z2ui5_cl_smpe_app_11.clas.abap), [`Z2UI5_CL_SMPE_APP_12`](z2ui5_cl_smpe_app_12.clas.abap) | the two abap2UI5 apps | +| `Z2UI5_T_SMPS_TCK`, `Z2UI5_D_SMPS_TCK` | the ticket table and its draft table | +| [`Z2UI5_R_SMPS_TCK`](01/z2ui5_r_smps_tck.ddls.asddls) + [`.bdef`](01/z2ui5_r_smps_tck.bdef.asbdef) | the root view entity and the behavior with the two events | +| [`Z2UI5_CL_SMPS_BP_TCK`](01/z2ui5_cl_smps_bp_tck.clas.locals_imp.abap) | behavior pool — determination and the additional save that raises | +| [`Z2UI5_R_SMPS_TCK_STAT`](01/z2ui5_r_smps_tck_stat.ddls.asddls) | the abstract entity typing the data event payload | +| [`Z2UI5_CL_SMPS_EVT_TCK`](01/z2ui5_cl_smps_evt_tck.clas.locals_imp.abap) | the event handler, writes the log | +| `Z2UI5_T_SMPS_LOG` + [`Z2UI5_R_SMPS_LOG`](01/z2ui5_r_smps_log.ddls.asddls) | the log table and its CDS view | +| [`Z2UI5_R_SMPS_TCK_C`](01/z2ui5_r_smps_tck_c.ddls.asddls), `Z2UI5_SD_SMPS_TCK`, `Z2UI5_SB_SMPS_TCK` | projection, service definition and an OData V4 binding | +| [`Z2UI5_CL_SMPS_APP_11`](z2ui5_cl_smps_app_11.clas.abap), [`Z2UI5_CL_SMPS_APP_12`](z2ui5_cl_smps_app_12.clas.abap) | the two abap2UI5 apps | The projection, service definition and service binding are there on purpose: the same business object can be published as an OData V4 service and consumed by a diff --git a/src/05/z2ui5_cl_smpe_app_11.clas.abap b/src/05/z2ui5_cl_smps_app_11.clas.abap similarity index 91% rename from src/05/z2ui5_cl_smpe_app_11.clas.abap rename to src/05/z2ui5_cl_smps_app_11.clas.abap index 36d619c..4067ea0 100644 --- a/src/05/z2ui5_cl_smpe_app_11.clas.abap +++ b/src/05/z2ui5_cl_smps_app_11.clas.abap @@ -1,13 +1,13 @@ -CLASS z2ui5_cl_smpe_app_11 DEFINITION PUBLIC CREATE PUBLIC. +CLASS z2ui5_cl_smps_app_11 DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. TYPES: BEGIN OF ty_s_ticket, - title TYPE z2ui5_e_smpe_title, - priority TYPE z2ui5_e_smpe_priority, - status TYPE z2ui5_e_smpe_status, + title TYPE z2ui5_e_smps_title, + priority TYPE z2ui5_e_smps_priority, + status TYPE z2ui5_e_smps_status, created_by TYPE syuname, END OF ty_s_ticket. DATA mt_tickets TYPE STANDARD TABLE OF ty_s_ticket WITH EMPTY KEY. @@ -33,7 +33,7 @@ CLASS z2ui5_cl_smpe_app_11 DEFINITION PUBLIC CREATE PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_11 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_11 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. @@ -67,7 +67,7 @@ CLASS z2ui5_cl_smpe_app_11 IMPLEMENTATION. ENDIF. " Create a ticket via the RAP business object -> raises the RAP business event - MODIFY ENTITIES OF z2ui5_r_smpe_tck + MODIFY ENTITIES OF z2ui5_r_smps_tck ENTITY Ticket CREATE FIELDS ( title priority status ) WITH VALUE #( ( %cid = `CID_TICKET` @@ -84,7 +84,7 @@ CLASS z2ui5_cl_smpe_app_11 IMPLEMENTATION. RETURN. ENDIF. - COMMIT ENTITIES RESPONSE OF z2ui5_r_smpe_tck + COMMIT ENTITIES RESPONSE OF z2ui5_r_smps_tck FAILED DATA(commit_failed) REPORTED DATA(commit_reported). @@ -99,7 +99,7 @@ CLASS z2ui5_cl_smpe_app_11 IMPLEMENTATION. ENDMETHOD. METHOD data_read. - SELECT FROM z2ui5_t_smpe_tck + SELECT FROM z2ui5_t_smps_tck FIELDS title, priority, status, created_by ORDER BY created_at DESCENDING INTO CORRESPONDING FIELDS OF TABLE @mt_tickets diff --git a/src/05/z2ui5_cl_smpe_app_11.clas.xml b/src/05/z2ui5_cl_smps_app_11.clas.xml similarity index 90% rename from src/05/z2ui5_cl_smpe_app_11.clas.xml rename to src/05/z2ui5_cl_smps_app_11.clas.xml index d227c83..a742845 100644 --- a/src/05/z2ui5_cl_smpe_app_11.clas.xml +++ b/src/05/z2ui5_cl_smps_app_11.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_11 + Z2UI5_CL_SMPS_APP_11 E RAP Events Demo - Ticket App (abap2UI5) 1 diff --git a/src/05/z2ui5_cl_smpe_app_12.clas.abap b/src/05/z2ui5_cl_smps_app_12.clas.abap similarity index 89% rename from src/05/z2ui5_cl_smpe_app_12.clas.abap rename to src/05/z2ui5_cl_smps_app_12.clas.abap index 048323c..c5213aa 100644 --- a/src/05/z2ui5_cl_smpe_app_12.clas.abap +++ b/src/05/z2ui5_cl_smps_app_12.clas.abap @@ -1,12 +1,12 @@ -CLASS z2ui5_cl_smpe_app_12 DEFINITION PUBLIC CREATE PUBLIC. +CLASS z2ui5_cl_smps_app_12 DEFINITION PUBLIC CREATE PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. TYPES: BEGIN OF ty_s_log, - event_name TYPE z2ui5_e_smpe_evt_name, - log_text TYPE z2ui5_e_smpe_log_text, + event_name TYPE z2ui5_e_smps_evt_name, + log_text TYPE z2ui5_e_smps_log_text, created_by TYPE syuname, END OF ty_s_log. DATA mt_log TYPE STANDARD TABLE OF ty_s_log WITH EMPTY KEY. @@ -21,7 +21,7 @@ CLASS z2ui5_cl_smpe_app_12 DEFINITION PUBLIC CREATE PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_12 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_12 IMPLEMENTATION. METHOD z2ui5_if_app~main. me->client = client. @@ -38,7 +38,7 @@ CLASS z2ui5_cl_smpe_app_12 IMPLEMENTATION. ENDMETHOD. METHOD data_read. - SELECT FROM z2ui5_t_smpe_log + SELECT FROM z2ui5_t_smps_log FIELDS event_name, log_text, created_by ORDER BY created_at DESCENDING INTO CORRESPONDING FIELDS OF TABLE @mt_log diff --git a/src/05/z2ui5_cl_smpe_app_12.clas.xml b/src/05/z2ui5_cl_smps_app_12.clas.xml similarity index 90% rename from src/05/z2ui5_cl_smpe_app_12.clas.xml rename to src/05/z2ui5_cl_smps_app_12.clas.xml index cc7442b..3326e61 100644 --- a/src/05/z2ui5_cl_smpe_app_12.clas.xml +++ b/src/05/z2ui5_cl_smps_app_12.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_12 + Z2UI5_CL_SMPS_APP_12 E RAP Events Demo - Event Log App (abap2UI5) 1 diff --git a/src/06/01/z2ui5_t_smpe_01.tabl.xml b/src/06/01/z2ui5_t_smps_01.tabl.xml similarity index 95% rename from src/06/01/z2ui5_t_smpe_01.tabl.xml rename to src/06/01/z2ui5_t_smps_01.tabl.xml index 7a2c5f7..b59bec4 100644 --- a/src/06/01/z2ui5_t_smpe_01.tabl.xml +++ b/src/06/01/z2ui5_t_smps_01.tabl.xml @@ -3,7 +3,7 @@ - Z2UI5_T_SMPE_01 + Z2UI5_T_SMPS_01 E TRANSP X @@ -13,7 +13,7 @@ 1 - Z2UI5_T_SMPE_01 + Z2UI5_T_SMPS_01 A 0 APPL0 diff --git a/src/06/README.md b/src/06/README.md index 2cd0b64..a54a9be 100644 --- a/src/06/README.md +++ b/src/06/README.md @@ -24,7 +24,7 @@ ABAP Standard (on-premise). The locks go through the function modules `ENQUEUE_E_TABLE` and `ENQUEUE_READ`, which are available there — `485`'s own page title points this out. -The lock table `Z2UI5_T_SMPE_01` comes with this package +The lock table `Z2UI5_T_SMPS_01` comes with this package ([`src/06/01`](01)); after the import it only has to be activated, it is never filled with data. Keep `SM12` open next to the browser and you can watch the entries appear live. @@ -33,12 +33,12 @@ appear live. | Sample | Shows | |---|---| -| [`486`](z2ui5_cl_smpe_app_486.clas.abap) | the basics — a counter in a static container. It keeps counting up while the session is stateful and starts over once you switch it off | -| [`485`](z2ui5_cl_smpe_app_485.clas.abap) | set an `ENQUEUE` lock, read it back with `ENQUEUE_READ`, end and restart the session | -| [`490`](z2ui5_cl_smpe_app_490.clas.abap) | one lock per screen — every *Next Lock View* navigates into a new app instance that takes the next `VARKEY`, going back releases it | +| [`486`](z2ui5_cl_smps_app_486.clas.abap) | the basics — a counter in a static container. It keeps counting up while the session is stateful and starts over once you switch it off | +| [`485`](z2ui5_cl_smps_app_485.clas.abap) | set an `ENQUEUE` lock, read it back with `ENQUEUE_READ`, end and restart the session | +| [`490`](z2ui5_cl_smps_app_490.clas.abap) | one lock per screen — every *Next Lock View* navigates into a new app instance that takes the next `VARKEY`, going back releases it | -Start any of them with `?app_start=z2ui5_cl_smpe_app_`, or from the overview -app `?app_start=z2ui5_cl_smpe_app_00`, which lists every sample of this repository. +Start any of them with `?app_start=z2ui5_cl_smps_app_`, or from the overview +app `?app_start=z2ui5_cl_smps_app_00`, which lists every sample of this repository. Begin with `486`: it makes the mode switch visible in one number before any lock is involved. diff --git a/src/06/z2ui5_cl_smpe_app_485.clas.abap b/src/06/z2ui5_cl_smps_app_485.clas.abap similarity index 97% rename from src/06/z2ui5_cl_smpe_app_485.clas.abap rename to src/06/z2ui5_cl_smps_app_485.clas.abap index 49565f8..069d50e 100644 --- a/src/06/z2ui5_cl_smpe_app_485.clas.abap +++ b/src/06/z2ui5_cl_smps_app_485.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_485 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_485 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -33,7 +33,7 @@ CLASS z2ui5_cl_smpe_app_485 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_485 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_485 IMPLEMENTATION. METHOD initialize_view. diff --git a/src/06/z2ui5_cl_smpe_app_485.clas.locals_imp.abap b/src/06/z2ui5_cl_smps_app_485.clas.locals_imp.abap similarity index 96% rename from src/06/z2ui5_cl_smpe_app_485.clas.locals_imp.abap rename to src/06/z2ui5_cl_smps_app_485.clas.locals_imp.abap index 0c06fab..9047104 100644 --- a/src/06/z2ui5_cl_smpe_app_485.clas.locals_imp.abap +++ b/src/06/z2ui5_cl_smps_app_485.clas.locals_imp.abap @@ -44,7 +44,7 @@ CLASS lcl_locking IMPLEMENTATION. DATA(lv_fm) = 'ENQUEUE_E_TABLE'. CALL FUNCTION lv_fm EXPORTING - tabname = 'Z2UI5_T_SMPE_01' + tabname = 'Z2UI5_T_SMPS_01' varkey = 'Z100' EXCEPTIONS foreign_lock = 1 @@ -62,7 +62,7 @@ CLASS lcl_locking IMPLEMENTATION. DATA enqueue_table TYPE STANDARD TABLE OF ty_seqg3. DATA argument TYPE c LENGTH 150. - argument = |Z2UI5_T_SMPE_01 Z100*|. + argument = |Z2UI5_T_SMPS_01 Z100*|. DATA(lv_fm) = 'ENQUEUE_READ'. CALL FUNCTION lv_fm diff --git a/src/06/z2ui5_cl_smpe_app_485.clas.xml b/src/06/z2ui5_cl_smps_app_485.clas.xml similarity index 90% rename from src/06/z2ui5_cl_smpe_app_485.clas.xml rename to src/06/z2ui5_cl_smps_app_485.clas.xml index 5405729..1a5b3d3 100644 --- a/src/06/z2ui5_cl_smpe_app_485.clas.xml +++ b/src/06/z2ui5_cl_smps_app_485.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_485 + Z2UI5_CL_SMPS_APP_485 E Stateful Sessions - Locks 1 diff --git a/src/06/z2ui5_cl_smpe_app_486.clas.abap b/src/06/z2ui5_cl_smps_app_486.clas.abap similarity index 96% rename from src/06/z2ui5_cl_smpe_app_486.clas.abap rename to src/06/z2ui5_cl_smps_app_486.clas.abap index 626215e..368e4fc 100644 --- a/src/06/z2ui5_cl_smpe_app_486.clas.abap +++ b/src/06/z2ui5_cl_smps_app_486.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_486 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_486 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -25,7 +25,7 @@ CLASS z2ui5_cl_smpe_app_486 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_486 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_486 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/06/z2ui5_cl_smpe_app_486.clas.locals_imp.abap b/src/06/z2ui5_cl_smps_app_486.clas.locals_imp.abap similarity index 100% rename from src/06/z2ui5_cl_smpe_app_486.clas.locals_imp.abap rename to src/06/z2ui5_cl_smps_app_486.clas.locals_imp.abap diff --git a/src/06/z2ui5_cl_smpe_app_486.clas.xml b/src/06/z2ui5_cl_smps_app_486.clas.xml similarity index 90% rename from src/06/z2ui5_cl_smpe_app_486.clas.xml rename to src/06/z2ui5_cl_smps_app_486.clas.xml index 79bd46f..cc1df8c 100644 --- a/src/06/z2ui5_cl_smpe_app_486.clas.xml +++ b/src/06/z2ui5_cl_smps_app_486.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_486 + Z2UI5_CL_SMPS_APP_486 E Stateful Sessions - Basics 1 diff --git a/src/06/z2ui5_cl_smpe_app_490.clas.abap b/src/06/z2ui5_cl_smps_app_490.clas.abap similarity index 93% rename from src/06/z2ui5_cl_smpe_app_490.clas.abap rename to src/06/z2ui5_cl_smps_app_490.clas.abap index 10e174c..8aa7fe2 100644 --- a/src/06/z2ui5_cl_smpe_app_490.clas.abap +++ b/src/06/z2ui5_cl_smps_app_490.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_490 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_490 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -16,7 +16,7 @@ CLASS z2ui5_cl_smpe_app_490 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_490 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_490 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -41,7 +41,7 @@ CLASS z2ui5_cl_smpe_app_490 IMPLEMENTATION. CASE client->get( )-event. WHEN `CALL_BOOKING_MASK`. DATA lf_key TYPE n LENGTH 4. - DATA(lr_view2) = NEW z2ui5_cl_smpe_app_490( ). + DATA(lr_view2) = NEW z2ui5_cl_smps_app_490( ). lr_view2->view_id = 2. lr_view2->varkey = `001`. client->nav_app_call( lr_view2 ). @@ -63,7 +63,7 @@ CLASS z2ui5_cl_smpe_app_490 IMPLEMENTATION. DATA(lv_fm) = `ENQUEUE_E_TABLE`. CALL FUNCTION lv_fm EXPORTING - tabname = `Z2UI5_T_SMPE_01` + tabname = `Z2UI5_T_SMPS_01` varkey = varkey EXCEPTIONS foreign_lock = 1 @@ -94,7 +94,7 @@ CLASS z2ui5_cl_smpe_app_490 IMPLEMENTATION. CASE client->get( )-event. WHEN `NEXT_LOCK`. client->set_session_stateful( abap_false ). - lr_view2 = NEW z2ui5_cl_smpe_app_490( ). + lr_view2 = NEW z2ui5_cl_smps_app_490( ). lr_view2->view_id = 2. DATA lf_new_varkey TYPE n LENGTH 4. lf_new_varkey = varkey+0(4). diff --git a/src/06/z2ui5_cl_smpe_app_490.clas.xml b/src/06/z2ui5_cl_smps_app_490.clas.xml similarity index 91% rename from src/06/z2ui5_cl_smpe_app_490.clas.xml rename to src/06/z2ui5_cl_smps_app_490.clas.xml index 09aac2b..1fd49b1 100644 --- a/src/06/z2ui5_cl_smpe_app_490.clas.xml +++ b/src/06/z2ui5_cl_smps_app_490.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_490 + Z2UI5_CL_SMPS_APP_490 E Stateful Sessions - Navigation and Locks 1 diff --git a/src/07/01/z2ui5_amc_smp_2.samc.xml b/src/07/01/z2ui5_amc_smp_2.samc.xml index 74c4057..5852b12 100644 --- a/src/07/01/z2ui5_amc_smp_2.samc.xml +++ b/src/07/01/z2ui5_amc_smp_2.samc.xml @@ -28,7 +28,7 @@ A 1 /news_feed - Z2UI5_CL_SMPE_APP_489_WS======CP + Z2UI5_CL_SMPS_APP_489_WS======CP S @@ -36,7 +36,7 @@ A 2 /news_feed - Z2UI5_CL_SMPE_APP_489_WS======CP + Z2UI5_CL_SMPS_APP_489_WS======CP C diff --git a/src/07/01/z2ui5_apc_smp_2.sapc.xml b/src/07/01/z2ui5_apc_smp_2.sapc.xml index b822ed6..7b21324 100644 --- a/src/07/01/z2ui5_apc_smp_2.sapc.xml +++ b/src/07/01/z2ui5_apc_smp_2.sapc.xml @@ -7,7 +7,7 @@ Z2UI5_APC_SMP_2 A /sap/bc/apc/sap/z2ui5_apc_smp_2 - Z2UI5_CL_SMPE_APP_489_WS + Z2UI5_CL_SMPS_APP_489_WS 1 diff --git a/src/07/README.md b/src/07/README.md index 003ebdd..0bbdabc 100644 --- a/src/07/README.md +++ b/src/07/README.md @@ -31,13 +31,13 @@ message arrive in both at once. | Object | Role | |---|---| -| [`489`](z2ui5_cl_smpe_app_489.clas.abap) | the app — connect, publish, list the active connections | -| [`489_ws`](z2ui5_cl_smpe_app_489_ws.clas.abap) | the APC handler, `CL_APC_WSP_EXT_STATELESS_BASE` | +| [`489`](z2ui5_cl_smps_app_489.clas.abap) | the app — connect, publish, list the active connections | +| [`489_ws`](z2ui5_cl_smps_app_489_ws.clas.abap) | the APC handler, `CL_APC_WSP_EXT_STATELESS_BASE` | | `Z2UI5_AMC_SMP_2` | the messaging channel, `/news_feed` | | `Z2UI5_APC_SMP_2` | the push channel and its ICF node | -Start it with `?app_start=z2ui5_cl_smpe_app_489`, or from the overview app -`?app_start=z2ui5_cl_smpe_app_00`, which lists every sample of this repository. +Start it with `?app_start=z2ui5_cl_smps_app_489`, or from the overview app +`?app_start=z2ui5_cl_smps_app_00`, which lists every sample of this repository. ## Where to go next diff --git a/src/07/z2ui5_cl_smpe_app_489.clas.abap b/src/07/z2ui5_cl_smps_app_489.clas.abap similarity index 95% rename from src/07/z2ui5_cl_smpe_app_489.clas.abap rename to src/07/z2ui5_cl_smps_app_489.clas.abap index d5ba249..b039469 100644 --- a/src/07/z2ui5_cl_smpe_app_489.clas.abap +++ b/src/07/z2ui5_cl_smps_app_489.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_489 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_489 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -33,7 +33,7 @@ CLASS z2ui5_cl_smpe_app_489 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_489 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_489 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -51,7 +51,7 @@ CLASS z2ui5_cl_smpe_app_489 IMPLEMENTATION. " Counted before the control connects - our own connection is added " when the APC handler broadcasts __NEW_CONNECTION__ back to us. - connections = z2ui5_cl_smpe_app_489_ws=>get_active_connections( ). + connections = z2ui5_cl_smps_app_489_ws=>get_active_connections( ). ws_active = abap_true. ws_status = `Connected`. @@ -96,7 +96,7 @@ CLASS z2ui5_cl_smpe_app_489 IMPLEMENTATION. " Published from ABAP straight into the AMC channel - every APC " connection bound to it, this app's own included, receives it back " through the Websocket control. - z2ui5_cl_smpe_app_489_ws=>send( z2ui5_cl_ajson=>create_empty( + z2ui5_cl_smps_app_489_ws=>send( z2ui5_cl_ajson=>create_empty( )->set( iv_path = `/` iv_val = s_news @@ -113,10 +113,10 @@ CLASS z2ui5_cl_smpe_app_489 IMPLEMENTATION. METHOD on_event_received. CASE ws_message. - WHEN z2ui5_cl_smpe_app_489_ws=>c_msg-__new_connection__. + WHEN z2ui5_cl_smps_app_489_ws=>c_msg-__new_connection__. connections = connections + 1. - WHEN z2ui5_cl_smpe_app_489_ws=>c_msg-__closed__. + WHEN z2ui5_cl_smps_app_489_ws=>c_msg-__closed__. connections = connections - 1. WHEN OTHERS. @@ -163,7 +163,7 @@ CLASS z2ui5_cl_smpe_app_489 IMPLEMENTATION. ws_status = `Disconnected`. " The connection is down, so the count can no longer be maintained from " the broadcasts - read it from the channel instead. - connections = z2ui5_cl_smpe_app_489_ws=>get_active_connections( ). + connections = z2ui5_cl_smps_app_489_ws=>get_active_connections( ). client->message_box_display( text = |The WebSocket connection failed ({ client->get_event_arg( 1 ) }): { client->get_event_arg( 2 ) }| diff --git a/src/07/z2ui5_cl_smpe_app_489.clas.xml b/src/07/z2ui5_cl_smps_app_489.clas.xml similarity index 90% rename from src/07/z2ui5_cl_smpe_app_489.clas.xml rename to src/07/z2ui5_cl_smps_app_489.clas.xml index b6da7e7..37b7b0b 100644 --- a/src/07/z2ui5_cl_smpe_app_489.clas.xml +++ b/src/07/z2ui5_cl_smps_app_489.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_489 + Z2UI5_CL_SMPS_APP_489 E Websocket - News Feed 1 diff --git a/src/07/z2ui5_cl_smpe_app_489_ws.clas.abap b/src/07/z2ui5_cl_smps_app_489_ws.clas.abap similarity index 96% rename from src/07/z2ui5_cl_smpe_app_489_ws.clas.abap rename to src/07/z2ui5_cl_smps_app_489_ws.clas.abap index e656aa0..27800cd 100644 --- a/src/07/z2ui5_cl_smpe_app_489_ws.clas.abap +++ b/src/07/z2ui5_cl_smps_app_489_ws.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_489_ws DEFINITION PUBLIC +CLASS z2ui5_cl_smps_app_489_ws DEFINITION PUBLIC INHERITING FROM cl_apc_wsp_ext_stateless_base. PUBLIC SECTION. @@ -35,7 +35,7 @@ CLASS z2ui5_cl_smpe_app_489_ws DEFINITION PUBLIC ENDCLASS. -CLASS z2ui5_cl_smpe_app_489_ws IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_489_ws IMPLEMENTATION. METHOD get_producer. diff --git a/src/07/z2ui5_cl_smpe_app_489_ws.clas.xml b/src/07/z2ui5_cl_smps_app_489_ws.clas.xml similarity index 90% rename from src/07/z2ui5_cl_smpe_app_489_ws.clas.xml rename to src/07/z2ui5_cl_smps_app_489_ws.clas.xml index fa107ef..00f957a 100644 --- a/src/07/z2ui5_cl_smpe_app_489_ws.clas.xml +++ b/src/07/z2ui5_cl_smps_app_489_ws.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_489_WS + Z2UI5_CL_SMPS_APP_489_WS E Generated APC WebSocket protocol impementation class 1 diff --git a/src/08/README.md b/src/08/README.md index c81bee0..59ff859 100644 --- a/src/08/README.md +++ b/src/08/README.md @@ -2,7 +2,7 @@ *[← all packages](../../README.md)* -[`487`](z2ui5_cl_smpe_app_487.clas.abap) plays a sound stored in the **MIME +[`487`](z2ui5_cl_smps_app_487.clas.abap) plays a sound stored in the **MIME repository**, addressed by its ICF path — a success and an error tone, both shipped with this package ([`src/08/01`](01)). @@ -24,8 +24,8 @@ app checks the node and warns if it is inactive. ## The sample -Start it with `?app_start=z2ui5_cl_smpe_app_487`, or from the overview app -`?app_start=z2ui5_cl_smpe_app_00`, which lists every sample of this repository. +Start it with `?app_start=z2ui5_cl_smps_app_487`, or from the overview app +`?app_start=z2ui5_cl_smps_app_00`, which lists every sample of this repository. Type the magic key the app tells you and you get the success sound; type anything else and you get the error one. diff --git a/src/08/z2ui5_cl_smpe_app_487.clas.abap b/src/08/z2ui5_cl_smps_app_487.clas.abap similarity index 96% rename from src/08/z2ui5_cl_smpe_app_487.clas.abap rename to src/08/z2ui5_cl_smps_app_487.clas.abap index 1893f0b..23321d5 100644 --- a/src/08/z2ui5_cl_smpe_app_487.clas.abap +++ b/src/08/z2ui5_cl_smps_app_487.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_487 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_487 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -19,7 +19,7 @@ CLASS z2ui5_cl_smpe_app_487 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_487 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_487 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/08/z2ui5_cl_smpe_app_487.clas.xml b/src/08/z2ui5_cl_smps_app_487.clas.xml similarity index 90% rename from src/08/z2ui5_cl_smpe_app_487.clas.xml rename to src/08/z2ui5_cl_smps_app_487.clas.xml index 470856e..b9c95ef 100644 --- a/src/08/z2ui5_cl_smpe_app_487.clas.xml +++ b/src/08/z2ui5_cl_smps_app_487.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_487 + Z2UI5_CL_SMPS_APP_487 E MIME - Audio and Play Sound 1 diff --git a/src/09/README.md b/src/09/README.md index 1c364cc..bf502f4 100644 --- a/src/09/README.md +++ b/src/09/README.md @@ -26,7 +26,7 @@ A **Fiori Launchpad** with a tile pointing at abap2UI5 — an on-premise FLP The target mapping's URL is the abap2UI5 ICF node plus the app to start: ``` -/sap/bc/z2ui5?app_start=z2ui5_cl_smpe_app_481 +/sap/bc/z2ui5?app_start=z2ui5_cl_smps_app_481 ``` The framework detects the launchpad from that context (`scenario=LAUNCHPAD` in the @@ -38,14 +38,14 @@ message box when it was started standalone — where it then has no shell to tal | Sample | Shows | |---|---| -| [`481`](z2ui5_cl_smpe_app_481.clas.abap) | read the startup parameters the tile passed in — `client->get( )-t_comp_params` | -| [`482`](z2ui5_cl_smpe_app_482.clas.abap) | set the shell title from the backend — `follow_up_action( cs_event-set_title_launchpad )` | -| [`483`](z2ui5_cl_smpe_app_483.clas.abap) | cross-app navigation, **sender** — hands two values over to another tile | -| [`484`](z2ui5_cl_smpe_app_484.clas.abap) | cross-app navigation, **receiver** — reads them back out of its startup parameters | +| [`481`](z2ui5_cl_smps_app_481.clas.abap) | read the startup parameters the tile passed in — `client->get( )-t_comp_params` | +| [`482`](z2ui5_cl_smps_app_482.clas.abap) | set the shell title from the backend — `follow_up_action( cs_event-set_title_launchpad )` | +| [`483`](z2ui5_cl_smps_app_483.clas.abap) | cross-app navigation, **sender** — hands two values over to another tile | +| [`484`](z2ui5_cl_smps_app_484.clas.abap) | cross-app navigation, **receiver** — reads them back out of its startup parameters | -Start any of them with `?app_start=z2ui5_cl_smpe_app_` — from a tile, that is +Start any of them with `?app_start=z2ui5_cl_smps_app_` — from a tile, that is what the target mapping's URL carries. The overview app -`?app_start=z2ui5_cl_smpe_app_00` lists them too, but its Open button starts them +`?app_start=z2ui5_cl_smps_app_00` lists them too, but its Open button starts them standalone, and standalone is exactly the case where they have no shell to talk to and say so in a message box. @@ -73,8 +73,8 @@ decides which app answers to it. Configure two target mappings for the pair: | Semantic object | Action | Starts | |---|---|---| -| `Z2UI5_CL_LP_SAMPLE_03` | `display` | `z2ui5_cl_smpe_app_483` (sender) | -| `Z2UI5_CL_LP_SAMPLE_04` | `display` | `z2ui5_cl_smpe_app_484` (receiver) | +| `Z2UI5_CL_LP_SAMPLE_03` | `display` | `z2ui5_cl_smps_app_483` (sender) | +| `Z2UI5_CL_LP_SAMPLE_04` | `display` | `z2ui5_cl_smps_app_484` (receiver) | Both literals sit in the classes, so use these two names or change them there. The *back to the previous app* button in either sample needs no configuration at all — diff --git a/src/09/z2ui5_cl_smpe_app_481.clas.abap b/src/09/z2ui5_cl_smps_app_481.clas.abap similarity index 94% rename from src/09/z2ui5_cl_smpe_app_481.clas.abap rename to src/09/z2ui5_cl_smps_app_481.clas.abap index 5c0d6d8..cbc54f7 100644 --- a/src/09/z2ui5_cl_smpe_app_481.clas.abap +++ b/src/09/z2ui5_cl_smps_app_481.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_481 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_481 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -8,7 +8,7 @@ CLASS z2ui5_cl_smpe_app_481 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_481 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_481 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/09/z2ui5_cl_smpe_app_481.clas.xml b/src/09/z2ui5_cl_smps_app_481.clas.xml similarity index 91% rename from src/09/z2ui5_cl_smpe_app_481.clas.xml rename to src/09/z2ui5_cl_smps_app_481.clas.xml index 2b50616..5c067c0 100644 --- a/src/09/z2ui5_cl_smpe_app_481.clas.xml +++ b/src/09/z2ui5_cl_smps_app_481.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_481 + Z2UI5_CL_SMPS_APP_481 E Launchpad - Read Startup Parameters 1 diff --git a/src/09/z2ui5_cl_smpe_app_482.clas.abap b/src/09/z2ui5_cl_smps_app_482.clas.abap similarity index 95% rename from src/09/z2ui5_cl_smpe_app_482.clas.abap rename to src/09/z2ui5_cl_smps_app_482.clas.abap index db83a44..ec350d0 100644 --- a/src/09/z2ui5_cl_smpe_app_482.clas.abap +++ b/src/09/z2ui5_cl_smps_app_482.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_482 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_482 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -10,7 +10,7 @@ CLASS z2ui5_cl_smpe_app_482 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_482 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_482 IMPLEMENTATION. METHOD z2ui5_if_app~main. diff --git a/src/09/z2ui5_cl_smpe_app_482.clas.xml b/src/09/z2ui5_cl_smps_app_482.clas.xml similarity index 90% rename from src/09/z2ui5_cl_smpe_app_482.clas.xml rename to src/09/z2ui5_cl_smps_app_482.clas.xml index 2bb29b1..d7a602e 100644 --- a/src/09/z2ui5_cl_smpe_app_482.clas.xml +++ b/src/09/z2ui5_cl_smps_app_482.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_482 + Z2UI5_CL_SMPS_APP_482 E Launchpad - Set Shell Title 1 diff --git a/src/09/z2ui5_cl_smpe_app_483.clas.abap b/src/09/z2ui5_cl_smps_app_483.clas.abap similarity index 94% rename from src/09/z2ui5_cl_smpe_app_483.clas.abap rename to src/09/z2ui5_cl_smps_app_483.clas.abap index 2319951..4446221 100644 --- a/src/09/z2ui5_cl_smpe_app_483.clas.abap +++ b/src/09/z2ui5_cl_smps_app_483.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_483 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_483 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -14,7 +14,7 @@ CLASS z2ui5_cl_smpe_app_483 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_483 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_483 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -39,7 +39,7 @@ CLASS z2ui5_cl_smpe_app_483 IMPLEMENTATION. text = `SENDER side of launchpad cross-app navigation: the button navigates to ` && `the receiver tile via _event_client( cs_event-cross_app_nav_to_ext ), ` && `handing over the bound Product and Quantity values as navigation ` && - `parameters - the receiver (z2ui5_cl_smpe_app_484) reads them from its ` && + `parameters - the receiver (z2ui5_cl_smps_app_484) reads them from its ` && `startup parameters. ` && `Only works inside a launchpad with both tiles configured.` type = `Information` diff --git a/src/09/z2ui5_cl_smpe_app_483.clas.xml b/src/09/z2ui5_cl_smps_app_483.clas.xml similarity index 91% rename from src/09/z2ui5_cl_smpe_app_483.clas.xml rename to src/09/z2ui5_cl_smps_app_483.clas.xml index 97bb0e5..682f0b5 100644 --- a/src/09/z2ui5_cl_smpe_app_483.clas.xml +++ b/src/09/z2ui5_cl_smps_app_483.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_483 + Z2UI5_CL_SMPS_APP_483 E Launchpad - Cross-App Navigation Sender 1 diff --git a/src/09/z2ui5_cl_smpe_app_484.clas.abap b/src/09/z2ui5_cl_smps_app_484.clas.abap similarity index 94% rename from src/09/z2ui5_cl_smpe_app_484.clas.abap rename to src/09/z2ui5_cl_smps_app_484.clas.abap index a16f6a6..5154370 100644 --- a/src/09/z2ui5_cl_smpe_app_484.clas.abap +++ b/src/09/z2ui5_cl_smps_app_484.clas.abap @@ -1,4 +1,4 @@ -CLASS z2ui5_cl_smpe_app_484 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_484 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -13,7 +13,7 @@ CLASS z2ui5_cl_smpe_app_484 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_484 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_484 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -38,7 +38,7 @@ CLASS z2ui5_cl_smpe_app_484 IMPLEMENTATION. page->message_strip( text = `RECEIVER side of launchpad cross-app navigation: started via the sender ` && - `tile (z2ui5_cl_smpe_app_483), it reads the Product and Quantity values the ` && + `tile (z2ui5_cl_smps_app_483), it reads the Product and Quantity values the ` && `sender handed over from its startup parameters (t_comp_params) and shows ` && `them below. ` && `The button navigates back to the sender the same way. Only works inside ` && diff --git a/src/09/z2ui5_cl_smpe_app_484.clas.xml b/src/09/z2ui5_cl_smps_app_484.clas.xml similarity index 91% rename from src/09/z2ui5_cl_smpe_app_484.clas.xml rename to src/09/z2ui5_cl_smps_app_484.clas.xml index ef9aab8..c97da5f 100644 --- a/src/09/z2ui5_cl_smpe_app_484.clas.xml +++ b/src/09/z2ui5_cl_smps_app_484.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_484 + Z2UI5_CL_SMPS_APP_484 E Launchpad - Cross-App Navigation Receiver 1 diff --git a/src/z2ui5_cl_smpe_app_00.clas.abap b/src/z2ui5_cl_smps_app_00.clas.abap similarity index 92% rename from src/z2ui5_cl_smpe_app_00.clas.abap rename to src/z2ui5_cl_smps_app_00.clas.abap index 1ea6d2d..8c06516 100644 --- a/src/z2ui5_cl_smpe_app_00.clas.abap +++ b/src/z2ui5_cl_smps_app_00.clas.abap @@ -1,6 +1,6 @@ "!

abap2UI5 samples-stack 00 - overview

"! The entry point of this repository: every sample of every package in one -"! list, one press away. Start it with ?app_start=z2ui5_cl_smpe_app_00. +"! list, one press away. Start it with ?app_start=z2ui5_cl_smps_app_00. "! "! The Open button of a row starts its sample in a NEW BROWSER TAB, so the "! overview stays where it is and several samples can run side by side. That @@ -10,7 +10,7 @@ "! server response would be swallowed by the popup blocker. "! "! Every sample is referenced BY NAME and looked up at runtime, never with a -"! NEW z2ui5_cl_smpe_app_( ). A static reference would compile the whole +"! NEW z2ui5_cl_smps_app_( ). A static reference would compile the whole "! repository into this one class, and this class has to survive the two "! cases where that is exactly what must not happen: "! @@ -34,7 +34,7 @@ "! with nav_app_call( ) and a missing one opens its GitHub repository instead. "! Keep it in sync with the copies in abap2UI5/samples and "! abap2UI5/samples-controls. -CLASS z2ui5_cl_smpe_app_00 DEFINITION PUBLIC. +CLASS z2ui5_cl_smps_app_00 DEFINITION PUBLIC. PUBLIC SECTION. INTERFACES z2ui5_if_app. @@ -90,7 +90,7 @@ CLASS z2ui5_cl_smpe_app_00 DEFINITION PUBLIC. "! the overview app of samples-controls before its 2026-08 rename - an "! installation that predates it still answers to this name controls_old TYPE string VALUE `z2ui5_cl_dmo_app_overview` ##NO_TEXT, - stack TYPE string VALUE `z2ui5_cl_smpe_app_00` ##NO_TEXT, + stack TYPE string VALUE `z2ui5_cl_smps_app_00` ##NO_TEXT, END OF cs_overview. CONSTANTS: @@ -106,8 +106,8 @@ CLASS z2ui5_cl_smpe_app_00 DEFINITION PUBLIC. "! the demo data of the two RAP packages - called by name for the same "! reason the samples are, see the class documentation BEGIN OF cs_class, - data_trv TYPE string VALUE `Z2UI5_CL_SMPE_DATA_TRV` ##NO_TEXT, - data_trd TYPE string VALUE `Z2UI5_CL_SMPE_DATA_TRD` ##NO_TEXT, + data_trv TYPE string VALUE `Z2UI5_CL_SMPS_DATA_TRV` ##NO_TEXT, + data_trd TYPE string VALUE `Z2UI5_CL_SMPS_DATA_TRD` ##NO_TEXT, END OF cs_class. METHODS on_event. @@ -186,7 +186,7 @@ CLASS z2ui5_cl_smpe_app_00 DEFINITION PUBLIC. ENDCLASS. -CLASS z2ui5_cl_smpe_app_00 IMPLEMENTATION. +CLASS z2ui5_cl_smps_app_00 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -286,12 +286,12 @@ CLASS z2ui5_cl_smpe_app_00 IMPLEMENTATION. render_package( page = page title = `03 - RAP` - hint = `one EML statement per sample on Z2UI5_R_SMPE_TRV - the business object ships with the package` + hint = `one EML statement per sample on Z2UI5_R_SMPS_TRV - the business object ships with the package` items = client->_bind( t_rap ) ). render_package( page = page title = `04 - RAP with Draft` - hint = `Z2UI5_R_SMPE_TRD - start at 06, it carries the trick the other three reuse` + hint = `Z2UI5_R_SMPS_TRD - start at 06, it carries the trick the other three reuse` items = client->_bind( t_draft ) ). render_package( page = page @@ -562,143 +562,143 @@ CLASS z2ui5_cl_smpe_app_00 IMPLEMENTATION. ( sample( no = `315` title = `Two OData models in one view` detail = `one table bound to each, column headers from the metadata` - classname = `Z2UI5_CL_SMPE_APP_315` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_315` ) ) ). t_smart = VALUE #( ( sample( no = `313` title = `SmartFilterBar and SmartTable` detail = `with variant management - UI_PRODUCTLIST` - classname = `Z2UI5_CL_SMPE_APP_313` ) ) + classname = `Z2UI5_CL_SMPS_APP_313` ) ) ( sample( no = `314` title = `Switch the default model` detail = `device, HTTP and OData model side by side - GWSAMPLE_BASIC` - classname = `Z2UI5_CL_SMPE_APP_314` ) ) + classname = `Z2UI5_CL_SMPS_APP_314` ) ) ( sample( no = `319` title = `SmartMultiInput to SELECT-OPTIONS` detail = `UI conditions mapped 1:1 onto an ABAP range table` - classname = `Z2UI5_CL_SMPE_APP_319` ) ) + classname = `Z2UI5_CL_SMPS_APP_319` ) ) ( sample( no = `475` title = `SmartField inside a SmartForm` detail = `GWSAMPLE_BASIC` - classname = `Z2UI5_CL_SMPE_APP_475` ) ) + classname = `Z2UI5_CL_SMPS_APP_475` ) ) ( sample( no = `476` title = `SmartForm, display/edit toggle` detail = `GWSAMPLE_BASIC` - classname = `Z2UI5_CL_SMPE_APP_476` ) ) + classname = `Z2UI5_CL_SMPS_APP_476` ) ) ( sample( no = `477` title = `SmartFilterBar driving a SmartTable` detail = `GWSAMPLE_BASIC` - classname = `Z2UI5_CL_SMPE_APP_477` ) ) + classname = `Z2UI5_CL_SMPS_APP_477` ) ) ( sample( no = `478` title = `Page variant management` detail = `GWSAMPLE_BASIC` - classname = `Z2UI5_CL_SMPE_APP_478` ) ) + classname = `Z2UI5_CL_SMPS_APP_478` ) ) ( sample( no = `479` title = `SmartChart with NavigationPopover` detail = `an analytical service - you supply the path` - classname = `Z2UI5_CL_SMPE_APP_479` ) ) + classname = `Z2UI5_CL_SMPS_APP_479` ) ) ( sample( no = `493` title = `Classic FilterBar with variant management` detail = `no service needed - the data is ABAP` - classname = `Z2UI5_CL_SMPE_APP_493` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_493` ) ) ). t_rap = VALUE #( ( sample( no = `01` title = `Read a travel` detail = `READ ENTITIES` - classname = `Z2UI5_CL_SMPE_APP_01` ) ) + classname = `Z2UI5_CL_SMPS_APP_01` ) ) ( sample( no = `02` title = `Create a travel` detail = `MODIFY ... CREATE, key from MAPPED` - classname = `Z2UI5_CL_SMPE_APP_02` ) ) + classname = `Z2UI5_CL_SMPS_APP_02` ) ) ( sample( no = `03` title = `Update a travel` detail = `MODIFY ... UPDATE FIELDS` - classname = `Z2UI5_CL_SMPE_APP_03` ) ) + classname = `Z2UI5_CL_SMPS_APP_03` ) ) ( sample( no = `04` title = `Delete a travel` detail = `MODIFY ... DELETE FROM` - classname = `Z2UI5_CL_SMPE_APP_04` ) ) + classname = `Z2UI5_CL_SMPS_APP_04` ) ) ( sample( no = `05` title = `Manage travels - the complete app` detail = `01-04 plus EXECUTE and COMMIT ENTITIES RESPONSE OF` - classname = `Z2UI5_CL_SMPE_APP_05` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_05` ) ) ). t_draft = VALUE #( ( sample( no = `06` title = `Which travels have a draft?` detail = `READ ... %is_draft = mk-on` - classname = `Z2UI5_CL_SMPE_APP_06` ) ) + classname = `Z2UI5_CL_SMPS_APP_06` ) ) ( sample( no = `07` title = `Enter draft mode` detail = `EXECUTE Edit / Resume` - classname = `Z2UI5_CL_SMPE_APP_07` ) ) + classname = `Z2UI5_CL_SMPS_APP_07` ) ) ( sample( no = `08` title = `Change and save a draft` detail = `UPDATE ... %is_draft = mk-on` - classname = `Z2UI5_CL_SMPE_APP_08` ) ) + classname = `Z2UI5_CL_SMPS_APP_08` ) ) ( sample( no = `09` title = `Leave draft mode` detail = `EXECUTE Activate / Discard` - classname = `Z2UI5_CL_SMPE_APP_09` ) ) + classname = `Z2UI5_CL_SMPS_APP_09` ) ) ( sample( no = `10` title = `Manage travels with draft - the complete app` detail = `06-09 in one screen` - classname = `Z2UI5_CL_SMPE_APP_10` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_10` ) ) ). t_events = VALUE #( ( sample( no = `11` title = `Create tickets through the BO` detail = `every create and update raises an entity event` - classname = `Z2UI5_CL_SMPE_APP_11` ) ) + classname = `Z2UI5_CL_SMPS_APP_11` ) ) ( sample( no = `12` title = `The event log` detail = `what the handler wrote, newest first` - classname = `Z2UI5_CL_SMPE_APP_12` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_12` ) ) ). t_stateful = VALUE #( ( sample( no = `486` title = `The basics - a counter in a static container` detail = `counts up while the session is stateful, starts over once it is not` - classname = `Z2UI5_CL_SMPE_APP_486` ) ) + classname = `Z2UI5_CL_SMPS_APP_486` ) ) ( sample( no = `485` title = `Set and read an ENQUEUE lock` detail = `ENQUEUE_E_TABLE and ENQUEUE_READ, end and restart the session` - classname = `Z2UI5_CL_SMPE_APP_485` ) ) + classname = `Z2UI5_CL_SMPS_APP_485` ) ) ( sample( no = `490` title = `One lock per screen` detail = `every Next Lock View takes the next VARKEY, going back releases it` - classname = `Z2UI5_CL_SMPE_APP_490` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_490` ) ) ). t_websocket = VALUE #( ( sample( no = `489` title = `A news feed over WebSocket` detail = `connect, publish, list the active connections - no JavaScript` - classname = `Z2UI5_CL_SMPE_APP_489` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_489` ) ) ). t_mime = VALUE #( ( sample( no = `487` title = `Play a sound from the MIME repository` detail = `a success and an error tone, addressed by their ICF path` - classname = `Z2UI5_CL_SMPE_APP_487` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_487` ) ) ). t_launchpad = VALUE #( ( sample( no = `481` title = `Read the startup parameters` detail = `what the tile passed in - client->get( )-t_comp_params` - classname = `Z2UI5_CL_SMPE_APP_481` ) ) + classname = `Z2UI5_CL_SMPS_APP_481` ) ) ( sample( no = `482` title = `Set the shell title` detail = `follow_up_action( cs_event-set_title_launchpad )` - classname = `Z2UI5_CL_SMPE_APP_482` ) ) + classname = `Z2UI5_CL_SMPS_APP_482` ) ) ( sample( no = `483` title = `Cross-app navigation - sender` detail = `hands two values over to another tile` - classname = `Z2UI5_CL_SMPE_APP_483` ) ) + classname = `Z2UI5_CL_SMPS_APP_483` ) ) ( sample( no = `484` title = `Cross-app navigation - receiver` detail = `reads them back out of its startup parameters` - classname = `Z2UI5_CL_SMPE_APP_484` ) ) ). + classname = `Z2UI5_CL_SMPS_APP_484` ) ) ). ENDMETHOD. diff --git a/src/z2ui5_cl_smpe_app_00.clas.xml b/src/z2ui5_cl_smps_app_00.clas.xml similarity index 91% rename from src/z2ui5_cl_smpe_app_00.clas.xml rename to src/z2ui5_cl_smps_app_00.clas.xml index caa7956..2419ade 100644 --- a/src/z2ui5_cl_smpe_app_00.clas.xml +++ b/src/z2ui5_cl_smps_app_00.clas.xml @@ -3,7 +3,7 @@ - Z2UI5_CL_SMPE_APP_00 + Z2UI5_CL_SMPS_APP_00 E abap2UI5 samples-stack 00 - overview 1