Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"title": "Excel & E-Mail",
"runsOn": "Cloud + Standard ≥ 7.58 (2023)",
"syntax": "v757",
"note": "The XCO XLSX library and cl_bcs_mail_message are released ABAP Cloud APIs; on-premise the package needs a release that carries both. The mail sample also needs outbound mail configured.",
"shared": []
"note": "The XCO XLSX library and cl_bcs_mail_message are released ABAP Cloud APIs; on-premise the package needs a release that carries both. The mail sample also needs outbound mail configured. The import sample creates travels in the business object of package 03, so the branch carries src/03 along.",
"shared": ["00", "03"]
},
{
"dir": "14",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ package, and skip the rest:
| Call a large language model from your app — a chat, or a table summarized by AI | [`src/10`](src/10/README.md) — AI / LLM | an HTTPS destination to an LLM endpoint (SM59 or BTP), or SAP's ABAP AI SDK |
| Upload a file into a RAP business object through an action with a deep parameter | [`src/11`](src/11/README.md) — RAP File Upload | ≥ 2025, the release that carries deep action parameters with `@Semantics.largeObject`; the business object ships with the package |
| Ask a business object what is allowed, call actions with parameters, factory actions and default values, validate while the user types | [`src/12`](src/12/README.md) — RAP Actions & Permissions | ≥ 2025; the business object ships with the package |
| Read an uploaded Excel file, export a table as Excel, send it as a mail attachment | [`src/13`](src/13/README.md) — Excel & E-Mail | ≥ 2023 or ABAP Cloud; outbound mail configured for the mail sample |
| Read an uploaded Excel file, import it into a RAP business object, export a table as Excel, send it as a mail attachment | [`src/13`](src/13/README.md) — Excel & E-Mail | ≥ 2023 or ABAP Cloud; outbound mail configured for the mail sample |
| Render Adobe Forms to PDF and download one or several as a ZIP | [`src/14`](src/14/README.md) — Adobe Forms | on-premise; Adobe Document Services configured |

Each package README opens with a **What you need** section that turns the last
Expand Down
7 changes: 6 additions & 1 deletion SAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# The sample catalogue

Every app in this repository — 47 of them — with what it shows and a
Every app in this repository — 52 of them — with what it shows and a
link to its source. This is the [overview app](src/z2ui5_cl_smps_app_000.clas.abap)
as a page you can read here, before installing anything.

Expand Down Expand Up @@ -61,6 +61,9 @@ type who does not know it exists. `Ctrl+F` on this page uses them.
| Update a Travel<br>changes single fields of one instance - UPDATE FIELDS names what may be touched<br><sub>eml rap update travel modify commit table</sub> | [`Z2UI5_CL_SMPS_APP_003`](src/03/z2ui5_cl_smps_app_003.clas.abap) |
| Delete a Travel<br>deletes one instance - MODIFY ... DELETE FROM<br><sub>eml rap delete travel remove commit table</sub> | [`Z2UI5_CL_SMPS_APP_004`](src/03/z2ui5_cl_smps_app_004.clas.abap) |
| Manage Travels, the Complete App<br>01-04 plus EXECUTE and COMMIT ENTITIES RESPONSE OF<br><sub>eml rap crud travel manage popup objectstatus</sub> | [`Z2UI5_CL_SMPS_APP_005`](src/03/z2ui5_cl_smps_app_005.clas.abap) |
| Mass Change with Preview<br>Several travels changed in one go - the new values are previewed next to the old ones, one MODIFY ENTITIES ... UPDATE saves them, and a refusal is shown on its row<br><sub>mass change bulk update preview rap eml travel multiselect</sub> | [`Z2UI5_CL_SMPS_APP_029`](src/03/z2ui5_cl_smps_app_029.clas.abap) |
| Approval Worklist<br>An approval worklist - the open travels, several selected and accepted or rejected with one EXECUTE, the list shrinking as they are decided<br><sub>approval approve reject inbox worklist action execute rap eml travel multiselect</sub> | [`Z2UI5_CL_SMPS_APP_030`](src/03/z2ui5_cl_smps_app_030.clas.abap) |
| Edit with Conflict Check<br>Edit a travel without a stateful session - the app remembers LastChangedAt when it reads, and Save refuses the change if someone else saved the travel in between<br><sub>edit lock conflict concurrency etag optimistic locking lastchangedat rap eml travel</sub> | [`Z2UI5_CL_SMPS_APP_032`](src/03/z2ui5_cl_smps_app_032.clas.abap) |

### RAP with Draft — `src/04`

Expand Down Expand Up @@ -141,6 +144,8 @@ type who does not know it exists. `Ctrl+F` on this page uses them.
| **Excel** — Read an Uploaded XLSX File with XCO<br>An .xlsx file from the FileUploader read with the XCO XLSX library - the first worksheet becomes an ABAP table and is shown as it arrived<br><sub>excel xlsx upload import read spreadsheet xco fileuploader table</sub> | [`Z2UI5_CL_SMPS_APP_021`](src/13/z2ui5_cl_smps_app_021.clas.abap) |
| **Excel** — Export a Table as XLSX File with XCO<br>The table on the screen written into an .xlsx file with the XCO XLSX library and handed to the browser as a download - a header row, then one row per line<br><sub>excel xlsx export download write spreadsheet xco table download_b64_file</sub> | [`Z2UI5_CL_SMPS_APP_022`](src/13/z2ui5_cl_smps_app_022.clas.abap) |
| **E-Mail** — Send a Table as XLSX Attachment<br>A mail with an .xlsx attachment, sent with cl_bcs_mail_message - recipient, subject and text from the screen, the attachment written with the XCO XLSX library<br><sub>email mail send attachment xlsx excel cl_bcs_mail_message smtp</sub> | [`Z2UI5_CL_SMPS_APP_023`](src/13/z2ui5_cl_smps_app_023.clas.abap) |
| **Excel** — Import Travels into a RAP Business Object<br>An .xlsx file of travels checked row by row and created in the RAP business object with one MODIFY ENTITIES - every refusal lands on the row it belongs to<br><sub>excel xlsx import upload mass create rap eml business object travel fileuploader</sub> | [`Z2UI5_CL_SMPS_APP_028`](src/13/z2ui5_cl_smps_app_028.clas.abap) |
| **Excel** — Report with Selection and Export<br>A report as it is written every day - a selection with ranges, the result in a table with a total, and the same rows exported as .xlsx with XCO<br><sub>report selection screen filter range export excel xlsx download travel sql</sub> | [`Z2UI5_CL_SMPS_APP_031`](src/13/z2ui5_cl_smps_app_031.clas.abap) |

### Adobe Forms — `src/14`

Expand Down
42 changes: 24 additions & 18 deletions catalogue-derived.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"sap.m.DatePicker",
"sap.m.Dialog",
"sap.m.ToolbarSpacer",
"sap.m.ObjectIdentifier",
"sap.m.SegmentedButton",
"sap.m.SegmentedButtonItem",
"sap.tnt.InfoLabel",
"sap.m.FeedInput",
"sap.m.FeedListItem",
Expand All @@ -65,14 +68,12 @@
"sap.ui.core.Item",
"sap.m.ObjectNumber",
"z2ui5.cc.FileUploader",
"sap.m.SegmentedButton",
"sap.m.SegmentedButtonItem",
"sap.m.StepInput",
"sap.m.TextArea"
],
"counts": {
"samples": 47,
"controls": 61,
"samples": 52,
"controls": 62,
"noChain": 0
},
"samples": [
Expand All @@ -89,21 +90,26 @@
{"class":"Z2UI5_CL_SMPS_APP_010","minUi5":"1.71","needs":[],"controls":[1,2,3,39,40,22,37,6,7,10,11,12,13,18,41,15,17,38],"controlCount":55},
{"class":"Z2UI5_CL_SMPS_APP_011","minUi5":"1.71","needs":[],"controls":[1,2,3,22,37,5,7,10,11,12,13,18,41,17,38],"controlCount":33},
{"class":"Z2UI5_CL_SMPS_APP_012","minUi5":"1.71","needs":[],"controls":[1,2,3,7,10,11,12,13,18,41,17],"controlCount":18},
{"class":"Z2UI5_CL_SMPS_APP_013","minUi5":"1.71","needs":[],"controls":[1,52,22,37,5,23,7,53,10,41,54,17,38],"controlCount":28},
{"class":"Z2UI5_CL_SMPS_APP_014","minUi5":"1.71","needs":[],"controls":[1,43,44,22,45,5,7,10,14,17],"controlCount":11},
{"class":"Z2UI5_CL_SMPS_APP_015","minUi5":"1.71","needs":[],"controls":[1,2,3,22,37,5,55,7,8,10,11,12,14,17],"controlCount":38},
{"class":"Z2UI5_CL_SMPS_APP_016","minUi5":"1.71","needs":[],"controls":[1,2,3,31,22,37,5,7,10,11,12,13,18,41,17,38,56],"controlCount":35},
{"class":"Z2UI5_CL_SMPS_APP_017","minUi5":"1.71","needs":[],"controls":[1,2,3,31,37,5,6,7,10,51,11,12,13,18,41,17],"controlCount":31},
{"class":"Z2UI5_CL_SMPS_APP_018","minUi5":"1.71","needs":[],"controls":[1,2,3,40,31,22,37,5,7,57,58,10,59,11,12,60,13,18,41,15,17,38],"controlCount":50},
{"class":"Z2UI5_CL_SMPS_APP_013","minUi5":"1.71","needs":[],"controls":[1,55,22,37,5,23,7,56,10,41,57,17,38],"controlCount":28},
{"class":"Z2UI5_CL_SMPS_APP_014","minUi5":"1.71","needs":[],"controls":[1,46,47,22,48,5,7,10,14,17],"controlCount":11},
{"class":"Z2UI5_CL_SMPS_APP_015","minUi5":"1.71","needs":[],"controls":[1,2,3,22,37,5,58,7,8,10,11,12,14,17],"controlCount":38},
{"class":"Z2UI5_CL_SMPS_APP_016","minUi5":"1.71","needs":[],"controls":[1,2,3,31,22,37,5,7,10,11,12,13,18,41,17,38,59],"controlCount":35},
{"class":"Z2UI5_CL_SMPS_APP_017","minUi5":"1.71","needs":[],"controls":[1,2,3,31,37,5,6,7,10,54,11,12,13,18,41,17],"controlCount":31},
{"class":"Z2UI5_CL_SMPS_APP_018","minUi5":"1.71","needs":[],"controls":[1,2,3,40,31,22,37,5,7,43,44,10,60,11,12,61,13,18,41,15,17,38],"controlCount":50},
{"class":"Z2UI5_CL_SMPS_APP_019","minUi5":"1.71","needs":[],"controls":[1,22,37,5,23,7,10,12,41,17,38],"controlCount":15},
{"class":"Z2UI5_CL_SMPS_APP_020","minUi5":"1.71","needs":[],"controls":[1,2,3,31,5,7,10,11,12,13,18,41,17],"controlCount":25},
{"class":"Z2UI5_CL_SMPS_APP_021","minUi5":"1.71","needs":[],"controls":[1,2,3,31,5,7,10,11,12,17,56],"controlCount":27},
{"class":"Z2UI5_CL_SMPS_APP_021","minUi5":"1.71","needs":[],"controls":[1,2,3,31,5,7,10,11,12,17,59],"controlCount":27},
{"class":"Z2UI5_CL_SMPS_APP_022","minUi5":"1.71","needs":[],"controls":[1,2,3,22,5,7,10,11,12,13,18,41,17],"controlCount":22},
{"class":"Z2UI5_CL_SMPS_APP_023","minUi5":"1.71","needs":[],"controls":[1,22,37,5,23,7,10,12,60,41,17,38],"controlCount":18},
{"class":"Z2UI5_CL_SMPS_APP_024","minUi5":"1.71","needs":[],"controls":[1,2,3,37,5,6,23,7,10,11,12,60,41,17,38],"controlCount":22},
{"class":"Z2UI5_CL_SMPS_APP_023","minUi5":"1.71","needs":[],"controls":[1,22,37,5,23,7,10,12,61,41,17,38],"controlCount":18},
{"class":"Z2UI5_CL_SMPS_APP_024","minUi5":"1.71","needs":[],"controls":[1,2,3,37,5,6,23,7,10,11,12,61,41,17,38],"controlCount":22},
{"class":"Z2UI5_CL_SMPS_APP_025","minUi5":"1.71","needs":[],"controls":[1,2,3,22,37,5,23,7,10,11,12,13,18,41,17,38],"controlCount":31},
{"class":"Z2UI5_CL_SMPS_APP_026","minUi5":"1.71","needs":[],"controls":[2,3,22,37,4,45,5,7,9,10,50,11,12,13,18,15,17,38],"controlCount":24},
{"class":"Z2UI5_CL_SMPS_APP_027","minUi5":"1.71","needs":[],"controls":[2,3,37,5,7,10,51,11,12,18,17],"controlCount":12},
{"class":"Z2UI5_CL_SMPS_APP_026","minUi5":"1.71","needs":[],"controls":[2,3,22,37,4,48,5,7,9,10,53,11,12,13,18,15,17,38],"controlCount":24},
{"class":"Z2UI5_CL_SMPS_APP_027","minUi5":"1.71","needs":[],"controls":[2,3,37,5,7,10,54,11,12,18,17],"controlCount":12},
{"class":"Z2UI5_CL_SMPS_APP_028","minUi5":"1.71","needs":[],"controls":[1,55,2,3,31,5,6,7,10,11,12,13,18,41,17,59],"controlCount":38},
{"class":"Z2UI5_CL_SMPS_APP_029","minUi5":"1.71","needs":[],"controls":[1,2,3,22,37,42,6,7,10,11,12,13,18,41,17,38],"controlCount":34},
{"class":"Z2UI5_CL_SMPS_APP_030","minUi5":"1.71","needs":[],"controls":[1,2,3,42,6,7,43,44,10,11,12,18,41,17],"controlCount":29},
{"class":"Z2UI5_CL_SMPS_APP_031","minUi5":"1.71","needs":[],"controls":[1,2,3,39,31,22,37,7,10,60,11,12,13,18,41,17,38],"controlCount":44},
{"class":"Z2UI5_CL_SMPS_APP_032","minUi5":"1.71","needs":[],"controls":[1,2,3,40,22,37,5,7,10,11,12,13,18,41,15,17,38],"controlCount":38},
{"class":"Z2UI5_CL_SMPS_APP_313","minUi5":"1.71","needs":[],"controls":[7,10,19,20,21,17],"controlCount":6},
{"class":"Z2UI5_CL_SMPS_APP_314","minUi5":"1.71","needs":[],"controls":[2,3,22,7,10,11,12,13,18,17],"controlCount":31},
{"class":"Z2UI5_CL_SMPS_APP_315","minUi5":"1.71","needs":[],"controls":[2,3,7,10,11,12,13,18,17],"controlCount":35},
Expand All @@ -117,10 +123,10 @@
{"class":"Z2UI5_CL_SMPS_APP_482","minUi5":"1.71","needs":[],"controls":[1,22,37,5,7,10,17,38],"controlCount":10},
{"class":"Z2UI5_CL_SMPS_APP_483","minUi5":"1.71","needs":[],"controls":[1,22,37,5,7,10,17,38],"controlCount":11},
{"class":"Z2UI5_CL_SMPS_APP_484","minUi5":"1.71","needs":[],"controls":[1,22,37,5,7,10,17,38],"controlCount":13},
{"class":"Z2UI5_CL_SMPS_APP_485","minUi5":"1.71","needs":[],"controls":[1,31,37,5,7,10,14,42,17],"controlCount":18},
{"class":"Z2UI5_CL_SMPS_APP_486","minUi5":"1.71","needs":[],"controls":[1,31,37,7,10,14,42,17],"controlCount":11},
{"class":"Z2UI5_CL_SMPS_APP_485","minUi5":"1.71","needs":[],"controls":[1,31,37,5,7,10,14,45,17],"controlCount":18},
{"class":"Z2UI5_CL_SMPS_APP_486","minUi5":"1.71","needs":[],"controls":[1,31,37,7,10,14,45,17],"controlCount":11},
{"class":"Z2UI5_CL_SMPS_APP_487","minUi5":"1.71","needs":[],"controls":[1,22,5,7,10,12,14,17],"controlCount":9},
{"class":"Z2UI5_CL_SMPS_APP_489","minUi5":"1.71","needs":[],"controls":[1,43,44,22,37,45,5,23,7,46,47,10,48,41,42,15,17,38,49],"controlCount":21},
{"class":"Z2UI5_CL_SMPS_APP_489","minUi5":"1.71","needs":[],"controls":[1,46,47,22,37,48,5,23,7,49,50,10,51,41,45,15,17,38,52],"controlCount":21},
{"class":"Z2UI5_CL_SMPS_APP_490","minUi5":"1.71","needs":[],"controls":[1,31,22,5,7,10,13,14,17,38],"controlCount":14},
{"class":"Z2UI5_CL_SMPS_APP_493","minUi5":"1.71","needs":[],"controls":[2,3,31,22,5,7,10,11,12,35,36,32,17],"controlCount":27}
]
Expand Down
131 changes: 130 additions & 1 deletion catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"runsOn": "Cloud + Standard ≥ 7.58 (2023)",
"cloud": true,
"release": "7.58 (2023)",
"note": "The XCO XLSX library and cl_bcs_mail_message are released ABAP Cloud APIs; on-premise the package needs a release that carries both. The mail sample also needs outbound mail configured.",
"note": "The XCO XLSX library and cl_bcs_mail_message are released ABAP Cloud APIs; on-premise the package needs a release that carries both. The mail sample also needs outbound mail configured. The import sample creates travels in the business object of package 03, so the branch carries src/03 along.",
"branch": "13-excel-email",
"readme": "src/13/README.md"
},
Expand Down Expand Up @@ -536,6 +536,82 @@
"branch": "03-rap",
"setup": "src/03/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_029",
"path": "src/03/z2ui5_cl_smps_app_029.clas.abap",
"package": "src/03",
"technology": "RAP",
"title": "Mass Change with Preview",
"summary": "Several travels changed in one go - the new values are previewed next to the old ones, one MODIFY ENTITIES ... UPDATE saves them, and a refusal is shown on its row",
"keywords": [
"mass",
"change",
"bulk",
"update",
"preview",
"rap",
"eml",
"travel",
"multiselect"
],
"runsOn": "Cloud + Standard ≥ 7.54 (1909)",
"cloud": true,
"needs": "ABAP Platform >= 1909; the BO ships with this repo",
"branch": "03-rap",
"setup": "src/03/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_030",
"path": "src/03/z2ui5_cl_smps_app_030.clas.abap",
"package": "src/03",
"technology": "RAP",
"title": "Approval Worklist",
"summary": "An approval worklist - the open travels, several selected and accepted or rejected with one EXECUTE, the list shrinking as they are decided",
"keywords": [
"approval",
"approve",
"reject",
"inbox",
"worklist",
"action",
"execute",
"rap",
"eml",
"travel",
"multiselect"
],
"runsOn": "Cloud + Standard ≥ 7.54 (1909)",
"cloud": true,
"needs": "ABAP Platform >= 1909; the BO ships with this repo",
"branch": "03-rap",
"setup": "src/03/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_032",
"path": "src/03/z2ui5_cl_smps_app_032.clas.abap",
"package": "src/03",
"technology": "RAP",
"title": "Edit with Conflict Check",
"summary": "Edit a travel without a stateful session - the app remembers LastChangedAt when it reads, and Save refuses the change if someone else saved the travel in between",
"keywords": [
"edit",
"lock",
"conflict",
"concurrency",
"etag",
"optimistic",
"locking",
"lastchangedat",
"rap",
"eml",
"travel"
],
"runsOn": "Cloud + Standard ≥ 7.54 (1909)",
"cloud": true,
"needs": "ABAP Platform >= 1909; the BO ships with this repo",
"branch": "03-rap",
"setup": "src/03/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_006",
"path": "src/04/z2ui5_cl_smps_app_006.clas.abap",
Expand Down Expand Up @@ -1234,6 +1310,59 @@
"branch": "13-excel-email",
"setup": "src/13/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_028",
"path": "src/13/z2ui5_cl_smps_app_028.clas.abap",
"package": "src/13",
"technology": "Excel & E-Mail",
"title": "Excel — Import Travels into a RAP Business Object",
"summary": "An .xlsx file of travels checked row by row and created in the RAP business object with one MODIFY ENTITIES - every refusal lands on the row it belongs to",
"keywords": [
"excel",
"xlsx",
"import",
"upload",
"mass",
"create",
"rap",
"eml",
"business",
"object",
"travel",
"fileuploader"
],
"runsOn": "Cloud + Standard ≥ 7.58 (2023)",
"cloud": true,
"needs": "the XCO XLSX library; outbound mail for the mail sample",
"branch": "13-excel-email",
"setup": "src/13/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_031",
"path": "src/13/z2ui5_cl_smps_app_031.clas.abap",
"package": "src/13",
"technology": "Excel & E-Mail",
"title": "Excel — Report with Selection and Export",
"summary": "A report as it is written every day - a selection with ranges, the result in a table with a total, and the same rows exported as .xlsx with XCO",
"keywords": [
"report",
"selection",
"screen",
"filter",
"range",
"export",
"excel",
"xlsx",
"download",
"travel",
"sql"
],
"runsOn": "Cloud + Standard ≥ 7.58 (2023)",
"cloud": true,
"needs": "the XCO XLSX library; outbound mail for the mail sample",
"branch": "13-excel-email",
"setup": "src/13/README.md"
},
{
"class": "Z2UI5_CL_SMPS_APP_024",
"path": "src/14/z2ui5_cl_smps_app_024.clas.abap",
Expand Down
14 changes: 12 additions & 2 deletions src/03/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ rest of the samples read themselves:

## Find the snippet

Five samples: four single statements, then one complete app. The numbers are the
reading order.
Four single statements, then one complete app, then three everyday jobs. The
numbers are the reading order.

| You want to | Statement | Sample |
|---|---|---|
Expand All @@ -105,6 +105,16 @@ made sense:
|---|---|---|
| call a BO action, save and catch what failed | `MODIFY … EXECUTE`, `COMMIT ENTITIES RESPONSE OF` | [`005` manage travels](z2ui5_cl_smps_app_005.clas.abap) |

**Everyday jobs** — three apps that each do one thing a real project needs, on the
same business object. Each one is the worked example of a guide in the
[documentation](https://abap2ui5.github.io/docs/everyday/):

| | | |
|---|---|---|
| change many travels at once, preview first, every refusal on its row | `MODIFY … UPDATE` for all rows, answers by key | [`029` mass change](z2ui5_cl_smps_app_029.clas.abap) |
| a worklist of open travels, accept or reject several at once | `MODIFY … EXECUTE … RESULT` | [`030` approval worklist](z2ui5_cl_smps_app_030.clas.abap) |
| edit without a lock while typing, refuse a save over someone else's | `LastChangedAt` checked after the `UPDATE` took the lock | [`032` edit with conflict check](z2ui5_cl_smps_app_032.clas.abap) |

## The snippets

**Read** — no SELECT, no OData.
Expand Down
Loading
Loading