How to use Style Parameters ?

Hi,
in JDEV I have created a VO with a query (pasted from sqlplus) that does a select cross a couple of tables. I need to parameterise the query but cant see how to do it. It looks like you could use
' where table.atttribute = :1' as part of the query in the View Object designer. Selecting the check box ? Style Parameters means the sql tests as valid. But when you apply the changes you get a value not bound error.
How do you get the parameter from (for example) a form value, into the view ? Is there a way to do this and ignore the variable not bound error mentioned above ?
Seems like it should be intuitive, but I've obviously missed that bit of the developers guide :-)
Any pointers would be great.
Paul

There is no direct way to bind the Form Fields to the query.
You need to do the following:
Use the pageContext.getParameter("param_name") to get the value for the form field.
Use the am.invokeMethod to bind the variable as below in your view method:
setWhereClauseParams(null); // Always reset
setWhereClause(null);
setWhereClauseParam(0,qotHdrId);
executeQuery();
This should work. Hope this helps.

Similar Messages

  • How to use Style in LVC_S_LAYO (ALV Grid Layout)

    Hi Experts,
    I am trying to set field 'STYLEFNAME' of LVC_S_LAYO while setting up layout for ALV GRID using 'SET_TABLE_FOR_FIRST_DISPLAY' . I'm passing the field name contain the styles for each row. I am setting it in the same way we set 'INFO_FNAME' by passing color field name for coloring the rows. Styles are available in include <CL_ALV_CONTROL> .
    Please note styles are working properly when I am setting it at field cat level by setting fieldcat field LVC_S_FCAT-STYLE. But set sets style for entire column. I want to set style for few rows. I want to use style 'ALV_STYLE_BUTTON' .
    Please advice how to do this.
    Regards,
    Sushant.

    I'll try to understand your question.
    You have a 'new-style' alv and want to show some fields as pushbutton.
    To make a cell to be displayed as a pushbutton, we have two steps.
    Firstly, insert a new inner table of type u201CLVC_T_STYLu201D into your list data table.
    *--- Internal table holding list data
    DATA BEGIN OF gt_list OCCURS 0 .
    INCLUDE STRUCTURE SFLIGHT .
    DATA rowcolor(4) TYPE c .
    DATA cellcolors TYPE lvc_t_scol .
    DATA carrid_handle TYPE int4 .
    DATA connid_handle TYPE int4 .
    DATA cellstyles TYPE lvc_t_styl .
    DATA END OF gt_list .
    Fill this inner table for each field to be displayed as pushbutton.
    DATA ls_style TYPE lvc_s_styl .
    READ TABLE gt_list INDEX 7 .
    ls_style-fieldname = 'SEATSMAX' .
    ls_style-style = cl_gui_alv_grid=>mc_style_button .
    APPEND ls_style TO gt_list-cellstyles .
    MODIFY gt_list INDEX 7 .
    As usual, we state our list data table field related with styles in the layout structure at field u2018STYLEFNAMEu2019.
    e.g. ps_layout-stylefname = 'CELLSTYLES' .
    Button click event is handled like hotspot click via the event u201Cbutton_clicku201D through its parameters u201Ces_col_idu201D and u201Ces_row_nou201D which contain the address of the clicked pushbutton cell.

  • How to use Default parameters

    Hello,
    How do I use default parameters from ODP.NET. I have a proc in Oracle that shows Default? = Y when I do Describe in PL/SQL Developer. Therefore, I don't want to pass this parameter at all via ODP.NET/C# call. If I omit this parameter, I get the dreaded "Invalid number or types of parameters" error.
    Thanks for your help,
    Evgueni

    Hi,
    You'll just want to set OracleCommand::BindByName=true. Here's an example, hope it helps.
    Greg
    create or replace function showparams(p1 varchar2, p2 varchar2 default 'foo',
               p3 varchar2, p4 varchar2 default 'bar') return varchar2
    is
    retval varchar2(4000);
    begin
    retval := 'p1 = '|| p1;
    retval := retval || ',p2 = ' || p2;
    retval := retval || ',p3 = ' || p3;
    retval := retval || ',p4 = ' || p4;
    return retval;
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    class testdefault
        static void Main(string[] args)
            using (OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger"))
                con.Open();
                using (OracleCommand cmd = new OracleCommand("showparams", con))
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.BindByName = true;
                    cmd.Parameters.Add( new OracleParameter("retval", OracleDbType.Varchar2,4000));
                    cmd.Parameters["retval"].Direction = ParameterDirection.ReturnValue;
                    cmd.Parameters.Add("p1", "firstval");
                    cmd.Parameters.Add("p3", "secondval");
                    cmd.ExecuteNonQuery();
                    Console.WriteLine(cmd.Parameters["retval"].Value.ToString());
    }OUTPUT
    =========
    p1 = firstval,p2 = foo,p3 = secondval,p4 = bar
    Press any key to continue . . .

  • How to use HTML parameters in Java applet

    Hello
    In perl I have created a form with things like a selectiuon box called currency and text fields called product for example. Then when I click submit the perl program can pick up the currency and product parameters.
    I have read about applet param eg <param name="param1" value="Apple"> is this the same thing? Or is it different?
    Can I use HTML parameters or do I need to use applet param? I am confused.
    If applet param is what I need, then how do I change the param values say by editing text in a text field?

    You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

  • How to use style sheet

    Hi,
    I have created a ui5 page and i want to apply style to it.
    so can anyone help me with the process on how to use the separate css file and style the different elements.
    Thanks

    Hi Anshul,
    use the statement
    jQuery.sap.includeStyleSheet(jQuery.sap.getModulePath("<project name>")+'/resources/css/zexthcmleavereqcre.css');
    This would include your css in the project.
    find attched a sample folder structure make folders under webcontent folder
    in the above case the project name is 'local_json'.
    Make sure you are using the right path to point to your css file.
    Thanks and Regards, Venkatesh

  • How to use event parameters?

    Hi
    I've made simple eem applet for shutdown the port which trigered storm control event.
    It is look like that:
    event manager applet shut-storm
      event storm-control
      action 1.0 cli local python bootflash:shut-storm.py
    and the script is
    from cisco import CLI
    from cisco import cli
    import sys
    import datetime
    import time
    import re
    whitelist = [
    "Ethernet1/1",
    "Ethernet1/2"]
    shlog = CLI('sh logg last 100 | i ETHPORT-5-STORM_CONTROL_ABOVE_THRESHOLD | last 3',False).get_output()
    pat = re.compile(r'(\d{4} \w{3} \d{2} \d\d:\d\d:\d\d) \S+ \%ETHPORT-5-STORM_CONTROL_ABOVE_THRESHOLD: Traffic in port (Eth\S+|[Pp]o\S+)')
    now = datetime.datetime.now()
    delta = datetime.timedelta(seconds=180)
    for l in shlog:
      mobj = pat.match(l)
      if mobj:
        port       = mobj.group(2)
        logTimeStr = mobj.group(1)
        logTimeObj = time.strptime(logTimeStr, "%Y %b %d %H:%M:%S")
        logTime    = datetime.datetime(*logTimeObj[:6])
        if now-logTime < delta:
          if port not in whitelist:
            cli("conf t")
            cli("interface %s" % port)
            cli("shutdown")
    But the python script is a bit complecs because it shoud find triggered interfece in log.
    Is it possible to use event parameters? And how?
    I know that they are:
    sw1# sh event manager history events det
    Event ID Time of Event        Event Type                   Slot       Policies
    32       09/30/2013 15:40:51  storm_control                active(1)  shut-storm
        interface = "Ethernet1/16", cause = "storm-control"

    Thank you Joseph.
    It works.
    Now the applet looks like:
    event manager applet shut-storm2
      event storm-control
      action 1.0 cli local python bootflash:shut-storm2.py $interface
    And the script:
    from cisco import cli
    from syslog import syslog
    import sys
    whitelist = [
    "Ethernet1/1",
    "Ethernet1/2"]
    port = sys.argv[1]
    if port not in whitelist:
      cli("conf t")
      cli("interface %s" % port)
      cli("shutdown")
      syslog(2, "Interface %s was shutdown due to storm conditions" % port)

  • How to use Import parameters of a search help

    Hi,
    Could you please tell me how to use import & export parameters of a search help in the report.

    Hi,
    Import parameters are imported from the selection screen of the report into the search help and then these are used to query in the search help.
    For example
    case 1.
    parameters : p_carrid like sflight-carrid.
    parameters : p_connid like sflight-connid.
    the search help that is used in the above condition is
    SFLIGHT.
    And the selection method is SFLIGHT in this search help.
    ( to check which search help is used go to se11 display the table and put your cursor on the field and in the menu for goto--> search help.)
    so when you do an F4 on connid it looks for a field which is declared like SFLIGHT-CARRID ( and the value entered in it) since the SFLIGHT-CARRRID is an import parameter in the search help,  and queries the database where the value is equal to the p_carrid which is declared like SFLIGHT-CARRID and gets only data which is equal to carrid
    case 2.
    parameters : p_carrid like SCARR-carrid.
    parameters : p_connid like sflight-connid.
    In this case the system will fetch all the data.
    since there is no parameter for SFLIGHT-CARRID on the selection screen it would get all the data from SFLIGHT.

  • How to use init parameters?

    Is it posible to use init parameters with FacesServlet?
    With any other servlet I'd do this:
    <servlet>
    - <init-param>
      <param-name>base</param-name>
      <param-value>/shop</param-value>
      </init-param>
    </servlet>but it doesn't seem correct to the same with the FacesServlet ie:
    <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    - <init-param>
      <param-name>imageURL</param-name>
      <param-value>/images/</param-value>
      </init-param>What is the right way to use init params with JSF?

    You don't have control over the FacesServlet.
    Rather use the context-param.
    <context-param>
        <param-name>paramName</param-name>
        <param-value>paramValue</param-value>
    </context-param>
    String paramName = facesContext.getExternalContext().getInitParameter("paramName");

  • How to use URL parameters in Flex?

    Hello Everyone,
    I wanted to know how can the parameters passed in a URL be used in our Flex application. I searched in the forum and tried these links:
    http://forums.adobe.com/message/217950#217950
    http://www.danvega.org/blog/index.cfm/2009/2/5/Flex-FlashVars-in-local-development
    In the second link, this is the solution provided:
       1. // if we've detected an acceptable version
       2. // embed the Flash Content SWF when all tests are passed
       3. AC_FL_RunContent(
       4.         "src", "ffManager",
       5.         "width", "100%",
       6.         "height", "100%",
       7.         "align", "middle",
       8.         "id", "ffManager",
       9.         "quality", "high",
      10.         "bgcolor", "#869ca7",
      11.         "name", "FFManager",
      12.         "allowScriptAccess","sameDomain",
      13.         "type", "application/x-shockwave-flash",
      14.         "pluginspage", "http://www.adobe.com/go/getflashplayer",
      15.         "flashvars","username=dvega"
      16. );
    private function init():void {
        // grab the username so we can track who is logged in
        [Bindable] private var:username= Application.application.parameters.username;
    But here, I am getting the hardcoded value (ie.,dvega) as the data inside my flex application. Instead I would need the dynamic data that is passed through the URL. For Ex: if I use the URL, http://172.22.41.154/MH_2.html?myName=Arush
    I need would need to use the name 'Arush' inside the application. Can you please help me on how and what part of the code is to be modified?
    Thank you,
    Warm regards,
    Deepak

    That would come within flex.
    In my case, there is a SAP CRM web application which has a push button. On click of this button, flex URL is called(ie., http://172.22.41.154/MH_Bluebook_Integration2.html). On click of that button I need to pass an Object ID, which is passed withing that flex URL, something like this:
    http://172.22.41.154/MH_Bluebook_Integration2.html?objID=abcd
    I need to receive 'abcd' in the flex. Any way we could modify the HTML wrapper to send this value to swf? 

  • How to use additional parameters in SM49

    Hi,
    I wrote a CMD file witch copies a file from one directory to another, the source and destention are both parameteres,
    how do I sent the 2 parameters using SM49?
    the command file looks like this:
    copy %1% %2%
    The system is windows
    Thanks,
    Naama.

    Right click on the References node in the project navigator and select: Add New Library Reference. In the subsequent dialog, specify the path to the jar file you wish to include. This library will be automatically added to the application classpath at design time and deployed with the application when you run the project.

  • How to use DATETIME parameters in stored procedure?

    I can not define a variable or parameters
    with data type of DATETIME
    when I define stored procedure using Developer/2000.
    Does Oracle not support DATETIME?
    null

    Chen Honghua (guest) wrote:
    : I can not define a variable or parameters
    : with data type of DATETIME
    : when I define stored procedure using Developer/2000.
    : Does Oracle not support DATETIME?
    Oracle supports DATETIME data type.
    "DATETIME" data type is stored in "DATE" data type.
    if you want to DEFINE "10-Jan-1998 10:20" :
    declare
    dummy_date date:=to_date('10-jan-1998 10:00','DD-MON-YYYY
    HH24:MI');
    BEGIN
    END;
    null

  • How to use lexical parameters with Sql Server Stored Procedure?

    Hi,
    I'm developing a BI Publisher report on a sql server database. I need to execute a stored procedure to dynamically build the query by replacing the lexical parameters with the values of varaibles of the stored procedure. With Oracle stored procedures, I have used data template and had reference the varaiable in SP by prefixing it with '&'.
    It doesn't work if I try to do the same thing with SQL server. Is there anyone who has come across the similar situation? Please let me know if anyone has got any ideas...
    Thanks in Advance
    Rag

    TopLink currently doesn't support multiple ResultSets. Multiple ResultSets support is considered for a future release.

  • How to use reference parameters (BAPI Import Parameters) in SQL statements

    Dear SAP gurus
    I have a question on using parameters passed in a custom BAPI in SQL statements.
    I am sending 2 parameters  TABLENAME, COLUMNNAME into a custom bapi.
    In the BAPI I need to give an sql command some thing like
    select * from TABLENAME where COLUMNNAME = '100'.
    Where TABLENAME and COLUMNAME may vary depend on what parameters are sent while calling this BAPI.
    Even defining an internal table that has the structure of TABLENAME is not working.
    I used the following statement 'data: ls_TABLENAME type TABLENAME', which generates error message saying TABLENAME is unknons.
    Any feedback will be highly appreciated.
    Thanks
    Ram

    As far as I know you can not give parameter to a select query like that. You should describe the tablename and the columnname as string type.  Then assign the values to them you want to use in query.
    data: str_table type string.
    data: str_column type string.
    select * from  (str_table)  into  <g_t_table>  where (str_column)  = '100'.
    If the table name is not determined until runtime, you must specify an output area with INTO .

  • How to use different parameters for two tables(chart and Table) in one report in SSRS?

    Hi,
    Here is my requirement, i have 7 parameters in my report(Site,Account,LOB,year,Month,WeekDay and Date_Filter),
    and in my report i have one table and one Chart,
    my requirement is the table in the report has to show the data for 6 parameters only i.e(Site,Account,LOB,year,Month and WeekDay).so the table has to consider only 6 parameters, and it has ignore the 7th parameter, table should not consider Date_Filter parameter.
    And Chart has to consider all 7 parameters.
    so, when we preview the report table has to show the data for only 6 parameters and chart has to show the data for all 7 parameters.
    if there is a way to get this Please reply me ASAP, it is an urgent requirement.
    Thanks in Advance,
    Naveen

    Hi Naveen,
    Refer below link to create multiple datasets as suggested by Gnanadurai
    http://technet.microsoft.com/en-us/library/ff714047(v=sql.105).aspx
    Thanks
    Swapna

  • How to use global parameters in Opertional Mapping??

    Hi,
    I have to create 4 mappings.
    1. File to PI(Graphical): To extract Payload form incoming hedaer,payload & trailer & few validation which gives an ERROR variable.
    2. XSLT: payload to IDOC stucture data type.
    3. To IDoc(Graphical): final mapping to IDoc.
    4. Mail mapping: here i need the ERROR variable to flow through all mappings so that I can make an RFC call in this mapping using ERROR variable.
    Please provide inputs.

    Hi Das,
    take XSD of IDoc and add one field (Error flag) and use this structure in first level mapping between File to IDoc1,then IDoc 1 to Original IDoc.
    or
    You can use unsed field in IDoc it self to hold error variable details(may be in control record or some where in IDoc) ,befor esedning data to ECC, suppress this value.
    Regards,
    Raj

Maybe you are looking for

  • How to delete the single record from the  ODS

    HI,    I want to DELETE  the particular record from ODS.. how to delete that.. plz give me the solution.. it's urgent.. with regards @jay

  • The iTunes application could not be opened.  An unknown error occurred

    Has anyone else gotten this problem after downloading iTunes 7? I didn't have this problem with the previous version, and I tried to repair this one and the same problem still happens. Before the error box pops up, though, it asks me to agree to some

  • PowerPC G4 powers down on reboot after installing Leopard 10.5

    After what seemed like a successful install of Leopard 10.5 from Tiger 10.4.11 (got the green check mark and successful install message at the end), upon reboot, my PowerPC G4 went to the gray screen - but before the gray apple appeared, the system c

  • Blackberry Blend on Ipad iOS 8 bad referrer

    I downloaded and intalled blackberry blend, on my ipad 3,  a few times and everytime when i connect to my black berry it just shows a screen that dosnt show my data just some titles or it shows a screen that says "bad referrer" Can someone please hel

  • Cannot receive txts on iPhone 4S (from paypal)

    I have my PayPal account configured with the SMS text security code feature for logons.  I just switched from AT&T to Verizon and I can no longer receive the SMS codes on my new iPhone 4S.  I can send/receive SMS messages to others.  I tried de-activ