Skip to content

Latest commit

 

History

History
189 lines (148 loc) · 18.7 KB

SAMPLES.md

File metadata and controls

189 lines (148 loc) · 18.7 KB

The sample catalogue

Every app in this repository — 52 of them — with what it shows and a link to its source. This is the overview app as a page you can read here, before installing anything.

What makes these different from abap2UI5/samples: each one needs something from your stack — an OData service, a RAP behavior definition, an APC channel, the Fiori Launchpad. The package README says what, and a sample that needs nothing but abap2UI5 belongs in the other repository.

To run one: install abap2UI5, pull this repository with abapGit, do the setup its package README asks for, then open <your endpoint>?app_start=<the class in the right-hand column>. Or run Z2UI5_CL_SMPS_APP_000 and click through the list — that is the same catalogue, in the app.

To read one: click the class. Every sample is a single class, so the link is the whole sample.

The small type under a title is the sample's search terms — what somebody would type who does not know it exists. Ctrl+F on this page uses them.


abap2UI5 - samples-stack — src

Sample Class
Overview — All Samples in This Repository
every sample in this repository, grouped by what it needs from the system
overview launchpad index start nav_app_call popover all samples
Z2UI5_CL_SMPS_APP_000

OData — src/01

Sample Class
Two Models in One View
one table bound to each, column headers from the metadata
odata model service entityset switch_default_model_path external binding
Z2UI5_CL_SMPS_APP_315

Smart Controls — src/02

Sample Class
Smart Table and Variants
with variant management - UI_PRODUCTLIST
smarttable smartfilterbar variant management annotations controlconfiguration odata
Z2UI5_CL_SMPS_APP_313
Switch Default Model
device, HTTP and OData model side by side - GWSAMPLE_BASIC
switch_default_model_path odata model default binding smart controls
Z2UI5_CL_SMPS_APP_314
Smart Multi Input
UI conditions mapped 1:1 onto an ABAP range table
smartmultiinput multi input tokens smart controls odata
Z2UI5_CL_SMPS_APP_319
SmartField in a SmartForm
needs the GWSAMPLE_BASIC OData service
smartform smartfield group groupelement columnlayout annotations
Z2UI5_CL_SMPS_APP_475
SmartForm, editable toggle
needs the GWSAMPLE_BASIC OData service
smartform smartfield editable toggle edit mode
Z2UI5_CL_SMPS_APP_476
SmartFilterBar and SmartTable
needs the GWSAMPLE_BASIC OData service
smartfilterbar smarttable filter search annotations controlconfiguration
Z2UI5_CL_SMPS_APP_477
Page Variant Management
needs the GWSAMPLE_BASIC OData service
smartvariantmanagement page variant save smarttable smartfilterbar filter
Z2UI5_CL_SMPS_APP_478
SmartChart with NavPopover
an analytical service - you supply the path
smartchart navpopover semanticobjectcontroller chart semantic object navigation
Z2UI5_CL_SMPS_APP_479
classic FilterBar variants
no service needed - the data is ABAP
filterbar filtergroupitem smartvariantmanagement classic filter variant
Z2UI5_CL_SMPS_APP_493

RAP — src/03

Sample Class
Read a Travel
reads one instance by its key - a missing key comes back in FAILED, not as an exception
eml rap read travel select entity behavior
Z2UI5_CL_SMPS_APP_001
Create a Travel
MODIFY ... CREATE, key from MAPPED
eml rap create travel insert commit datepicker
Z2UI5_CL_SMPS_APP_002
Update a Travel
changes single fields of one instance - UPDATE FIELDS names what may be touched
eml rap update travel modify commit table
Z2UI5_CL_SMPS_APP_003
Delete a Travel
deletes one instance - MODIFY ... DELETE FROM
eml rap delete travel remove commit table
Z2UI5_CL_SMPS_APP_004
Manage Travels, the Complete App
01-04 plus EXECUTE and COMMIT ENTITIES RESPONSE OF
eml rap crud travel manage popup objectstatus
Z2UI5_CL_SMPS_APP_005
Mass Change with Preview
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
mass change bulk update preview rap eml travel multiselect
Z2UI5_CL_SMPS_APP_029
Approval Worklist
An approval worklist - the open travels, several selected and accepted or rejected with one EXECUTE, the list shrinking as they are decided
approval approve reject inbox worklist action execute rap eml travel multiselect
Z2UI5_CL_SMPS_APP_030
Edit with Conflict Check
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
edit lock conflict concurrency etag optimistic locking lastchangedat rap eml travel
Z2UI5_CL_SMPS_APP_032

RAP with Draft — src/04

Sample Class
Which Travels Have One
READ ... %is_draft = mk-on
eml rap draft list objectstatus which travels
Z2UI5_CL_SMPS_APP_006
Enter Draft Mode
Edit copies the active instance into a new draft, Resume picks up an existing one
eml rap draft edit enter lock mode
Z2UI5_CL_SMPS_APP_007
Change and Save a Draft
UPDATE ... %is_draft = mk-on
eml rap draft change save modify
Z2UI5_CL_SMPS_APP_008
Leave Draft Mode
EXECUTE Activate / Discard
eml rap draft discard resume leave mode
Z2UI5_CL_SMPS_APP_009
Complete Draft Handling
a whole app, not a snippet - the complete draft lifecycle in one screen
eml rap draft handling crud popup complete
Z2UI5_CL_SMPS_APP_010

Business Events — src/05

Sample Class
Ticket App
every create and update raises an entity event
rap business events ticket raise publish
Z2UI5_CL_SMPS_APP_011
Event Log App
what the handler wrote, newest first
rap business events log consumer subscribe
Z2UI5_CL_SMPS_APP_012

Stateful Sessions / Locks — src/06

Sample Class
Stateful Sessions — Locks
ENQUEUE_E_TABLE and ENQUEUE_READ, end and restart the session
stateful session lock enqueue dequeue set_session_stateful
Z2UI5_CL_SMPS_APP_485
Stateful Sessions — Basics
counts up while the session is stateful, starts over once it is not
stateful session basics state roundtrip set_session_stateful
Z2UI5_CL_SMPS_APP_486
Stateful Sessions — Navigation and Locks
every Next Lock View takes the next VARKEY, going back releases it
stateful session lock navigation nav_app_call check_on_navigated
Z2UI5_CL_SMPS_APP_490

AMC/APC — src/07

Sample Class
Websocket — News Feed
connect, publish, list the active connections - no JavaScript
websocket apc amc push channel feedlistitem news popover
Z2UI5_CL_SMPS_APP_489

MIME Play Audio — src/08

Sample Class
MIME — Audio and Play Sound
a success and an error tone, addressed by their ICF path
mime audio sound play_audio mp3 follow_up_action
Z2UI5_CL_SMPS_APP_487

Launchpad — src/09

Sample Class
Build the URL of a Launchpad App
Builds the URL of a launchpad app from semantic object, action and parameters - through cl_lsapi_manager where the system has it, as an intent URL of its own where it does not
launchpad fiori flp url intent semantic object action link cl_lsapi_manager open_new_tab
Z2UI5_CL_SMPS_APP_025
Smart Link Popover with getLinks
a list of products whose ids are smart links - a press asks the launchpad which apps the user may open for the product and lists them in a popover
launchpad fiori flp smart link popover getlinks intent semantic object cross_app_nav_get_links
Z2UI5_CL_SMPS_APP_026
Full Width
follow_up_action( cs_event-set_app_full_width ) - the app takes the launchpad's whole width instead of the shell's letterbox
launchpad fiori flp full width letterbox screen width fullwidth set_app_full_width follow_up_action
Z2UI5_CL_SMPS_APP_027
Read Startup Parameters
what the tile passed in - client->get( )-t_comp_params
launchpad fiori flp startup parameters intent
Z2UI5_CL_SMPS_APP_481
Set Shell Title
follow_up_action( cs_event-set_title_launchpad )
launchpad fiori flp shell title follow_up_action
Z2UI5_CL_SMPS_APP_482
Cross-App Navigation Sender
hands two values over to another tile
launchpad fiori flp cross app navigation sender intent
Z2UI5_CL_SMPS_APP_483
Cross-App Navigation Receiver
reads them back out of its startup parameters
launchpad fiori flp cross app navigation receiver intent
Z2UI5_CL_SMPS_APP_484

AI / LLM — src/10

Sample Class
Settings and Connection Test
where the two AI samples get their model from - provider, destination, model and key, saved once and tested with one press
ai llm chat settings configuration destination sm59 islm
Z2UI5_CL_SMPS_APP_013
Chat with a Language Model
a chat with a real language model over HTTPS - the conversation goes out, the answer comes back, the provider is configuration
ai llm chat chatbot feedinput feedlistitem anthropic openai
Z2UI5_CL_SMPS_APP_014
Summarize a Table with AI
a table of sales figures and one button - the rows go to a language model as context, its summary comes back into a panel
ai llm chat summarize table prompt hygiene anthropic
Z2UI5_CL_SMPS_APP_015

RAP File Upload — src/11

Sample Class
Deep Action Parameter
EXECUTE uploadFile with a deep parameter - the file travels as a stream property, download and delete included
file upload attachment rap action deep parameter largeobject stream eml fileuploader download
Z2UI5_CL_SMPS_APP_016

RAP Actions and Permissions — src/12

Sample Class
RAP Actions — Feature Control with GET PERMISSIONS
GET PERMISSIONS asks the business object what may happen to each request - the buttons follow its answer, and the business object refuses the rest anyway
rap eml feature control instance features get permissions enabled disabled buttons
Z2UI5_CL_SMPS_APP_017
RAP Actions — Parameters, Factory Actions, Defaults
Actions with a parameter - a default function proposes a new request, a static factory action creates it, a factory action copies one, and reject asks for its reason in a popup
rap eml action parameter abstract entity factory action default function popup create copy reject
Z2UI5_CL_SMPS_APP_018
RAP Actions — Validate on Change with a Determine Action
A determine action runs the validation of the business object while the user types - the quantity is checked on every change, and nothing is saved until Save
rap eml determine action validation check on change valuestate messages without saving
Z2UI5_CL_SMPS_APP_019
RAP Actions — One Business Object, Two Contracts
One business object, two contracts - approve through the projection Z2UI5_C_SMPS_REQ or on the business object itself, and the handler records which one it was
rap eml projection behavior definition contract cl_abap_behv_aux interface consumer approve
Z2UI5_CL_SMPS_APP_020

Excel and E-Mail — src/13

Sample Class
Excel — Read an Uploaded XLSX File with XCO
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
excel xlsx upload import read spreadsheet xco fileuploader table
Z2UI5_CL_SMPS_APP_021
Excel — Export a Table as XLSX File with XCO
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
excel xlsx export download write spreadsheet xco table download_b64_file
Z2UI5_CL_SMPS_APP_022
E-Mail — Send a Table as XLSX Attachment
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
email mail send attachment xlsx excel cl_bcs_mail_message smtp
Z2UI5_CL_SMPS_APP_023
Excel — Import Travels into a RAP Business Object
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
excel xlsx import upload mass create rap eml business object travel fileuploader
Z2UI5_CL_SMPS_APP_028
Excel — Report with Selection and Export
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
report selection screen filter range export excel xlsx download travel sql
Z2UI5_CL_SMPS_APP_031

Adobe Forms — src/14

Sample Class
Render to PDF, Download One or a ZIP
Renders Adobe Forms of the system to PDF with FP_JOB_OPEN and the generated function module - one form as a PDF download, several at once as one ZIP file
adobe forms pdf ads fp_job_open print form output zip download cl_abap_zip
Z2UI5_CL_SMPS_APP_024

Not samples

21 classes here are not apps and carry no tile: behavior pools, demo data, an event consumer, the generated APC protocol class and the language-model layer the AI samples call. They are reached by a sample rather than looked up, which is why they are exempt from the keyword rule — but a catalogue that claims to account for the tree has to be able to say they exist.

Class What it is
Z2UI5_CL_SMPS_CONTEXT abap2UI5 EML sample - shared context
Z2UI5_CL_SMPS_BP_TRV abap2UI5 EML sample - behavior pool
Z2UI5_CL_SMPS_DATA_TRV abap2UI5 EML sample - demo data
Z2UI5_CL_SMPS_BP_TRD abap2UI5 EML sample - behavior pool (draft)
Z2UI5_CL_SMPS_DATA_TRD abap2UI5 EML sample - demo data (draft)
Z2UI5_CL_SMPS_BP_TCK RAP Events Demo - Ticket Behavior Pool
Z2UI5_CL_SMPS_EVT_TCK RAP Events Demo - Local Event Consumer (writes log)
Z2UI5_CL_SMPS_APP_489_WS Generated APC WebSocket protocol implementation class
Z2UI5_CL_SMPS_LLM_CLAUDE LLM - Anthropic Messages API
Z2UI5_CL_SMPS_LLM_FACTORY LLM - Configuration and Provider Factory
Z2UI5_CL_SMPS_LLM_JSON LLM - JSON Written and Read by Hand
Z2UI5_CL_SMPS_LLM_OPENAI LLM - OpenAI-Compatible Chat Completions
Z2UI5_CX_SMPS_LLM LLM - Exception
Z2UI5_CL_SMPS_LLM_SM59 LLM - HTTP Transport over an SM59 Destination
Z2UI5_CL_SMPS_LLM_CLOUD LLM - HTTP Transport for ABAP Cloud
Z2UI5_CL_SMPS_LLM_ISLM LLM - SAP ABAP AI SDK (ISLM)
Z2UI5_CL_SMPS_BP_FIL abap2UI5 RAP sample - file behavior pool
Z2UI5_CL_SMPS_BP_REQ abap2UI5 RAP sample - request behavior pool
Z2UI5_CL_SMPS_DATA_REQ abap2UI5 RAP sample - request demo data
Z2UI5_CL_SMPS_PERM_REQ abap2UI5 RAP sample - request permissions
Z2UI5_CL_SMPS_XLSX abap2UI5 sample - Excel read and write with XCO