Select query on table rcv_lots_interface is always returning null

Hi ,
I need a help on the below issue.
The issue is after creating PO in Oracle 11i I receive it in MSCA application.
When we receive it at that point data gets inserted in the table " rcv_transactions_interface " and we have written a trigger on it.
From the trigger on table " rcv_transactions_interface " we are calling a package and in the package we have select query on "rcv_lots_interface."
But the select query is always returning null even though we are passing the correct "interface_transaction_id " and also after the "Receiving Transaction Processor" is executed i can see data in the table " RCV_LOT_TRANSACTIONS " for the same transaction.
Below is the sample code i am using.
CREATE OR REPLACE TRIGGER inv.RCV_TRAN_TRIGGER
AFTER UPDATE
ON po.rcv_transactions_interface
FOR EACH ROW
WHEN (NEW.processing_status_code='PENDING'
AND NEW.destination_type_code IN ('INVENTORY','RECEIVING')
AND NEW.mobile_txn = 'Y')
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
v_user_id NUMBER;
v_interface_transaction_id NUMBER;
v_organization_id NUMBER;
v_item_id NUMBER;
v_quantity NUMBER;
v_resp_id NUMBER;
v_mobile_txn VARCHAR2(5);
v_shipment_header_id NUMBER;
v_bill_of_lading VARCHAR2(100);
v_group_id NUMBER;
v_header_interface_id NUMBER;
BEGIN
v_interface_transaction_id := :NEW.interface_transaction_id;
v_organization_id := :NEW.to_organization_id;
v_user_id := :NEW.created_by;
v_item_id := :NEW.item_id;
v_quantity := :NEW.quantity;
v_resp_id :=fnd_profile.VALUE('RESP_ID');
v_transaction_type := :NEW.transaction_type;
v_mobile_txn := :NEW.mobile_txn;
v_bill_of_lading := :NEW.bill_of_lading;
v_group_id := :NEW.group_id;
v_header_interface_id := :NEW.HEADER_INTERFACE_ID;
INV.INV_RCV_TRX_PKG.INV_RCV_LABEL_GEN_PRC( v_user_id,
v_interface_transaction_id,
v_item_id,
v_quantity,
v_organization_id,
v_resp_id,
v_shipment_header_id,
v_bill_of_lading,
v_header_interface_id,
v_group_id);
END;
CREATE OR REPLACE PACKAGE BODY INV.INV_RCV_TRX_PKG
AS
PROCEDURE INV_RCV_LABEL_GEN_PRC( p_user_id IN NUMBER,
p_interface_transaction_id IN NUMBER,
p_item_id IN NUMBER,
p_quantity IN NUMBER,
p_organization_id IN NUMBER,
p_resp_id IN NUMBER,
p_shipment_header_id IN NUMBER,
p_bill_of_lading IN VARCHAR2,
p_header_interface_id IN NUMBER ,
p_group_id IN NUMBER
IS
v_user_id NUMBER;
v_print BOOLEAN;
v_resp_id NUMBER;
v_resp_appl_id NUMBER;
v_lot_num VARCHAR2(50);
BEGIN
BEGIN
SELECT application_id
INTO v_resp_appl_id
FROM apps.fnd_responsibility_tl frt
WHERE responsibility_id=p_resp_id;
END;
apps.fnd_global.apps_initialize(p_user_id, p_resp_id, v_resp_appl_id);
BEGIN
SELECT rli.lot_num , rli.expiration_date
INTO v_lot_num ,
v_expiration_date
FROM apps.rcv_lots_interface rli
WHERE rli.interface_transaction_id = p_interface_transaction_id ;
EXCEPTION
WHEN OTHERS THEN
v_lot_num :=NULL;
v_expiration_date :=NULL;
apps.fnd_file.put_line(fnd_file.log,'Exception while deriving LOT Number ######### '||p_interface_transaction_id||'------'||SQLERRM);
END;
END;
Need your help to understand why the below query is always returning null and what is the solution for it ?
SELECT rli.lot_num , rli.expiration_date
FROM apps.rcv_lots_interface rli
WHERE rli.interface_transaction_id = p_interface_transaction_id ;
Thanks
Jaydeep
Edited by: user10454886 on Mar 25, 2013 6:31 AM
Hi ,
I need a solution to this issue at the earliest.
Appreciate all of your help
Thanks
Jaydeep

Centinul wrote:
There are a lot of bugs listed in Metalink with respect to wrong results and function-based indexes.
Here are a few:
Bug 4028186 Wrong results if function based index exists
Bug 4717546 Wrong results / poor plan when function based index exists
Bug 5092688 Wrong results if function based index exists
Based on reviewing them the workarounds range from dropping the index to setting "_disable_function_based_index" to TRUE.Facinating. It seems to me that if you use the undocumented intitialization parameter you might just as well drop the FBIs too.
Another hazard of FBIs is the Law of Unintended Consequences. 2 years ago we tried to use one to speed up a query in a PL/SQL package. Worked OK for that purpose, but an unrelated loader on the affected table ran and rand but never finished until the FBI was dropped.

Similar Messages

  • Output parameters always return null when ExecuteNonQuery - No RefCursor

    I am trying to call a procedure through ODP that passes in one input parameter and returns two (non-RefCursor) VARCHAR2 output parameters. I am calling the procedure using ExecuteNonQuery(); however, my parameters always return null. When I run the procedure outside of ODP, such as with SQLPlus or SQL Navigator, the output parameters are populated correctly. For some reason, there appears to be a disconnect inside of ODP. Is there a way to resolve this?
    Anyone have this problem?
    Here is the basic code:
    ===========================================================
    //     External call of the class below
    DBNonCursorParameterTest Tester = new DBNonCursorParameterTest();
    ===========================================================
    //     The class and constructor that calls the procedure and prints the results.
    public class DBNonCursorParameterTest
         public DBNonCursorParameterTest()
              //     The test procedure I used is a procedure that takes a recordID (Int32) and then returns a
              //     general Name (Varchar2) and a Legal Name (Varchar2) from one table with those three fields.
              string strProcName                    = "MyTestProc;
              OracleConnection conn               = new OracleConnection(DBConnection.ConnectionString);
              OracleCommand cmd                    = new OracleCommand(strProcName,conn);
              cmd.CommandType                         = CommandType.StoredProcedure;
                   //     Create the input parameter and the output cursor parameter to retrieve data; assign a value to the input parameter;
              //     then create the parameter collection and add the parameters.
              OracleParameter pBPID               = new OracleParameter("p_bpid",               OracleDbType.Int32,          ParameterDirection.Input);
              OracleParameter pBPName               = new OracleParameter("p_Name",               OracleDbType.Varchar2,     ParameterDirection.Output);
              OracleParameter pBPLegalName     = new OracleParameter("p_LegalName",     OracleDbType.Varchar2,     ParameterDirection.Output);
              pBPID.Value = 1;
              //     Open connection and run stored procedure.
              try
                   conn.Open();
                   cmd.Parameters.Add(pBPID);
                   cmd.Parameters.Add(pBPName);
                   cmd.Parameters.Add(pBPLegalName);
                   cmd.ExecuteNonQuery();
                   Console.Write("\n" + cmd.CommandText + "\n\n");
                   //for (int i = 0; i < cmd.Parameters.Count; i++)
                   // Console.WriteLine("Parameter: " + cmd.Parameters.ParameterName + " Direction = "     + cmd.Parameters[i].Direction.ToString());
                   // Console.WriteLine("Parameter: " + cmd.Parameters[i].ParameterName + " Status = "          + cmd.Parameters[i].Status.ToString());
                   // Console.WriteLine("Parameter: " + cmd.Parameters[i].ParameterName + " Value = "          + cmd.Parameters[i].Value.ToString() + "\n");
                   foreach (OracleParameter orap in cmd.Parameters)
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Direction = "     + orap.Direction.ToString() + " Value = " + orap.Value.ToString());
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Status = "          + orap.Status.ToString());
                        Console.WriteLine("Parameter: " + orap.ParameterName + " Value = "          + orap.Value.ToString() + "\n");
                   //     End Test code.
              catch (Exception ex)
                   throw new Exception("ExecuteQuery() failed: " + ex.Message);
              finally
                   this.Close();
         public void Close()
              if (conn.State != ConnectionState.Closed)
                   conn.Close();
    =========================================================
    Other things to note:
    I have no problems with returning RefCursors; they work fine. I just don't want to use RefCursors when they are not efficient, and I want to have the ability to return output parameters when I only want to return single values and/or a value from an insert/update/delete.
    Thanks for any help you can provide.

    Hello,
    Here's a short test using multiple out parameters and a stored procedure. Does this work as expected in your environment?
    Database:
    /* simple procedure to return multiple out parameters */
    create or replace procedure out_test (p_text in varchar2,
                                          p_upper out varchar2,
                                          p_initcap out varchar2)
    as
    begin
      select upper(p_text) into p_upper from dual;
      select initcap(p_text) into p_initcap from dual;
    end;
    /C# source:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace Miscellaneous
      class Program
        static void Main(string[] args)
          // change connection string as appropriate
          const string constr = "User Id=orademo; " +
                                "Password=oracle; " +
                                "Data Source=orademo; " +
                                "Enlist=false; " +
                                "Pooling=false";
          // the stored procedure to execute
          const string sql = "out_test";
          // simple input parameter for the stored procedure
          string text = "hello!";
          // create and open connection
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          // create and setup connection object
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = sql;
          cmd.CommandType = CommandType.StoredProcedure;
          // the input paramater
          OracleParameter p_text = new OracleParameter("p_text",
                                                       OracleDbType.Varchar2,
                                                       text.Length,
                                                       text,
                                                       ParameterDirection.Input);
          // first output parameter
          OracleParameter p_upper = new OracleParameter("p_upper",
                                                        OracleDbType.Varchar2,
                                                        text.Length,
                                                        null,
                                                        ParameterDirection.Output);
          // second output parameter
          OracleParameter p_initcap = new OracleParameter("p_initcap",
                                                          OracleDbType.Varchar2,
                                                          text.Length,
                                                          null,
                                                          ParameterDirection.Output);
          // add parameters to collection
          cmd.Parameters.Add(p_text);
          cmd.Parameters.Add(p_upper);
          cmd.Parameters.Add(p_initcap);
          // execute the stored procedure
          cmd.ExecuteNonQuery();
          // write results to console
          Console.WriteLine("   p_text = {0}", text);
          Console.WriteLine("  p_upper = {0}", p_upper.Value.ToString());
          Console.WriteLine("p_initcap = {0}", p_initcap.Value.ToString());
          Console.WriteLine();
          // keep console from closing when run in debug mode from IDE
          Console.WriteLine("ENTER to continue...");
          Console.ReadLine();
    }Output:
       p_text = hello!
      p_upper = HELLO!
    p_initcap = Hello!
    ENTER to continue...- Mark

  • Request.getParameter() always returns null

    I have a html file and am trying to retrieve the values from a formin my servlet.
    here is the html code:
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <h1><b>Add DVD</b></h1>
    </head>
    <body>
    <form action="add_dvd.do" method="POST">
    Title:<input type="text" name="title" />
    Year:<input type="text" name="year" />
    Genre: <select name='gselected'>
    <option value='Sci-Fi'>Sci-Fi</option>
    </select>
    or enter new genre:<input type="text" name='gentered' value="" />
    <input type="submit" value="Add DVD" />
    </form>
    </body>
    </html>
    and here is the servlet code:
    public class AddDVDServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    // System.out.println("in AddDVDServlet post method");
    List errorMsgs = new LinkedList();
    //retrieve form parameters
    try{
    String title = request.getParameter("title").trim();
    String year = request.getParameter("year").trim();
    *String gentered = request.getParameter("gentered");
    String gselected = request.getParameter("gselected");
    String genre="";
    if("".equals(gentered))
    genre = gselected;
    else
    genre = gentered;
    // System.out.println("parameter retrieved");
    if(!year.matches("\\d\\d\\d\\d"))
    // System.out.println("year not 4 digit long");
    errorMsgs.add("Year must be four digit long");
    if("".equals(title))
    // System.out.println("title not entered");
    errorMsgs.add("Please enter the title of the dvd");
    if("".equals(genre))
    // System.out.println("genre not valid");zdf
    errorMsgs.add("Enter genre.");
    if(! errorMsgs.isEmpty())
    //System.out.println("errors in entry ");
    request.setAttribute("errors",errorMsgs);
    // System.out.println("error attribute set in request");
    RequestDispatcher rd = request.getRequestDispatcher("error.view");
    rd.forward(request, response);
    return;
    //create DVDItem instance
    DVDItem dvd = new DVDItem(title,year,genre);
    request.setAttribute("dvdItem",dvd);
    RequestDispatcher rd = request.getRequestDispatcher("success.view");
    rd.forward(request, response);
    catch(Exception e){
    errorMsgs.add(e.getMessage());
    request.setAttribute("errors",errorMsgs);
    RequestDispatcher rd = request.getRequestDispatcher("error.view");
    rd.forward(request, response);
    e.printStackTrace();
    System.out.println("exception:"+e);
    why does getParameter always return null??? whats wrong?

    I don't know. However, I suspect that because you have a tag with the same name as 'title', its causing a name conflict. Chnage the name to something else. If it works, then that's the likely explaination.

  • Execute oracle stored procedure from C# always returns null

    Hi,
    I'm trying to execute a stored procedure on oracle 9i. I'm using .Net OracleClient provider.
    Apparently, I can execute the stored procedure, but it always returns null as a result (actually all the sp's I have there returns null)! I can execute any text statement against the database successfully, and also I can execute the stored procedure using Toad.
    This is not the first time for me to call an oracle stored procedure, but this really is giving me a hard time! Can anyone help please?
    Below are the SP, and the code used from .Net to call it, if that can help.
    Oracle SP:
    CREATE OR REPLACE PROCEDURE APIECARE.CHECK_EXISTENCE(l_number IN NUMBER) AS
    v_status VARCHAR2(5) := NULL;
    BEGIN
    BEGIN
    SELECT CHECK_NO_EXISTENCE(to_char(l_number))
    INTO v_status
    FROM DUAL;
    EXCEPTION WHEN OTHERS THEN
    v_status := NULL;
    END;
    DBMS_OUTPUT.PUT_LINE(v_status);
    END CHECK_CONTRNO_EXISTENCE;
    C# Code:
    string connStr = "Data Source=datasource;Persist Security Info=True;User ID=user;Password=pass;Unicode=True";
    OracleConnection conn = new OracleConnection(connStr);
    OracleParameter param1 = new OracleParameter();
    param1.ParameterName = "v_status";
    param1.OracleType = OracleType.VarChar;
    param1.Size = 5;
    param1.Direction = ParameterDirection.Input;
    OracleParameter param2 = new OracleParameter();
    param2.ParameterName = "l_number";
    param2.OracleType = OracleType.Number;
    param2.Direction = ParameterDirection.Input;
    param2.Value = 006550249;
    OracleParameter[] oraParams = new OracleParameter[] { param1, param2 };
    OracleCommand cmd = new OracleCommand("CHECK_EXISTENCE", conn);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.AddRange(oraParams);
    conn.Open();
    object result = cmd.ExecuteScalar();
    conn.Close();

    Hi,
    Does that actually execute? You're passing two parameters to a procedure that only takews 1 and get no error?
    Your stored procedure doesnt return anything and has no output parameters, what are you expecting to be returned exactly?
    If you're trying to access V_STATUS you'll need to declare that as either an output parameter of the procedure, or return value of the function, and also access it via accessing Param.Value, not as the result of ExecuteScalar.
    See if this helps.
    Cheers,
    Greg
    create or replace function myfunc(myinvar in varchar2, myoutvar out varchar2) return varchar2
    is
    retval varchar2(50);
    begin
    myoutvar := myinvar;
    retval := 'the return value';
    return retval;
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    public class odpfuncparams
         public static void Main()
          OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
          con.Open();
          OracleCommand cmd = new OracleCommand("myfunc", con);
          cmd.CommandType = CommandType.StoredProcedure;
          OracleParameter retval = new OracleParameter("retval",OracleDbType.Varchar2,50);
          retval.Direction = ParameterDirection.ReturnValue;
          cmd.Parameters.Add(retval);
          OracleParameter inval = new OracleParameter("inval",OracleDbType.Varchar2);
          inval.Direction = ParameterDirection.Input; 
          inval.Value="hello world";
          cmd.Parameters.Add(inval);
          OracleParameter outval = new OracleParameter("outval",OracleDbType.Varchar2,50);
          outval.Direction = ParameterDirection.Output;
          cmd.Parameters.Add(outval);
          cmd.ExecuteNonQuery();
          Console.WriteLine("return value is {0}, out value is {1}",retval.Value,outval.Value);
          con.Close();
    }

  • GetUsageData is always returning Null

    Let me first start out by stating that I know there are many questions on this issue, and I have read them all. However, none of the suggestions that I have read have seemed to help my situation. Therefore, I figure I would supply my code with the hopes
    that someone can solve the issue that is mentioned in the title. Let me first supply a little bit of background.
    My goal in this code is to determine what are the most visited sites in our SharePoint 2010 farm. To do this, I figured I would cycle through all of the webs in the farm, and then obtain the amount of page views within each site using the GetUsageData function.
    Just to test if the GetUsageData was supplying the correct data, I coded the web part in such a way where if GetUsageData returned "Null", it would print it for every site, and "Not Null" if otherwise. In every case I have tested this web part, it has always
    returned Null for evey site it has checked.
    I am fairly new to programming web parts in C#, so a lot of this code is derived from what I have read when researching the subject. If anyone can assist me to see where I could fix my issue, I would greatly appreciate it.
    Thank you.
    Below is my Code:
    using System;
    using System.Data;
    using System.Collections;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.SharePoint.WebControls;
    //This code has been derived from the following link: http://blog.rafelo.com/2008/07/22/iterating-through-sharepoint-web-applications-site-collections-and-sites-webs/
    namespace WebAnalyticsTest.Test
    [ToolboxItemAttribute(false)]
    public class Test : WebPart
    //For testing purposes. More is explained further in the code.
    int test;
    ArrayList totalHitsArray = new ArrayList();
    int totalHits;
    DataGrid grid = null;
    public void BeginProcess()
    // Get references to the farm and farm WebService objects
    // the SPWebService object contains the SPWebApplications
    SPFarm thisFarm = SPFarm.Local;
    SPWebService service = thisFarm.Services.GetValue<SPWebService>("");
    foreach (SPWebApplication webApp in service.WebApplications)
    //Execute any logic you need to against the web application
    //Iterate through each site collection
    foreach (SPSite siteCollection in webApp.Sites)
    //do not let SharePoint handle the access denied
    //exceptions. If one occurs you will be redirected
    //in the middle of the process. Handle the AccessDenied
    //exception yourself in a try-catch block
    siteCollection.CatchAccessDeniedException = false;
    try
    //Execute any logic you need to against the site collection
    //Call the recursive method to get all of the sites(webs)
    GetWebs(siteCollection.AllWebs);
    catch (Exception webE)
    //You should log the error for reference
    //reset the CatchAccessDeniedException property of the site
    //collection to true
    siteCollection.CatchAccessDeniedException = true;
    public void GetWebs(SPWebCollection allWebs)
    //iterate through each site(web)
    foreach (SPWeb web in allWebs)
    if(web.Exists)
    //For every site the program finds, the count will increase by one. If this code is executed by a user who does not have
    //full control, then the count will be inaccurate as it will only return the number of sites the user can access.
    test += 1;
    DataTable table = web.GetUsageData(Microsoft.SharePoint.Administration.SPUsageReportType.browser, Microsoft.SharePoint.Administration.SPUsagePeriodType.lastMonth);
    if (table == null)
    HttpContext.Current.Response.Write("Null");
    else
    HttpContext.Current.Response.Write("Not Null");
    protected override void CreateChildControls()
    BeginProcess();

    Hi, Shiladitya.
    Sorry I haven't replied until now. I'll paste the current code I am using, but my solution is not yet complete. What it does as of right now is it creates a data table with all of the webs located in your farm, as well as the total amount of page views for
    each web. What I noticed though is that when I compare these stats with the web analytics for the specific web, they don't match. I put the project on hold for this reason, and I might start it back up again soon. Feel free to use the code, and perhaps you
    maybe can shed some light on my issue.
    using System;
    using System.Data;
    using System.Collections;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.SharePoint.WebControls;
    //This code has been derived from the following link: http://blog.rafelo.com/2008/07/22/iterating-through-sharepoint-web-applications-site-collections-and-sites-webs/
    namespace WebAnalyticsTest.Test
    [ToolboxItemAttribute(false)]
    public class Test : WebPart
    //For the total amount of hits for a single web
    int totalHits;
    //The final data table that will be added to.
    DataTable final = new DataTable();
    //Size of the data table
    int finalSize = 0;
    //The grid that will be displayed
    DataGrid grid = new DataGrid();
    public void BeginProcess()
    //To allow users with lower permissions to view the proper content, the code must be used with RunWithElevatedPrivileges.
    SPSecurity.RunWithElevatedPrivileges(delegate()
    // Get references to the farm and farm WebService objects
    // the SPWebService object contains the SPWebApplications
    SPFarm thisFarm = SPFarm.Local;
    SPWebService service = thisFarm.Services.GetValue<SPWebService>("");
    foreach (SPWebApplication webApp in service.WebApplications)
    //Execute any logic you need to against the web application
    //Iterate through each site collection
    foreach (SPSite siteCollection in webApp.Sites)
    //do not let SharePoint handle the access denied
    //exceptions. If one occurs you will be redirected
    //in the middle of the process. Handle the AccessDenied
    //exception yourself in a try-catch block
    siteCollection.CatchAccessDeniedException = false;
    try
    //Execute any logic you need to against the site collection
    //Call the recursive method to get all of the sites(webs)
    GetWebs(siteCollection.AllWebs);
    catch (Exception webE)
    //Place any error logic here
    //reset the CatchAccessDeniedException property of the site
    //collection to true
    siteCollection.CatchAccessDeniedException = true;
    public void GetWebs(SPWebCollection allWebs)
    //iterate through each site(web)
    foreach (SPWeb web in allWebs)
    if (web.Exists)
    DataTable table = web.GetUsageData(SPUsageReportType.url, SPUsagePeriodType.lastMonth);
    if (table != null)
    //Determines the total amount of hits for a single web
    foreach (DataRow row in table.Rows)
    int num = System.Convert.ToInt32(row["Total Hits"]);
    totalHits = totalHits + num;
    //Temporarily stores the total hits with the associated web.
    DataTable temp = new DataTable();
    temp.Columns.Add("Site", typeof(string));
    temp.Columns.Add("Total Views", typeof(int));
    temp.Rows.Add(web.Title, totalHits);
    //Merges the data table "temp" to the data table "final"
    final.Merge(temp);
    //Data table size increases by one.
    finalSize += 1;
    //Resets the total hit counter
    totalHits = 0;
    protected override void CreateChildControls()
    BeginProcess();
    //Sorts the data table bases on the total hits
    final.DefaultView.Sort = "Total Views DESC";
    //The total amount of pages to show is 10. Therefore, only execute this If statement if the final's size > 10.
    if (finalSize > 10)
    //Data table of the top ten most viewed pages. This data table will be used in the data grid "grid"
    DataTable topTen = final.Clone();
    for (int i = 0; i < 10; i++)
    topTen.ImportRow(final.Rows[i]);
    grid.DataSource = topTen;
    else
    grid.DataSource = final;
    grid.DataBind();
    this.Controls.Add(grid);
    ListBox list = new ListBox();

  • Call thirty party java web service but always return null

    hi
    I call a java web service in my application visual studio 2008 c#, but always return NULL.
    I used Tool Fiddler to monitor the traffic between my client and the web service server, it showed the return is not Null.
    Here is my code, please see if anything I do wrong.
    namespace CanOfficer_THQ_vs_IHQ.TestWebReferenceAppointment {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="AppointmentServiceSoapBinding", Namespace="http://service.ips.salvationarmy.org/")]
    public partial class AppointmentService : Microsoft.Web.Services3.WebServicesClientProtocol {
    private System.Threading.SendOrPostCallback deleteAppOperationCompleted;
    private System.Threading.SendOrPostCallback importAppOperationCompleted;
    private System.Threading.SendOrPostCallback editAppOperationCompleted;
    private bool useDefaultCredentialsSetExplicitly;
    /// <remarks/>
    public AppointmentService() {
    this.Url = global::CanOfficer_THQ_vs_IHQ.Properties.Settings.Default.CanOfficer_THQ_vs_IHQ_TestWebReferenceAppointment_AppointmentService;
    if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
    this.UseDefaultCredentials = true;
    this.useDefaultCredentialsSetExplicitly = false;
    else {
    this.useDefaultCredentialsSetExplicitly = true;
    public new string Url {
    get {
    return base.Url;
    set {
    if ((((this.IsLocalFileSystemWebService(base.Url) == true)
    && (this.useDefaultCredentialsSetExplicitly == false))
    && (this.IsLocalFileSystemWebService(value) == false))) {
    base.UseDefaultCredentials = false;
    base.Url = value;
    public new bool UseDefaultCredentials {
    get {
    return base.UseDefaultCredentials;
    set {
    base.UseDefaultCredentials = value;
    this.useDefaultCredentialsSetExplicitly = true;
    /// <remarks/>
    public event deleteAppCompletedEventHandler deleteAppCompleted;
    /// <remarks/>
    public event importAppCompletedEventHandler importAppCompleted;
    /// <remarks/>
    public event editAppCompletedEventHandler editAppCompleted;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string deleteApp([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id) {
    object[] results = this.Invoke("deleteApp", new object[] {
    id});
    return ((string)(results[0]));
    /// <remarks/>
    public void deleteAppAsync(int id) {
    this.deleteAppAsync(id, null);
    /// <remarks/>
    public void deleteAppAsync(int id, object userState) {
    if ((this.deleteAppOperationCompleted == null)) {
    this.deleteAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OndeleteAppOperationCompleted);
    this.InvokeAsync("deleteApp", new object[] {
    id}, this.deleteAppOperationCompleted, userState);
    private void OndeleteAppOperationCompleted(object arg) {
    if ((this.deleteAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.deleteAppCompleted(this, new deleteAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string importApp(
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int person,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
    [System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
    object[] results = this.Invoke("importApp", new object[] {
    person,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories});
    return ((string)(results[0]));
    /// <remarks/>
    public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
    this.importAppAsync(person, name, territory, location, primary, start, end, categories, null);
    /// <remarks/>
    public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
    if ((this.importAppOperationCompleted == null)) {
    this.importAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OnimportAppOperationCompleted);
    this.InvokeAsync("importApp", new object[] {
    person,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories}, this.importAppOperationCompleted, userState);
    private void OnimportAppOperationCompleted(object arg) {
    if ((this.importAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.importAppCompleted(this, new importAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string editApp(
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
    [System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
    object[] results = this.Invoke("editApp", new object[] {
    id,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories});
    return ((string)(results[0]));
    /// <remarks/>
    public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
    this.editAppAsync(id, name, territory, location, primary, start, end, categories, null);
    /// <remarks/>
    public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
    if ((this.editAppOperationCompleted == null)) {
    this.editAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OneditAppOperationCompleted);
    this.InvokeAsync("editApp", new object[] {
    id,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories}, this.editAppOperationCompleted, userState);
    private void OneditAppOperationCompleted(object arg) {
    if ((this.editAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.editAppCompleted(this, new editAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    public new void CancelAsync(object userState) {
    base.CancelAsync(userState);
    private bool IsLocalFileSystemWebService(string url) {
    if (((url == null)
    || (url == string.Empty))) {
    return false;
    System.Uri wsUri = new System.Uri(url);
    if (((wsUri.Port >= 1024)
    && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
    return true;
    return false;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void deleteAppCompletedEventHandler(object sender, deleteAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class deleteAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal deleteAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void importAppCompletedEventHandler(object sender, importAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class importAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal importAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void editAppCompletedEventHandler(object sender, editAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class editAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal editAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));

    Hi;
    I used Fiddler to monitor the process, and it showed the request sent thru web service worked and returned a value, but in my .Net application the return captured as NULL. Could you please look into the code above and the result from Filddler and see if
    you can help.
    thank you.
    REQUEST:
    POST https://159.253.140.178/services/AppointmentService HTTP/1.1
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4252)
    Content-Type: text/xml; charset=utf-8
    SOAPAction: ""
    Host: 159.253.140.178
    Content-Length: 1589
    Expect: 100-continue
    Connection: Keep-Alive
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://service.ips.salvationarmy.org/" xmlns:types="http://service.ips.salvationarmy.org/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
    <soap:Header>
    <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>
    [email protected]
    </wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
    tpi4IPSws!
    </wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <tns:importApp>
    <person xsi:type="xsd:int">
    169275
    </person>
    <name xsi:type="xsd:string">
    Corps Officer (Cahul-Russia) Test12
    </name>
    <territory xsi:type="xsd:string">
    CAN
    </territory>
    <location xsi:type="xsd:string">
    TEST LOCATION 12
    </location>
    <primary xsi:type="xsd:boolean">
    true
    </primary>
    <start xsi:type="xsd:dateTime">
    2013-05-30T00:00:00
    </start>
    <end xsi:type="xsd:dateTime">
    2014-06-04T00:00:00
    </end>
    <categories href="#id1" />
    </tns:importApp>
    <soapenc:Array id="id1" soapenc:arrayType="xsd:string[1]">
    <Item>
    vpsCat1
    </Item>
    </soapenc:Array>
    </soap:Body>
    </soap:Envelope>
    RESPONSE:
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Content-Type: text/xml;charset=UTF-8
    Content-Length: 232
    Date: Fri, 05 Sep 2014 19:45:22 GMT
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ns2:importAppResponse xmlns:ns2="http://service.ips.salvationarmy.org/">
    <return>
    OK_572463
    </return>
    </ns2:importAppResponse>
    </soap:Body>
    </soap:Envelope>

  • UCCX XPath on Get XML Document Data Step always returns null

    Hello,
    Can someone tell whats wrong with my XPath, because it always returns null. I have tried different variations and nothing. I'm using UCCX 7.0
    XML
    <?xml version="1.0" encoding="utf-8" ?>
    <GetManagersResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.labdomain.com/">
      <ClaimManagersList>
        <X_CLAIM_MANAGER>
          <ClaimManagerUserName>test</ClaimManagerUserName>
        </X_CLAIM_MANAGER>
      </ClaimManagersList>
    </GetManagersResult>
    XPATH
    "/descendant::GetManagersResult/child::ClaimManagersList/child::X_CLAIM_MANAGER/child::ClaimManagerUserName"
    During debug, this is the value of the xml document when it reaches the Get XML Document Data step:
    TEXT[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetManagersResult xmlns=\"http://www.labdomain.com/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n  <ClaimManagersList>\r\n    <X_CLAIM_MANAGER>\r\n      <ClaimManagerUserName>test</ClaimManagerUserName>\r\n    </X_CLAIM_MANAGER>\r\n  </ClaimManagersList>\r\n</GetManagersResult>]

    It's your XML namespace in the root element.
    First off, I have never seen the CRS Editor play nice when XML namespaces are involved.
    Secondly, with your namespace in place, not even a generic xpath expression tester can find your data.  See attachements.
    I think that if you find a way to either: not send, or remove the namespace from your document, your xpath expression will work.
    With Namespaces
    Without Namespaces

  • Get XML Document Data step always returns NULL

    Hi All,
    I was hoping someone might be able to help with this.
    I'm writing a holiday script, it uses XML to check whether the date is a holiday or halfday. XML below
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Holidays>
      <Holiday Date="1/1/2012">Holiday</Holiday>
      <Holiday Date="3/1/2012">Halfday</Holiday>
      <Holiday Date="6/1/2012">Holiday</Holiday>
      <Holiday Date="5/4/2012">Halfday</Holiday>
      <Holiday Date="6/4/2012">Holiday</Holiday>
      <Holiday Date="8/4/2012">Holiday</Holiday>
      <Holiday Date="9/4/2012">Holiday</Holiday>
      <Holiday Date="30/4/2012">Halfday</Holiday>
      <Holiday Date="1/5/2012">Holiday</Holiday>
      <Holiday Date="17/5/2012">Holiday</Holiday>
      <Holiday Date="27/5/2012">Holiday</Holiday>
      <Holiday Date="6/6/2012">Holiday</Holiday>
      <Holiday Date="23/6/2012">Holiday</Holiday>
      <Holiday Date="6/4/2012">Holiday</Holiday>
      <Holiday Date="3/11/2012">Halfday</Holiday>
      <Holiday Date="25/12/2012">Holiday</Holiday>
      <Holiday Date="26/12/2012">Holiday</Holiday>
      <Holiday Date="19/10/2012">Halfday</Holiday>
    </Holidays>
    However when I debug the script the result of the Get XML Document step always returns null.
    Xpath work great in notepad++
    My code is attached, anyone with any pointers?
    Regards,
    Andy

    Your XPATH of:
    "/Holidays/Holiday[@Date='+DateString+']"
    Needs to be:
    "/Holidays/Holiday[@Date='"+DateString+"']"
    Good luck and happy scripting!
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Plz help, A select query for table giving foll o/p

    A table has a single column with following data
    Col1
    170
    10
    140
    520
    20
    60
    70
    The select query should return the data in the following format
    Col1 Col2 Col3 Col4
    170 3 1 0
    10 0 0 1
    140 2 2 0
    520 10 1 0
    20 0 1 0
    60 1 0 1
    70 1 1 0

    Using my awesome puzzle solving brain I note that Col2 = 50 Col3 = 20 Col4 = 10.
    But you should be telling US that.
    select col1, floor(col1/50) col2, floor(mod(col1,50)/20) col3, floor(mod(mod(col1,50),20)/10) col4
    from mytable.
    I win the internets!
    Edited by: Dave Hemming on Dec 19, 2008 11:35 AM

  • Error While Firing select Query  on Table

    Hi aill,
    we have Oracle 11g RG2 RAC on Production Machine. When I am firing select query on one partiton table,it will show me below error in Alter Log file :
    Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x0] [PC:0x84056AA, kkpamDInfo()+38] [flags: 0x0, count: 1]
    Errors in file /opt/app/oracle/diag/rdbms/winsdb/WINSDB2/trace/WINSDB2_ora_29686.trc (incident=288563):
    ORA-07445: exception encountered: core dump [kkpamDInfo()+38] [SIGSEGV] [ADDR:0x0] [PC:0x84056AA] [Address not mapped to object] []
    Incident details in: /opt/app/oracle/diag/rdbms/winsdb/WINSDB2/incident/incdir_288563/WINSDB2_ora_29686_i288563.trc
    While checking the trace file :
    ========== FRAME [2] (ksedst1()+98 -> skdstdst()) ==========
    defined by frame pointers 0x2ba371efaa40 and 0x2ba371efa990
    CALL TYPE: call ERROR SIGNALED: no COMPONENT: KSE
    RDI 0000000000000000 RSI 0000000000000000 RDX 00002BA371EF6118
    RCX 0000000000000001 R8 0000000000000000 R9 0000000000000000
    RAX 0000000000000000 RBX 0000000000000003 RBP 00002BA371EFAA40
    R10 71EFA9A000000000 R11 0000000000000000 R12 0000000000000003
    R13 0000000000000003 R14 0000000000000001 R15 0000000000000001
    RSP 00002BA371EFA9A0 RIP 000000000349E72E
    Dump of memory from 0x2ba371efaa40 to 0x2ba371efaaf0
    2BA371EFAA40 71EFAB10 00002BA3 0349E77F 00000000 [...q.+....I.....]
    2BA371EFAA50 00000000 00000000 00000000 00000000 [................]
    2BA371EFAA60 71B996F0 00002BA3 02050034 00000000 [...q.+..4.......]
    2BA371EFAA70 000000FF 00002BA3 00002004 00000000 [.....+... ......]
    2BA371EFAA80 00000000 00000000 2338D058 00016DAB [........X.8#.m..]
    2BA371EFAA90 00000003 00000000 085232F3 00000000 [.........2R.....]
    2BA371EFAAA0 0000000D 00000000 00000002 00000000 [................]
    2BA371EFAAB0 00000000 00000000 00000000 00000000 [................]
    2BA371EFAAC0 71EFAAD0 00002BA3 085BBFCF 00000000 [...q.+....[.....]
    2BA371EFAAD0 71EFAB10 00002BA3 0349E249 00000000 [...q.+..I.I.....]
    2BA371EFAAE0 00000000 00002BA3 00000013 00000000 [.....+..........]
    Can Anyone guide me for above Errors. How can I resolve the same.

    A quick search of Oracle Support shows that there are a handful of bugs that match ORA-07445 with an argument of kkpamDInfo()+38.
    Whether yours is already identified and patched depends on the exact version of 11.2 and the specific circumstances.
    If you're on 11.2.0.1 then this might be part of what sounds like quite a big bucket of such errors - Bug 9399991 relating to errors and dumps with SQL against partitioned tables.

  • Select Query LQUA Table

    Hi Experts
    Can Any one tell me ,
    Is there anything wrong in this select query, As per my knoledge everything is Fine, But Still i am getting SY-SUBRC = 4 for this Query,
    Its a Warehouse Management table LQUA i have Used.
    TABLES:mara,lqua.
    *Internal Table And Work Area Declearation
    DATA: it_lqua1 TYPE TABLE OF lqua WITH HEADER LINE.
    DATA: wa_tmp_lqua TYPE lqua.
    CONSTANTS: c_x TYPE char1 VALUE 'X',
               c_t TYPE char1 VALUE 'Q'.
    *Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS:P_HLDR TYPE lqua-Z_HLDREF1.
    SELECT-OPTIONS:s_matnr FOR mara-matnr,
                   s_date  FOR sy-datum DEFAULT sy-datum,
                   s_mfgt  FOR sy-uzeit DEFAULT sy-uzeit,
                   s_CHARG FOR lqua-CHARG.
    SELECTION-SCREEN END OF BLOCK blk1.
    START-OF-SELECTION.
    Select * from LQUA
                into table IT_LQUA1
                where MATNR in S_MATNR
                and BDATU in S_DATE
                and Z_MFGTIM in S_MFGT
                   AND CHARG IN S_CHARG.
    After Debuging Above Query I am Getting SY-SUBRC = 4.
    Same data is availabe In LQUA Table For Selection Criteria..
    Please help me if anyone has worked on WM LQUA Table

    Hi
    as per your code you are mentioning S_DATE and S_MFGT which is system date and username.
    i beleive you do not have data for this user name and this date in your table LQUA. that why you are getting sy-subrc = 4
    because all this is in the where condition with AND operator. So all the conditions should be matched otherwise you will not find any data.
    so check your table once again for the given values, like your system date and the current user name.
    Thanks
    Lalit Gupta

  • Query to table in Database Link returns value from local table

    Hi
    I made a databaselink (Create database link db_a.world connect to db_a identified by <user> using 'db_a.world')
    Then I query a table, connected as a user in db_b.world (this is our developer database - identical to db_a): Select count(*) from table@db_a.world.
    When I get the result - it comes from the database I am logged in to (db_b)! - This is easy to check, because when I run select count(*) from table - it shows the same number. When I connect to the remote database, the same query shows another (correct) number.
    When I created the database link, Oracle demanded a loopback clause. Why is that, and can this be the reason for the strange behaviour?
    Thanx
    Anders
    Narvik, Norway

    Hi Anders,
    A loopback database link is when you want to test connecting to the same database as say a different user. It can be used for testing purposes. Creating a database link doesn't require a loopback clause. The reason why you are getting the same row count as db_b.world because db_a.world has been created as a loopback link.
    In the example you have Create database link db_a.world connect to db_a identified by <user> using 'db_a.world' , the clause after 'connect to' is meant to be the username and the clause after 'identified by' is meant to be the password.
    So, create a regular database link like this:
    create database link db_a_link connect to <user> identified by <passwd> using <service name>
    You shouldn't get an error message that the loopback clause has to be specified. Then try querying and hopefully it will work.
    -Raj

  • I am trying to raise event at UserControl, and catch it at Main program, But the event always return null

    I am trying to raise a event in one of classes of userControl, and Fire it in the Main class. I tried two different ways to fire this event, one of them works, But I still want to know why other way cannot work, and how to fix it.
    My userContol class:
    public partial class UserControl1 : UserControl
    public UserControl1()
    InitializeComponent();
    if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
    return;
    Class1 c = new Class1();
    Thread accept = new Thread(
    () =>
    c.connection();
    accept.Start();
    And the Class1:
    public class Class1
    public delegate void myhandler(object sender, EventArgs e);
    public event myhandler test;
    public Class1()
    public void connection()
    test(this, new EventArgs());
    In the Main, I just simply add into referent, and add
    xmlns:my="clr-namespace:WpfControlLibrary1;assembly=WpfControlLibrary1"
    then I try to subscribe this event in the main
    public partial class SurfaceWindow1 : SurfaceWindow
    /// <summary>
    /// Default constructor.
    /// </summary>
    public SurfaceWindow1()
    InitializeComponent();
    Class1 c = new Class1();
    c.test+=new Class1.myhandler(c_test);
    // Add handlers for window availability events
    AddWindowAvailabilityHandlers();
    public void c_test(object sender, EventArgs e)
    MessageBox.Show("fire");
    If I only raise this event not into thread, it works fine, but If I try to let it raise in this thread, this test event only return null, and shows:
    Object reference not set to an instance of an object.
    looks like I did not subscribe it ever. So How to fix it if I must use it in thread.

    Subscribing to events window to class is not a great approach.
    You have to then go un subscribe those handlers in order to allow your instance to be disposed.
    Forget that and you'll eventually notice you have memory leaks.
    The way I do this sort of thing is using mvvm light messenger.
    You can keep everything decoupled then.
    http://social.technet.microsoft.com/wiki/contents/articles/26070.aspx
    I just did a bit of code for someone else which shows how to do cross thread stuff with this approach.
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    Messenger.Default.Register<String>(this, (action) => ReceiveString(action));
    private void ReceiveString(string msg)
    MessageBox.Show(msg);
    Dispatcher.BeginInvoke((Action)delegate()
    tb.Text = msg;
    private void Button_Click(object sender, RoutedEventArgs e)
    Task.Factory.StartNew(() => {
    Messenger.Default.Send<String>("Hello World");
    Note that the message arrives on the thread it was sent from. That's not the ui thread because it was sent from that task.factory.startnew to deliberately put it on a different thread.
    In order to change UI controls, it uses dispatcher.begininvoke to run code on the UI thread.
    Although this is in one piece of code behind publisher and subscriber can be in two totally different classes which have no reference of knowledge of each other.
    Meaning you can send a message<t> from any class1 or whatever you like and your mainwindow can subscribe and act of receipt of a message<t>.
    It is the type which defines which message one is. You put data you want to send in t and use it in the subscriber.
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Query about "env- GetByteArrayElements(jImageBlob, 0);"  Returning null

    Hi All,
    I am calling a C++ method using JNI with a byte array as argument.
    The C++ code snippet is:
    if( jImageBlob == NULL ) {
              env->ThrowNew( jnullPointerException, "Image buffer is null." );
              return 0;
    imageBlob = env->GetByteArrayElements(jImageBlob, 0);
         if (imageBlob == NULL)
         env->ThrowNew( jexception, ImgErrorString("Error Message") );
              goto onError;
    This code works fine with normal working conditions. But, with heavy load under multi threaded execution, this call fails with "Error message". As the byte array passes first check for null, it is sure that the contents are not null. Still "env->GetByteArrayElements(jImageBlob, 0);" returns null.
    What can be the probable reason here?
    Thanks in advance,
    Daya

    imageBlob = env->GetByteArrayElements(jImageBlob, 0);
    if (imageBlob == NULL)
    env->ThrowNew( jexception, ImgErrorString("Error Message") );That is certainly wrong. When that null is returned java, by definition, has already thrown an exception.
    JNI exception MUST be dealt with via one of the following
    1. Clear it
    2. Return immediately to java.
    You are not doing the above.
    Other than that
    1. you might want to make sure that the byte array is not being accessed by more than one thread.
    2. your code example uses the same var name for completely different types. Hopefully that isn't how your code works.

  • Need pointers to improve performance of a select query to table vbrk

    Hey Folks,
    I have a query , whose performance needs to be tuned , as such:
        SELECT a~vbeln
               a~fkart                    
               a~waerk
               a~fkdat                   
               b~posnr
               b~vgbel
               b~vgpos
               b~matnr
               b~arktx
               b~prctr
               b~txjcd
          INTO TABLE gi_billing_items
          FROM vbrk AS a
          INNER JOIN vbrp AS b
          ON a~vbeln = b~vbeln
          FOR ALL ENTRIES IN gi_sales_items
         WHERE b~vgbel = gi_sales_items-vbeln
           AND b~vgpos  = gi_sales_items-posnr
           AND b~matnr  = gi_sales_items-matnr
           AND b~werks  = gi_sales_items-werks.
    where
    gi_sales_items is an internal table consisting of 278 entries,.
    The result set collected in table gi_billing_items is 200 records
    The total execution time for this query for the afore given data is 72,983 ms with the average time/record being ~ 9,471 ms which is too high.
    When I try to verify the Explain Plan of the query in ST05, in the Access path I see that the performance of Query Block 1 is bad. Query Block 1 is of the QBLOCK_TYPE UNIONA. Its the very first step in the Query execution internally.
    The indexes are defined on participating tables VBRK and VBRP as:
    VBRK~0      MANDT,VBELN
    VBRK~LOC MANDT,LCNUM
    VBRP~0      MANDT,VBELN,POSNR
    VBRP~Z01   FPLNR,MANDT
    VBRP~Z02   MANDT,MATNR,WERKS
    Its clear from the ST05, STAD and SE30 traces that there is a performance issue in this query. Does anyone have any pointers as to how to resolve this issue? Is there a protocol one needs to follow when using the "FOR ALL ENTRIES IN" clause? Or is there a need for any secondary indexes to be created?
    Please let me know
    Thanks and Best Regards,
    Rashmi.

    Hi,
    Try using the VBFA...to get the Invoice number and line item..and then use that value in VBRK...
    * Declare the internal table for T_VBFA.
    IF NOT gi_sales_items[] IS INITIAL.
    SELECT VBELV
                  POSNV
                  VBELN
                  POSNN
                  VBTYP_N
                  INTO TABLE T_VBFA
                  FOR ALL ENTRIES IN gi_sales_items
                  WHERE VBELV = gi_sales_items-VBELN
                  AND       POSNV = gi_sales_items-POSNR
                  AND       VBTYP_N = 'M'.             "Invoice                       ""Added this..
    ENDIF.
    **Add two columns to GI_SALES_ITEMS..to store the VBELN POSNN the data from t_vbfa..let's assume it is VBELN_VF and POSNR_VF
    * Basically merge gi_sales_items AND t_vbfa
    ** Then use that field in
    IF NOT GI_SALES_ITEMS[] IS INITIAL.
          SELECT a~vbeln
               a~fkart                    
               a~waerk
               a~fkdat                   
               b~posnr
               b~vgbel
               b~vgpos
               b~matnr
               b~arktx
               b~prctr
               b~txjcd
          INTO TABLE gi_billing_items
          FROM vbrk AS a
          INNER JOIN vbrp AS b
          ON a~vbeln = b~vbeln
          FOR ALL ENTRIES IN gi_sales_items
          WHERE b~vbeln = gi_sales_items-vbeln_vf   " Change here
           AND b~posnr  = gi_sales_items-posnr_vf     " Change here
           AND b~matnr  = gi_sales_items-matnr
           AND b~werks  = gi_sales_items-werks.
    ENDIF.
    Thanks
    Naren
    Edited by: Narendran Muthukumaran on Oct 15, 2008 11:35 PM

Maybe you are looking for

  • How can I access my icloud account if I don't have a mac? (I have an iphone and ipad)

    My pages app lost all my documents and according to my ipad my icloud has the files backed up but I don't know how to see those documents on my ipad. When I search this on google, i find only how to access the icloud via mac. HELP PLEASE!

  • PDF opens in all versions of Acrobat except 7

    I am working on a project where we create PDF documents with FOP. The generated PDFs open in Version 6, 8 and 9 but NOT 7! We get an error "There was a problem reading this document(114)" The document is partially rendered and disappears when you scr

  • Smart playlist not working

    My smart playlists aren't doing jack squat for updating. The live-update checkbox is checked. I tried unchecking it, then going back and checking it again. No luck. I have lots of new songs on my computer that simply are not showing up. And the music

  • G4-dual + G4-dual connection

    I have a G4-dual processor and now have another one available. Can I? if so, How can I connect the 2 G4 computers together to get the max processing output from the 2 G4-Dual? Both have latest Tiger OS. I remembering using the firewire connection. Th

  • New external hard drive

    Hi. I'm looking to get my first external hard drive, and I'm considering this: http://www.newegg.com/Product/Product.aspx?Item=N82E16822186032 . Does this look o.k. for use with my iBook? Is Iomega a reliable brand? If not to either, could somebody p