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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,42 @@ CLASS z2ui5_cl_demo_app_313 IMPLEMENTATION.

IF client->check_on_init( ).

* DATA(view) = z2ui5_cl_xml_view=>factory( ).
*
* DATA(page) = view->shell(
* )->page(
* title = `abap2UI5 - Smart Controls with Variants`
* navbuttonpress = client->_event_nav_app_leave( )
* shownavbutton = client->check_app_prev_stack( ) ).
*
* page->smart_filter_bar(
* id = `smartFilterBar`
* persistencykey = `SmartFilterPKey`
* entityset = `BookingSupplement`
* )->_control_configuration(
* )->control_configuration(
* previnitdatafetchinvalhelpdia = abap_false
* visibleinadvancedarea = abap_true
* key = `TravelID`
* )->get_parent(
* )->smart_table(
* id = `smartFiltertable`
* smartfilterid = `smartFilterBar`
* tabletype = `ResponsiveTable`
* editable = abap_false
* initiallyvisiblefields = `TravelID,BookingID`
* entityset = `BookingSupplement`
* usevariantmanagement = abap_true
* useexporttoexcel = abap_true
* usetablepersonalisation = abap_true
* header = `Test`
* showrowcount = abap_true
* enableexport = abap_false
* enableautobinding = abap_true ).
*
* client->view_display( val = view->stringify( )
* switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).

DATA(view) = z2ui5_cl_xml_view=>factory( ).

DATA(page) = view->shell(
Expand All @@ -41,30 +77,30 @@ CLASS z2ui5_cl_demo_app_313 IMPLEMENTATION.
page->smart_filter_bar(
id = `smartFilterBar`
persistencykey = `SmartFilterPKey`
entityset = `BookingSupplement`
entityset = `ProductType_2`
)->_control_configuration(
)->control_configuration(
previnitdatafetchinvalhelpdia = abap_false
visibleinadvancedarea = abap_true
key = `TravelID`
key = `ProductType`
)->get_parent(
)->smart_table(
id = `smartFiltertable`
smartfilterid = `smartFilterBar`
tabletype = `ResponsiveTable`
editable = abap_false
initiallyvisiblefields = `TravelID,BookingID`
entityset = `BookingSupplement`
initiallyvisiblefields = `ProductType,ProductType_Text`
entityset = `ProductType_2`
usevariantmanagement = abap_true
useexporttoexcel = abap_true
usetablepersonalisation = abap_true
header = `Test`
showrowcount = abap_true
enableexport = abap_false
enableautobinding = abap_true ).
enableautobinding = abap_false ).

client->view_display( val = view->stringify( )
switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).
switch_default_model_path = `/sap/opu/odata/sap/UI_PRODUCTLIST/` ).

ENDIF.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<VSEOCLASS>
<CLSNAME>Z2UI5_CL_DEMO_APP_313</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>tab - smart controls</DESCRIPT>
<DESCRIPT>EXPERIMENTAL - Smart Table and Variants</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
Expand Down
35 changes: 19 additions & 16 deletions src/00/00/z2ui5_cl_demo_app_314.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,36 @@ CLASS z2ui5_cl_demo_app_314 IMPLEMENTATION.
)->text( `{http>DESCR}`).

tab = page->table(
items = `{/BookingSupplement}`
items = `{/BusinessPartnerSet}`
growing = abap_true ).

tab->header_toolbar(
)->toolbar(
)->title( `table with odata model` ).

tab->columns(
)->column( )->text( `TravelID` )->get_parent(
)->column( )->text( `BookingID` )->get_parent(
)->column( )->text( `BookingSupplementID` )->get_parent(
)->column( )->text( `SupplementID` )->get_parent(
)->column( )->text( `SupplementText` )->get_parent(
)->column( )->text( `Price` )->get_parent(
)->column( )->text( `CurrencyCode` )->get_parent( ).
)->column( )->text( `BusinessPartnerID` )->get_parent(
)->column( )->text( `CompanyName` )->get_parent(
)->column( )->text( `WebAddress` )->get_parent(
* )->column( )->text( `SupplementID` )->get_parent(
* )->column( )->text( `SupplementText` )->get_parent(
* )->column( )->text( `Price` )->get_parent(
* )->column( )->text( `CurrencyCode` )->get_parent( ).
).

tab->items( )->column_list_item( )->cells(
)->text( `{TravelID}`
)->text( `{BookingID}`
)->text( `{BookingSupplementID}`
)->text( `{SupplementID}`
)->text( `{SupplementText}`
)->text( `{Price}`
)->text( `{CurrencyCode}` ).
)->text( `{BusinessPartnerID}`
)->text( `{CompanyName}`
)->text( `{WebAddress}`
* )->text( `{SupplementID}`
* )->text( `{SupplementText}`
* )->text( `{Price}`
* )->text( `{CurrencyCode}`
).

client->view_display( val = view->stringify( )
switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).
switch_default_model_path = `/sap/opu/odata/iwbep/gwsample_basic/` ).
* switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).

ENDIF.

Expand Down
2 changes: 1 addition & 1 deletion src/00/00/z2ui5_cl_demo_app_314.clas.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<VSEOCLASS>
<CLSNAME>Z2UI5_CL_DEMO_APP_314</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>tab - odata, device, http</DESCRIPT>
<DESCRIPT>EXPERIMENTAL - Switch default Model</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
Expand Down
Loading