Howto map to an odata model function import returning an entity, not an entity set?

Hi,
how do I map to an odate model function import returning an entity (not an entity set) in a XML view? I tried property mapping {/method/property}, which does not make a network request and sets the value to null and I tried aggregation mapping {/method}, which makes a network request with $skip=0&$top=100&$inlinecount=allpages which is of course rejected by the odata source.
Thanks,
Wolfgang

Hello Dr. Wolfgang,
you can use
  var oParams = {};
  oParams.Field1 = 'ABC';
  oParams.Field2= 'XYZ';
  oParams.Field3= '123';
  oModel.callFunction('MyFuncImport', 'GET', oParams, null, function(oResponse){
        alert("Call to Func Imp successful");
    },function(){
        alert("Call to Func Imp failed");});
also refer SAPUI5 SDK - Demo Kit
Regards,
Chandra

Similar Messages

  • Odata function import - structure as import parameter

    Hello Experts,
    I want to pass list of measured values (valueID, measured value) with info about temperature and date.
    So i want to pass to function data like this:
    - temerature
    - date
    - measured value table
             -  valueID1, measured value1
             - valueID2, measured value2
             - valueID3, measured value3
    I am not able to find way how to do it. In function import parameters there is no option to do it (like on below screen from segw)
    Thanks for help.
    Lucas

    I don't like this situation.
    Probably its often situation when you want to pass
    1) from client
    2) or to client
    data with structure:
    - param1
    - param2
    - tableType1
    For now i know ways:
    1) concatenate values from table to one string parameter (function import apraache)
    2) create update statement with table (crud update approache) and add param1 and param2 to tableType1. Its of course redundantion and its not good approache for big data.
    3) and probably best one: Batch Request in Netweaver Gateway(Multiple Operations into a Single Request)
    But i am disappointed that its also impossible to pass table type into function import.
    Am i right ?
    BR Lucas

  • Odata function import - input as complex type

    Hello
    Is it possible to make an input as a complex type ?
    for example we want to check set of values which are in table, all for one temperature .
    and we will use structure:
    1) -temperature
        -table
              -tableval1
              -tableval2
              -tableval3
    Question is how to set such input type in segw ?
    Thanks from mountains
    Lucas

    Thank you for answer.
    The way you create this example does not reflect relation 1:n
    We know that temperature value to measured values in in relation 1:n 
    We don't know n , its could be 5 or 100.
    As i understand you approach with complex type will be good when we know that for example for every temperature there will be 5 measured values. but we don't know this. Its dynamic value from runtime, not static.
    I mixup while writing post complex type with table type. Correct valus which i want to pass are:
    - temerature
    - date
    - measured value table (n-values, dynamic from runtime)
              -  valueID1, measured value1
             - valueID2, measured value2
             - valueID3, measured value3
             - valueIDn, measured valuen
    For now i know 2 ways:
    1) concatenate values from table to one string parameter (function import apraache)
    2) create update statement with table (crud update approache):
    - temerature, date, valueID1, measured value1
    - temerature, date, valueIDn, measured valuen
    It makes redundantion.
    Both solutions are not ideal.
    Thanks for your help!

  • Using Function Import in Integration Gateway

    Hello Experts,
    Jitendra Kansal
    Midhun VP
    Andreas Wegmann
    Rakshit Doshi
    I am trying to use Function import for  Functions in Oracle DB.
    There is no option to bind datasource for Function import in oData Modelling.
    How Function imports can be used?
    Please Suggest.
    Regards
    Manish

    Hi Manish,
    As of now, IGW doesn't support function import. Enabling Database Content as OData Services - Data Integration using Integration Gateway - SAP Library
    CC: Bjoern Woppmann
    Regards,
    JK

  • Fiori - Create oData Model and Creating Customized App

    Dear All Gurus,
    This may be too easy question for you all but as a layman need your expert advise on this.
    Requirment
    Create a customized app/oData Model for  'Z' table in ERP server (CRUD operation)
    I was able te to  get an Understanding about oData Model - CRUD operation for ZTables referring below Link. (Thanks for Chandrasekar Mahajan for the Blog)
    Let’s code CRUDQ and Function Import operations in OData service!
    But howabout Ztable in ERP ? Can we use RFC for this and how to integrate this for Ztable?
    Thank you...
    Tags edited by: Michael Appleby

    Hi Masayuki,
    Thank you for your reply and I was able to get an understading with the document you have shared...
    My requirement was to to access 'Z'table in ERP system through Gateway Server (Read/Update/Delete...).
    How do we create an oData model for this ?
    Thank you Sir...

  • Oracle Proc in edmx via add function import is not working

    I have a mandate to call a external oracle package from my local oracle db proc using Entity Framework. I have created a synonym for that. When I am trying to polpulate the oracle procedure data in my mvc screen using odp.net. The screen is closing automatically when I am trying to retive the column info by clicking "get column information" under "Add Function Import" in model browser.
    Following is my code snipet
    1. created a oracle stored proc to call the external proc
    CREATE OR REPLACE PROCEDURE USP_GET_DETAILS
    IN_ID IN NUMBER,
    OUT_RESULT OUT SYS_REFCURSOR
    IS
    OUT_FED_TAX_ID_NO VARCHAR2(50);
    OUT_PARTY_ID_NO NUMBER;
    OUT_PARTY_TYP_CD NUMBER;
    BEGIN
    PKG_GET_DETAILS.USP_GET_DETAILS_INFO (IN_ID, OUT_FED_TAX_ID_NO, OUT_PARTY_ID_NO);
    OPEN OUT_RESULT FOR
         SELECT OUT_FED_TAX_ID_NO, OUT_PARTY_ID_NO FROM DUAL;
    END USP_GET_DETAILS;
    2. added the proc "USP_GET_DETAILS" using "Update model using database" in my edmx file
    3. Now proc has been added to my edmx file under SSDL
    <Function Name="USP_GET_DETAILS" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="BCS_OWNER">
    <Parameter Name="IN_ID" Type="number" Mode="In" />
    </Function>
    4. added following code to my web.config file
    <oracle.dataaccess.client>
    <settings>
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursor.OUT_RESULT" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursorMetaData.OUT_RESULT.Column.0" value="implicitRefCursor metadata='ColumnName=OUT_FED_TAX_ID_NO;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    <add name="BCS_OWNER.USP_GET_DETAILS.RefCursorMetaData.OUT_RESULT.Column.1" value="implicitRefCursor metadata='ColumnName=OUT_PARTY_ID_NO;NATIVEDATATYPE=Number;ProviderType=Decimal'" />
    </settings>
    </oracle.dataaccess.client>
    5. underModel Browser try to add the procedure under "Add Import Function", select "Complex Type". when i am clicking on "Get column information" button, the screen blank for some time and then auto closing the screen without displaying any column info. I would like to know if any thing wrong i am doing on my steps? please help?

    I managed to workaround this problem.
    I add the function with no return value. Then in the Model Explorer you go to the properties of the imported function and edit the return type property, the same dialog appears, but this time it works as expected(considering you have set all the values correctly on your config file).

  • Error while invoking "create" on odata model

    Hello,
    I have an OData model  (added to the view) to which I would like to add a new entry:
    var data = {
    ID : 1234,
    SCENARIO_INSTANCE_ID : "235800598404399104",
    FULL_NAME : "Joachim",
    EMAIL : "[email protected]",
    TELEPHONE : "+555 11 222",
    CELLPHONE : "555 111 111",
    ADDRESS : "Holywood"
    this.getView().getModel().create(path, data, null, function() {
    alert("Create successful");
    }, function() {
    alert("Create failed");
    But I always get the following error:
    2013-08-09 10:20:57 The following problem occurred: HTTP request failed501,Not Implemented,<?xml version="1.0" encoding="utf-8" standalone="yes"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message xml:lang="en-US">Feature not supported.</message></error> - 
    The service itself is generated on HANA.
    SAPUI5 Version: 1.12.2 (build at 201305281333, last change 7340864478bf826028376497c3d94bea4688e432)
    Any ideas why this happens?
    Thanks in advance and best regards,
    Joachim

    Hello Krishna,
    thanks for supporting us to analyse the problem. Here are some addtional information:
    I created the oData service by creating a .xsodata file in the services folder of my XS Application. Furthermore I tested the oData service create method by directly sending an HTTP POST request to the service URL. This worked fine - an addtional data entry was created in the database table.
    This is described in this blog on SAP HANA Academy: http://www.saphana.com/docs/DOC-3775
    From my point of view, everything works fine with the oData service. Do you have any other idea how to identify the root cause?
    In addition: how can I make the call back funcitons more verbose?
    Thanks & Regards
    Nico

  • Not getting column information while Function Import

    i had followed below link
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkOBE/EntityFrameworkOBE.htm
    i m successfully able to update and add recored using Entity framework into oracle DB.
    now my problem is with Select SPS here i follwed all step from above link with sql db and i m able to get column informatin while same is not possible with oracle db.
    the stored procedure returns a ref cursor, so we can create a new complex type by selecting "Get Column Information" then selecting "Create New Complex Type".
    but i m not able to have enable button for create new complex type becuase get column not return anything.
    i had created model or .edmx file and then go to model browser where i had list of stored procedure not by double click on sp we will get one dialog box for function import
    over there when ever i select sp and then get colum information i m not able to find any thing ,,,, while sp is running fine i test that too using sql developer,,,
    and yes i had created complex property tooo but that columns are also not coming.........
    i m new to this please help me where i m lacking.
    PLEASE
    Reference copy of my SP
    PROCEDURE GETPERSONDETAIL(curParam out sys_refcursor)
    IS
    BEGIN
    OPEN curParam FOR
    SELECT
    FIRSTNAME,
    GENDER_CODE,
    BIRTH_DATE,
    LASTNAME
    FROM PERSON;
    END;
    this sp is simple select statement...
    Edited by: 875347 on Jul 27, 2011 2:23 AM

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <connectionStrings>
    <add name="HREntities" connectionString="metadata=res://*/HRModel.csdl|res://*/HRModel.ssdl|res://*/HRModel.msl;provider=Oracle.DataAccess.Client;provider connection string=&quot;DATA SOURCE=IRWORA;PASSWORD=irw#1234;PERSIST SECURITY INFO=True;USER ID=IRW01&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
    i had taken same name as per link i.e. HREntities and HRModel all that
    now pls check my settings are correct or not because my Datasource name is IRWORA and oracle username is irw01 so do i need to change that in baseschemaname which i defined as HR,,, and yes i put the same &quot do i need to change that i hav no idea for that .....
    below is my app config for the same....
    <oracle.dataaccess.client>
    <settings>
    <add name="&quot;HR&quot;.&quot;UPDATE_AND_RETURN_SALARY&quot;.RefCursor.NEW_SALARY" value="implicitRefCursor bindinfo='mode=Output'" />
    <add name="&quot;HR&quot;.&quot;UPDATE_AND_RETURN_SALARY&quot;.RefCursorMetaData.NEW_SALARY.Column.0" value="implicitRefCursor metadata='ColumnName=FIRST_NAME;BaseColumnName=FIRST_NAME;BaseSchemaName=HR;BaseTableName=EMPLOYEES;NATIVE_DATA_TYPE=Varchar2;ProviderType=Varchar2;PROVIDER_DB_TYPE=String;ColumnSize=20'" />
    <add name="&quot;HR&quot;.&quot;UPDATE_AND_RETURN_SALARY&quot;.RefCursorMetaData.NEW_SALARY.Column.1" value="implicitRefCursor metadata='ColumnName=SALARY;BaseColumnName=SALARY;BaseSchemaName=HR;BaseTableName=EMPLOYEES;NATIVE_DATA_TYPE=Number;ProviderType=Int32;DataType=System.Int32;ColumnSize=8'" />
    </settings>
    </oracle.dataaccess.client>
    </configuration>
    sorry i m very new to this ,,,,
    please help me

  • Set filter criteria on page 1 for page 2 OData model - "best practice"?

    Hello, I have a problem with an app - where I want to filter data on a second page, based on settings from the first page. I use an OData model.
    The collections on both pages are not related in terms of "navigation" properties, that is my problem and I can not change the data source...
    So I am looking for ideas/best practices to solve this because sometimes my filtering doesn't work... the following problem occurred: Request aborted
    I have a page with a sap.m List with items="{/tabWorkPlace}" and and a local JSON model where I store relevant data during the app lifecycle.
    handleListSelect - first page
    var context = evt.getParameter("listItem").getBindingContext();
    var dataModel = sap.ui.getCore().getModel("dataModel");
    var workplace = context.getProperty("WORKPLACE_ID");
    dataModel.setProperty("/WORKPLACE_ID", workplace);
    this.nav.to("SubMaster", context);
    The general App.controller.js handles the nav.to function:
    var app = this.getView().app;
    var page = app.getPage(pageId);
    if(pageId == "secondPage") {
         page.getController().filterData();
    And the controller of the second page:
    filterData: function() {
    var oModel = sap.ui.getCore().getModel("odata");
    var dataModel = sap.ui.getCore().getModel("dataModel");
    var workplace = dataModel.getProperty("/WORKPLACE_ID");
    var items = this.getView().byId("list");
    var oFilter=new sap.ui.model.Filter("WORKPLACE_ID",sap.ui.model.FilterOperator.EQ,workplace);
    items.getBinding("items").filter(oFilter);
    I don't write this code into the onInit() or beforeRendering() function, because they are called only once and I am navigating back and forth between the two pages, because the pages are created only once and "just" the data is changed.
    The desired page looks like this - with an other collection bound to it:
    <List
      id="list"
      select="handleListSelect"
      items="{/tabWorkstep_Status}"
    >
    But when I call it - then the request gets aborted:
    The following problem occurred: Request aborted
    But despite the fact the Request is aborted, the list on the second page is filtered!
    The filter criteria for the model works when I type it into the browser with URL. Maybe this fails because the data binding for the list didn't took place at this phase?
    I have this pattern (filter criteria on one page and result on the second page) more times - (and I think a better data model would be better with navigation properties would be better, but I cannot change it)
    But at another constellation the filtering doesn't work - same error... the following problem occurred: Request aborted
    I also don't want to change the pattern (page 1 to page 2) into popup lists or this fancy new filtering possibilities because it is not suitable for my use case.
    Is there maybe a more elegant solution - because sometimes filtering works, sometimes don't..., do I have an error in my solution (general approach)?
    Many thanks for any input!
    BR,
    Denise

    Hello, yeah you are right, but it works without the odata> stuff because of this in App.controller.js:
    var uri = "http://localhost:32006/JsonOdataService.svc";
    var oModelMS = new sap.ui.model.odata.ODataModel(uri);
    sap.ui.getCore().setModel(oModelMS, "odata");
    oView.setModel(oModelMS);
    So my question is - how to navigate from one page to another - and on the other page first bind a collection to a select and then when selecting bind certain elements (a textfield) to the selected filtered entity.
    The stuff with context and binding won't work, because the two Collections don't have a navigation/association property between them...
    So for example:
    page1
    select a list item with property color: red and year 1985. Press one of the buttons and pass this criteria to another page.
    page 2:
    show a dropdown box with all car names which fullfill this criteria, and when one car is selected, then display the data for THIS car in several text fields.
    This is not a master->detail navigation example, because on page 1 i select certain criterias, and then with buttons I navigate to several pages with those criterias.
    But since the OData model has no relationships it is really hard to do it manually... With a dummy mock.json like in DJ Adams Fiori like SAPUI5 apps it is no problem... But with OData and no things related to each other it is hard...

  • Is Multi Mapping will work with  node function useAsMany with SP10 ?

    Hi friends,
                    I  am  working some sample Multi Mapping scenario . My XI 3.0   SP is  10 .
                    I am getting the following error , while i am testing the Mapping with <b>useAsMany Node function </b> it  is giving the Following Error
    <b>
      Cannot produce target element /ns0:Messages/ns0:Message1/ns1:MT_MSG_IB[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</b>
                     Will Multi Mapping work with this SP 10 ?
    Best Regards.,
    V.Rangarajan

    Hi ,
           I have just taken the Model as the following link
            /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
            I have designed the Objects  as same as which is specified  in that link  . But my Service pack is 10.
            It is showing the above specified error
    Regards.,
    V.Rangarajan

  • POST Function Import in Gateway Builder

    Hi everyone,
    I am trying to create a new Function Import in SEGW transaction (Netweaver Gateway Builder).
    I have followed different blogs (For example: Let’s code CRUDQ and Function Import operations in OData service!) and managed to create one.
    However I am having 2 small differences:
    1.  I am trying to make a Http POST Function Import which is a bit different in the way you call the service.
    2. I have a parameter with type Edm.Guid.
    I have not found any documentation about these 2 specific things.
    Here is what I have...
    My function and it`s parameters in SEGW:
    My metadata:
    The URI I am trying with it`s payload:
    /sap/opu/odata/sap/MY_SERVICE/AddTransferProducts
    with
    <?xml version="1.0" encoding="utf-8"?>
    <atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <atom:content type="application/xml">
    <m:properties>
         <d:DocGUID>guid’12345678-aaaa-bbbb-cccc-ddddeeeeffff’</d:DocGUID>
         <d:Products>R100000</d:Products>
    </m:properties>
    </atom:content>
    </atom:entry>
    With this setup I get the following error when I call the service: 404 not found
    Anyone understands why it is not working ? Anyone already got this issue ?
    Thank you very much.
    Natalie

    Metadata is showing GET method and the cache was cleared.
    Here is a snippet of my code
    CLASS xxxxx_DPC_EXT, method
    /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION
        IF iv_action_name EQ 'AddTransferProducts'.
          IF it_parameter IS NOT INITIAL.
    *       Read Function import parameters values
            READ TABLE it_parameter
              INTO ls_parameter
              WITH KEY name = 'DocGUID'.
            IF sy-subrc = 0.
              lv_docguid = ls_parameter-value.
            ENDIF.
            READ TABLE it_parameter
              INTO ls_parameter
              WITH KEY name = 'Products'.
            IF sy-subrc = 0.
              lv_concat_products = ls_parameter-value.
            ENDIF.
            SPLIT lv_concat_products AT '||' INTO TABLE lt_products.
    *       Save products in the staging table and get product information
            LOOP AT lt_products
              ASSIGNING <lfs_products>.
              ls_transfer_details-matnr =   <lfs_products>-matnr.
             APPEND ls_transfer_details TO lt_transfer_details.
            ENDLOOP.
    *       Build the Document Details entity set to return
            LOOP AT lt_transfer_details
              ASSIGNING <lfs_transfer_details>.
              MOVE-CORRESPONDING <lfs_transfer_details> TO ls_entity.
              APPEND ls_entity TO lt_entityset.
            ENDLOOP.
    *       Call method copy_data_to_ref and export entity set data
            copy_data_to_ref( EXPORTING is_data = lt_entityset
                    CHANGING cr_data = er_data ).
          ENDIF.
        ENDIF.

  • GW Function Import: pass parameter table (e.g. multiple parameters of same type)

    Hello GW experts,
    we have defined a Function Import "CreatePOWithReference" with a parameter "Reference" which contains a string with information about a reference document which shall be used to create a new Purchase Order (PO):
    Now I would like to pass not only a single reference but multiple reference all of the same type "Reference".
    I tried calling the function import with two references like this:
    /sap/opu/odata/sap/ZMP_ODATA_PO_SRV/CreatePOWithReference?Reference='123'&Reference='456'
    But in method "/IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION" my parameter table "IT_PARAMETER" only contains 1 single record:
    How can I achieve that the table "IT_PARAMETER" contains two records (Reference='123' and Reference='456')?
    Thanks and best regards,
    Oliver
    PS: As there can be any number of references, it is not an option to create several parameters "Reference1", "Reference2", "Reference3" and so on... .

    Hello Thomas,
    In my opinion, i do not think you can pass same property multiple times as you are trying now. I really doubt if GW supports this and IT_PARAMETER has only one Reference ( which is sent 1st i.e., 123 ) as you have already shared values read at runtime.. As per my understanding it is the correct behavior of GW where only one reference number - 123 is present in IT_PARAMETER table.
    Other standard way of accomplishing your business case would be implementing CREATE operation and operate it on BATCH.
    Regards,
    Ashwin

  • MyUsedLink Function Import in Launchpad Gateway Service

    In the standard delivered Gateway Service for working with Launchpads there is a function import that updates the frequently used counter to whatever the current counter is +1.
    I have a requirement to provide a button on the UI so that the end user can reset the counter.  Theory being, there job may change and while they may have access to certain applications that are in their frequently used list, they may not need them as frequently any longer and they should have the option to remove them.
    It would have been fabulous to redefine this standard delivered service and make the change, but given the current class inheritance and SAP's unwillingness to unmark a super class as final, this is not possible.
    We are writing a new gateway service whose sole pupose is to update this counter to 0.
    Most of the code to accomplish this can just be copied from existing classes.
    I am struggling with how this should be structured.
    I had put this together in an update entity method.  However, this doesn't seem correct since we are basically passing a reference id like:
    04ZESS0DZESS_MYHR_FPM20005056A51C9D1EE3AFFEA106D591C3EA
    And expecting the code to update some obscure table with a value of 0 for the counter.
    1)     Is this a correct approach?
    2)     Should this be done in a function import given that we aren't really updating the entity per se but rather some end user personalization attribute?
    3)     Is there an issue with having a Gateway Service that is comprised of nothing but one function import?
    Any thoughts on this requirement are appreciated, perhaps we are heading down the wrong path altogether....

    Krishna,
    Thanks so much for your reply.  Exteremely helpful.
    We have been struggling through some of the standard delivered services and UI5 applications (swim lanes).
    I have created a REST service to handle updating the frequently used counter, so much smoother and easier.  I think this is the route we will go.
    However, not to hijack my own thread, but since we started down the oData route initially, I have not been able to get my gateway service to work.  I started by creating an entity called linkid that is simply a string and an entity set that is made of those links.  However, I have not been able to get the update entity method for the entity set to work.
    I am trying to wrap my mind around what we are trying to do and that we aren't really working with an entity set in the traditional sense, but rather importing a key (reference id) and expecting something to happen in the backend but not really updating that entity.
    We originally put this in the LINKS_UPDATE_ENTITY method.  But we aren't even getting that far.  I have googled the message returned but am still somewhat lost.  I am back to wondering if this really shouldn't be in an update method at all, but rather in the execute_action method and whether we should just be doing this with a function import rather than trying to do a put.
    We have created other GW services, but they all have traditional entity sets and there is a get implementation in addition to the update and deletes and that all seems to make sense.  This one just seems odd as what we are trying to do is very focused and seems to be missing half the parts and I'm wondering if that's the problem....
    EDIT: I should mention, that my understanding is that this is an issue with the body of the request, however, I'm not sure how to debug that.

  • SAPUI5 oData Read function

    Hi,
    I'm currently creating an application which binds odata from a thirds party source to a local application.
    Using my odata model, I;m trying to bind the receive data to a form control. I tried using odata model read function, like below:
    this.odataModel = new sap.ui.model.odata.ODataModel("XXXXXX/SAMPLEFLIGHT/");
                 var form2 = sap.ui.getCore().byId("Form2");
                 // insert url parameters
                 this.odataModel.read("/FlightCollection(carrid='"+param1"',connid='"+param2+"',fldate=datetime'2013-05-01T00%3A00%3A00')",
                  null,
                  null,
                  false,
                  function(oData, oResponse){
                  // create JSON model
                  var oODataJSONModel =  new sap.ui.model.json.JSONModel();
                  // set the odata JSON as data of JSON model
                  oODataJSONModel.setData(oData);
                  // store the model
                  form2.setModel(oODataJSONModel, "localModel");
                  console.log(form2.getModel("localModel")); //successful output
    I was able to retrieve the odata, but when I try to display it on my form, the output is blank, below is my view file:
    var oForm1 = new sap.ui.layout.form.Form("Form2",{
           title: new sap.ui.core.Title({text: "Flight Details", tooltip: "Flight Details"}),
           layout: oLayout1,
           formContainers: [
                new sap.ui.layout.form.FormContainer("F2C1",{
                     title: "Flight Details",
                     formElements: [
                          new sap.ui.layout.form.FormElement({
                               label: new sap.ui.commons.Label({text:"Carrier ID"}),
                               fields: [
                                         new sap.ui.commons.TextField({
                                                 placeholder: "Please input carrier ID",
                                                   value: "{carrid}"
                     ], // end of form elements
    I'm sure about the path, since there are no errors generated, and the path is a direct child from the root entry. My question is, what am I missing on odata read function, and how do I properly bind the retrieved data to the form control?
    Thanks in advance!
    Gin

    Hi All,
    Already solved the issue, by investigating the odata property of my model.
    It seems that when JSONModel on odata read function, the root needs an additional "/" for the binding path.
    For example, my recent path:
    value: "{carrid}"
    will now be accessed via
    value: "{/carrid}"
    I hope this will help you regarding same issue.
    Thanks,
    Gin

  • Not able to create Distribution Model nor Import using IDX2

    Hello,
    I have created an RFC destination, and i'm able to connect successfully also remote logon is working with error, i have also created Port associated in RFC destination.
    But when i try to added a message type in distribution model, i get an error rfc destination not maintained.
    Same goes with Import of metadata, i not able to maintain an Port in IDX1, hence not able to import metadata.
    If i import an Idoc or create an external defination will it help.
    any help would be appreciated.
    Regards,
    Abhishek

    >>i not able to maintain an Port in IDX1
    I hope you have created RFC destination in PI system. What error do you see when you try to maintain port?
    Regards,
    Prateek Raj Srivastava

Maybe you are looking for