Binding to Odata Service with Input Parameters from HANA

Hello,
I'm developing a UI5 application that consumes a SAP HANA OData service to search a database (using fuzzy search). This service receives an Input Parameter, used to query the database.
So every time the user searches for something I build a new binding path and refresh the model to show the search results in the sap.m.List.
The Model:
var hanaModel =  new sap.ui.model.odata.ODataModel("…/services/seed.xsodata");
this.setModel(hanaModel);
The search event handler from sap.m.SearchField:
var listBinding = this.getView().byId("list").getBinding("items");
listBinding.sPath = "/FoodstuffByNameValuesParameters(P_NAME='" + searchString + "')/Results";
this.getView().getModel().refresh();
My question is if this is the correct approach to create the model and bind the list when we have a service with an Input Parameter, or if there is a better way to do it.
(This approach is actually working).
Regards,
Paulo

i would do
var       filter = [];
var selectFilter = new sap.ui.model.Filter("name", sap.ui.model.FilterOperator.Contains, sVal);
      filter.push(selectFilter);
listBinding .filter(filter);

Similar Messages

  • Call a Graphical Calc view with input Parameters from a Script Based Calc View

    Hi All.
    I am trying to call a graphical calculation view with input parameters from a script based calculation view as below but getting syntax error:
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                 WITH PARAMETERS  ('PLACEHOLDER' = ('$$IP_START_DATE$$',:START_DATE),
                                     'PLACEHOLDER' = ('$$IP_END_DATE$$',:END_DATE));
    START_DATE  and END_DATE are input parameters of the script based calculation view.
    Can anyone please help me with the correct syntax for accomplishing this?
    Thanks,
    Goutham

    Hi Gautham,
    One more option  what i would like you to try is the below option , here i have just changed the order of passing nothing else.
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                   ('PLACEHOLDER' = ('$$IP_END_DATE$$','$$END_DATE$$'),
                                  'PLACEHOLDER' = ('$$IP_START_DATE$$','$$START_DATE$$'))
    Regards,
    Vinoth

  • Calling Web Service with SOAP header from BPEL

    Hi,
    I am calling a web service (with header information) from BPEL. In the Invoke activity, i created a header variable to pass the header information.
    But, when i test the BPEL service, invoke activity fails because the header information is not being passed.
    Below is the error message (copied from clipboard).
    +<messages><input><Invoke_1_getsubinfo_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><getsubinfoElement xmlns="http://ws/its/tabs/webservices/SingleRowWS/SingleRowWS.wsdl">+
    +<pSubnoin>+
    +<insubno>12345678</insubno>+
    +</pSubnoin>+
    +</getsubinfoElement>+
    +</part></Invoke_1_getsubinfo_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke:+
    start fault message:+
    Internal Server Error (Caught exception while handling request: javax.xml.rpc.JAXRPCException: Not authenticated user)+
    *:end fault message*</summary>
    +</part></bindingFault></fault></messages>+
    As said, no header information is visible in the Invoke activity.
    Please provide help for the above issue.
    -MJ

    Hello Patrick,
    Thanks for the response. I am using normal assign activity to assign values to the header variable as shown below. HeadMT is the header variable which is passed in the invoke activity.
    +<assign name="Assign_Header">+
    +<copy>+
    +<from expression="'tkl12'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:USER_NAME" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +<copy>+
    +<from expression="'tkl123'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:PASSWORD" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +<copy>+
    +<from expression="'TKL'"/>+
    +<to query="/ns1:LOGIN_INFO/ns1:CHANNEL_ID" variable="*HeadMT*"+
    part="payload"/>
    +</copy>+
    +</assign>+
    The expected input by the web service is as below with the header information highlighted.
    +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws/webservices/RowWS/RowWS.wsdl">+
    +*<soap:Header>*+
    +*<ns1:LOGIN_INFO>*+
    +*<ns1:USERNAME>tkl12</ns1:USERNAME>*+
    +*<ns1:PASSWORD>tkl123</ns1:PASSWORD>*+
    +*<ns1:CHANNEL_ID>TKL</ns1:CHANNEL_ID>*+
    +*</ns1:LOGIN_INFO>*+
    +*</soap:Header>*+
    +<soap:Body>+
    +<ns1:substatusElement>+
    +<ns1:pInparam>+
    +<ns1:insubno>7674988</ns1:insubno>+
    +</ns1:pInparam>+
    +</ns1:substatusElement>+
    +</soap:Body>+
    +</soap:Envelope>+

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • Error when using Analytic view with Input Parameters

    Hi,
    I am trying to create an info space based on my Analytic view which has input parameters. The infospace is validated and indexed without any issue. However when I ran the view, I get an error (50011) as it is unable to fetch any results. I tried using an infospace based on Calculation view with input parameters and the explorer view works without any issue.
    Has anyone faced similar issues?
    We are using HANA SP 6 rev 67 and BI 4.0 SP 4.
    Also is there a way to enable input prompts for the users when they refresh the BO Explorer view? If not currently available is there any work around ?
    Thanks

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

  • How to write XSJS Select Query with input parameters

    Hello Experts,
    I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View
    I have tried it the following way:
    var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"Country\" FROM \"_SYS_BIC\".\"Test.HL/AddressView\"'
        + 'WITH PARAMETERS(\'PLACEHOLDER\' = (\'$$P_Name$$\', \' Akhil \'),'
      + '\'PLACEHOLDER\' = (\'$$P_City$$\', \' Lucknow \'))';
    But it gives me the "Mixed spaces and tabs error".
    How should I write XSJS Select Query with input parameters?
    Regards,
    Rohit

    >But it gives me the "Mixed spaces and tabs error".
    Mixed spaces and tabs has nothing to do with the syntax of the statement. You used both spaces and the tab in the content - which JSLint doesn't like.  Remove the beginning spaces of each line and use only one or the other.
    The actual syntax of your statement doesn't look right.  The problem is that you are escaping the \ when you don't need to if you are using ' instead of " for your string.  You escape with \" in the first line but then escape with \' in the 2nd and 3rd line.  That is going to cause serious parsing problems with the command.

  • Questions on CDS Views with input parameters

    Dear Experts,
    1. Can we call a CDS View (or generated database view) with input parameters inside an AMDP? I am looking for something similar to the feature in HANA where we can consume calculation view with filters inside SQL Script?
    2. I understand we can next CDS Views, but how we can next (call) a CDS View with input parameters inside another CDS View?
    Thanks,
    Giri

    Hi Thomas,
    I get the below error that the CDS View's generated table function cannot take field from AMDP.
    I have a requirement to query the CDS View using 2 timestamps (start & end). So, in AMDP I have used the TIME_STAMP and try to pass it to the CDS View
    View code:
    define view Z_Ngi_Cag_A
    with parameters start_ts:abap.dec( 15, 0 ) , end_ts:abap.dec( 15, 0 )
    as select from table {
    resource_key
    where
    (begtstmp > $parameters.start_ts or endtstmp > $parameters.start_ts )
    and
    (begtstmp < $parameters.end_ts or endtstmp < $parameters.end_ts )
    I am calling using the below AMDP:
    DECLARE iv_start_date TIMESTAMP;
    DECLARE iv_end_date TIMESTAMP;
    SELECT CURRENT_TIMESTAMP INTO iv_start_date from dummy;
    SELECT ADD_DAYS(CURRENT_TIMESTAMP, 30) INTO iv_end_date from dummy;
    et_data =      SELECT * FROM ZMR_H_CA ( start_ts => iv_start_date, end_ts =>  iv_end_date );
    What could be wrong ? Is this not supported?
    Thanks,
    Giri

  • Execute javascript with input parameters of a taskflow

    Using JDev 11g PS4
    I have a taskflow that uses some javascript. When the taskflow has been loaded, I need to execute a javascript function that uses 2 input parameters of my taskflow.
    I don't really know how I can execute the javascript with my input parameters.
    As a test, I have added a commandButton in my taskflow that will do the job:
    <af:commandButton id="btnRefresh" text="Open">
                <af:clientAttribute name="long" value="#{pageFlowScope.pLong}"/>
                <af:clientAttribute name="lat" value="#{pageFlowScope.pLat}"/>
                <af:clientListener method="doNavigate" type="click"/>
            </af:commandButton>How do I do the same when the taskflow loads instead of needing to push the button.

    Please find attached sample based on your use-case:
    http://adfsampleapplications.googlecode.com/svn/trunk/JavascriptOnLoadSample.rar
    It invokes a javascript function on pagefragment load by passing the input parameters from the taskflow.
    Thanks,
    Navaneeth

  • Error connecting OData service with Appbuilder

    Hello,
    I have created an OData service with SAP Netweaver Gateway and there isn't any problem while testing the service on the browser.
    I made all the right settings in SMP 3.0 and the system is reached successfully from the server.I am developing the app with appbuilder so when trying to connect with SMP onboarding service there is the following error. Failed to get Service metadata.I can see the metadata in the browser so i can not understand what this error means.
    If anybody can help it would be very useful because im in a deadlock.
    Thank you in advance!

    Hi IIliona,
    I am facing the same error
    I can see the metadata in the browser.
    The operation of entity set returns correct results as well.
    Did you fix the it?  If yes, do you mind sharing your solution?
    Thanks!!

  • Calculated view with input parameters

    Hello there.
    I've created a calculated view with input parameters, which I am going to call  it  'VIEW_A'.
    This view has been working just fine.
    But now I have to create another calculated view and import the last one(VIEW_A) in a projection.
    But I got a error when trying to see the data content. 
    It says :
    Error: SAP DBTech JDBC: [2048]: column store error: search table error:  [6968] Evaluator: syntax error in expression string;expected TK_ID,parsing '"DT_DOC_MES_ANO" >= [here]and "DT_DOC_MES_ANO" <='
    At the 'Problems' panel it says the all the input parameters are unmapped.
    What Am I doing wrong?  Sorry but I am kind new at SAP world.

    http://scn.sap.com/message/15489475Hello Tiago,
    Could you please let me know if you're able to resolve your issue, I'm getting the similar error when I'm passing alpha numeric values as parameter via my SP.
    Thanks for your help in advance!
    Regards,
    Sathish

  • Java dynpro - bind a table in the input parameters of an RFC

    Hi ,
      JAVA Webdynpro -  I have to bind a table in the input parameters of an RFC.
      The code below is taking in the N num of rows but is repeating the last row N times and
    sending it to the RFC.
    Ztsgt_Pos_Name postionTab = new Ztsgt_Pos_Name();     
    Ztsgt_Pos_Name.Ztsgt_Pos_Name_List positionTabList = new Ztsgt_Pos_Name.Ztsgt_Pos_Name_List();
             int e = wdContext.nodePosition_List_update().size();
             int f = 0;
             for( f = 0; f < e; f = f+1 )
                  wdContext.nodePosition_List_update().setLeadSelection( f );
         postionTab.setPosition_Nm( wdContext.nodePosition_List_update().currentPosition_List_updateElement().getPosition_Nm() );
                   postionTab.setPosition_Dscr( wdContext.nodePosition_List_update().getPosition_List_updateElementAt(f).getPosition_Dscr());
                  positionTabList.addZtsgt_Pos_Name( postionTab );
                   UpdatePosit.setPosition_List( positionTabList );
            try {
                  wdContext.nodeZRFC_3318_UPDATE_VEND_POSITION().nodePosition_List5().invalidate();
                   wdContext.currentZRFC_3318_UPDATE_VEND_POSITIONElement().modelObject().execute();     
                   wdContext.nodeOutput5().invalidate();
              } catch (WDDynamicRFCExecuteException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();

    Hi SMI SAP Project Team,
    Please check the code for loop and lead selection when you setting the values.
    for( f = 0; f < e; f++)
    Refer to below documents:
    initializing AbstractList Model in Custom Controller
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/761eba66-0401-0010-b982-d5f5bd9e8f90?quicklink=index&overridelayout=true
    Hope it will helps
    Regards
    Arun

  • Input data from HANA

    Hi team,
    Would I input data from HANA to ESP.
    I found SAP HANA output adapter, but I seems to be used for output.
    Is there no way that ESP get data from HANA ?
    Thank you in advance.

    Hello,
    A third alternative for getting data from HANA is to use the getData() function:
      http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01621.0514/doc/html/vge1312573080739.html
    CREATE COLUMN TABLE "SYSTEM"."ALERI" ("C1" INTEGER CS_INT NOT NULL ,
      "C2" INTEGER CS_INT NOT NULL ,
      "C3" INTEGER CS_INT NOT NULL ,
      "C4" VARCHAR(25) CS_FIXEDSTRING NOT NULL ,
      "C5" LONGDATE CS_LONGDATE,
      PRIMARY KEY ("C1")) UNLOAD PRIORITY 5 AUTO MERGE WITH PARAMETERS ('PARTITION_SPEC' = 'HASH 4 C1')
      Insert some data into the "ALERI" table.
    CREATE INPUT stream StockStream SCHEMA (NewColumn1 INTEGER, NewColumn2 INTEGER, NewColumn3 INTEGER, NewColumn4 STRING ,
    NewColumn5 bigdatetime );
    CREATE Flex stock_flex
    IN StockStream
    OUT OUTPUT STREAM stock_traded SCHEMA (c1 INTEGER, c2 INTEGER, c3 INTEGER, c4 STRING, c5 BIGDATETIME)
    BEGIN
      DECLARE
         vector (typeof (stock_traded)) asedata;
      END;
      ON StockStream {
      if(isnull(asedata))
      asedata := new vector(typeof (stock_traded));
      getData(asedata,'HANAODBCService','select * from aleri');
      for(rec in asedata)
      output setOpcode(rec,insert);
      resize(asedata,0);
    END;

  • How to bind values for input parameters from an adf table?

    Hi,
    The version I am using is
    Jdev TP4 11.1.1.0.0
    I need to know how to bind values for input parameters to methods.
    I have created an af:table and I have a button created using a method which is outside the af:table. This method needs to take input parameter values from the column values in the table.
    When I have an adf form instead of the table the binding works.
    Any help?
    Thanks.

    Hi Balaji,
    you need to bind you table to a backing bean and call a method in the backing bean when you hit the button. In the method you get the selected row from the table and have access to the columns of it. Then call the the method with the parameters.
    To bind the table to a bean select the properties of the table, go to behavior section and look for the advanced section 'Binding' property.
    Select the small down arrow at the right side and click edit. In the dialog select or create a bean and property for the table.
    Go to the button properties, look for 'Action', again select the small down arrow and click 'Edit'. Select the bean which holds the table property and create a method for the button.
    The method look like    public void bearbeitenQuelle(ActionEvent actionEvent)
            // Add event code here...
            RichTable lTable = getYourTable();
            Object lData = lTable.getSelectedRowData();
            FacesCtrlHierNodeBinding lNB = (FacesCtrlHierNodeBinding) lData;
            YourViewRow lRow = (YourViewRow ) lNB.getCurrentRow();
        }Hope the get you started
    Timo

  • REST Web Reference with Input Parameters

    I am using  APEX 4.2.0
    I was integrating with remote oracle database with API (Restful)
    it's working me fine from APEX Page items with username and password
    with static contents that located in the:
    Home >Application Builder >Application 179 >Shared Components >Web Service Reference> Edit
    Name
    URL
    Test
    View
    Updated By
    Updated
    Created By
    Created
    GAAS
    http://remotehost:port/api/registered
    username
    47 minutes ago
    in the region of:
    REST Input Parameters
    With the option of 
    Specified Body with Substitutions
    The content is located as static in the source item and I have copied to the below section:
    <?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
    <registerRequested>
        <requestType>register</requestType>
        <firstName>IBRA</firstName>
        <lastName>ADAM</lastName>
        <msisdn>699502112</msisdn>
    </registerRequested>
    So my question is how can I change the above static that I have received from remote side  into the input items
    Example
    :P95_FIRST_NAME
    :P95_LAST_NAME
    :P95_MSISDN
    Thanks in advance

    The APEX forum is here : Application Express
    I'm sure you'll get more help there.

Maybe you are looking for

  • Billing doc types

    Hi Gurus, Can I confirm that invoice list is not a billing doc type and Returns and External transactions are also not billing doc types. I am not sure if only 'returns' is mentioned, does it mean the Returns order , the Returns delivery or credit me

  • IDVD ejects during multiplexing and burning

    Hi folks, I've used iDVD previously (several times) to create DVDs of movies I've created in FCE4. Today, the program goes so far, then ejects the disk during the "multiplexing and burning" / "writing lead-in" portion. When I check, there's nothing o

  • BPM Performance monitoring

    Hi experts, I would like to monitorize the performance of my BPMs. I want to know how much each BPM last. This information it's available in SXMB_MONI -> PE, there I can know that by watching to begining and end of each singular process. 1.-How can I

  • Tabular form, dynamic select list

    Hi, Direction as to how to tackle this problem politely requested please: I have a "choices" table of three columns. Sample data shown below: col1 col2 col3 a b c a b d a b e f g h f g i The plan is to show these "choices" as a tabular form. With the

  • RAW photos & JPEG conversion

    In iPhoto 4, I can store my RAW images, and, by double clicking, get them to open in Photoshop Elements in RAW mode - which is what I want to do. In iPhoto 5, it seems I can't do this. The instructions are that I should move it to the desk top, then