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
6 changes: 6 additions & 0 deletions docs/.verify-refs-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ my_app_name # stands for "your class" in the ?app_start= URL on the
zcl_my_app # stands for "your app class": the name you gave defineApp in the why-cap2UI5 pitch, and the ABAP class on the views page — an ABAP app is registered by its transpiled class, not by defineApp
ClassName # literal placeholder in the URL-parameter description

# --- apps of other repositories -------------------------------------------
# Registered with defineApp in their own repository, not in cap2UI5 - and apps,
# not framework classes, whatever their z2ui5_ prefix says to the class check.
z2ui5_cl_caps_app_001 # cap2UI5/samples-stack's OData sample, linked from examples/external-odata
z2ui5_cl_caps_app_002 # cap2UI5/samples-stack's RFC sample, linked from examples/external-odata

# Upstream's frozen src/99 needs no entries any more: the plugin hosts
# upstream's whole transpiled runtime, so z2ui5_cl_xml_view and its siblings
# ARE in it (measured in the assembled output) and resolve like any other
Expand Down
21 changes: 15 additions & 6 deletions docs/examples/external-odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ An app is a CAP handler in every way that matters, so calling a remote service
is CAP's job rather than cap2UI5's: import the service, declare it in
`cds.requires`, `cds.connect.to` it, and run a query.

::: warning Not exercised by this project's test suite
Everything here is standard CAP remote-service usage, and it works from an app
because an app is ordinary handler code with `cds` in scope. But there is no
test in the repository that calls a remote service, so treat this page as the
shape rather than as a measured recipe — unlike [Hello World](./hello-world)
and [List & Detail](./list), which are files the CI runs.
::: tip Runnable and tested: cap2UI5/samples-stack
[cap2UI5/samples-stack](https://github.com/cap2UI5/samples-stack) has this page
as a project you can run. Its sample
[`Z2UI5_CL_CAPS_APP_001`](https://github.com/cap2UI5/samples-stack/blob/main/srv/apps/z2ui5_cl_caps_app_001.js)
reads SAP S/4HANA's OData service `API_BUSINESS_PARTNER` the way this page
shows — `cds.connect.to`, then `cds.ql` — and runs without the system: while no
credentials are configured, `cds watch` mocks the service. Its tests drive the
app against that mock and through a real OData V2 request. The Northwind code
below has the same shape, but no test runs it — the sample is the measured
recipe.
:::

## Import the service
Expand Down Expand Up @@ -106,4 +110,9 @@ until you refresh it deliberately.
## Next

- [**List & Detail**](./list) — the same shape against your own entities, tested
- [**cap2UI5/samples-stack**](https://github.com/cap2UI5/samples-stack) — this
page against SAP S/4HANA, and a function module in an SAP system called over
RFC with `@sap/cds-rfc`
([`Z2UI5_CL_CAPS_APP_002`](https://github.com/cap2UI5/samples-stack/blob/main/srv/apps/z2ui5_cl_caps_app_002.js))
— both runnable without the system, both tested
- [**Data Binding**](../guide/data-binding) — declaring the row type
Loading