Skip to content

Commit e74203d

Browse files
authored
Update dx.md
1 parent 31457c8 commit e74203d

File tree

1 file changed

+32
-3
lines changed
  • docs/advanced/technical

1 file changed

+32
-3
lines changed

docs/advanced/technical/dx.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,38 @@ go_salv->display( ).
8181
```
8282
15 lines of code, a single file, and the snippet is ready to use to transport to production for the use of end users. this is strong! unfortunately it is not cloud ready and therefor not future. let mix this with the baap2ui5 approach from above. a abap2ui5 we can create somethig quite similar with the follwoing snippet:
8383
```abap
84-
"app
85-
"app
86-
"app
84+
CLASS z2ui5_cl_test_test DEFINITION PUBLIC.
85+
PUBLIC SECTION.
86+
INTERFACES z2ui5_if_app.
87+
ENDCLASS.
88+
89+
CLASS z2ui5_cl_test_test IMPLEMENTATION.
90+
METHOD z2ui5_if_app~main.
91+
92+
SELECT FROM t100
93+
FIELDS *
94+
INTO TABLE @DATA(gt_t100)
95+
UP TO 10 ROWS.
96+
97+
DATA(tab) = z2ui5_cl_xml_view=>factory(
98+
)->table( client->_bind_local( gt_t100 ) ).
99+
100+
DATA(lo_columns) = tab->columns( ).
101+
lo_columns->column( )->text( text = `SPRSL` ).
102+
lo_columns->column( )->text( text = `ARBGB` ).
103+
lo_columns->column( )->text( text = `MSGNR` ).
104+
lo_columns->column( )->text( text = `TEXT` ).
105+
106+
DATA(lo_cells) = tab->items( )->column_list_item( ).
107+
lo_cells->text( `{SPRSL}` ).
108+
lo_cells->text( `{ARBGB}` ).
109+
lo_cells->text( `{MSGNR}` ).
110+
lo_cells->text( `{TEXT}` ).
111+
112+
client->view_display( tab ).
113+
114+
ENDMETHOD.
115+
ENDCLASS.
87116
```
88117

89118

0 commit comments

Comments
 (0)