Skip to Content
avatar image
Former Member

how can i dysplay my odata of a table in xml based view?

i am tryind to make a homework. i wand to take data from my omodel and dysplay it on my UI.

could somme one please help me?

i dont know how to pass ma anzeige function.

var sServiceUrl = "/sap/opu/odata/sap/ZAL_HK_UI5_ODATA_SRV/";
		var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, true);
		sap.ui.getCore().setModel(oModel);

	anzeigen: function() {
			
		
            oModel.read("/ZHK_DATENSet", function(data){
   

	<content>
				<Button text="zeige mein daten" width="230px" press="anzeigen" class="sapUiSmallMarginBottom"/>
				<Table 	id="Table"
			
          mode="SingleSelectMaster"
          selectionChange="onSelectionChange"
          items="{odata>/ZHK_DATENSet}"
          class="TableStyle">


        <headerToolbar> 


          <Toolbar> 


            <Label text="list"></Label> 


          </Toolbar> 


        </headerToolbar> 


        <columns> 


          <Column 


            width="5em"> 


            <Label text="ID" /> 


          </Column> 


          <Column 


            width="12em"> 


            <Label text="Empfanger" /> 


          </Column> 


          <Column 


            width="12em"> 


            <Label text="IBAN" /> 


          </Column> 
          <Column 


            width="12em"> 


            <Label text="BIC" /> 


          </Column> 
          <Column 


            width="6em"> 


            <Label text="BETRAG" /> 


          </Column> 
          <Column 


            width="12em"> 


            <Label text="VERWENDUNGSZWECK" /> 


          </Column> 


        </columns> 


      


        <items> 


          <ColumnListItem> 


            <cells> 


              <ObjectIdentifier 


                text="{odata>empfanger_id}"   />


              <ObjectIdentifier 


                text="{odata>name}" /> 


              <ObjectIdentifier 


                text="{odata>iban}" />  
                <ObjectIdentifier 


                text="{odata>bic}" />  
                <ObjectIdentifier 


                text="{odata>betrag}" />   
                <ObjectIdentifier 


                text="{odata>vzweck}" />                 
            </cells> 


          </ColumnListItem> 


        </items> 
        </Table>
	             </content>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 28 at 07:52 AM
    Add comment
    10|10000 characters needed characters exceeded