Skip to content

Commit 00463ca

Browse files
authored
Merge pull request #19 from abap2UI5/new
New
2 parents 29ca877 + b790b8d commit 00463ca

File tree

6 files changed

+108
-102
lines changed

6 files changed

+108
-102
lines changed

docs/.vitepress/config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export default defineConfig({
110110
{ text: 'Device Capabilities', link: '/development/specific/ndc' },
111111
{ text: 'Drag & Drop', link: '/development/specific/drag' },
112112
{ text: 'CDS, EML', link: '/development/specific/cds' },
113+
{ text: 'OData', link: '/development/odata' },
113114
]
114115
},
115116
]
@@ -152,8 +153,8 @@ export default defineConfig({
152153
{ text: 'Stateful Sessions', link: '/advanced/stateful' },
153154
{ text: 'Downporting', link: '/advanced/downporting' },
154155
{ text: 'Renaming', link: '/advanced/renaming' },
155-
{ text: 'Launchpad KPIs', link: '/addons/kpi' },
156-
{ text: 'Remote App Calls', link: '/addons/rfc' },
156+
{ text: 'Remote App Calls', link: '/advanced/rfc' },
157+
{ text: 'Smart Controls', link: '/advanced/smart_controls' },
157158
{ text: 'Extensibility', collapsed : "false" , link: '/advanced/extensibility' , items: [
158159
{ text: 'Custom JS', link: '/advanced/extensibility/custom_js' },
159160
{ text: 'Custom Control', link: '/advanced/extensibility/custom_control' },

docs/addons/kpi.md

Lines changed: 0 additions & 99 deletions
This file was deleted.
File renamed without changes.

docs/advanced/smart_controls.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Smart Controls
2+
3+
You can use Smart Controls, check out sample `Z2UI5_CL_DEMO_APP_313`. (Experimental Feature)

docs/configuration/launchpad.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,102 @@ Integrate your abap2UI5 apps into SAP Fiori Launchpads. Find all information her
1616
* Action: display
1717
* URL: /sap/bc/ui5_ui5/sap/z2ui5
1818
* ID: z2ui5
19-
* Parameter: app_start / Z2UI5_CL_MY_APP
19+
* Parameter: app_start / Z2UI5_CL_MY_APP
20+
21+
22+
23+
### Launchpad KPIs
24+
25+
<i class="fa-brands fa-github"></i> [Repository](https://github.com/abap2UI5-addons/launchpad-kpi)
26+
27+
Find more information in the blog article on [LinkedIn.](https://www.linkedin.com/pulse/abap2ui5-host-your-apps-sap-fiori-launchpad-33-kpis-abap2ui5-uuxxe/)
28+
29+
##### Key Features
30+
* KPI Connector: Send KPIs of your abap2UI5 Apps to SAP Fiori Launchpad
31+
* User-Friendly: Implement just a single interface and method to return the KPI value
32+
* Project Consistency: Easily integrable with your abap2UI5 apps
33+
* Compatibility: Runs with SAP Netweaver (v.7.30 or higher) or S/4 Private (Standard ABAP)
34+
35+
##### Functionality
36+
<img width="800" alt="image" src="https://github.com/abap2UI5/abap2UI5-connector_launchpad_kpi/assets/102328295/c7db9e46-6876-40d8-a632-be79e2fbcb91">
37+
<br>
38+
39+
##### Preview
40+
<img width="621" alt="Pasted Graphic 3" src="https://github.com/abap2UI5/abap2UI5-connector_launchpad_kpi/assets/102328295/1b24c31e-5570-4324-92d0-5db915394ceb"><br>
41+
42+
##### Approach
43+
(1/4) Use a single Interface:
44+
```abap
45+
INTERFACE z2ui5_if_lp_kpi
46+
PUBLIC.
47+
48+
METHODS count
49+
IMPORTING
50+
filter TYPE string
51+
RETURNING
52+
VALUE(result) TYPE i.
53+
54+
ENDINTERFACE.
55+
```
56+
(2/4) Which can be used on app level to return KPIs:
57+
```abap
58+
CLASS z2ui5_cl_lp_kpi_hello_world DEFINITION
59+
PUBLIC
60+
FINAL
61+
CREATE PUBLIC .
62+
63+
PUBLIC SECTION.
64+
INTERFACES z2ui5_if_proxy_kpi.
65+
INTERFACES z2ui5_if_app.
66+
67+
ENDCLASS.
68+
69+
CLASS z2ui5_cl_proxy_kpi_hello_world IMPLEMENTATION.
70+
71+
METHOD z2ui5_if_lp_kpi~count.
72+
"kpi calculation....
73+
result = 10.
74+
ENDMETHOD.
75+
76+
METHOD z2ui5_if_app~main.
77+
"abap2UI5 app logic here...
78+
ENDMETHOD.
79+
80+
ENDCLASS.
81+
```
82+
(3/4) A generic OData service takes care of everything else (which just returns n dummy entries):
83+
```abap
84+
METHOD /iwbep/if_mgw_appl_srv_runtime~get_entityset.
85+
86+
DATA lt_result TYPE zcl_z2ui5_proxy_kpi_mpc=>tt_entity.
87+
DATA(lt_filter_cond) = io_tech_request_context->get_filter( )->get_filter_select_options( ).
88+
89+
TRY.
90+
DATA(lv_classname) = to_upper( lt_filter_cond[ property = `CLASS` ]-select_options[ 1 ]-low ).
91+
CATCH cx_root.
92+
INSERT VALUE #( id = `ERROR_NO_PARAMETER_FOUND_WITH_NAME_CLASS` ) INTO TABLE lt_result.
93+
copy_data_to_ref( EXPORTING is_data = lt_result CHANGING cr_data = er_entityset ).
94+
RETURN.
95+
ENDTRY.
96+
97+
TRY.
98+
DATA(lv_filter) = to_upper( lt_filter_cond[ property = `FILTER` ]-select_options[ 1 ]-low ).
99+
CATCH cx_root.
100+
ENDTRY.
101+
102+
DATA li_lp_kpi TYPE REF TO z2ui5_if_lp_kpi.
103+
CREATE OBJECT li_lp_kpi TYPE (lv_classname).
104+
DATA(lv_count) = li_lp_kpi->count( lv_filter ).
105+
106+
DO lv_count TIMES.
107+
INSERT VALUE #( id = sy-index ) INTO TABLE lt_result.
108+
ENDDO.
109+
110+
copy_data_to_ref( EXPORTING is_data = lt_result CHANGING cr_data = er_entityset ).
111+
112+
ENDMETHOD.
113+
```
114+
(4/4) Maintain the KPI at the Launchpad with the following endpoint:
115+
```
116+
.../sap/opu/odata/sap/Z2UI5_PROXY_KPI_SRV/ENTITYCollection/$count?$filter=CLASS eq 'z2ui5_cl_proxy_kpi_hello_world'
117+
```

docs/development/odata.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# OData
2+
3+
You can bind an OData Service to your view, check out sample `Z2UI5_CL_DEMO_APP_314`. (Experimental Feature)

0 commit comments

Comments
 (0)