TRY .
super->define( ).
" Code to add/overwrite SAP LABEL Annotation
TRY.
DATA: lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ,
lo_property TYPE REF TO /iwbep/if_mgw_odata_property.
lo_entity_type = model->get_entity_type( iv_entity_name = '<your entity>').
lo_property = lo_entity_type->get_property( iv_property_name = '<entity's property name>').
lo_property->set_label_from_text_element(
EXPORTING
iv_text_element_symbol = TEXT-001 " Text element number
io_object_ref = me
).
CATCH /iwbep/cx_mgw_med_exception. " Meta data exception
ENDTRY.
CATCH /iwbep/cx_mgw_med_exception. " Meta data exception
ENDTRY.
method /iwbep/if_mgw_appl_srv_runtime~get_entityset.
DATA(lv_entityset_name) = io_tech_request_context->get_entity_set_name( ).
CASE lv_entityset_name.
WHEN <your entity>.
TRY.
DATA(ls_material) = it_key_tab[ name = 'Material' ].
CATCH cx_sy_itab_line_not_found.
ENDTRY.
TRY.
DATA(ls_procmtid) = it_key_tab[ name = 'QltyInProcmtIntID' ].
CATCH cx_sy_itab_line_not_found.
ENDTRY.
"your code to retrieve your data ....
copy_data_to_ref(
EXPORTING
is_data = gt_manufacturer
CHANGING
cr_data = er_entityset
).
when others.
super->/iwbep/if_mgw_appl_srv_runtime~get_entityset(
EXPORTING
iv_entity_name = iv_entity_name
iv_entity_set_name = iv_entity_set_name
iv_source_name = iv_source_name
it_filter_select_options = it_filter_select_options
it_order = it_order
is_paging = is_paging
it_navigation_path = it_navigation_path
it_key_tab = it_key_tab
iv_filter_string = iv_filter_string
iv_search_string = iv_search_string
io_tech_request_context = io_tech_request_context
IMPORTING
er_entityset = er_entityset
es_response_context = es_response_context ).
IF er_entityset IS INITIAL.
RETURN.
ENDIF.
mo_flx_runtime_api->enrich_entityset(
EXPORTING
io_tech_request_context = io_tech_request_context
ir_entityset = er_entityset ).
endcase.
endmethod.
<!-- Use stable and unique id's!-->
<core:FragmentDefinition
controllerName="customer.adpvar.qm_qltyinprocs1" height="100%"
xmlns:core="sap.ui.core" xmlns="sap.m"
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:mvc="sap.ui.core.mvc"
xmlns:smartFilterBar="sap.ui.comp.smartfilterbar"
xmlns:smartTable="sap.ui.comp.smarttable"
xmlns:table="sap.ui.table"
xmlns:u="sap.ui.unified"
xmlns:uxap="sap.uxap">
<uxap:ObjectPageSection id="idOPSNewSection">
<uxap:subSections>
<uxap:ObjectPageSubSection id="idOPSSNewSection" title="NewSection">
<uxap:blocks>
<VBox id="idVboxMain" fitContainer="true">
<Text id="idTextSection" text="{i18n>fragmentname}"/>
<smartTable:SmartTable id="IdNewSectionSmartTable"
entitySet="NewSectionSet" tableType="Table"
useVariantManagement="true" useTablePersonalisation="true"
header="Records" showRowCount="true" enableAutoBinding="true"
class="sapUiResponsiveContentPadding" showFullScreenButton="true"
placeToolbarInTable="true" tableBindingPath="To_NewSection"
initiallyVisibleFields="Plant,Vendor,Material"
requestAtLeastFields="Qltyinprocmtintid"
persistencyKey="Material">
<smartTable:layoutData id="idSmartTableLayout">
<FlexItemData growFactor="1" baseSize="0%" id="idFid1"/>
</smartTable:layoutData>
</smartTable:SmartTable>
</VBox>
</uxap:blocks>
</uxap:ObjectPageSubSection>
</uxap:subSections>
</uxap:ObjectPageSection>
</core:FragmentDefinition>
I hope this tutorial will help you to understand the steps involved in creating an adaptation project, redefining OData service, the purpose of i18n file and other options for translation and configuring the adaption variant for launchpad.
To know more about Adaptation project, check below links
Extending an SAP Fiori Application
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |