Skip to content

Commit 7fdbb5a

Browse files
authored
Update cloud.md
1 parent f8d23cd commit 7fdbb5a

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

docs/technical/cloud.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,68 @@ While the framework is cloud ready, each individual app must follow the same dev
3535
Example (cloud-ready):
3636

3737
```abap
38-
test
38+
CLASS z2ui5_cl_demo_app_003 DEFINITION PUBLIC.
39+
PUBLIC SECTION.
40+
INTERFACES z2ui5_if_app.
41+
DATA mt_salesorder TYPE STANDARD TABLE OF I_SalesOrder WITH EMPTY KEY.
42+
43+
ENDCLASS.
44+
45+
CLASS z2ui5_cl_demo_app_003 IMPLEMENTATION.
46+
47+
METHOD z2ui5_if_app~main.
48+
49+
SELECT FROM I_SalesOrder
50+
FIELDS salesorder, salesorganization
51+
INTO TABLE @mt_salesorder
52+
UP TO 10 ROWS.
53+
54+
DATA(view) = z2ui5_cl_xml_view=>factory( )->list(
55+
headertext = 'List Ouput'
56+
items = client->_bind_edit( mt_salesorder )
57+
mode = `SingleSelectMaster`
58+
selectionchange = client->_event( 'SELCHANGE' )
59+
)->standard_list_item(
60+
title = '{SALESORDER}'
61+
description = '{SALESORGANIZATION}' ).
62+
client->view_display( view ).
63+
64+
ENDMETHOD.
65+
66+
ENDCLASS.
3967
```
4068

4169
Example (not cloud-ready):
4270
```abap
43-
test
71+
CLASS z2ui5_cl_demo_app_003 DEFINITION PUBLIC.
72+
PUBLIC SECTION.
73+
INTERFACES z2ui5_if_app.
74+
DATA mt_salesorder TYPE STANDARD TABLE OF vbak WITH EMPTY KEY.
75+
76+
ENDCLASS.
77+
78+
CLASS z2ui5_cl_demo_app_003 IMPLEMENTATION.
79+
80+
METHOD z2ui5_if_app~main.
81+
82+
SELECT FROM vbak
83+
FIELDS vbeln, vkorg
84+
INTO TABLE @mt_salesorder
85+
UP TO 10 ROWS.
86+
87+
DATA(view) = z2ui5_cl_xml_view=>factory( )->list(
88+
headertext = 'List Ouput'
89+
items = client->_bind_edit( mt_salesorder )
90+
mode = `SingleSelectMaster`
91+
selectionchange = client->_event( 'SELCHANGE' )
92+
)->standard_list_item(
93+
title = '{VBELN}'
94+
description = '{VKORG}' ).
95+
client->view_display( view ).
96+
97+
ENDMETHOD.
98+
99+
ENDCLASS.
44100
```
45101

46102
So always follow cloud-ready development principles to ensure your apps are portable, upgrade-stable, and suitable for ABAP Cloud environments.

0 commit comments

Comments
 (0)