0% found this document useful (0 votes)
43 views5 pages

SAP UI5 Master Data Page Layout

The document outlines an SAP UI5 XML view for a Master Data application, featuring an Object Page Layout that includes input fields for plant codes and a table for business master data. It provides functionality for adding, deleting, and saving entries, as well as dialogs for material and supplier code value help. The layout is designed with responsive elements and includes various UI components such as buttons, labels, and tables to facilitate user interaction.

Uploaded by

Ameya Ranade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views5 pages

SAP UI5 Master Data Page Layout

The document outlines an SAP UI5 XML view for a Master Data application, featuring an Object Page Layout that includes input fields for plant codes and a table for business master data. It provides functionality for adding, deleting, and saving entries, as well as dialogs for material and supplier code value help. The layout is designed with responsive elements and includes various UI components such as buttons, labels, and tables to facilitate user interaction.

Uploaded by

Ameya Ranade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<mvc:View controllerName="[Link].

MasterData"
xmlns:mvc="[Link]" displayBlock="true"
xmlns="sap.m"
xmlns:html="[Link]
xmlns:f="[Link]"
xmlns:l="[Link]"
xmlns:u="[Link]">
<App>
<pages>
<Page id="page">
<u:ObjectPageLayout id="ObjectPageLayout"
showTitleInHeaderContent="false" upperCaseAnchorBar="false">
<u:headerTitle>
<u:ObjectPageDynamicHeaderTitle visible="false">
<!-- <heading>
<m:ObjectStatus ></m:ObjectStatus>
</heading> -->
</u:ObjectPageDynamicHeaderTitle>
</u:headerTitle>
<u:headerContent>
<FlexBox wrap="Wrap">
<Label id="lPlant" required="true"
text="{i18n>[Link]}" class="sapUiLargeMarginBegin sapUiTinyMarginTop"
visible="true"/>
<Input id="IPlant" class="sapUiSmallMarginBegin"
value="{werks}" liveChange="onPlantLiveChg" maxLength="4" editable="true"
width="52px" visible="true"/>
<Text id="IPlantDesc" class="sapUiSmallMarginBegin
sapUiTinyMarginTop" text="{i18n>[Link]}"/>
</FlexBox>
<HBox justifyContent="End" class="sapUiSmallMarginBottom">
<ToolbarSpacer/>
<Button id="bAdd" icon="sap-icon://add"
press="handleValueHelpRequest" class="sapUiSmallMarginEnd"/>
<Button id="bDelete" icon="sap-icon://delete"
press="onDeleteRow" class="sapUiSmallMarginEnd"/>
<Button id="bSave" type="Emphasized"
text="{i18n>[Link]}" class="sapUiSmallMarginEnd"/>
</HBox>
</u:headerContent>
<u:sections>
<u:ObjectPageSection titleUppercase="false"
showTitle="false">
<u:subSections>
<u:ObjectPageSubSection showTitle="false"
titleUppercase="false">
<u:blocks>
<ScrollContainer width="100%"
horizontal="true" vertical="true">
<Table id="tBusinessMaster"
growing="true" fixedLayout="false" growingScrollToLoad="true" growingThreshold="20"
mode="MultiSelect" items="{/MaterialData}" sticky="ColumnHeaders,HeaderToolbar"
class="sapUiResponsiveMargin">
<columns>
<Column id="C1"
hAlign="Center">
<Text id="T1"
text="{i18n>[Link]}"/>
</Column>
<Column id="C2"
hAlign="Center">
<Text id="T2"
text="{i18n>[Link]}"/>
</Column>
<Column id="C3" hAlign="Center"
width="80px">
<Text id="T3"
text="{i18n>[Link]}"/>
</Column>
<Column id="C4" hAlign="Center"
width="100px">
<Text id="T4"
text="{i18n>Column.Supp1_Code}"/>
</Column>
<Column id="C5" hAlign="Center"
width="120px">
<Text id="T5"
text="{i18n>Column.Supp1_Name1}"/>
</Column>
<Column id="C6"
hAlign="Center">
<Text id="T6"
text="{i18n>Column.Supp1_Perc}"/>
</Column>
<Column id="C7" hAlign="Center"
width="100px">
<Text id="T7"
text="{i18n>Column.Supp2_Code}"/>
</Column>
<Column id="C8" hAlign="Center"
width="120px">
<Text id="T8"
text="{i18n>Column.Supp2_Name1}"/>
</Column>
<Column id="C9"
hAlign="Center">
<Text id="T9"
text="{i18n>Column.Supp2_Perc}"/>
</Column>
<Column id="C10"
hAlign="Center" width="100px">
<Text id="T10"
text="{i18n>Column.Supp3_Code}"/>
</Column>
<Column id="C11"
hAlign="Center" width="120px">
<Text id="T11"
text="{i18n>Column.Supp3_Name1}"/>
</Column>
<Column id="C12"
hAlign="Center">
<Text id="T12"
text="{i18n>Column.Supp3_Perc}"/>
</Column>
<Column id="C13"
hAlign="Center">
<Text id="T13"
text="{i18n>Column.Total_Perc}"/>
</Column>
</columns>
<items>
<ColumnListItem id="cLI"
vAlign="Middle">
<cells>
<Text id="tMaterial"
text="{Matnr}"/>
<Text id="tDescription"
text="{Descr}"/>
<Text id="tUOM"
text="{Meins}"/>

<!-- search help -->


<Input id="tSupp1Cd"
valueHelpRequest="handleSupplierCodeValueHelpRequest" showValueHelp="true"
value="{Lifnr1}"/>

<Text id="tSuppNm1"
text="{VendorName1}"/>
<Input id="tSupp1Pr"
maxLength="3" liveChange="fnLchCheckPercentage" change="fnChCheckPercentage"
textAlign="Center" value="{Lifnr1_Per}"/>

<!-- search help -->


<Input id="tSupp2Cd"
valueHelpRequest="handleSupplierCodeValueHelpRequest" showValueHelp="true"
value="{Lifnr2}"/>

<Text id="tSuppNm2"
text="{VendorName2}"/>
<Input id="tSupp2Pr"
maxLength="3" liveChange="fnLchCheckPercentage" change="fnChCheckPercentage"
textAlign="Center" value="{Lifnr2_Per}"/>

<!-- search help -->


<Input id="tSupp3Cd"
valueHelpRequest="handleSupplierCodeValueHelpRequest" showValueHelp="true"
value="{Lifnr3}"/>

<Text id="tSuppNm3"
text="{VendorName3}"/>
<Input id="tSupp3Pr"
maxLength="3" liveChange="fnLchCheckPercentage" change="fnChCheckPercentage"
textAlign="Center" value="{Lifnr3_Per}"/>
<Text id="tTotalPr"
textAlign="Center" text="{TotalPercentage}"/>
</cells>
</ColumnListItem>
</items>
<layoutData>
<l:GridData linebreakS="true"
linebreakM="true" linebreakL="true" indent="L0 M0 S0" span="L12 M12 S12"/>
</layoutData>
</Table>
</ScrollContainer>
</u:blocks>
</u:ObjectPageSubSection>
</u:subSections>
</u:ObjectPageSection>
</u:sections>
</u:ObjectPageLayout>
</Page>
<Page>
<Dialog id="addRowDialog" title="Set Material"
contentWidth="400px">
<VBox>
<Label text="Material Code" labelFor="materialInput"
class="sapUiTinyMarginBegin" />

<!-- we need search help -->


<Input id="materialInput" required="true"
valueHelpRequest="handleMaterialCodeValueHelpRequest" showValueHelp="true"
placeholder="Material Code" width="350px" class="sapUiTinyMarginBegin" />
</VBox>

<beginButton>
<Button text="OK" press=".onDialogConfirm" />
</beginButton>
<endButton>
<Button text="Cancel" press=".onDialogCancel" />
</endButton>
</Dialog>
</Page>
<Page id="dialogPage">
<Dialog id="diaValueHelpMaterialCode"
title="{i18n>[Link]}" contentWidth="30rem" contentHeight="30rem">
<SearchField id="searchMaterialCode" width="100%"
placeholder="{i18n>[Link]}" liveChange="onSearchMaterialCode"
search="onMaterialCode" />
<Table id="tMaterialCode" mode="None" items="{/results}">
<columns>
<Column>
<header>
<Label text="{i18n>[Link]}"
textAlign="Center" />
</header>
</Column>
<Column>
<header>
<Label text="{i18n>[Link]}"
textAlign="Center" />
</header>
</Column>
<Column>
<header>
<Label text="{i18n>[Link]}"
textAlign="Center" />
</header>
</Column>
</columns>
<items>
<ColumnListItem type="Active"
press="fnMaterialCodeVHPress">
<Text id="tVHMaterialCd" text="" />
<Text id="tVHDescription" text="{}"/>
<Text id="tVHUOM" text="{}"/>
</ColumnListItem>
</items>
</Table>
<buttons>
<Button text="{i18n>[Link]}"
press="fnCloseMaterialCdVH"></Button>
</buttons>
</Dialog>
</Page>

<Page id="dialogSupplyPage">
<Dialog id="diaValueHelpSupplierCode"
title="{i18n>[Link]}" contentWidth="25rem" contentHeight="25rem">
<SearchField id="searchSupplierCode" width="100%"
placeholder="{i18n>[Link]}" liveChange="onSearchSupplierCode"
search="onMaterialCode" />
<Table id="tSupplierCode" mode="None" items="{/results}">
<columns>
<Column>
<header>
<Label text="{i18n>[Link]}"
textAlign="Center" />
</header>
</Column>
<Column>
<header>
<Label text="{i18n>[Link]}"
textAlign="Center" />
</header>
</Column>
</columns>
<items>
<ColumnListItem type="Active"
press="fnSupplierCodeVHPress">
<Text id="tVHSupplierCode" text="{}" />
<Text id="tVHSupplierName" text="{}"/>
</ColumnListItem>
</items>
</Table>
<buttons>
<Button text="{i18n>[Link]}"
press="fnCloseSupplierCodeVH"></Button>
</buttons>
</Dialog>
</Page>

</pages>
</App>
</mvc:View>

<!-- <sf:SmartField id="idsmfldstrg" showValueHelp="true"


textLabel="{i18n>txt_strg}" value="" showValueStateMessage="true"
showSuggestion="true"></sf:SmartField> -->

Common questions

Powered by AI

Potential challenges include maintaining efficient data retrieval and ensuring user-friendly interaction within a limited screen space. The document addresses these by designing dialogs that focus on relevant supplier information using compact layouts and efficient search functionalities. Additionally, utilizing event-driven programming like valueHelpRequest ensures dialogs are activated only when necessary, optimizing performance and user experience .

The ScrollContainer component enhances user experience by providing a navigable area for viewing larger sets of data without overwhelming the user interface. It enables horizontal and vertical scrolling within the table, ensuring that users can access all data columns and rows easily. This flexibility is crucial for applications with extensive data sets, as it maintains readability and accessibility .

The document uses Input fields with attributes like liveChange to manage real-time data updates. These fields are designed to react instantaneously to user input by triggering functions that verify and update data dynamically. This live change mechanism, along with other attributes like maxLength and editable, ensures data integrity and timely validation throughout user interactions .

Data consistency is maintained through several mechanisms, including the use of search help and value help dialogs for selecting supplier codes and names, which reduce input errors by providing validated choices. Additionally, percentage fields for suppliers have liveChange events that trigger validation functions to ensure percentages are valid and accurate. By using controlled inputs and event-driven updates, data consistency is effectively upheld .

The UI layout design in the document promotes efficient data management by organizing elements into flexible containers such as FlexBox and HBox, which allow for adaptive and responsive design. The use of components like ObjectPageLayout and ScrollContainer enables users to manage data smoothly through features like growing tables and layered dialog pages for additional tasks, reducing clutter and focusing on key functionalities like saving, adding, and deleting records .

i18n integration plays a critical role in facilitating internationalization and localization by allowing the interface to adapt to different languages and cultural settings without altering the program code. This is achieved through the use of bindings like i18n>label.PlantCd, which dynamically fetches language-specific text, ensuring the interface can cater to a global user base and enhance usability across diverse regions .

The design employs interactive elements like value help dialogs for supplier codes and names, enhancing user engagement by simplifying complex data entries. Interactive elements enable users to look up and select from predefined supplier information, ensuring quick and accurate data entry. Additionally, input fields that change dynamically based on user interaction improve the usability of the interface for complex tasks .

Using dialog pages for tasks like setting material codes offers advantages such as focused interaction, where users can perform specific tasks without distractions. Dialogs encapsulate input actions within a separate window, which helps in managing data entry processes independently from the main layout. This separation ensures data is input accurately and efficiently, reducing errors and improving user workflow .

The ObjectPageLayout component serves as the primary structural element that organizes content into sections and subsections. It includes features such as dynamic titles, upper case anchor bars, and section expanding capabilities. This setup helps in providing a clear and organized presentation of data, making navigation and interaction intuitive for users .

The Table element is optimized with features like growing and mode settings to efficiently manage dynamic data scaling and user interactions. Its growing feature allows for lazy loading and scrolling to load more data incrementally, which prevents performance bottlenecks for large datasets. Mode settings like MultiSelect enhance user control by enabling operations on multiple items simultaneously, streamlining tasks like edit and delete .

You might also like