cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Odata Call from UI5

govind_parmar
Participant
0 Kudos

hi Experts,

I am new to UI5 and trying to a create app with a view with an input and a simple display only form.  The manifest is linked to backend odata SAP service.

Below is the Flow of the application :

AccountNumber( Input field) --> Get the AccountNumber from the Input and tag it to the filter to the SAP odata service and populated the response of the api in the form.

below is the example: 

<uri> / sap/opu/odata/SAP/BPACCBAL/BillAccDetailSet?$filter=(AccountNumber eq '1234567890')

FYI: This specific filter works in the postman so the service is up and running.

Below is the xml view with the form:

<form:SimpleForm
                        id="sf2"
                        maxContainerCols="2"
                        editable="false"
                        layout="ResponsiveGridLayout"
                        labelSpanL="3"
                        labelSpanM="3"
                        emptySpanL="4"
                        emptySpanM="4"
                        columnsL="1"
                        columnsM="1">
                        <form:content>
                            <Label text="{i18n>ObjectSupplierName}"/>
                            <Text text="{AccountNumber}"/>
                            <Label text="{i18n>ObjectSupplierName}"/>
                            <Text text="{BillingName}"/>
                            <Label text="{i18n>ObjectSupplierAddress}"/>
                            <Text text="{Address1}  {Address2} {City} {Zipcode} "/>
                        </form:content>
</form:SimpleForm>
 
Manifest:
    "dataSources": {
      "bpService": {
        "uri": "sap/opu/odata/SAP/BPACCBAL/",
        "type": "OData",
        "settings": {
          "annotations": [],
          "localUri": "localService/metadata.xml",
          "odataVersion": "2.0"
        }
      }

 

is there a way to apply the filter and bind  to the form directly ?

Thanks

 

 

 

Accepted Solutions (0)

Answers (0)