How to select value from database view with * in wher clause

Hi ,
  I ahve a database view with some fields.
Now my requirement is to serach a single row on the basis of process type.
Process type can have values like ZBA,ZBC,ZBD,ZBE or similarly anything starting with ZB.
Now i know that starting two letters will be ZB , but dont knwo the last letter.
So how should i use select query for the same?
Should i use like operator for the same?
regards
PG

hi,
u can use character '%'.sample code like this
SELECT reltype
             instid_a
             catid_a
             instid_b
             FROM /dbm/ord_docflow
             INTO TABLE it_link
             FOR ALL ENTRIES IN it_pnwtyh
             WHERE  instid_a  =  it_pnwtyh-instid_a AND
             instid_b  LIKE 'QMSM%'  AND
             typeid_a  = 'BUS2400'  AND
             typeid_b  = 'BUS2400' AND
             catid_a   = 'BO' AND
             catid_b   = 'BO' AND
             reltype   = 'VONA'.
this is similar to using* while we fetch values from table.in the above code only i no QMSM rest values not sure,so used QMSM%

Similar Messages

  • How to retrive data  from  database views or projection views

    how to retrive data  from  database views or projection views

    Hi chintam,
    1. Very simple
    2. Just like normal select statement.
    3. Select * from VIEWNAME.
    4. (Instead of the tablename, we just have to give the viewname)
    regards,
    amit m.

  • How to select data from Maintance View in Program

    Dear All ,
    How to select data from Maintance View V_T052 in abap Program.
    Regards,
    Archana

    TABLES: t179, t179t.
    DATA: v_t179_int TYPE TABLE OF v_t179.
    SELECT * FROM t179
      JOIN t179t ON
        t179prodh = t179tprodh
      INTO CORRESPONDING FIELDS OF TABLE v_t179_int.
    Reward points...

  • Select data from database tables with high performance

    hi all,
    how to select data from different database tables with high performance.
    im using for all entries instead of inner joins, even though burden on data base tables is going very high ( 90 % in se30)
    hw to increase the performance.
    kindly, reply.
    thnks

    Also Check you are not using open sql much like distict order by group by , use abap techniques on internal table to acive the same.
    also Dont use select endselect.
    if possible use up to n rows claus....
    taht will limit the data base hits.
    also dont run select in siode any loops.
    i guess these are some of the trics oyu can use to avoid frequent DATA BASE HITS AND ABVOID THE DATA BASE LAOD.

  • How to popup values from database tables to SelectOneMenu

    Hi friends,
    I am doing a jsf application, in which there is a selectOneMenu
    control and I want that, iwhen this page is loaded after clicking button
    on the previous page, the selectOne Menu should be populated with
    the values from database.
    Also I want , if i will select any menu item from the menu , acccordingly
    another selectOneMenu control should be filled with respective values
    thanx,
    bye

    Oh dear. I don't think anybody can advise you until you are not "kinda" new to Java anymore. Learn Java itself (the language, the platform and the tools), only then should you start considering going into web development.

  • How to select rows from database like 10 to 20 etc

    Hi Experts,
    I want to select rows from database like row number 10 to row number 20.How could it be done?

    HI,
       First get the data into the INTERNAL TABLE from the FLAT FILE and read the internal table using the index.
        ex: 1) Read table ITAB index 10.
              2) Read table ITAB index 20.
    or use as said by  Srinivas Gurram, to get the range of records using where condition to the loop.
    <REMOVED BY MODERATOR>
    Edited by: Ravi Kumar on Jun 9, 2008 4:01 PM
    Edited by: Alvaro Tejada Galindo on Jun 9, 2008 3:16 PM

  • How to set value from one view to other view's context node attr b4 save

    HI all,
    My requirement is as below:
    There are two views in component BP_CONT.
    BP_CONT/ContactDetails    IMPL class
    BP_CONT/SalesEmployee   SALESEMPLOYEE    STRUCT.SALESEMPLOYEE
    I want to set value from first view to second view's context node's attribute.
    i get Sales Employee BP number in ContactDetails view, from here i want to set that value in to STRUCT.SALESEMPLOYEE
    of second view in the same component.
    please send me code snippet for doing the same.
    Thanks in advance.
    seema

    Hi Seema
    You can access the fields from different views by either using custom controllers or by using component controllers, in your case you can access the Sales employee BP number from the Component controller.
    first access the component controller  as below in BP_CONT/SalesEmployee  (in do_prepare_output method) or in (specific setter method)
    lv_compcontroller type ref to CL_BP_CONT_BSPWDCOMPONENT_IMPL,
    lv_partner type ref to cl_crm_bol_entity,
    lv_role type string,
    lv_partner_no type string.
    lv_employee TYPE REF TO if_bol_bo_property_access,
    lv_compcontroller  = me->COMP_CONTROLLER.
    lv_partner ?= lv_compcontroller  ->typed_context->-partner->collection_wrapper->get_current( ).
    lv_role = lv_partner->get_property( iv_attr_name = 'BP_ROLE' )
    IF LV_ROLE = 'SALESEMPLOYEE'
      lv_partner_no ?= lv_current->get_property( iv_attr_name = 'BP_NUMBER' ).
    endif.
    now set the value
    lv_employee ?= me->typed_context->salesemployee->collection_wrapper->get_current( )
    CHECK lv_employee IS BOUND.
        lv_employee->set_property( iv_attr_name = 'SALESEMPLOYEE' iv_value =  lv_partner_no  )
    Thanks & Regards
    Raj

  • How to select value from list with multiple selections ?

    HI,
    i have a list with multiple selections where i show email address retrieved from database.
    what i want to do is to send the selected email address to the invoiceedit.jsp.
    please look at the following code which gives you the better idea.
    <td class='smalltext'><select name="email" size="3" multiple="multiple">
       <% 
       Connection conn = null;
       Statement stmt = null;
       Statement stmt_contactperson = null;
       Statement stmt_address = null;
       try{
          conn = getREConnection();
           stmt = conn.createStatement();
       ResultSet rs = null;
       rs = stmt.executeQuery("SELECT PROPERTYID, VALUE FROM PROPERTIES WHERE ENTITYID="+ g_strGroupID+" AND NAME = 'invoice_default_email'");
       int numofrows = 0;
       while(rs.next())
               %>
       <option value="<%= rs.getString("VALUE") %>" selected="selected"> <%= rs.getString("VALUE")  %> </option>
        <%
           }//end of while
          %>
         </select>
        <a href="invoiceedit.jsp?entityid=<%=g_strGroupID%>&add=1"><font color="#000000">Add</font></a>
         <a href="invoiceedit.jsp?entityid=<%=g_strGroupID%>&email_to="><font color="#000000"> Edit</font></a> </td>thanks

    Use a form button instead of a link so that you can send it as a request parameter to the server. In the server side just use HttpServletRequest#getParameterValues() to obtain all values for the given parameter name. If you really need a link rather than a button, then use Javascript to submit the form on click of the link.
    That said, your design is bad. Java code belongs in Java classes, not in JSP files. Database access logic belongs in a DAO class. Business and controlling logic belongs in a Servlet class. Only presentation logic belongs in the JSP file. Avoid scriptlets as much as possible and use JSP EL and/or JSTL instead.

  • How to select value from DropDownByKey?

    Hi all,
    In my application, I am using 2 Bapis. The first one just for displaying data with all material numbers. The second Bapi is for inserting the Sales data to database. Both of them have Material number. Now from the first Bapi, I displayed all the materials in a dropdown list. Now when i select one value from Dropdown list, and I fill some values for Sales data, then the data has to be stored in database along with the material number.I displayed the material number of first Bapi in my View and the remaining feilds of second (Sales)Bapi. How to do this?
    Help is highly appreciated.

    Hi,
    Step1:
    //Input Tothe First BAPI
         <Bapi>Input input1=new <Bapi>Input();
         wdContext.node<BAPIInput>().bind(input);
            input.set<Param>(wdContext.current<ContextName>Element.get<Param>());
    Step2:
    //Execute the First BAPI
    Step3:
    //Output Of the FirstBapi
    int len=wdContext.node<BAPIList>().size();
    Step4:
         <Bapi2>Input input2=new <Bapi2>Input();
         wdContext.node<BAPI2Input>().bind(input2);
    //SecondBapi Input from First Bapi
    for(int l=0;l<len;l++) {
         String returndata=String.valueOf(((IPrivate<viewname>.I<BAPIList>Element)(wdContext.node<BAPIList>().getElementAt(l))).get<Parameter>());
    input2.set<Param>(returndata);
    //Do Other Input for Second Bapi
    input2.set<Param>("Input");
    //Execute the Second Bapi
    //Output Of Second Bapi//Like Step4
    //Execute the SQl
    Kind Regards
    Mukesh

  • How to populate values from database into a Combo Box?

    Hi,
    How to display all the values of a field of a database table in a combo box inside a grid in B1 user defined form?
    Regards,
    Sudeshna.

    Hi,
    If you are trying to do this on a system form (I gues this is your case, reading the other question), for example Sales Orders, and you want to show the values from a User Defined Table (UDT), you just need to add a User Defined Field on Marketing Documents Line level, and say it is linked to the UDT.
    SBO will automatically show the combo with the values on the Code field of the UDT.
    Regards,
    Ibai Peña
    Sorry, I didn´t read the post well.
    What you could do is each time the form is loaded, read the values from the table, and asign them as Valid Values for the combobox column. You can do this programatically, or using XML (which is recommended becouse of better performance).
    Message was edited by: Ibai Peña

  • *SELECT: How to select value from cube into variable?

    Hi,
    I have an application that need lots of complex calculations.  Currently I am facing problem in retrieving a value from BPC application/database (BW cube) into a script logic local variable.  Let's say the application has  these  following dimensions
    1.  FYPD ( fiscal yr period. 200901, 200902 etc)
    2.  REGION ( A, B , C , D etc)
    3.  PRODUCT(Product ID)
    4.  VERSION ( ACTUAL, FORECAST etc)
    5.  AMOUNT (Sales Amount, signed data )
    Now I need to extract the sales amount into a local valriable where REGION = "A" and  PRODUCT = "SMK-1234" and FYPD = "200905"  and VERSION = "ACTUAL"
    What's should be the equivalent SELECT command? I tried but could not figure out. Any help?
    Regards
    DipM

    Hi DipM,
    There isn't really a concept of local variables for values in script logic. Instead, you'll want to use *WHEN, *LOOKUP, or MDX statements.
    For example, this will copy the value you mention into the PLAN version:
    *WHEN REGION
    *IS A
    *WHEN PRODUCT
    *IS SMK-1234
    *WHEN FYPD
    *IS 200905
    *WHEN VERSION
    *IS ACTUAL
    *REC(FACTOR=1,VERSION=PLAN)
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    *ENDWHEN
    See *WHEN ([link|http://help.sap.com/saphelp_bpc70sp02/helpdata/en/36/339907938943ad95d8e6ba37b0d3cd/frameset.htm]) and *REC ([link|http://help.sap.com/saphelp_bpc70sp02/helpdata/en/25/8d51050c43496887ddff88f13e5f1a/frameset.htm]) documentation for more.
    As mentioned, you can also use *LOOKUP or MDX statements to look up values and drive calculations in *REC(EXPRESSION=....) statements. This functionality is outlined in the SP02 documentation addendum ([link|http://service.sap.com/~form/sapnet?_SHORTKEY=00200797470000088146&_SCENARIO=01100035870000000202&]).
    In the MS Version of BPC, there is a concept of local MDX variables that work with the specialized *GO script logic statement. This statement is not available in the Netweaver version.
    Ethan

  • How to load values from database into the f:selectItems value attribute

    Hi,
    I am trying to load the drop down menu value i.e f:selectItems from the database with a list of values from a column in the databse table. how can i do this? Should i use binding? or is there any other way.
    Note:i am able to load values into f:selectItems from the faces-config.xml file but they are static values. i want the values from the database
    Please reply with sample codes of faces jsp, bean file and config.xml file

    But this is working for me,
    JSF
         <h:selectOneMenu value="#{loadbean.grade}" >
              <f:selectItems value="#{loadbean.gradelist}" />
         </h:selectOneMenu>
    bean
    private String grade;
    private List<SelectItem> gradelist;
    public String getGrade() {
              return grade;
         public void setGrade(String grade) {
              this.grade = grade;
         public List<SelectItem> getGradelist() {
              return gradelist;
         public void setGradelist(List<String> items) {
              gradelist=new ArrayList<SelectItem>();
              gradelist.add(new SelectItem("daniel"));//this value can be from data base
              gradelist.add(new SelectItem("pspindia"));
              gradelist.add(new SelectItem("prelude sys"));
    faces-config.xml
    <managed-property>
              <property-name>gradelist</property-name>
              <null-value/>
    </managed-property>
    this working fine for me. So setter method also works to load value for the h:selectItems
    Thanks a lot.

  • How to select data from a view (V_5UBI_B)

    The following SELECT won't compile.  The compiler gives the message "'V_5UBI_B" is not defined in the ABAP Dictionary as a table, projection view or database view".  I can run SE11 and enter it as the name of a view and pull it up so I'm obviously missing something.
    SELECT SINGLE ercst
        INTO (p_covered_rate_out)
        FROM V_5UBI_B
        WHERE barea = '01'
          AND bplan = p_bplan_in
          AND bcost = '0001'.

    hi,
    do this way ..
    SELECT  ercst up to 1 rows
        FROM T5UBI
        INTO (p_covered_rate_out)
        WHERE barea = '01'
          AND bplan = p_bplan_in
          AND bcost = '0001'.
    ENDSELECT.

  • How to display value from java class with output generated with toplink

    i hava a requirement of displaying (distance ie calculated in java class) with output generated by query.
    ie if output is like
    school name (distance)
    physical address
    here the school name and physical address are retrived from database.

    Hi,
    ValueHolders are used by the JSF internal framework. To work with an object (attributes) in a managed bean you don't need to make it returning a value holder.
    Create a POJO, provide accessor methods and register it as a managed bean. Access it from JSF with EL
    Frank

  • How to read records from Database view

    Hi folks,
    well...let me know, y im getting error as : V_T52EL is not defined in the ABAP dictionary as Table , Projection view or Database view.
    But actually here this View Type is : Maitenance View.
      SELECT  KOART
        from   V_T52EL
        where ENDDA  GE SY-DATUM AND
                 SYMKO  EQ T030-BWMOD.
    plz let me know..guys.
    Regards,
    Kumar

    Hello,
    Maitenace View reocird can be viewed only through Tcode SM30
    Vasanth

Maybe you are looking for

  • Music on iPod is showing as other & will not sync or restore

    Can someone please help?? I turned on my iPod & noticed that all the music was gone. I seen the same amount of space was being used but instead of showing as music storage it is showing as other storage. I didn't think this would be such a problem si

  • The problem is to monitor two experimental parameters

    The problem is to monitor two experimental parameters (pressure and temperature) using USB -6008. These parameters are converted to voltage by proper sensors. I use the following sequence of commans: DAQmxBaseCreateTask("T",&taskHandle); DAQmxBaseCre

  • 11.2.0.2 to 11.2.0.3

    Version: 11.2 Platform : Solaris x86 (64-Bit) I want to upgrade my 11.2.0.2.0 DB to 11.2.0.3.0. I realise that , starting from Sep 2010 release of 11.2.0.2, patchset comes in a single Installable. This is very usefuly when we do fresh Installation. B

  • Imesage verifying wrong number

    My imessage says it is trying to verify a random number? so i cannot send imesgaes from my phone number? how can i fix this?

  • Force to scroll to the ende of a IFrame

    Hello experts, could anyone please explain me if it is possible to enable a button after scrolling a IFrame until the end of the page? PsychoCode: Something like this: --> If IframeScrollToEnd then enable Button. Many thanks Marco