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
4 changes: 2 additions & 2 deletions docs/advanced/fiori.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ METHOD z2ui5_if_app~main.

DATA(lr_view) = z2ui5_cl_xml_view=>factory( ).
DATA(lr_page) = lr_view->page( showheader = abap_false
backgrounddesign = 'List' )->content( ). "Backgrounddesign "List" sets a white background color
backgrounddesign = `List` )->content( ). "Backgrounddesign "List" sets a white background color

lr_page->text( 'TEXT' ).
lr_page->text( `TEXT` ).

client->view_display( lr_view->stringify( ) ).

Expand Down
6 changes: 3 additions & 3 deletions docs/advanced/tools/srtti.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ CLASS z2ui5_cl_app IMPLEMENTATION.
FIELD-SYMBOLS <tab> TYPE ty_t_tab.
ASSIGN mr_tab->* TO <tab>.
<tab> = VALUE #(
( title = 'entry 01' value = 'red' descr = 'this is a description' )
( title = 'entry 02' value = 'blue' descr = 'this is a description' ) ).
( title = `entry 01` value = `red` descr = `this is a description` )
( title = `entry 02` value = `blue` descr = `this is a description` ) ).

client->message_box_display( `this works out of the box` ).

Expand All @@ -63,7 +63,7 @@ CLASS z2ui5_cl_app IMPLEMENTATION.

METHOD z2ui5_if_app~main.

DATA(o_struct_desc) = cl_abap_structdescr=>describe_by_name( 'USR01' ).
DATA(o_struct_desc) = cl_abap_structdescr=>describe_by_name( `USR01` ).
DATA(o_table_desc) = cl_abap_tabledescr=>create(
p_line_type = CAST #( o_struct_desc )
p_table_kind = cl_abap_tabledescr=>tablekind_std
Expand Down
14 changes: 7 additions & 7 deletions docs/configuration/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ CLASS z2ui5_cl_launchpad_handler IMPLEMENTATION.

METHOD if_http_extension~handle_request.
" Read the app name from the request
DATA(lv_app) = server->request->get_header_field( 'APP_START' ).
DATA(lv_app) = server->request->get_header_field( `APP_START` ).

" Restrict access to a specific app
IF lv_app <> 'MY_APP'.
IF lv_app <> `MY_APP`.
RETURN.
ENDIF.

Expand All @@ -54,11 +54,11 @@ CLASS z2ui5_cl_launchpad_handler IMPLEMENTATION.

METHOD if_http_extension~handle_request.
" Read the app name from the request
DATA(lv_app) = server->request->get_header_field( 'APP_START' ).
DATA(lv_app) = server->request->get_header_field( `APP_START` ).

" Perform an authorization check
AUTHORITY-CHECK OBJECT 'Z_APP_AUTH'
ID 'APP' FIELD lv_app.
AUTHORITY-CHECK OBJECT `Z_APP_AUTH`
ID `APP` FIELD lv_app.

IF sy-subrc <> 0.
" Authorization failed, deny access
Expand Down
2 changes: 1 addition & 1 deletion docs/development/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ UI5 Control properties can be used not only to display data but also to trigger
You can trigger backend processing when an event occurs using the `client->_event` method.

#### Basic
As an example, we will use the `press` property of a button. To trigger events in the backend, assign the result of `client->_event('MY_EVENT_NAME')` to the relevant UI5 control property. Once triggered, the backend can retrieve the event details with `client->get( )-event`.
As an example, we will use the `press` property of a button. To trigger events in the backend, assign the result of `client->_event(`MY_EVENT_NAME`)` to the relevant UI5 control property. Once triggered, the backend can retrieve the event details with `client->get( )-event`.

```abap
METHOD z2ui5_if_app~main.
Expand Down
4 changes: 2 additions & 2 deletions docs/development/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can directly pass common message structures, objects, and variables to the f
```abap
METHOD z2ui5_if_app~main.

MESSAGE ID 'NET' TYPE 'I' NUMBER '001' into data(lv_dummy).
MESSAGE ID `NET` TYPE `I` NUMBER `001` into data(lv_dummy).
client->message_box_display( sy ).

ENDMETHOD.
Expand All @@ -58,7 +58,7 @@ ENDMETHOD.
METHOD z2ui5_if_app~main.

DATA lt_bapiret TYPE STANDARD TABLE OF bapiret2.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
CALL FUNCTION `BAPI_USER_GET_DETAIL`
EXPORTING
username = sy-uname
TABLES
Expand Down
2 changes: 1 addition & 1 deletion docs/development/model/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CLASS z2ui5_cl_sample_device IMPLEMENTATION.

client->view_display( lo_view->stringify( ) ).

IF client->get( )-event = 'POST'.
IF client->get( )-event = `POST`.
"process device info here...
ENDIF.

Expand Down
22 changes: 11 additions & 11 deletions docs/development/model/expression_binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ CLASS z2ui5_cl_demo_app_max_val IMPLEMENTATION.

DATA(view) = z2ui5_cl_xml_view=>factory( ).
view->shell( )->page(
)->label( 'max value of the first two inputs'
)->input( '{ type : "sap.ui.model.type.Integer",' &&
' path:"' && client->_bind( val = input31
path = abap_true ) && '" }'
)->input( '{ type : "sap.ui.model.type.Integer",' && |\n| &&
' path:"' && client->_bind( val = input32
path = abap_true ) && '" }'
)->label( `max value of the first two inputs`
)->input( `{ type : "sap.ui.model.type.Integer",` &&
` path:"` && client->_bind( val = input31
path = abap_true ) && `" }`
)->input( `{ type : "sap.ui.model.type.Integer",` && |\n| &&
` path:"` && client->_bind( val = input32
path = abap_true ) && `" }`
)->input(
value = '{= Math.max($' && client->_bind( input31 ) &&', $' && client->_bind( input32 ) && ') }'
enabled = abap_false ).
Expand All @@ -51,13 +51,13 @@ CLASS z2ui5_cl_demo_editable IMPLEMENTATION.

DATA(view) = z2ui5_cl_xml_view=>factory( ).
view->shell( )->page(
)->label( 'only enabled when the quantity equals 500'
)->input( '{ type : "sap.ui.model.type.Integer",' &&
' path:"' && client->_bind( val = quantity
)->label( `only enabled when the quantity equals 500`
)->input( `{ type : "sap.ui.model.type.Integer",` &&
` path:"` && client->_bind( val = quantity
path = abap_true ) && `" }`
)->input(
value = product
enabled = '{= 500===$' && client->_bind( quantity ) && ' }' ).
enabled = `{= 500===$` && client->_bind( quantity ) && ` }` ).
client->view_display( view->stringify( ) ).

ENDMETHOD.
Expand Down
24 changes: 12 additions & 12 deletions docs/development/model/odata.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ DATA(tab) = z2ui5_cl_xml_view=>factory( )->page( )->table(
growing = abap_true ).

tab->columns(
)->column( )->text( 'AirportID' )->get_parent(
)->column( )->text( 'Name' )->get_parent(
)->column( )->text( 'City' )->get_parent(
)->column( )->text( 'CountryCode' ).
)->column( )->text( `AirportID` )->get_parent(
)->column( )->text( `Name` )->get_parent(
)->column( )->text( `City` )->get_parent(
)->column( )->text( `CountryCode` ).

tab->items( )->column_list_item( )->cells(
)->text( '{FLIGHT>AirportID}'
Expand All @@ -45,10 +45,10 @@ METHOD z2ui5_if_app~main.
growing = abap_true ).

tab->columns(
)->column( )->text( 'AirportID' )->get_parent(
)->column( )->text( 'Name' )->get_parent(
)->column( )->text( 'City' )->get_parent(
)->column( )->text( 'CountryCode' ).
)->column( )->text( `AirportID` )->get_parent(
)->column( )->text( `Name` )->get_parent(
)->column( )->text( `City` )->get_parent(
)->column( )->text( `CountryCode` ).

tab->items( )->column_list_item( )->cells(
)->text( '{FLIGHT>AirportID}'
Expand All @@ -75,10 +75,10 @@ DATA(tab) = z2ui5_cl_xml_view=>factory( )->page( )->table(
growing = abap_true ).

tab->columns(
)->column( )->text( 'TravelID' )->get_parent(
)->column( )->text( 'BookingID' )->get_parent(
)->column( )->text( 'BookingSupplementID' )->get_parent(
)->column( )->text( 'SupplementID' )->get_parent( ).
)->column( )->text( `TravelID` )->get_parent(
)->column( )->text( `BookingID` )->get_parent(
)->column( )->text( `BookingSupplementID` )->get_parent(
)->column( )->text( `SupplementID` )->get_parent( ).

tab->items( )->column_list_item( )->cells(
)->text( '{TRAVEL>TravelID}'
Expand Down
58 changes: 29 additions & 29 deletions docs/development/model/tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ CLASS z2ui5_cl_sample_tab IMPLEMENTATION.
DO 100 TIMES.
INSERT value #(
count = sy-index
value = 'red'
descr = 'this is a description' ) INTO TABLE mt_itab.
value = `red`
descr = `this is a description` ) INTO TABLE mt_itab.
ENDDO.

DATA(tab) = z2ui5_cl_xml_view=>factory( )->page(
)->table( client->_bind( mt_itab ) ).
tab->columns(
)->column( )->text( 'Counter' )->get_parent(
)->column( )->text( 'Value' )->get_parent(
)->column( )->text( 'Description' ).
)->column( )->text( `Counter` )->get_parent(
)->column( )->text( `Value` )->get_parent(
)->column( )->text( `Description` ).
tab->items( )->column_list_item( )->cells(
)->text( '{COUNT}'
)->text( '{VALUE}'
Expand All @@ -52,16 +52,16 @@ Making a table editable is a simple change. You just need to switch the binding
DO 100 TIMES.
INSERT value #(
count = sy-index
value = 'red'
descr = 'this is a description' ) INTO TABLE mt_itab.
value = `red`
descr = `this is a description` ) INTO TABLE mt_itab.
ENDDO.

DATA(tab) = z2ui5_cl_xml_view=>factory( )->page(
)->table( client->_bind_edit( mt_itab ) ).
tab->columns(
)->column( )->text( 'Count' )->get_parent(
)->column( )->text( 'Value' )->get_parent(
)->column( )->text( 'Description' ).
)->column( )->text( `Count` )->get_parent(
)->column( )->text( `Value` )->get_parent(
)->column( )->text( `Description` ).
tab->items( )->column_list_item( )->cells(
)->text( '{COUNT}'
)->text( '{VALUE}'
Expand Down Expand Up @@ -105,27 +105,27 @@ CLASS z2ui5_cl_sample_tree IMPLEMENTATION.
METHOD z2ui5_if_app~main.

prodh_nodes = VALUE #( (
text = 'Machines'
prodh = '00100'
text = `Machines`
prodh = `00100`
nodes = VALUE #( (
text = 'Pumps'
prodh = '0010000100'
text = `Pumps`
prodh = `0010000100`
nodes = VALUE #( (
text = 'Pump 001'
prodh = '001000010000000100' ) (
text = 'Pump 002'
prodh = '001000010000000105' ) )
text = `Pump 001`
prodh = `001000010000000100` ) (
text = `Pump 002`
prodh = `001000010000000105` ) )
) ) ) (
text = 'Paints'
prodh = '00110'
text = `Paints`
prodh = `00110`
nodes = VALUE #( (
text = 'Gloss paints'
prodh = '0011000105'
text = `Gloss paints`
prodh = `0011000105`
nodes = VALUE #( (
text = 'Paint 001'
prodh = '001100010500000100' ) (
text = 'Paint 002'
prodh = '001100010500000105' )
text = `Paint 001`
prodh = `001100010500000100` ) (
text = `Paint 002`
prodh = `001100010500000105` )
) ) ) ) ).

DATA(tree) = z2ui5_cl_xml_view=>factory( )->page(
Expand Down Expand Up @@ -163,9 +163,9 @@ CLASS z2ui5_cl_sample_nested_structures IMPLEMENTATION.
METHOD z2ui5_if_app~main.

mt_itab = VALUE #(
( product = 'table' s_details = VALUE #( create_date = `01.01.2023` create_by = `Peter` ) )
( product = 'chair' s_details = VALUE #( create_date = `25.10.2022` create_by = `Frank` ) )
( product = 'sofa' s_details = VALUE #( create_date = `12.03.2024` create_by = `George` ) ) ).
( product = `table` s_details = VALUE #( create_date = `01.01.2023` create_by = `Peter` ) )
( product = `chair` s_details = VALUE #( create_date = `25.10.2022` create_by = `Frank` ) )
( product = `sofa` s_details = VALUE #( create_date = `12.03.2024` create_by = `George` ) ) ).

DATA(tab) = z2ui5_cl_xml_view=>factory( )->table( client->_bind( mt_itab ) ).

Expand Down
2 changes: 1 addition & 1 deletion docs/development/navigation/app_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CLASS z2ui5_cl_sample_app_state IMPLEMENTATION.
IF client->check_on_navigated( ).
DATA(view) = z2ui5_cl_xml_view=>factory( ).
client->view_display(
view->label( 'quantity'
view->label( `quantity`
)->input( client->_bind_edit( mv_quantity )
)->button(
text = `post with state`
Expand Down
2 changes: 1 addition & 1 deletion docs/development/navigation/share.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CLASS z2ui5_cl_sample_share IMPLEMENTATION.
IF client->check_on_navigated( ).
DATA(view) = z2ui5_cl_xml_view=>factory( ).
client->view_display( view->shell(
)->label( 'quantity'
)->label( `quantity`
)->input( client->_bind_edit( mv_quantity )
)->button(
text = `share`
Expand Down
16 changes: 8 additions & 8 deletions docs/development/specific/barcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ CLASS z2ui5_cl_sample_focus IMPLEMENTATION.
METHOD z2ui5_if_app~main.

IF client->check_on_init( ).
focus_id = 'id1'.
focus_id = `id1`.

DATA(page) = z2ui5_cl_xml_view=>factory( )->page( ).
page->simple_form(
)->content( ns = 'form'
)->label( 'One'
)->content( ns = `form`
)->label( `One`
)->input(
id = 'id1'
id = `id1`
value = client->_bind_edit( one )
submit = client->_event( |one_enter| )
)->label( 'Two'
)->label( `Two`
)->input(
id = 'id2'
id = `id2`
value = client->_bind_edit( two )
submit = client->_event( |two_enter| ) ).

Expand All @@ -89,10 +89,10 @@ CLASS z2ui5_cl_sample_focus IMPLEMENTATION.

CASE client->get( )-event.
WHEN `one_enter`.
focus_id = 'id2'.
focus_id = `id2`.
client->view_model_update( ).
WHEN `two_enter`.
focus_id = 'id1'.
focus_id = `id1`.
client->view_model_update( ).
ENDCASE.

Expand Down
24 changes: 12 additions & 12 deletions docs/development/specific/cds.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ CLASS z2ui5_cl_sample_cds IMPLEMENTATION.
DATA(view) = z2ui5_cl_xml_view=>factory( )->page( ).
DATA(table) = view->table( client->_bind( mt_salesorder ) ).
table->columns(
)->column( )->text( 'SalesOrder' )->get_parent(
)->column( )->text( 'SalesOrderType' )->get_parent(
)->column( )->text( 'SalesOrganization' ).
)->column( )->text( `SalesOrder` )->get_parent(
)->column( )->text( `SalesOrderType` )->get_parent(
)->column( )->text( `SalesOrganization` ).

table->items( )->column_list_item( )->cells(
)->text( '{SALESORDER}'
Expand Down Expand Up @@ -68,9 +68,9 @@ CLASS z2ui5_cl_sample_eml_read IMPLEMENTATION.
DATA(view) = z2ui5_cl_xml_view=>factory( )->page( ).
DATA(table) = view->table( client->_bind( mt_salesorder ) ).
table->columns(
)->column( )->text( 'SalesOrder' )->get_parent(
)->column( )->text( 'SalesOrderType' )->get_parent(
)->column( )->text( 'SalesOrganization' ).
)->column( )->text( `SalesOrder` )->get_parent(
)->column( )->text( `SalesOrderType` )->get_parent(
)->column( )->text( `SalesOrganization` ).

table->items( )->column_list_item( )->cells(
)->text( '{SALESORDER}'
Expand All @@ -97,13 +97,13 @@ METHOD z2ui5_if_app~main.
distributionchannel
organizationdivision
soldtoparty )
WITH VALUE #( ( %cid = '0001'
WITH VALUE #( ( %cid = `0001`
%data = VALUE #(
SalesOrderType = 'TA'
SalesOrganization = '1010'
DistributionChannel = '10'
OrganizationDivision = '00'
SoldToParty = '0033500056' ) ) )
SalesOrderType = `TA`
SalesOrganization = `1010`
DistributionChannel = `10`
OrganizationDivision = `00`
SoldToParty = `0033500056` ) ) )
MAPPED DATA(ls_mapped)
FAILED DATA(ls_failed)
REPORTED DATA(ls_reported_modify).
Expand Down
Loading