Unable to update the values from store procedure

hi ,
I have simple table with 3 columns. id, name , sal. am updating the salary based on names. 
alter PROCEDURE p1(@names varchar(100))
AS
BEGIN
declare @empData varchar(200)
set @empData= '''' + replace(@names,',',''',''')+''''
print @empData
update tmp set sal =10 where name in ( @empData )
END
GO
if I execute same query (update tmp set sal =10 where name in ( @empData )) outside with printed @empData data it is working fine.
why the same is not working with SP ?
any ideas...

You need to split the list into a temporary table or table valued variable:
alter PROCEDURE p1(@names varchar(100))
AS
BEGIN
declare @empTable table ([name] varchar(100));
declare @p int = 1;
declare @len int = len(@names);
declare @nextP int = charindex(',', @name, @p) ;
set @nextP = case when @nextP = 0 then @len else @nextP end;
while @p < @len
begin
insert into @empTable
values (substring(@names, @p, @nextP-1));
set @p = @nextP + 1;
Set @nextP int = charindex(',', @name, @p) ;
set @nextP = case when @nextP = 0 then @len else @nextP
end
update tmp
set sal =10
where name in (Select [name] from @empTable );
END
GO
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

Similar Messages

  • Unable to retrieve the values from stored procedure

    Hi all
    I written one procedure and when i am trying to invoke that store procedure from jdbc it is throwing the following error .
    java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.DelegatingCallableStat
    ement
            at com.srit.hrnet.helpdesk.grievancemechanism.GrievanceComplaintDAO.getE
    mployerGenDetails(GrievanceComplaintDAO.java:895)
            at com.srit.hrnet.helpdesk.grievancemechanism.GrievanceComplaintAction.d
    eleteComplaints(GrievanceComplaintAction.java:1095)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchActio
    n.java:276)
            at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:
    196)
            at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:421)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:226)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116
    4)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at com.srit.hrnet.filter.SessionValidateFilter.doFilter(SessionValidateF
    ilter.java:79)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:178)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :856)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ssConnection(Http11Protocol.java:744)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
    int.java:527)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
    lowerWorkerThread.java:80)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
    ool.java:684)
            at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
            at com.srit.hrnet.helpdesk.grievancemechanism.GrievanceComplaintAction.d
    eleteComplaints(GrievanceComplaintAction.java:1098)and my code is
    store procedure is
    ============
    create or replace procedure SP_HD_GRIEVANCE_DELETE_DETAILS(in_queryid IN number DEFAULT NULL,RC1      IN OUT globalPkg.RCT1)
    as
    queryId number(18,0);
    BEGIN
    SP_HD_GRIEVANCE_DELETE_DETAILS.queryId := SP_HD_GRIEVANCE_DELETE_DETAILS.in_queryid;
      IF  SP_HD_GRIEVANCE_DELETE_DETAILS.queryId  = 1 THEN
             BEGIN
             OPEN RC1 FOR
            select HGRMCODE as compcode,emcode as applyEmpId,EMFNAME as assName,designame as desig,deptname as department ,to_char(HGRMOCCRDT,'DD/MM/YYYY') as occdate,
                        HGRMSLATYPE as category,HGRMSUBCAT as subcat,HGRMSLAPRIORITY as priority,HGRMSTATUS  as status from EMP_MSTR,HD_GRIEVANCE_RM_MSTR,
                        dept_mstr,desig_mstr where EMCODE=HGRMAPPLYEMCODE and EMDEPTCODE=deptcode and desigcode=EMDESIGCODE order by HGRMCODE;
            END;
         END IF;
    END SP_HD_GRIEVANCE_DELETE_DETAILS;and javacode is
    ==========
    con = new DBConnection().getConnection();
    java.sql.CallableStatement stmt = con.prepareCall("{call SP_HD_GRIEVANCE_DELETE_DETAILS(?,?)}");
                        stmt.clearParameters();
                        stmt.setInt(1,1);
                        stmt.registerOutParameter(2, OracleTypes.CURSOR);
                        stmt.execute();
                        cursor = ((OracleCallableStatement)stmt).getCursor(1);
    list  = new ArrayList();
                        while (cursor.next()) {
    compTO = new GrievanceComplaintTO();
    list.add(compTO);
    }where GrievanceComplaintTO is formbean class
    Please Guide me.
    Thanks in advance.

    Obviously, this
    cursor = ((OracleCallableStatement)stmt).getCursor(1);fails because you don't get an OracleCallableStatement.

  • Unable to get the values from ISearchResultList

    Hi,
    I am working on KM Indexmanagemnt API for searching with TREX, to build a search similar to msn or google.
    I am following the example of Thilo Brandt, and after building the query, I am unable to retrieve the result from ISearchResultList, the results size its displaying is zero. But session.getTotalNumberResultKeys() is retrieving a value 20.
    Here is the code I am using, please tell me where I am doing wrong.
    public class SearchComponetOne extends AbstractPortalComponent {
         public void doContent(IPortalComponentRequest request,     IPortalComponentResponse response) {
      com.sap.security.api.IUser nwUser =
                   UMFactory.getAuthenticator().getLoggedInUser();
    com.sapportals.portal.security.usermanagement.IUser user = null;
    try {
          user = WPUMFactory.getUserFactory().getEP5User(nwUser);
         } catch (UserManagementException e) {
                   response.write(e.getMessage());
       response.write("<html><head><title>Search</title></head><body>");
      ResourceContext c = new ResourceContext(user);
      try {
        IIndexService indexService = (IIndexService) ResourceFactory
                             .getInstance()
                             .getServiceFactory()
                             .getService(
                             IServiceTypesConst.INDEX_SERVICE);
       SearchQueryListBuilder sqb = new SearchQueryListBuilder();
       sqb.setSearchTerm("sap");
      IQueryEntryList qel = sqb.buildSearchQueryList();
      // get an instance of federated search
    IFederatedSearch federatedSearch =
                   (IFederatedSearch) indexService.getObjectInstance(
              IWcmIndexConst.FEDERATED_SEARCH_INSTANCE);
         List indexList = new ArrayList();
         String index = null;
         if (index != null && index.length() > 0) {
              // take a specified index from index= parameter
              indexList.add(indexService.getIndex(index));
         } else {
              // take all available indexes
              indexList = indexService.getActiveIndexes();
         // it is recommended to use a search session object
         // for searching execution
         ISearchSession session = null;
         if (session == null)
         session = federatedSearch.searchWithSession(qel, indexList, c);
    response.write("Inside doContent session.getNumberResultKeys() => " + session.getNumberResultKeys()); // output as 20
         this.renderResultHeader(response, session, indexList);
         // get all results from the search session
    ISearchResultList results =     session.getSearchResults(1, session.getTotalNumberResultKeys());
    response.write(" from session => " + results.size() + " and size is : " + results.toString());  // I am getting the results.size() as zero
    Thanks

    I think the problem is UME related. I had the same problem once. Try using a system user for searching, instead of the logged on user.
    Like this:
    com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getUser("cmadmin_service");
    Please reward the points if this helps.

  • Unable to get the value from the textfield in valueChangeEvent

    Hi,
    I have created one custom textField by extending the CoreInputText. Now i have attched default ValueChangeListener to it. I am using this textField in my application.
    Now i type some thing and do a focus lost, the value change listener get called. i want to validate the value entered. In that listener method if i take the getSource() from ValueChnageEvent object and do a getValue() I am getting the entered value.
    My problem is that if i do a getValue() of the textField i am not gettting the value entered.
    How can i get the entered value from the textfield.? Is there any method to notify to do this?
    Thanks in advance.

    Hi,
    I tried to the value from coreInputText also. If i check the getValue method of the component, i am getting the last updated value. I have debug the FlowPhaseListsner also. And i found that this listener is calling before the updateModel phase. Due to that i am not getting the value from the Field.

  • Unable to get the values from PAYLOAD

    Hi,
    i'm unable to get the values of payload. When i use
    currentTask = client.getTaskQueryService().getTaskDetailsById(workflowContext, taskID);
    Element payload = (Element)currentTask.getPayloadAsElement();
    node = (Element)payload.getFirstChild();
    System.out.println(node.getElementsByTagName("documentName").item(0).getNodeValue());
    I get null but i instantiate the bpel process with a value and i have
    - <payload>
    - <ns1:DocumentReviewProcessRequest xmlns:ns1="http://xmlns.oracle.com/bpel/Review">
    <ns1:documentTitle>vbvnmbvn</ns1:documentTitle>
    <ns1:documentName>bvnbvnvn</ns1:documentName>
    <ns1:URI>http://www.first.pt</ns1:URI>
    <ns1:assignees>gestdoc</ns1:assignees>
    <ns1:groups />
    </ns1:DocumentReviewProcessRequest>
    </payload>
    if i use System.out.println(node.getElementsByTagName("HELLO").item(0).getNodeValue());
    I get a normal erro 'cause this variable don't exist...
    Can someone please help me?
    Thanks!!

    I think the problem is UME related. I had the same problem once. Try using a system user for searching, instead of the logged on user.
    Like this:
    com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getUser("cmadmin_service");
    Please reward the points if this helps.

  • Why iam unable to get the valu from combobox

    when i run this code
    everytime iam getting blank alert
    y iam unable to get the selected item from combo box
    thank u
    <%@ page import="java.util.Date"%>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%><%@page import="java.sql.*,java.util.*,java.text.*,java.util.ArrayList, java.util.List,org.joda.time.DateTimeConstants,org.joda.time.LocalDate,
    org.joda.time.Weeks"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
      <HEAD>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <TITLE>Reading Data From Text Fields</TITLE>
      </HEAD><BODY onload=Datevalue()>
         <form name="form1" action ="" method="post" onSubmit="update();">
        <img src="nendrasys_logo.gif" align="right"></img>
      <b><font color="669900"><h4 align="left">UserName:</font> 
    <jsp:useBean id="user" scope="session" class="nendrasys.User" />
    <jsp:getProperty name="user" property= "name"/>
    &nbsp&nbsp&nbsp&nbsp
    <b><font color="90be00"><h4 align="left">Designation:</font>
      <jsp:getProperty name="user" property= "designation"/>
      <br><font color="669900"><h4 align="right">Project:</font>
        <select name="Projects">
         <option>Project:1</option>
         <option>Project:2</option>
         <option>Project:3</option>
         <option>Project:4</option>
         <option>Project:5</option>
    </select>
    <%! String s; %>
    <% DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
            Date date = new Date();
            //out.println(dateFormat.format(date));
                s=  dateFormat.format(date);
    %>
    <select name="Dates" sizes=1 id="dates" onchange="Datevalue(this.value)">
    <script type="text/javascript">
    <!--//
    var begDate = new Date("10/01/2008");
    var endDate = new Date();
    var previousDate =new Date();
    var presentDate =new Date("<%=s %>");
    endDate.setDate(presentDate.getDate()+14);
    begDate.setDate(begDate.getDate()+(6-begDate.getDay()));
    while (begDate <= endDate) {
    var datestring=[begDate.getDate(),(begDate.getMonth()+1),begDate.getFullYear()].join('/');
    //  var datestring=[begDate.getDate().padZero(2),(begDate.getMonth()+1).padZero(2),begDate.getFullYear()].join('/');
    if(previousDate < presentDate && presentDate <= begDate )
        document.writeln('<option selected>'+(datestring)+'</option>')}
    else   
    document.writeln('<option>'+(datestring)+'</option>')};
         previousDate.setDate(begDate.getDate());
        previousDate.setMonth(begDate.getMonth());
         previousDate.setYear(begDate.getYear());
        begDate.setDate(begDate.getDate()+7);
    document.writeln('</select>');
    //-->
    </script>
    <br><br>
    <TABLE BORDER="2" BORDERCOLOR="#336699" CELLPADDING="2" CELLSPACING="2" WIDTH="100%">
    <TR>
    <TD>&nbsp&nbsp&nbsp</TD>
    <TD bgcolor="669900"><label  id="sun"></label></TD>
    <TD bgcolor="90be00"><label for="mon" id="Mon">Mon</label></TD>
    <TD bgcolor="669900"><label for="tue" id="tue">Tue</label></TD>
    <TD bgcolor="90be00"><label for="wed" id="wed">Wed</label></TD>
    <TD bgcolor="669900"><label for="thu" id="thu">Thu</label></TD>
    <TD bgcolor="90be00"><label for="fri" id="fri">Fri</label></TD>
    <TD bgcolor="669900"><label for="sat" id="sat">Sat</label></TD>
    <TD bgcolor="90be00"><label for="tot" id="tot">Total</label></TD>
    </TR>
    <tr>
    <th>Project Work</th>
    <td bgcolor="669900"><input type="text" name="c11" size="2" value="7" onBlur="javascript:document.frm.c12.value = document.frm.c11.value"></td>
    <td bgcolor="90be00"><input type="text" name="c12" size="2" value="3"></td>
    <td bgcolor="669900"><input type="text" name="c13" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c14" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c15" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c16" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c17" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c18" size="4"></td>
    </tr>
    <tr>
    <th>Internal N/C</th>
    <td bgcolor="669900"><input type="text" name="c21" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c22" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c23" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c24" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c25" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c26" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c27" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c28" size="4"></td>
    </tr>
    <tr>
    <th>Public Holidays</th>
    <td bgcolor="669900"><input type="text" name="c31" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c32" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c33" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c34" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c35" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c36" size="2" ></td>
    <td bgcolor="669900"><input type="text" name="c37" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c38" size="4"></td>
    </tr>
    <tr>
    <th>Holidays Taken</th>
    <td bgcolor="669900"><input type="text" name="c41" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c42" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c43" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c44" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c45" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c46" size="2"></td>
    <td bgcolor="669900"><input type="text" name="c47" size="2"></td>
    <td bgcolor="90be00"><input type="text" name="c48" size="4"></td>
    </tr>
    </TABLE>
    <br>
    <center><input type="submit"  value="Submit" /> </center>
    <%
    String username   = request.getParameter("userid");
    String pwd  = request.getParameter("pwd");
    String connectionURL = "jdbc:mysql://localhost:3306/timestamp";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    String sql=null;
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    connection = DriverManager.getConnection(connectionURL, "root","nendrasys");
    statement = connection.createStatement();
    //rs=statement.executeQuery(sql); %>
    </form>
    <SCRIPT language='Javascript'>
    function update()
        alert("ciaoooooo");
        <%
            try
                String value=request.getParameter("c11");
                String value1=request.getParameter("c12");
             //   if(value!=null)
              //  System.out.println(value);             
               // System.out.println(value1);
            catch(NullPointerException n)
        %>
    </script>
    <SCRIPT language='Javascript'>
    function Datevalue(date)
           //  document.getElementById("dates").innerHTML=document.getElementById("sun").value;
      alert(date);
             //  alert( document.getElementById("dates"))
                <% System.out.println("bye");%>
    </SCRIPT>
    </BODY>
    </HTML>

    You mixed Java and Javascript in the expectation that they runs simultaneously.
    You are Wrong.
    You need to distinguish between the server side languages and client side languages. Java/JSP runs at the server side and produces a HTML page with other client side stuff in it like CSS and Javascript. When the HTML page is finished, it will be sent to the client and then Java/JSP stops. Once the HTML page is arrived at the client, there is no one line Java code in it, only its output/result. Do a View Source in your favourite web browser to see it. Only from that moment on, Javascript runs and/or can be invoked.
    Whenever you want to use Java variables in Javascript, you need to print them out as a Javascript variable. Whenever you want to use Javascript variables in Java, you need to invoke a request to the server and pass them as parameters. The request can be either synchronous (a link or a form submit) or asynchronous (ajaxical).

  • Storing the values from a procedure - help required

    Hi All,
    I am having a package which consists of two procedures.
    Both the procedures need to calculate 6 averages of some of my fields based on unique number.
    (These two procedures process different unique numbers).
    Now, as same code is implemented in the two procedures for calculation,
    I want to move the logic into another procedure/function, with IN parameter as the unique number.
    Now how can I get these 6 values from the procedure.
    If I use OUT parameters, how can I get the values inside the procedure.
    Please suggest me a solution.
    Thanks in advance.
    Regards
    Raghunadh

    Example of pipelined function...
    SQL> CREATE OR REPLACE TYPE myrec AS OBJECT
      2  ( col1   VARCHAR2(10),
      3    col2   VARCHAR2(10)
      4  )
      5  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE myrectable AS TABLE OF myrec
      2  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE FUNCTION pipedata(p_str IN VARCHAR2) RETURN myrectable PIPELINED IS
      2    v_str VARCHAR2(4000) := REPLACE(REPLACE(p_str, '('),')');
      3    v_obj myrec := myrec(NULL,NULL);
      4  BEGIN
      5    LOOP
      6      EXIT WHEN v_str IS NULL;
      7      v_obj.col1 := SUBSTR(v_str,1,INSTR(v_str,',')-1);
      8      v_str := SUBSTR(v_str,INSTR(v_str,',')+1);
      9      IF INSTR(v_str,',')>0 THEN
    10        v_obj.col2 := SUBSTR(v_str,1,INSTR(v_str,',')-1);
    11        v_str := SUBSTR(v_str,INSTR(v_str,',')+1);
    12      ELSE
    13        v_obj.col2 := v_str;
    14        v_str := NULL;
    15      END IF;
    16      PIPE ROW (v_obj);
    17    END LOOP;
    18    RETURN;
    19  END;
    20  /
    Function created.
    SQL>
    SQL> create table mytab (col1 varchar2(10), col2 varchar2(10));
    Table created.
    SQL>
    SQL> insert into mytab (col1, col2) select col1, col2 from table(pipedata('(1,2),(2,3),(4,5)'));
    3 rows created.
    SQL>
    SQL> select * from mytab;
    COL1       COL2
    1          2
    2          3
    4          5Although I'm not sure you necessarily need to do it this way. Could you show us the code you are using and more details of what you are trying to do?

  • Unable to get the value from the jsp page.

    Hi,
    I have developed a JSP, having two split fields seperated by some buttons..The sample code for the same is like this..
    (Only the required portion is included)
    <script>
    function reloadPageOK() {
    document.product.method="post"
    document.product.action="./TheSamePage.jsp?status=OK"
    document.product.submit()
    function moveValue(from,to) {
    if(from.selectedIndex>=0) {
    var text=from[from.selectedIndex].text
    var length= to.length
    to[length]=new Option(text,from.value,false,false)
    from.remove(from.selectedIndex)
    function moveAll(from,to) {
    if(from.length>0) {
    var menutext="";
    var i;
    var len=from.length
    for(i=0;i<len;i++) { 
    from.selectedIndex=0
    menutext=from[0].text
    var length= to.length
    to[length]=new Option(menutext,from.value,false,false)
    from.remove(from.selectedIndex)
    </script>
    <table width="100%" border="0" cellspacing="0" >
    <tr class="contactDetail">
    <td width="10%" class="table_grid1" rowspan="4">
    <div class="contactDetail">
    <select name="lstProviderLeft" size="7" style="width:111">
    <option> PDP</option>
    <option> Net</option>
    <option> Par</option>
    <option> Non-Par</option>
    </select>
    </div>
    </td>
    <td width="20%" bgcolor="#FFFFFF" class="contactDetail">
    <input type="button" value=" > " name="btnLtrProvider" class="button" onclick="moveValue(lstProviderLeft,lstProviderRight)">
    </td>
              <td width="10%" bgcolor="#FFFFFF" rowspan="4" class="contactDetail"> <font face="Arial, Verdana, Helvetica, sans-serif" size="2" >
              <select name="lstProviderRight" size="7" style="width:111"></select>
              </font></td>
    <tr>
    <td width="8%" class="contactDetail">
    <input type="button" value=" >> " name="btnLtrAllProvider" class="button" onclick="moveAll(lstProviderLeft,lstProviderRight)" >
    </td>
    </tr>
    <tr>
    <td width="8%" class="contactDetail">
    <input type="button" name="btnRtlProvider" value=" < " class="button" onclick="moveValue(lstProviderRight,lstProviderLeft)" >
    </td>
    </tr>
    <tr>
    <td width="8%" class="contactDetail" height="22">
    <input type="button" name="btnRtlAllProvider" value=" << " class="button" onclick="moveAll(lstProviderRight,lstProviderLeft)" >
    </td>
    </tr>
    </table>
    <p align = "center"> <input type="button" value=" OK " onclick="reloadPageOK()">
    The page is working fine. That is we can move the values in the left field to right as single or group.After submitting I need to get the values in the left & right fields respectively.
    I have used the method
    request.getParameterValues("lstProviderLeft");
    and pointed this to an array of strings,but it returns 'null' .
    How can I solve the above problem....Post your comments on this issue
    Thanking u

    probably the request.getParmeterValues will not work in this case as the name of the 2 select boxes are different....
    You can do this utility by using Javascript....concantinate the values of the 2 select boxes and put the concantinated strings (with a delimiter) in two hidden fields and capture the same fields in the target JSP/Servlet.
    I have modified ur code...have a look...
    --------------------Start-----------------
    <html>
    <head></head>
    <title></title>
    <body>
    <script language="Javascript">
    function reloadPageOK()
    document.product.method="post" ;
    document.product.action="./TheSamePage.jsp?status=OK" ;
    document.product.submit();
    function moveValue(from,to)
         if(from.selectedIndex>=0)
              var text=from[from.selectedIndex].text;
              var length= to.length ;
              to[length]=new Option(text,from.value,false,false);
              from.remove(from.selectedIndex);
    function moveAll(from,to)
         if(from.length>0)
              var menutext="";
              var i;
              var len=from.length;
              for(i=0;i<len;i++)
                   from.selectedIndex=0;
                   menutext=from[0].text ;
                   var length= to.length;
                   to[length]=new Option(menutext,from.value,false,false) ;
                   from.remove(from.selectedIndex);
    function fnSubmitPage(from,to)
         var strfromSelBox = "";
         var strtoSelBox = "";
         if(from.length>0)
              var len=from.length;
              for(var i=0;i<len;i++)
                   strfromSelBox=strfromSelBox+":"+from.text ;               
         if(to.length>0)
              var len=to.length;
              for(var i=0;i<len;i++)
                   strtoSelBox=strfromSelBox+":"+to[i].text ;               
         document.product.hdFromValue.value=strfromSelBox;
         document.product.hdFromValue.value=strtoSelBox;
         document.product.method="post" ;
         document.product.action="" ;//Name of the JSP or servlet wherever u want to direct to....
         document.product.submit();
    </script>
    <form name="product">
    <input type="hidden" name="hdFromValue">
    <input type="hidden" name="hdToValue">
    <table width="100%" border="0" cellspacing="0" >
    <tr class="contactDetail">
         <td width="10%" class="table_grid1" rowspan="4">
              <div class="contactDetail">
                   <select name="lstProviderLeft" size="7" style="width:111">
                        <option> PDP</option>
                        <option> Net</option>
                        <option> Par</option>
                        <option> Non-Par</option>
                   </select>
              </div>
         </td>
         <td width="20%" bgcolor="#FFFFFF" class="contactDetail">
              <input type="button" value=" > " name="btnLtrProvider" class="button" onclick="moveValue(lstProviderLeft,lstProviderRight)">
         </td>
         <td width="10%" bgcolor="#FFFFFF" rowspan="4" class="contactDetail">
              <font face="Arial, Verdana, Helvetica, sans-serif" size="2" >
                   <select name="lstProviderRight" size="7" style="width:111">
                   </select>
              </font>
         </td>
    <tr>
         <td width="8%" class="contactDetail">
              <input type="button" value=" >> " name="btnLtrAllProvider" class="button" onclick="moveAll(lstProviderLeft,lstProviderRight)" >
         </td>
    </tr>
    <tr>
         <td width="8%" class="contactDetail">
              <input type="button" name="btnRtlProvider" value=" < " class="button" onclick="moveValue(lstProviderRight,lstProviderLeft)" >
         </td>
    </tr>
    <tr>
         <td width="8%" class="contactDetail" height="22">
              <input type="button" name="btnRtlAllProvider" value=" << " class="button" onclick="moveAll(lstProviderRight,lstProviderLeft)" >
         </td>
    </tr>
    </table>
    <input type="button" value=" OK " onclick="reloadPageOK()">
    <input type="button" value=" Submit " onclick="fnSubmitPage(lstProviderRight,lstProviderLeft)">
    </form>
    </body>
    </html>
    --------------------Finish---------------
    Hope this helps...
    Thanks

  • Unable to pass the values from one report to another using navigation links

    Hi All,
    I am facing a strange issue where I have to pass a column value from one report to other.
    I have kept navigation link in the 1st report and 'is prompted' option in the 2nd report
    Issue was , I'm not getting the filtered result in the 2nd report (all the records are being displayed)
    Can anyone advice where I was going wrong
    Thank you,
    AO

    Hi,
    The column which you have given navigation link and 'is prompted' column should same and exist in both the reports.You have to give the guided navigation in the value interaction of the column in the report1.
    mark if helpful/correct.........
    thanks,
    prasanna

  • Unable to select the value from a list item in forms 6i

    Hi ,
    I'am using forms 6i. I have created a list item in my form as below.
    Item_type = list item
    list style - popup list
    elements in list - A, B, C,D
    When I open the form all the above values are displayed for the list item. But I'am unable to select the item( either A,B,C,D).
    Please let me know if I need to add any thing else programatically to acheive this. The block on whixh these values are diplayed is a datablock.
    This is very urgent. Any suggestions would be of great help.
    Thanks
    Deepthi

    If you have a list item where you have:
    Display A value 1
    Display B value 2
    Display C value 3
    Display D value 4
    If want to initial the value of the item to be A, you can set the initial value of the item to 1 in the property pane.
    Otherwise in an initialisation triger have
    :block.list_item := 1;
    HTH
    Tony

  • Unable to see the values from the FM in the ICSS application

    Hi Gurus,
    I am trying to call a custom function module in the ICSS application but it's not returning me any values in the application whereas it's showing values in the GUI for the same input.
    One more strange thing is when we are hardcoding the values in the output table of this FM then i am able to see the values in the front end application.
    I am clueless as what could be the reason.
    Please help me.
    Thanks,
    Gary

    Hi Saurabh,
    This is really a strange problem as you said.
    May be your fm is getting called more than once and in the second call there is no input data for the
    fm and that's why its returning blank and your business objects are getting overwritten with blank values but when you are hardcoding you are getting the data.
    Can you please debug and see if your fm is being called twice.
    Instead of hardcoding data to output tables, check once by hardcoding input to java backend object
    while calling the fm.
    Regards,
    Arshi

  • Unable to update the Data from Cube to Data Mart

    Hi,
    I have a problem with the data loading to a Cube(data Mart)in BW. When i checked in RSA3 it is showing 0 records.The data flow is depicted as follows: R/3 -> ODS(BW)-> cube(BW) -> Cube(BW- Data mart for APO cube)-> APO System. In BW, for the final Data target whenever data is loaded, by deleting the previous request through full load. But on checking this final cube (Data Mart to APO) records are avilable, wherein while checking in RSA3 for this final data target(Data Mart to APO)it is showing 0 records.
    Why? please help me.
    Regards,
    krishna

    Hi,
    I checked the data mart in RSA3.It is not a matter of Full upload or delta upload.
    thanks
    Krishna

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • How to extract values from pricing procedure for conditions in CRM Billing?

    I have a number of conditions in the pricing procedure in CRM Billing that I would like to extract to SAP BW. How can this be done?
    Is there a standard extractor for CRM Billing similar to the SD Billing extractor "Extraction of SD Billing Conditions" (2LIS_13_VDKON)?
    If there is no standard extractor, is there another way to extract the conditions and the related values?
    I am using the standard CRM Billing Extractor 0BEA_CRMB already, so maybe an append could solve my problem. How can this be done? In what CRM-tables can I find the values from pricing procedure for conditions in CRM Billing?

    you may want to post that last question in a CRM forum... in ECC it would be table KONV

  • Unable to capture the value of vbrk-vbeln value from VF02

    Hi All,
    am printing form from VF02 ,,,once i execute the VF02 , and select Billing Document -> Issue Output to  option .., my printi program gets triggered ,......,
    but in my print program am unable to capture the value of VBRK-VBELN which i have entered in the VF02 tcode..
    any other table the value of  VBELN is stored???
    pls help me out with the alternatives...
    thanks
    john

    Hi Dhiraj
      One doubt how the value is populating in the NAST  in the Print Program . While debugging i'm getting the Values from NAST but i want to know from where NAST is loading with these data.
    Thanks
    Bintu

Maybe you are looking for

  • IPhoto cannot import your photos because there was a problem downloading an image.

    Running Mac OS X Lion 10.7.5 on MacBook Air and Iphoto '09 version 8.1.2 on iphone 5. Keep getting the "iPhoto cannot import your photos because there was a problem downloading an image" error message. Is this related to HDR photos or videos? What ca

  • What can i do for a botched repair?

    Hi all, i've experienced a problem with a "repair" done at the Rozzano (Italy) genius bar, is there anything i can do? When i brought my computer to the apple store it had one broken cpu fan and one working. When i got it back both fans weren't worki

  • Issues with their Chinese or Japanese characters while sending mail

    Hi All , I am sending mail using FM SO_DOCUMENT_SEND_API1. I am facing problem with display of chinese and japanese character in mail attachment. For example , Data in ABAP table 延平路123弄1号10A is converted to ösï721_ 3S÷83L in excel sent via mail thr

  • URGENT: Regarding CALL FUNCTION 'GET_FIELDNAME_TEXT_1

    hi, i have made a report in which i am displaying changes to material and it is giving runtime error and it is saying :- A RAISE statement in the program "SAPLMASS_GENERAL_UTILITIES" raised the exception condition "NOT_FOUND". Since the exception was

  • About WLC 5508 version 6.0 upgrade to 7.0 issue

    hi guys, I have tow WLC , version is 6.0 One of the WLC successful upgrade and after rebooting the normal the another WLC successful too , but after rebooting the system version or 6.0 Thanks in advance