Skip to Content
0

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

Mar 27 at 09:46 PM

32

avatar image

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>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
MEGHAL SHAH Mar 28 at 07:52 AM
1
Show 2 Share
10 |10000 characters needed characters left characters exceeded

hi MEGHAL SHAH ,

thank you or your help.

can you have an issue how to delete a row from my table a get the change in the backend?

thanks

0

Hi,

Please check Delete Operation.

Regards,

Meghal Shah

0