How to expose odata service for input parameter based procedure.

i have created one procedure in my schema.
CREATE PROCEDURE TEST
(in id varchar) AS
BEGIN
SELECT * FROM "table" WHERE "ID" = :id;
END;
and i am able to call the procedure from console.
CALL "schema"."TEST"('1')
my question is how to expose this procedure as odata service.
is there any way to do it. ???

hello Avinash. this is where i stuck in my code. i dont know how to wrap procedure in calculation view..
My procedure code is below.
create procedure "Get_User_for_Project"(in PROJECT_ID VARCHAR(255), out OUTPUT_TABLE "schema"."test_table")
language SQLSCRIPT sql security definer  as
BEGIN
truncate table "schema"."test_table";
OUTPUT_TABLE = SELECT "ID", "FIRST_NAME", "LAST_NAME" FROM "schema"."U_USER" WHERE "ID" IN (SELECT "USER_ID" FROM "schema"."U_USER_PROJECT" WHERE "PROJECT_ID" = :PROJECT_ID);
END;
my procedure is working fine. i just need help to wrap in calculation view with input parameter.

Similar Messages

  • How to get search help for 2nd  parameter based on the 1st parameter value

    Hi all!
       I have 2 parameters (material no, revision level). I have created a search help for revision level. It has an importing parameter :material no. and one exporting parameter : revision level.When I checked it, it's giving the revision values only for the specified.
    In my report , I have kept these 2 materials in my selection screen.For revision level , I have added the matchcode object which I have created. When I  pressed F4 for revision level, it's giving all the values irrespective of the material no. in the first parameter. How to solve it? Please suggest.

    Hi,
    Try this code filling internal table fields,
    DATA: BEGIN OF values,
            OID TYPE ZCL_OBJECT-OBJECTID,
            ODEC TYPE ZCL_OBJECT-OBJECT_DESC,
           END OF values,
           W_FIELD(10).
    DATA: ZCL_PROJECT-PROJECTID type zcl_project-projectid,
          ZCL_OBJECT-OBJECTID(5).
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab LIKE TABLE OF values.
    CALL SCREEN 100.
    *&      Module  VALUE_PROJECTID  INPUT
          text
    *MODULE VALUE_PROJECTID INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
          EXPORTING
               tabname     = 'ZCL_PROJECT'
               fieldname   = 'PROJECTID'
               dynpprog    = progname
               dynpnr      = dynnum
               dynprofield = 'ZCL_PROJECT-PROJECTID'.
    *ENDMODULE.                 " VALUE_PROJECTID  INPUT
    *&      Module  VALUE_OBJECTID  INPUT
          text
    MODULE VALUE_OBJECTID INPUT.
       CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname             = progname
                dynumb             = dynnum
                translate_to_upper = 'X'
           TABLES
                dynpfields         = dynpro_values.
      READ TABLE dynpro_values INDEX 1 INTO field_value.
    W_FIELD = FIELD_VALUE-FIELDVALUE.
      SELECT  OBJECTID
              OBJECT_DESC
        FROM  ZCL_OBJECT
        INTO  (VALUES-OID,
               VALUES-ODEC)
    WHERE PROJECTID = FIELD_VALUE-FIELDVALUE.
       APPEND VALUES TO VALUES_TAB.
    ENDSELECT.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'OID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'ZCL_OBJECT-OBJECTID'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.
    ENDMODULE.                 " VALUE_OBJECTID  INPUT
    *&      Module  INIT  OUTPUT
          text
    MODULE INIT OUTPUT.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
      field_value-fieldname = 'ZCL_PROJECT-PROJECTID'.
      APPEND field_value TO dynpro_values.
      IF SY-UCOMM = 'BACK'.
        LEAVE program.
    ENDIF.
    IF SY-UCOMM = 'ANS'.
       LEAVE  TO SCREEN  '0'.
    ENDIF.
    ENDMODULE.                 " INIT  OUTPUT
    START-OF-SELECTION.
    WRITE: / field_value-fieldvalue,
             W_FIELD.
      LOOP AT VALUES_TAB INTO VALUES.
        WRITE / VALUES.
      ENDLOOP.
      if sy-subrc <> 0.
        WRITE / field_value-fieldvalue.
      endif.
    Plzz reward points if it helps

  • How to change data type of input parameter

    Hi
    In my procedure i declared the data type of "Value Date" Input parameter as Date where as in CR it is showing data type as "Date Time". Can any one please specify how to change to Date.
    While prompting for input parameter in description it is showing message as
    Please enter Date time in format"yyy-mm-dd hh:mm:ss" . To change the content selected "format field" option. But is there any way to change input parameter data type.
    Please suggest how to change.
    Thanks Sruthi

    Hi Sruthi,
    all you need to do on this is open the report go to the parameters, select the parameter that you wish to change and click "Edit". This will allow you to change thefield to a date rather than a date time.
    Regards,
    Noel

  • How can I pass Recordsets as input parameter to a Function ?

    Hi Gurus,
    I want to create a function that receive recordsets as input parameter also returns recordsets as output.
    I have a requirement to do stock taking for all order items of one Order number in one single query execution (to avoid row by row basis).
    From the post in the forum I know that a function can return recordsets / query result using REF CURSOR or pipelined table function.
    My question is : how to pass the recordsets as input parameter to that function ?
    (because I could have 75 rows item in one order number)
    Below is the DDL and the query :
    create table stocks (Product char(4), Warehouse char(5), expireddate date, qty_available number)
    insert into stocks values('P001', 'WH001', '01-dec-2006', 30)
    insert into stocks values('P001', 'WH002', '01-dec-2006', 50)
    insert into stocks values('P001', 'WH002', '01-jan-2007', 50 )
    insert into stocks values('P001', 'WH001', '01-Mar-2007', 150)
    insert into stocks values('P002', 'WH003', '01-dec-2006', 25)
    insert into stocks values('P002', 'WH003', '15-Jan-2007', 50)
    insert into stocks values('P002', 'WH003', '01-Mar-2007', 75)
    insert into stocks values('P003', 'WH001', '01-dec-2006', 30)
    insert into stocks values('P003', 'WH002', '15-Jan-2007', 40)
    insert into stocks values('P003', 'WH003', '01-Mar-2007', 50)
    CREATE TABLE Order_Detail (PRODUCT_ORD CHAR(4), QTY_ORD number, Priority_WH CHAR(5) )
    INSERT INTO Order_Detail VALUES ('P001', 75, 'WH003') // previously 'WH002'
    INSERT INTO Order_Detail VALUES ('P002', 45, 'WH002')
    INSERT INTO Order_Detail VALUES ('P003', 55, NULL)
    The query for stock taking :
    select product,warehouse,expireddate, least(qty_available-(sm - qty_ord),qty_available) qty
    from ( select product,warehouse,expireddate,qty_available,qty_ord, sum(qty_available) over(partition by product order by s.product,expireddate,decode(warehouse,priority_wh,0,1),warehouse ) sm
    from stocks s,order_detail o
    where s.product = o.product_ord order by s.product,expireddate,decode(warehouse,priority_wh,0,1) )
    where (sm - qty_ord) < qty_available

    Hi,
    This my requirement :
    I have (simplified)Order_Detail as below :
    CREATE TABLE Order_Detail (PRODUCT_ORD CHAR(4), QTY_ORD number, Priority_WH CHAR(5) )
    INSERT INTO Order_Detail VALUES ('P001', 75, 'WH003') // previously 'WH002'
    INSERT INTO Order_Detail VALUES ('P002', 45, 'WH002')
    INSERT INTO Order_Detail VALUES ('P003', 55, NULL)
    Then I want to do stock taking from my STOCK table (described on my first post on this thread)
    create table stocks (Product char(4), Warehouse char(5), expireddate date, qty_available number)
    The rule is : The stok taking is on First In First Out basis, on expireddate.
    And I want to do it in single query.
    I want to make this a Function / Stored Procedure so that other transaction can also make use of this query.
    That is why I need to pass the 3 rows oy mr Order_Detail above, do the query, and return the result.
    Then INSERT the result into ORDER_DETAIL_PER_EXPIRED_DATE table.
    I hope this clear my requirement, is this possible ?
    Thank you,
    xtanto

  • How to make a form for input in web interface builder

    Hi expert:
        How to make a form for input in web interface builder?I have already used it to do PS planning, but I don't know how to  draw lines and checkboxes . Thanks in advance.
    Allen

    WAD:
    Open the WAD and create a new template. On the left hand navigation you will have several Web Items available. Under 'Standard' you have 'Analysis' item. Pull that into your template to the right. Under the Properties tab you need to pick the query [form/layout] that you have built in Query Designer.
    You will also find other items such as Button group, Checkbox, drop down, list box etc available. Pick and drag into the template whatever it is you require. Lets say you want a button. Under the Properties tab select the 'Command' that you require. You could use standard commands that are available there. You could also define functions and commands that you require.
    Query Designer:
    Open the QD and drag the characteristics and key figures that you require into the rows and columns of the QD. You would need to specify restrictions under the Filter tab of the QD based on the granularity of data that you require. You would need to remember that the key figures need to be made Input Ready [do this by clicking on KF and on the planning tab select "change by user and planning functions"].
    This shouldgive you a start. After you've explored it yourself a bit we can discuss further and I can certainly provide you additional details/material on these areas.
    Srikant

  • How to consume OData service in  sapui5

    hi,
        how to consume Odata service  in sapui5 (table).
      If any idea  please share with me.

    i tryed but  some error comes:-
    Failed to load resource: the server responded with a status of 401 (Unauthorized) https://xxxxxxxxxxxxxx.com/sap/opu/odata/sap/Z_BANK/$metadata
    Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:55176' is therefore not allowed access.

  • How can I find services for object for PM Notification

    Hi all
    How can I find services for object(attached files ) for PM Notification  ?
    I can see then,for examle ,using transaction Iw22 :System---->Services for object
      My requirement are : 1. open attached file of selected notification for display ( if exists one)
                                     2. If user wants to attach file as service of object
                                           what function exists for it ?
    Please your help

    Hi SD,
    I have checked in SUIM and SU24 also. But I didn't find.  Could you please tell me any other way to finding out the authorization objects.
    Thanks,
    bsv.

  • How to determine number range for billing document based on company code ..

    Hi Friends!!
    can anybody tell me how to determine number range for billing document based on company code & tax departure country if required??
    Amit...plz help me!!

    Hi Amit,
    1. Define different Billing Document number ranges in  SPRO -> Sales & Dist -> Billing -> Define number ranges for billing docs. (VN01). Make sure that all are internal number ranges.
    e.g.
    NO.  From number To Number    Current number  Ext
    A1   0930000000    0930999999
    A2   0940000000    0940999999
    A3   0950000000    0950999999
    2. Define a Ztable ZNUMB_RANGE as follows
    Comp. Code | Tax departure country | Billing Doc Type | Number Range
    100                IN                               F2                      A1
    200                IN                               F2                      A2
    200                US                              F2                     A3
    3. In user exit RV60AFZZ (USEREXIT_NUMBER_RANGE)
    Read table ZNUMB_RANGE for Number Range with Comp. Code, Tax country and Billing Doc.
    If found pass this number range value to us_range_intern.
    us_range_intern is a standard SAP variable which tells program which number range use to create the current document which is under process.
    Let me know if you are clear.
    Thanks,
    Mandar

  • Custom UI or editor for input-parameter

    I think I need to implement a custom UI editor for an input-paramenter.  My input parameter is really a HashTable. I'd like to present a dialog that allows the user to enter any number of key value pairs.  The optional "editor" element  looks promising because it allows you to specify a ui-component.  I have searched and searched for sample code, but haven't found any.  Would some kind soul please point me to a resource that shows how to implement such as custom UI (whether it involves the "editor" element or not)?
    Here's a link to the ui-component element in the reference:
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/js/html/w whelp.htm?href=000959.html#1548965&accessible=true
    Thanks,
    Halynn

    I appreciate the reply.
    I was actually trying to point to another page, although that page may be applicable.  Apparently the URL in my browser window was not sufficient to recreate my state in livedocs.  I was looking at the reference for component.xml, specifically where it describes an optional <editor> element of <input-parameter>.  This <editor> component also has a child called <ui-component>.  I haven't found any sample code that uses these two elements.
    I need to call my component with a Map or Hashtable (an arbitrary set of Key/Value String pairs).  This Map needs to be easily configurable in LiveCycle Workbench.  I've seen numerous operations that popup dialogs for input-parameters and serialize their data.  I was thinking that I will have to implement my own dialog.
    It sounds like you are suggesting I can achieve this with a variable and the set value service.  I don't quite understand.  How would I insert the string pairs?
    Thanks,
    Halynn

  • 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);

  • Set max length for input parameter in SSRS

    I have an input parameter (@year)   to display a simple report. This input parameter taken Year from user (ex: 2015) manually. Here my problem is to restrict the user to max length of
    4. It should allow only (ex:2015) not (ex:20155) like that. Can any one please suggest me how to do this. 

    Hi SaikumarN,
    According to your description, you want to restrict the length of values which user type in the parameter box.
    In Reporting Services, it’s not supported to limit the length of the typed value in the parameter box currently. For your requirement, you could provide Microsoft a feature request at
    https://connect.microsoft.com/SQLServer, so that we can try to modify and expand the product features based on your needs.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Set Null as Default  for input parameter to a stored procedure

    hi ,
    How can we set default values as NULL to an input parameter in a stored Procedure.
    create or replace procedure emp_proc ( p_test_input in varchar2
                                                        p_emp_id in number,
                                                        p_emp_name in varchar2,
                                                       p_manager_id in number )
    as
      begin
       if ( upper ( p_test_input ) = 'I' )
       then
          insert into emp
          values      ( p_emp_id  ,p_emp_name ,p_Manager_id,sysdate );
       elsif ( upper ( p_test_input ) = 'D' )
       then
          delete from emp
          where       emp_id  = p_emp_id;
       else
          dbms_output.put_line
             ( 'Please input ''A'' for ADD or ''D'' Delete  EMPLOYEE'
       end if;
    end;As Shown above if i want to do only delete operation
    i want to call this procedure like without passing extra parameters .
    EXECUTE  emp_proc('D',1010);Edited by: Rede on May 28, 2010 12:21 PM
    Edited by: Rede on May 28, 2010 12:22 PM

    create or replace procedure emp_proc ( p_test_input in varchar2,
                                                        p_emp_id in number,
                                                        p_emp_name in varchar2 default null,
                                                       p_manager_id in number default null )

  • How to get and parse xml input parameter?

    Hi,
    If one transaction input parameter is xml string, like as below.
    <a>
    <b>
        <c>1</c>
        <d>2</d>
    </b>
    <b>
        <c>3</c>
        <d>4</d>
    </b>   
    </a>
    If I would like to get each element (maybe by repeater action), how to do that?
    Thanks!

    Hi,
    You must convert the string into xml with necessary action block. (XML Functions --> String to XML Parser)
    Then you must put a repeater after converter action and you must set Xpath expression for repeater (configuration) like below:
    String_To_XML_Parser_0.Output{/ARef/BRef}
    after repeater you can use values like below:
    Repeater.Output{/BRef/c}
    Repeater.Output{/BRef/d}
    Regards.

  • How to Expose the service to tuxedo :Todd Little  Please help.

    Hi all,
    I am trying to expose the service to tuxedo.In unix system with tuxedo 9.1
    I am starting with the simple app service .I prepared UBB config file. As follow:-
    # samples/atmi/simpapp/ubbsimple     $Revision: 1.5 $"
    *RESOURCES
    IPCKEY          51501
    UID          106
    GID          104
    PERM          0666
    MAXACCESSERS     1000
    DOMAINID     clarify
    MASTER          appsrv01
    MAXSERVERS     50
    MAXSERVICES     60
    MODEL          SHM
    LDBAL          Y
    *MACHINES
    chard1     LMID=appsrv01
              APPDIR="/apps/test/tuxedo/appsrv"
              TUXCONFIG="/apps/test/tuxedo/appsrv/tuxconfig"
              TUXDIR="/apps/test/tuxedo"
              ULOGPFX="/apps/test/tuxedo/samples/atmi/simpapp/LOGS_SAULOG/OLOGS"
              TLOGNAME="TLOG"
              TLOGSIZE=100
    *GROUPS
    "GROUP15" "LMID=appsrv01"     GRPNO=15     OPENINFO=NONE
    *SERVERS
    DEFAULT:
              RESTART=Y
              MAXGEN=5
              CLOPT="-A -- -n //10.106.1*3.**5:48800 -d /dev/tcp"
    simpserv     SRVGRP=GROUP15 SRVID=169
    *SERVICES
    TOUPPER
    When I am compiling this file I get
    883 ERROR: tmloadcf cannot run on an active node .
    I changed IPC key also ,tried to shut down the server but not able to shut down the server.then I tried to kill the server.still no sucess.
    Please answer some of my question.
    1)can my application placed in any folder other and execute compile tmloadcf from there?
    2)How to test my service using command prompt.
    I have also updated the Jrepository .
    Please if you find some required changes please let me know how to get those values which system specific eg I got server name using name -n command.
    Please anybody help me.

    Hi! I guess it's nice to get called upon by name. :-)
    As user878 mentions, the problem trying to execute tmloadcf is related to the fact that the associated IPC resources are already considered active by Tuxedo, i.e., you did a tmboot with a given TUXCONFIG and that Tuxedo environment is still running.
    Specifically to answer your questions:
    1)can my application placed in any folder other and execute compile tmloadcf from there?Where the files reside is almost immaterial. What is key is what the environment variable TUXCONFIG points to. That file defines a Tuxedo environment and is created with the tmloadcf command. Once the application is booted, you can't use tmloadcf to change the configuration. You either need to use the tmconfig command or shutdown the environment and then issue the tmloadcf command and then reboot the environment.
    2)How to test my service using command prompt.Tuxedo only provides a generic command line client for Tuxedo services that use FML or FML32 buffers. The commands are ud and ud32. For Tuxedo services that use other buffer types, you will have to develop a specific client.
    I have also updated the Jrepository .The Jolt repository is only needed if you are using Jolt, the Java client API to Tuxedo services.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Cl_salv_table - How to set grid ready for input

    Hi,
    I am using the class "cl_salv_table" on a 6.40 system to display an ALV grid.  How can I set the grid cells are ready for input/editing? 
    ( Something similar to slis_layout_alv-edit parameter  
    use in the REUSE_ALV_GRID_DISPLAY function )
    I have looked at the demo programs SALV_TEST_TABLE* and
    SALV_DEMO_TABLE*.  Unless I am blind I cannot find a way.
    Any suggestions?
    Lukas
    Message was edited by: van vuuren lukas

    Hi,
    thanks for the reply,
    I do not call the SET_TABLE_FOR_FIRST_DISPLAY,
    as far as I can tell SALV does not require this. 
    Here is in short  what my program looks like:
    data: lr_salvgrid  type ref to cl_salv_table,
          lr_columns type ref to cl_salv_columns_table,
          lr_column  type ref to cl_salv_column,
          gt_matdoc type mb_mkpf.
    I call method  cl_salv_table=>factory to get a reference to my itab:
            call method cl_salv_table=>factory
              exporting
                list_display = if_salv_c_bool_sap=>false
              importing
                r_salv_table = lr_salvgrid
              changing
                t_table      = gt_matdoc.
    Then for fieldcatalogue:
    i.e. hide columns etc
      lr_columns = lr_salvgrid->get_columns( ).
      lr_columns->set_optimize( abap_true ).
      lr_column = lr_columns->get_column( 'MANDT' ). 
      lr_column->set_visible( abap_false ).
    Then to display:
      lr_salvgrid->display( ).
    I would have thought that the edit parameter would be somewhere in the fieldcat ( in class CL_SALV_COLUMN )
    but I cannot find it there.  Everything else like text/edit mask/currency/visible etc is here but not edit.

Maybe you are looking for

  • Ipod Won't Sync, gives several error messages

    I have been having trouble with my itunes lately. Whenever I try to plug my ipod into my computer when itunes is up, the error messages "The ipod "Alexander's Ipod" cannot be synced. The required disk cannot be found" and "Attempting to copy to the d

  • BCC in Lion iPhoto

    How do I 1 - find a Blind C.Copy feature when sending photos from iPhoto? 2 -how do I see if mail is SENT? Thanks

  • Please advice process GR/IR, Dr and Cr

    Hello everyone. please advice process of GR/IR and if you have relevant document . please share to me I just know basic process GR Dr  Inventory        XXX   Cr   GR/IR clearing    XXX process IR Dr  GR/IR clearing   XXX   Cr    Vendor but I saw docu

  • MTS / COM+ distributed transactions

    How much support for Microsoft's MTS / COM+ distributed transactions is contained within the ODBC driver for Oracle that is distributed with Oracle9i for Windows? Does the ODBC driver support the Oracle Services for MTS that comes with the 9i client?

  • Number of columns in composite key

    Hi, I would like to know ,how many number of columns can be included in a composite primary key. thanx in advance Regards Rupesh S