SPLongOperation throws error "Thread was being aborted"

Recently we have migrated our SharePoint application from 2010 to 2013, we have upgraded our solution from VS 2012 to VS 2013 and deployed it successfully in newly installed SharePoint 2013 prior to content DB migrate and all.
In our solution, we had requirement to implement lengthy operation which create site from site template, copying documents from one library to another, creating user groups and so on. To achieve these, we have used
SPLongOperation which is taking care for not to abort thread and complete operation without and time constraint, which is working fine 2010 environment. 
After upgrading to 2013, we started facing problem with "Thread was being aborted", which seems SPLongOperation is not working.
Have I missed any configuration?
Help appreciated.
Arpan Shah MSFT Mark as Answer if it solves your problem. Vote As Helpful if the post is helpful for you.

Hi,
 According to your description, I suggest you debug your code in the test
environment and check if the method of SPLongOperation.End throw the exception.
The code snippet below for your reference:
//Long Operation Code
using (SPLongOperation longOperation = new SPLongOperation(this.Page))
//Start the long operation
longOperation.Begin();
//Your Long Operation Code Goes Here...
//End the long operation
longOperation.End("http://localhost/_layouts/success.aspx", Microsoft.SharePoint.Utilities.SPRedirectFlags.DoNotEndResponse, HttpContext.Current, "");
More information:
http://snahta.blogspot.com/2009/10/splongoperation-class.html
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support

Similar Messages

  • Thread was being aborted Error.

    HI,
        I am Getting Below error:
    Thread was being aborted. Source of Error :mscorlib Error Method :18 Helplink : Line of Error : at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() 
    Thanks is in Advance,
    Help me.

    try to move Response outside of the Try/Catch block
    Check this thread
    http://stackoverflow.com/questions/1433448/thread-was-being-aborted

  • SPListItem.Update() = Thread was being aborted.

    Hello,
    I currently have a problem to update a mysite list item.
    This code is working very well on my dev environment but in the production it's not working :/
    My logs end with : 
    Item added
    Error: Thread was being aborted.
    Nok: Thread was being aborted
    Anyone have an idea? (on prod the mysites are in a separate web application. that's the only difference)
    Thanks
    public static object Add(String User, String Title, String Text)
    try
    String AuthorLoginName = SPContext.Current.Web.CurrentUser.LoginName;
    SuiteBarLog("Sender: " + AuthorLoginName);
    SPSecurity.RunWithElevatedPrivileges(delegate()
    SuiteBarLog("RunWithElevatedPrivileges");
    using (SPWeb Web = new SPSite(new PeopleManager().GetPropertiesFor(User).PersonalUrl).RootWeb)
    SuiteBarLog("Open Web: " + Web.Url);
    Web.AllowUnsafeUpdates = true;
    SPUser Author = Web.EnsureUser(AuthorLoginName);
    try
    SPList List = Web.Lists[LISTNAME];
    SPListItem Item = List.AddItem();
    SuiteBarLog("Item added");
    Item["Title"] = Title;
    Item["Text"] = Text;
    Item["Read"] = false;
    Item["Author"] = Author.ID + ";#" + Author.Name;
    Item.SystemUpdate();
    SuiteBarLog("Notification Updated");
    List.Update();
    SuiteBarLog("List Updated");
    catch (Exception ex)
    SuiteBarLog("Error: " + ex.Message);
    Web.AllowUnsafeUpdates = false;
    return "ok";
    catch(Exception ex)
    SuiteBarLog("Nok : " + ex.Message);
    return "Nok : " + ex.Message;

    Thanks, but it solves nothing. I have no error to open the website. The error appears once I update my item in the list.
    I tried your code but as I thinked it's always the same error.
    public static object Add(String User, String Title, String Text)
    try
    SuiteBarLog("Add Notification to " + User);
    String AuthorLoginName = SPContext.Current.Web.CurrentUser.LoginName;
    SuiteBarLog("Sender: " + AuthorLoginName);
    String PersonalURL = new PeopleManager().GetPropertiesFor(User).PersonalUrl;
    SPSecurity.RunWithElevatedPrivileges(delegate()
    SuiteBarLog("RunWithElevatedPrivileges");
    using (SPSite Site = new SPSite(PersonalURL))
    using (SPWeb Web = Site.OpenWeb())
    SuiteBarLog("Open Web: " + Web.Url);
    Web.AllowUnsafeUpdates = true;
    SPUser Author = Web.EnsureUser(AuthorLoginName);
    SuiteBarLog("Author confirmed: " + Author.Email);
    try
    SPList List = Web.Lists[LISTNAME];
    SPListItem Item = List.AddItem();
    SuiteBarLog("Item added");
    Item["Title"] = Title;
    Item["Text"] = Text;
    Item["Read"] = false;
    Item["Author"] = Author.ID + ";#" + Author.Name;
    Item.SystemUpdate();
    SuiteBarLog("Notification Updated");
    List.Update();
    SuiteBarLog("List Updated");
    catch (Exception ex)
    SuiteBarLog("Error: " + ex.Message);
    Web.AllowUnsafeUpdates = false;
    return "ok";
    catch(Exception ex)
    SuiteBarLog("Nok : " + ex.Message);
    return "Nok : " + ex.Message;

  • SPUtility.GetPrincipalsInGroup method throws Thread was being aborted error when SPGroup Name is passed

    Hello,
    I am getting 'Thread was being aborted - Unable to evaluate expression because
    the code is optimized or a native frame is on top of the call stack' error
    when I use 'SPUtility.GetPrincipalsInGroup' method.
    bool bReachedMaxCount = false;
    SPPrincipalInfo[] _spPrincInfoColl = SPUtility.GetPrincipalsInGroup(web, groupName, Int32.MaxValue - 1, out bReachedMaxCount);
    We have both SharePoint groups (SPGroup) & Active Directory groups in our site.
    I am checking if logged in user has access to the group name that I am passing here as 'groupName'.
    Code works without any error when I pass 'domain name' as 'groupName' e.g. (Domain\\usergroup) but the same throws error when I pass SharePoint groups (SPGroup) name.
    Both type of these groups have at least 'Read' permission on site.
    I have this code inside 'try-catch' block and hence I am able to catch that thread aborted error.
    What could be the reason for this error? I don't get any call stack and all other properties of exception object are either null or with garbage values.
    I am having SP2010 foundation, VS2012 and .Net4.5 installed on my machine.
    Kindly suggest on this. Thank you.
    Sagar S.

    I think the RunWithElevatedPrivilages is not working correctly. I believe that the new site and web objects need to be opened within elevatedprivilages to work. it looks like the way your code is working the SPsite and SPweb objects are getting opened before
    the RunWithElevatedPrivilages give this a try and see if your result changes.
    bool IsUserInGroup = false;
    try
    SPSecurity.RunWithElevatedPrivileges(() =>
    Guid siteId = SPContext.Current.Site.ID;
    Guid webId = SPContext.Current.Web.ID;
    using (SPSite newSite = new SPSite(siteId)) {
    using (SPWeb newWeb = newSite.OpenWeb(webId)){
    bool bReachedMaxCount = false;
    SPPrincipalInfo[] _spPrincInfoColl = SPUtility.GetPrincipalsInGroup(newWeb, "TestGroup", Int32.MaxValue - 1, out bReachedMaxCount);
    if (_spPrincInfoColl.Where(a => a.LoginName == username).Count() > 0)
    IsUserInGroup = true;
    }//close web
    }//close site
    catch (Exception ex)
    LogManager.LogMessage(ex.Message.ToString());
    Alex

  • Thread was being aborted

    I am getting error like in my asp.net website
    System.Threading.ThreadAbortException: Thread was being aborted.
    at System.String.wstrcpy(Char* dmem, Char* smem, Int32 charCount)
    at System.String.FillStringChecked(String dest, Int32 destPos, String src)
    at System.String.Concat(String str0, String str1)
    at reporterror.Page_Load(Object sender, EventArgs e)
    In that procedure i do perform concatenation of two large strings. 
    Can anyone help to know why this error comes? Why Thread was being aborted error comes?

    Hello,
    For ASP.NET projects please consider asking your question here
    http://forums.asp.net/
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Workflow is Canceled instantly - System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    I am trying to solve some issues and strange behaviour with an important workflow hooked up with an InfoPath 2010 list in SharePoint 2010. Everything worked fine until now.
    One workflow item has ended prematurely with the workflow history messages "An error has occurred in workflowname" followed by some init text message I added, and finally "Could not start workflowname"
    (not sure of the exact translation but something like that). Status is still "On Going" (again not sure of translation).
    The workflows after this has gotten the status "Canceled" with no further error messages. However the first init text I added is visible in their workflow history but no other messages are displayed, neither my custom ones nor
    the built in.
    Please help me out, any hints or pointers to help debug this is very appreciated! I do not have other than "view" access so I will have to tell the IT-department to check logs and perform changes if needed.
    /Jesper Wilfing
    Edit: The IT guys sent me the error message from the log file:
    Workflow Infrastructure       72fq
     Unexpected Start Workflow: System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    Thank you for sharing and it will help others who meet the same issue.
    Best regards,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • CRVS2010 Beta thread was being aborted

    Hi,
    I am attempting to upgrade from CR 11.5 to CR 2010 Beta2  (with VS 2010, net 4) to see how the reports and applications do in the new environment. All of the reports have sql parameters and connect to sql server 2008r2 stored procedures. I am experiencing one strange issue.
    In the crystal viewer toolbar, if I print the report, after the printer dialog box is opened, the page and report won't work. (it doens't matter if you close the dialog or actually print the report) So, if there are parameter fields or a generate report button, nothing works after the print dialog has been shown. The CrystalDecisions.Web.ErrorEventArgs error says "Thread was being aborted". In order to have access to the web page, the user now needs to refresh the page. Why is this happening? Everything worked fine in both CR 11.5 and CR 2008 Also, if the export button is clicked instead of the print button, everything works fine afterwards, so it's just the print button that is errorring out.
    This error happens both on a development computer (XP sp3) and a development server (2008 x86).
    Any ideas? Thanks, Harlan

    Hi Don,
    I created a new asp.net Crystal reports Web site, created a new report and just connected it to a table instead of a stored procedure with no parameters. When I run it from the browser, I still get the same error messages when I try to print so it does not appear to be a migration issue.
    Thanks again,
    Harlan

  • Thread was being aborted Exception while creating large number of Sites in SharePoint 2013

    Hi All,
    I am getting threading exception while creating a large extent of sites in SharePoint 2013. I am reading data from an excel file and then looping each row. The sites are creating for first two rows then i am getting exception. This code working fine in dev
    server but not in UAT server. I tried with changing maxRequestLength in web.config but not working. And also followed the below link.
    http://support.microsoft.com/kb/928756
    My code as follows-
    private void CreateSites(DataRow dr)
                try
                    using (SPSite site = new SPSite(OtherSiteCollection)) // I am creating sites in another site collection
                        using (SPWeb web = site.OpenWeb())
                                SPWeb newWeb = null;
                                SPWebTemplateCollection templates = site.RootWeb.GetAvailableWebTemplates(1033);
                                SPWebTemplate template = (from SPWebTemplate m in
                                                              templates
                                                          where m.Title == "SiteTemplate"
                                                          select m).FirstOrDefault(); //Here i am using custom template
        string siteName = dr["Site Name"].ToString();
                                newWeb = web.Webs.Add(siteTitle, siteTitle, siteDescription, 1033, template, true, false); //Getting exception here.
                                newWeb.Update();
                                newWeb.Dispose();
                catch (Exception ex)
                    lblMsg.Text = "Exception in create sites : " + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString()
    I am getting error as-
    Exception in create sites: Thread was being aborted.;   at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent,
    String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, SPWebTemplate WebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
       System.Threading.ThreadAbortException: Thread was being aborted.
       at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32&
    plWebTemplateId)
       at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
       at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
       at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
       at Microsoft.SharePoint.SPWeb.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere, Guid appInstanceId)
       at Microsoft.SharePoint.SPWebCollection.Add(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, SPWebTemplate WebTemplate, Boolean useUniquePermissions, Boolean bConvertIfThere)
    Thread was being aborted.;   at System.Threading.ThreadAbortException: Thread was being aborted.
    Can anyone please help. Thanks!
    dinesh

    If you do this from a Console application, does it succeed?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Jco call rfc throws error after WAS upgrade sp15

    Hi all.
    When 2 days ago, our WAS engine version is sp14.
    And we have one application using jco library to connect to SAP R/3. It works well.
    After we upgrade WAS to sp15.
    This function throws out the error.
    Umrechnungsfaktor konnte nicht bestimmt werden
    Is there anybody can help me ? Its very urgent !

    Hi
    A)Go to adming page http://<localhost>:<port> >>click Web Dynpro >>Content admin >> create, maintain, test Jco and also you can Test the SLD connection too
    B)If you are using any JDBC driver,Check your JDBC driver is registered. or else you have register it
    1. Start the Visual Admin tool
    2. In the tab Cluster, open the node of the server you want to check.
    3. Open the node Services under the server you want to check.
    4. Click on the entry ClassLoader Viewer under Services. 5. The components are displayed in the right window. Open the node Applications in the right window.
    6. Look for the entry sap.com/com.sapportals.connectors.database and click on it.
    Under sap.com/com.sapportals.connectors.database, your JDBC driver should be available
    Cheers
    Jawahar Govindaraj
    PS: Reward points

  • Thread being aborted sharepoint 2013

    Hi All,
    I am receiving the below error "Thread being aborted" when i try to open my dev url. I have no idea about the area(ThirdSPS2010) which is throwing error. As the production was set up by third party and i just took back up of the url and also the
    back up of custom webparts and restored in development environment. I am struck with this error now :(
    06/25/2013 14:06:17.45     w3wp.exe (0x22A4)                           0x13DC    ThirdSPS2010               
         Error                             00000    Unexpected    Thread was
    being aborted.    b6c1289c-d07c-a0de-44ea-088cb42c35e3
    Above this i can find multiple Distributed cache warnings as below
    SharePoint Foundation             DistributedCache                  ah24w    Unexpected  
     Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts are
    present or running in the farm.     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'.
    Can someone guide what is the reason for these errors :(
    Thanks in advance
    Ranjani.R

    Unlike other service instances, though, the Distributed Cache Service Instance should either be installed *and* online on a SharePoint server, or not installed at all. If the service instance is stopped (disabled) but not uninstalled, details about the associated
    Cache Host stay in the Cache Cluster Config store, which can cause problems.
    For this reason, the Distributed Cache Service Instance should never be stopped via the Services on Server page in Central Administration or via Stop-SPServiceInstance in PowerShell. A special cmdlet, Remove-SPDistributedCacheServiceInstance, is available
    to stop *and* uninstall the local Distributed Cache Service Instance from a SharePoint server. This cmdlet, and its complement Add-SPDistributedCacheServiceInstance, should be used instead of Stop- and Start-SPServiceInstance for managing the local Distributed
    Cache Service Instance.
    from
    http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx

  • Full optimize with Compress DB throws error

    Hi,
    We are using SAP BPC 7.0 MS version... We have an SSIS package scheduled every morning for a Full Optimize with Compress DB. For the past few days this package had been failing after running for 2 hours, with the following error message :
    [Error][OSoft.Services.Application.OptimizeManage.OptimizeManageCtrl]
    When we tried doing a Full optimize without compress DB or Index defragmentation from the Admin Console, it completes successfully.
    But when we try doing a Full Optimize with Compress database checked, it runs for about 2 hours and throws the following error :
    An error has occurred during processing
    Error Message : Thread was being aborted
    After the above process it leaves all the records in the fact table with source column 1.
    Can anyone please share your ideas on this issue if you have faced this before and a way to fix this.
    We do not have bad or invalid records in the fact table.

    Hi,
    Please recheck if you have any calculated members or invalid dimension members.
    Calculated members will create such problems.
    Please check you have enough free disk space on your server which has Database and Analysis Services.
    Please make sure you have enabled 3GB support in Everest Update component, if you have more than 4GB RAM in your Application server.
    Please check if you have setup the Analysis Server settings with a minimum recommended value for the
    Threadpool \ Query \ MaxThreads parameter.
    The recommended value is higher of 10 or (number of Analysis Services Databases + twice the number of processor cores).
    If you have 4 dual core processors in your Analysis Services server (8 cores) and 5 Analysis Services DB, then you must set the value as 5+(2*8)=21.
    The source column will be updated as zero when the full optimization is complete. It remains as 1 since your full optimization is not completed.
    Since it says thread is being aborted, I believe the Analysis Services server settings change might resolve your issue.
    Karthik AJ

  • SPUtility.TransferToErrorPage throwing System.Threading.ThreadAbortException

    I am trying to call SPUtility.TransferToErrorPage from with in a ASPX code behind method in a sharepoint farm solution. it throws me the below error:
    System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Thread.AbortInternal()
       at System.Threading.Thread.Abort(Object stateInfo)
       at System.Web.HttpResponse.End()
       at System.Web.HttpServerUtility.Transfer(String path)
       at Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message, String linkText, String linkUrl)
    Can anyone help me in resolving this issue ?
    Thanks
    Vamsee
    Vamsee Inala

    You need to catch ThreadAbortException which might occur when some code is already running.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • PL/SQL throwing errors! trying to alter dates

    the following code keeps throwing errors, I was wondering if it is due to me getting confused when to use ":" before a variable and also ":=" when setting values?
    Can anyone see what I am doing wrong?
    Here is the code, at the moment it is throwing an error on line 44
    ORA-06550: line 44, column 1:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    CODE.....
    DECLARE
         QNStart DATE;
         QNFinish DATE;
         Q1Start DATE;
         Q1Finish DATE;
         Q2Start DATE;
         Q2Finish DATE;
         Q3Start DATE;
         Q3Finish DATE;
         Q4Start DATE;
         Q4Finish DATE;
         Q5Start DATE;
         Q5Finish DATE;
         QNT NUMBER;
         Q1T NUMBER;
         Q2T NUMBER;
         Q3T NUMBER;
         Q4T NUMBER;
         QNR NUMBER;
         Q1R NUMBER;
         Q2R NUMBER;
         Q3R NUMBER;
         Q4R NUMBER;
    BEGIN
         case current_date
              when current_date between to_date('01-JAN', 'DD-Mon') AND to_date('31-MAR', 'DD-Mon') then
                        QNStart := to_date('01-JAN', 'DD-Mon');
                        QNFinish := to_date('31-MAR', 'DD-Mon');
              when current_date between to_date('01-APR', 'DD-Mon') AND to_date('30-JUN', 'DD-Mon') then
                        QNStart := to_date('01-APR', 'DD-Mon');
                        QNFinish := to_date('30-JUN', 'DD-Mon');
              when current_date between to_date('01-JUL', 'DD-Mon') AND to_date('30-SEP', 'DD-Mon') then
                        QNStart := to_date('01-JUL', 'DD-Mon');
                        QNFinish := to_date('30-SEP', 'DD-Mon');
              when current_date between to_date('01-OCT', 'DD-Mon') AND to_date('31-DEC', 'DD-Mon') then
                        QNStart := to_date('01-OCT', 'DD-Mon');
                        QNFinish := to_date('31-DEC', 'DD-Mon');
         End Case
    :Q1Start := ADD_MONTHS(:QNStart,-3);
    :Q1Finish := ADD_MONTHS(:QNFinish,-3);
    :Q2Start := ADD_MONTHS(:QNStart,-6);
    :Q2Finish := ADD_MONTHS(:QNFinish,-6);
    :Q3Start := ADD_MONTHS(:QNStart,-3);
    :Q3Finish := ADD_MONTHS(:QNFinish,-3);
    :Q4Start := ADD_MONTHS(:QNStart,-4);
    :Q4Finish := ADD_MONTHS(:QNFinish,-4);
    :Q5Start := ADD_MONTHS(:QNStart,-5);
    :Q5Finish := ADD_MONTHS(:QNFinish,-5);
    select COUNT(COUNT(*)) INTO :Q1T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q1Start AND :Q1Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q2T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q2Start AND :Q2Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q3T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q3Start AND :Q3Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q4T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q4Start AND :Q4Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :QNT from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :QNStart AND :QNFinish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q1R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q2R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q3R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q4R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q5Start AND Q5Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :QNR from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN QNStart AND QNFinish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    EXECUTE
    Cheers
    Simon

    Dave had given you already some good advice.
    Your code is not only too complicated, but you have also probably a bug in it. You have for instance a QNstart as to_date('01.01, 'dd.mm') and a corresponding QNfinish as to_date('31.03', 'dd.mm'). As this means, it is the time portion at 00:01, you are missing the complete last day of this interval. So you better do:
    declare
      l_QNstart      date;
      l_Q1start      date;
      l_Q1finish     date;
      l_q1t          number
    begin
      l_QNstart := trunc(sysdate, 'Q');
      l_Q1start := add_months(l_QNstart, -3);
      l_Q1finish := l_QNstart;
      -- your condition is now
      select count(count(*))
      into   l_q1t
      from   ff_actions f, ff_action_type_lov a
      where  f.date_entered >= l_Q1start and f.date_entered < l_Q1finish
      and    a.action_score = 'y'
      and    f.input_type = a.action_name
      group by f.company_name;
    end;
    /Message was edited by:
    Leo Mannhart
    btw: what is the difference between Q1Start / Q3 Start and Q1Finish / Q3Finish resp.?

  • Error 4 occurred while information structure S001 was being updated.

    Hi experts,
    I set up the environment for the 2LIS_01_S001 DataSource (InfoCube 0SD_C01) accordingly these steps (as mentioned in another thread):
    1) Activating LIS update - goto OMO1 transaction code
    In the Updating – Info Structures(S001) - double-click the Updating radio button for Info structure S001.
    In the Parameters dialog box select Synchronous updating and choose ok.
    2) Goto OLI7 Transaction code - run the statistical update.
    3) Goto OLIX transaction code - setup version &( will be copied to actual version 000 for reporting
    4)Go back to OMO1 do deactive the LIS Update, check radio button to "No Update"
    5)Now goto LBW0 and choose option "Deactivate" Delta updating in LIS.
    6) In BW, Replicate DataSource, and run info Package with Initilization.
    7) Now again in R/3 we need to "Activate" Delta option from transaction code LBW0.
    8) and last step is to goto OMO1 to activate LIS Update to Synchronous updating and save.
    But in step 2 , I am getting an error i.e 
    Error 4 updating info structure S001
    Message no. M2022
    Error 4 occurred while information structure S001 was being updated.
    The update was attempted with the following key:
    &V3 0100000000000000290658
    I am not understanding this error,so cant proceed further.
    waiting for ur replies.
    Thanks in advance.

    Hi Colum
    I have two systems in both i am doing the same process.
    But in my one system i am getting  error
    but in my other system i am not getting  error and my set up table is filled with records.
    According to that note key figures sequence in S001, S001BIW1 & S001BIW2 should be same.
    but i my other system, key figure sequence is different and i am fine working with it.
    so why it is not able to fill my set up table for my other system ?
    thanks in advance.

  • Error RCIRAS0546, failure occured while the report was being processed

    Hello all,
    We use Crystal Reports 2008 V1 server on Linux. With 2 reports now we get the error when viewing the report from the Central Management Console (CMC)
    "Your request could not be completed because a failure occurred while the report was being processed. Please contact your system administrator. [RCIRAS0546]"
    In de /var/log/messages, I get messages like these:
    Sep 28 17:37:30 vsrv01 boe_crprocd[25630]: A failure occurred while the server was processing report file 2:11154 (RCIRAS0568)
    Sep 28 17:37:40 vsrv01 boe_crprocd[25630]: A failure occurred while the server was processing report '10. LEN Rapportage per scenario (kapitaallasten, investeringen, algemene gegevens) (V1)' (id=11154) for user 12 (RCIRAS0567)
    I tried several parameters on the CrystalReportsProcessingServer, like increasing/decreasing the Maximum Current Jobs and Number of Prestarted Children. None of these make a difference. Als the error occurred when viewing the report as Administrator.
    The reports has a dynamic parameter, wtih content coming from the database (drop-down list). When selecting one value the report is viewing fine. With a selection of more values the error occurred. In Crystal Reports 2008 there is no problem.
    I restarted the CRProcessingServer with -trace. In the trace I see the following lines:
    It seems that several subprocesses start for retrieving data based on the parameter values.
    After the crash of the first child, the above mentioned error occurs.
    2010/09/28 15:37:23.075|==| | |25630|1474829200| |||||||||||||||(ProcWorkerManager.cpp:82) PageChildDesc constructor (id=3)
    2010/09/28 15:37:23.075|==| | |25630|1474829200| |||||||||||||||(ProcWorkerManager.cpp:5489) doCreateChild() created a new child 3
    2010/09/28 15:37:30.011|==| | |25630|1474562960| |||||||||||||||(ProcWorkerManager.cpp:6814) cleanupChildren() starting
    2010/09/28 15:37:30.011|==| | |25630|1474562960| |||||||||||||||[ProcWorkerManager.cpp : 6854]  RAS-CORE-METRICS  (before cleanup) number of child processes = 3
    2010/09/28 15:37:30.011|==| | |25630|1474562960| |||||||||||||||(ProcWorkerManager.cpp:6979) child id=1 crashed
    2010/09/28 15:37:30.011|==| | |25630|1474562960| |||||||||||||||(ProcWorkerManager.cpp:6994) cleanupChildren() removing child id=1
    2010/09/28 15:37:30.012|==| | |25630|1474562960| |||||||||||||||(ProcWorkerManager.cpp:101) PageChildDesc destructor (id=1)
    2010/09/28 15:37:30.012|==| | |25630|1474562960| |||||||||||||||(ProcWorkerManager.cpp:7028) cleanupChildren() marking as stopped: worker id=1 in child id=1
    2010/09/28 15:37:30.012|==| | |25630|1474562960| |||||||||||||||(ProcWorker.cpp:2703) stopping worker id=1
    2010/09/28 15:37:30.012|==| | |25630|1474562960| |||||||||||||||(ProcWorkerManager.cpp:7168) cleanupChildren() ending
    Does someone know this problem and what to do about this?
    With kind regards,
    Pim van Stam
    SvSnet

    We got this error message on a report that had 5 subreports, 3 of which were based on stored procedures. The report was running fine in our Dev environment and in the CR developer, but not when we published it to another environment. The problem was caused because the stored procedures had been changed in Dev (so that they ran correctly) but these changes had not been released to the other environment. Once the scripts were run to update the stored procedures the report ran successfully. So it apepars that the problem was because the stored procedure/s the subreports were using were failing, but we only got the RCIRAS0546 error message.

Maybe you are looking for

  • I can no longer see a movie on itunes while having my safari or mailbox open.

    For about two months now I can no longer watch a movie on itunes and have my safari window open. Itunes window also dissappears when i have my mailbox open. I can hear the movie playing buy can't see the window. If I click on itunes my safari and mai

  • Transfer Vendor Open items to a new company

    Hi, My client is creating a new company code (Company B) from April and they want the vendor open items as on 31st March in the existing company (Company A)  to be transferred to the new company B on 1st April i.e on 1st April the balance in company

  • My Mac will not open

    Went to re open my Mac and the Apple and the spinning wheel came up and just kept going-and going and going!!! I have tried the "help" advice ie "shift option and start". Nothing. I can get into Safari's help section. Which will bring up some pages b

  • IDOC to be triggered based on Lookup value

    Hi all,    There is a requirement where in we wil have to trigger IDOCon the receiver  based on certain value which will be coming from RFC lookup during mapping runtime. So the entire scenario goes like this If look up result is 1 trigger IDOCX to r

  • 4th Gen iPod Touch will not restore or do anything!

    I have a iPod Touch 4th Generation 64gb.  One day, it restarted itself without input on my part.  Now, it's showing the "Connect to iTunes" screen.  When I connect it, iTunes says its found an iPod in Recovery Mode.  When I click Restore, it download