'sp_replicationdboption' cannot be executed within a transaction

I created a merge replication for a publisher (e.g. Pubisher1). Then I want to add a new aticle. Therefore, beside many other line of code (see "More Detail on above") within a db trigger I have line:
exec sp_replicationdboption @dbname = 'Publisher1',    @optname = 'merge publish', @value = 'true';
But I keep getting this error:
"The procedure 'sp_replicationdboption' cannot be executed within a transaction.
Msg 14013, Level 16, State 1, Procedure sp_MSrepl_refreshsubscriptions, Line 60
This database is not enabled for publication."
I am not sure what is going on?
More Detail on above:
What I am trying to do is to add an article (e.g. MyTable) to my publication (e.g. Pub1). I tried many different combination of options. My latest version of code is as follow:
exec sp_changemergepublication 'Pub1',@property='allow_anonymous',@value='true';
exec sp_changemergepublication 'Pub1', @property='allow_subscriber_initiated_snapshot', @value='true';
exec sp_changemergepublication 'Pub1', @property='allow_push', @value='true', @force_invalidate_snapshot = 1, @force_reinit_subscription = 1;
---source of errors is these two lines (as stated above):           
exec sp_replicationdboption @dbname = 'Publisher1',    @optname = 'merge publish', @value = 'false';
exec sp_replicationdboption @dbname = 'Publisher1',    @optname = 'merge publish', @value = 'true';
EXEC sp_addmergearticle @publication = 'Pub1', @article = MyTable, @source_object = MyTable, @force_invalidate_snapshot = 1;
EXEC sp_mergearticlecolumn @publication = 'Pub1', @article = MyTable, @force_invalidate_snapshot = 1, @force_reinit_subscription = 1;
exec sp_link_publication @publisher = '7-PC' ,@publisher_db = 'Publisher1' , @publication =  'Pub1', @security_mode =  2, @login =  'sa' ,  @password = '*';
exec sp_refreshsubscriptions 'Pub1';
exec sp_startpublication_snapshot 'Pub1'
Can anyone help me on that? If you need even more details please let me know.
Thanks in advance

My question is why are you disabling merge publication on this database and then re-enabling it. From:
From http://msdn.microsoft.com/en-us/library/ms188769.aspx
This procedure creates or drops specific replication system tables, security accounts, and so on, depending on the options given. Sets the corresponding category bit in the
master.sysdatabases system table and creates the necessary system tables.
This is not how you go about adding an article to a merge publication, remove these two steps.
If you are interested in being able to roll back the addition of an article to a publication you should check for an error and if you get one remove the article - however even that does not make a lot of sense because sp_addmergearticle - either succeeds
or it fails - so it is "transactional" in itself.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

Similar Messages

  • Oracle.xml.sql.OracleXMLSQLException:Cannot enable auto commit within JTS transaction

    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

    Clearly , there does seem to be something a bit odd with the above stack.
    <Bug:1917808> mentions OracleXMLSave in context of plsql equivalent : dbms_xmlsave . i.e dbms_xmlsave is a wrapper around OracleXMLSave class.
    disabling autocommit on connection as follows should help:
    conn = DriverManager.getConnection("connect string","scott","tiger");
    conn.setAutoCommit(false);
    to disble auto commit and see if this has an effect.
    This issue might be <Bug:1497506>. If disabling autocommit does not work then it appears that it could be this issue .
    Malcolm
    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

  • ORA-02074: cannot ROLLBACK in a distributed transaction

    I have a stored procedure that successfully creates a portal user when I run it with SQLPLUS.
    However when I call the same procedure through ODP.Net, I get the following error.
    "ORA-20001: ORA-02074: cannot ROLLBACK in a distributed transaction\nORA-06512: at \"PORTAL30.WWSEC_API\", line 1915\nORA-02074: cannot SET SAVEPOINT in a distributed transaction\nORA-06512: at \"PORTAL30.PRO_CREATE_WEB_USER\", line 28\nORA-06512: at line 1"
    The portal version is 3.0.9.8.2 The stored proc is in the portal30 schema and I am connecting as portal30 user.
    Any help is greatly appreciated...
    Thanks.
    The following is the code for the stored procedure:-
    CREATE OR REPLACE PROCEDURE PORTAL30.PRO_CREATE_WEB_USER (
    puser IN varchar2,
    puser_last_name IN varchar2,
    puser_first_name IN varchar2,
    puser_group IN varchar2,
    password IN varchar2
    ) AS
    l_group_id number;
    l_id number;
    e_code number;
    begin
    l_id := wwsec_api.add_portal_user(p_User_Name => puser,p_Last_Name => puser_last_name,p_First_Name => puser_first_name,p_Portal_User => 'Y');
    wwsec_api.activate_portal_user(puser);
    portal30_sso.WWSSO_API_USER_ADMIN.CREATE_USER(P_USERNAME=> puser,P_PASSWORD=>password,p_error_code=> e_code);
    wwsec_api.add_user_to_list(p_person_id => l_id,p_to_group_id => wwsec_api.group_id (p_name => puser_group),p_is_owner => wwsec_api.NOT_OWNER);
    wwsec_api.set_defaultgroup(p_groupid => wwsec_api.group_id (p_name => puser_group),p_username => puser);
    commit;
    exception
    when others then
    raise_application_error(-20001,substr(sqlerrm,1,200));
    end;
    The foll is the code I am using to call the stored proc.
    private void createUser()
    string retval ;
    OracleConnection oraconn = new OracleConnection(Data Source=testdb;User ID=portal30;Password=portal30" );
    OracleCommand cmd = new OracleCommand("PRO_CREATE_WEB_USER", oraconn);
    cmd.CommandType = CommandType.StoredProcedure;
    OracleParameter a_uid = new OracleParameter("puser" ,OracleDbType.Varchar2,20);
    a_uid.Direction = ParameterDirection.Input ;
    a_uid.Value = (txtUserId.Text).Trim() ;
    cmd.Parameters.Add(a_uid);
    OracleParameter a_last_name = new OracleParameter("puser_last_name" ,OracleDbType.Varchar2,20);
    a_last_name.Direction = ParameterDirection.Input ;
    if (( txtLName.Text).Trim() != "" )
    a_last_name.Value = (txtLName.Text).Trim() ;
    else
    a_last_name.Value = " ";
    cmd.Parameters.Add(a_last_name);
    OracleParameter a_first_name = new OracleParameter("puser_first_name" ,OracleDbType.Varchar2,20);
    a_first_name.Direction = ParameterDirection.Input ;
    if ((txtFName.Text).Trim() != "")
    a_first_name.Value = (txtFName.Text).Trim() ;
    else
    a_first_name.Value = " ";
    cmd.Parameters.Add(a_first_name);
    OracleParameter a_type = new OracleParameter("puser_group" ,OracleDbType.Varchar2,20);
    a_type.Direction = ParameterDirection.Input ;
    a_type.Value = (lstUserType.SelectedValue).Trim() ;
    cmd.Parameters.Add(a_type);
    OracleParameter a_passwd = new OracleParameter("password" ,OracleDbType.Varchar2,20);
    a_passwd.Direction = ParameterDirection.Input ;
    a_passwd.Value = (txtPassword.Text).Trim() ;
    cmd.Parameters.Add(a_passwd);
    try
    oraconn.Open();
    cmd.ExecuteNonQuery();
    lblMsg.ForeColor = System.Drawing.Color.FromName("blue");
    lblMsg.Text = "User Created.";
    catch(OracleException e)
    { retval = e.Message ;
    lblMsg.ForeColor = System.Drawing.Color.FromName("red");
    lblMsg.Text = "Error Creating user" ;
    finally
    oraconn.Close();

    Also note that remote procedure/function calls (e.g. from ODP.NET), do not support distributed transactions (i.e. a SAVEPOINT/ROLLBACK block within the PL/SQL procedure/function) before database version Oracle 9i.
    So if you are using say Oracle 817 you must use the "OracleTransaction" object in ODP.NET instead.
    See:
    http://www.dotnet247.com/247reference/msgs/39/197274.aspx

  • Query cannot be parsed within the Builder ORA-00900: invalid SQL statement

    Why am I getting the error message "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00900: invalid SQL statement"
    If I run the query in sqlplus it comes back with "no rows selected" which is what I want.
    The function is valid and the user has privileges to run it.
    Is there something I can do about it?
    If I only have any field instead of the function the error goes away.
    Can someone explain what is happening? I'm using 2.0.
    select
    F_TOTAL_AMOUNT_PAID('fees',a.acct_fee_id,0) "Fee Paid"
    from fee_component a, fee b, license c
    where a.acctfee_id = b.acctfee_id
    and b.license_id = c.license_id
    and b.fee_status = 'U'
    and c.client_id = :P301_CLIENT_ID
    Thanks I really appreciate any help I can get.

    Does your parsing schema have direct granted privileges to execute the function or privileges via a role? If it is through a role, you need to directly grant execute on the function to your parsing schema.
    Mike

  • Error:  Due to a lock, query cannot be executed at the moment

    Hi,
    I am getting the following error when executing my query:
    Error:  Due to a lock, query cannot be executed at the moment
    Abort System error in program SAPLRSDRC and form /BIC/ZABC_01
    The query has been running fine for the past few months.
    Can anyone explain why this error occured and what can I do to avoid this?
    Thanks in Advance!!
    Regards,
    Swapna

    Hi Swapna,
    make sure that the BW system (e.g. another user, process, ...) does not have currently access to the data e.g. like maintain data. In this case the BW sets a lock so that the current user gets exclusively access to the table.
    Check the table if there are any locks on it. Call transaction SU53 and check your table for any locks.
    Check this thread, perhaps you will find some more information there:
    https://forums.sdn.sap.com/click.jspa?searchID=3180428&messageID=1088573
    Hope this helps.
    Regards,
    Marco

  • Control multiple updates and queries within one transaction in JPA

    Hi,
    I have a question regarding control multiple updates and queries within one transaction. We are using EclipseLink 2.3.1. With below code, will I be able to:
    - have all insert, update, select queries committed in one transaction;
    - queryGetBalance will return the latest OrgBalance after update;
    - if one fails, everything rolls back.
    Thanks!
    Jeffrey
    PS: I realized that I cannot use em.getTransaction().begin() and em.getTransaction().commit(), since I am using JTA.
    =============
    @PersistenceContext(unitName="Test")
    EntityManager em;
    em.setFlushMode(FlushModeType.COMMIT);
    newTransaction.setAmount(1000);
    newTransaction.setType("check");
    em.persist(newTransaction);
    orgAudit.setUpdateUser("Joe")
    orgAudit.setupUpdateTime(time);
    em.merge(orgAudit);
    Query queryUpdateBalance = em.createQuery("update OrgBalance o set o.balance = o.balance + :amount where orgId = :myOrgId");
    queryUpdateBalance.setParameter("amount", 1000);
    queryUpdateBalance.setParameter("myOrgId", 1234);
    Query queryGetBalance = em.createQuery("select OrgBalance o where o.orgId = :myOrgId");
    queryGetBalance.setHint("javax.persistence.cache.storeMode", CacheStoreMode.REFRESH);
    queryGetBalance.setHint("javax.persistence.cache.retrieveMode", CacheRetrieveMode.BYPASS);
    queryGetBalance.getResultList();
    em.flush();
    Edited by: JeffreyW on Dec 12, 2011 10:34 AM

    Yes, the operation will be in a single transaction, assuming you are using a JTA managed SessionBean and the code is part of a SessionBean method.

  • ORA-00164: autonomous transaction disallowed within distributed transaction

    I have been trying to solve this problem for weeks now, I have posted this question everywhere I can think of, but I havent really received and answer that has helped, so now I am going to post it here hoping for an answer.
    We are running 9iAS on Solaris and when the following stuff is run we are getting ORA-00164 errors. If you refresh the page a bunch of time the problem goes away. But it comes back the next time you try to execute the procedure again. Here are the cases when the problem shows up.
    Editing the style:
    PROCEDURE : PORTAL30.wwpob_app_style.edit_style
    Saving changes to the banner for a page
    PROCEDURE : PORTAL30.wwptl_banner.savecustom
    Logging out
    PROCEDURE : PORTAL30.wwsec_app_priv.logout
    After setting the default user group and applying the changes:
    PROCEDURE : PORTAL30.wwsec_app_user_mgr.edit_user
    Creating a new group:
    PROCEDURE : PORTAL30.wwsec_app_group_mgr.create_group
    Opening the add portlet screen:
    PROCEDURE : PORTAL30.wwv_main.main
    There are a few other places but I don't have them documented. In ALL cases the problem goes away once we start and stop the Apache using the following comands:
    /app/oracle/n_portal/Apache/Apache/bin/apachectl stop
    ps -ef | grep httpd | grep n_portal
    /app/oracle/n_portal/Apache/Apache/bin/apachectl start
    After starting and stopping Apache the problem is gone for a little while (20-30 mins) then it starts coming back slowly (sometimes the problem is there then it is not). Once the problem is back if you continually press refresh on the browser (5-10 times) the page might appear, if the page does not appear you will see the
    ORA-00164: autonomous transaction disallowed within distributed transaction
    The following error appears in apache log (50% of the time) when Autonomous Transaction error shows up on the screen:-
    DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = 5225534324468880950975536484
    215 PortalSession id = 521335001720MERAJ
    DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = -638034231325135430097553725
    8001 PortalSession id = 992335001711JDALGLIESH
    These errors might be related to dynamic services but we were had the problem long before Dynamic services was installed.
    We want to start pre-production user testing as we have just had 11 developers building portlets for the company, but we cant do much with this error popping up every time a user wants to test it. We have one of the Oracle consultants here and he has asked the oracle developer group what the problem could be, and they seem to think it might be related to our use of DB links however, we never get the problem when we try to run a portlet that uses a database link.
    Please help.
    Jeff Dalgliesh
    null

    Jay,
    My name is Craig McCauley. I'm an Oracle Technical Manager working onsite at Unocal Indonesia. I'm with the Portal group in ATS.
    When I got here the first thing we did was bump up init.ora parameters and apache confif parameters as suggested by the iPlatform group. We have thes sessions parameter (in init.ora) bumped up from 100 to 700. I'm watching v$session and the get these AT messages with as few as 70 total db sessions. Any help your group can give will be greatly appreciated.
    Unocal is planning on implementing Oracle Portal globally - as a common interface. They have similar installs in Thailand and Houston and thus far have not seen the AT messages (although there has not been much development going on at those sites).
    Thanks,
    Craig

  • Linked Server :: OLE DB provider "OraOLEDB.Oracle" for linked server "ABC" returned message "New transaction cannot enlist in the specified transaction coordinator. ".

    Hello All,
    As mentioned in title, i am stuck up with that articular error from last three days,
    i have following scenario, my SQL server 2008, my oracle 10g are on both same machine with OS Windows Server 2008.
    the following error generated on my management studio when i execute my procedure written in my SQL server. Following is original source code snippet after error massage.
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORCL" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 50000, Level 16, State 2, Procedure PROC_MIGRATE_MST_FRM_ORA_SQLSERVER, Line 43
    The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "ORCL" was unable to begin a distributed transaction.
    BEGIN TRY
    -- MIGRATION OF PR_COMPANY_MH START
    BEGIN TRANSACTION T1
    PRINT 'mILAN NNNNNNNNN 11'
    INSERT INTO PROD.PR_COMPANY_MH
    SELECT * FROM OPENQUERY(ORCL, 'SELECT * FROM PR_COMPANY_MH WHERE SQL_FLG = ''N'' ')
    PRINT 'mILAN NNNNNNNNN 12'
    UPDATE OPENQUERY(ORCL, 'SELECT SQL_FLG FROM PR_COMPANY_MH WHERE SQL_FLG = ''N''')
    SET SQL_FLG = 'Y'
    --EXECUTE ('UPDATE PROD.PR_COMPANY_MH SET SQL_FLG = ''Y'' ') AT [ORCL]
    PRINT 'mILAN NNNNNNNNN 13'
    COMMIT TRANSACTION T1
    -- MIGRATION OF PR_COMPANY_MH END
    END TRY
    BEGIN CATCH
    PRINT 'mILAN NNNNNNNNN 14'
    ROLLBACK TRANSACTION T1
    PRINT 'mILAN NNNNNNNNN 15'
    SELECT
    @ErrorNumber = ERROR_NUMBER(),
    @ErrorSeverity = ERROR_SEVERITY(),
    @ErrorState = ERROR_STATE(),
    @ErrorLine = ERROR_LINE(),
    @ErrorProcedure = ISNULL(ERROR_PROCEDURE(), '-');
    PRINT 'mILAN NNNNNNNNN 16'
    SELECT @ErrorMessage = ERROR_MESSAGE();
    RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState, @ErrorNumber, @ErrorProcedure)
    PRINT 'mILAN NNNNNNNNN 17'
    END CATCH
    this perticular part is raising that error, and i had tried every configuartion on my local machine related to MS DTC.
    When i remove my transaction code, its work just fine no exception raise, but when i use then i.e. BEGIN TRAN, COMMITE TRAN, AND ROLLBACK TRAN. its giving me error, other wise its fine.
    Please Help or disscus or suggest why my transaction base code is not woking????
    thanks in advance.
    Regards,
    Milan

    Sorry again, I am new on any kind of forum, so i am learning now, following is the error massage generated by SQL Server. and its not
    an architecture problem, i had just included my complete architecture to be more informative while asking for the solution or suggestion. My real problem is T-SQL, i think and its related to Distributed queries raise in SQL Server in Oracle Link Server.
    OLE DB provider "OraOLEDB.Oracle"
    for linked server "ORCL" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 50000, Level 16, State 2, Procedure PROC_MIGRATE_MST_FRM_ORA_SQLSERVER,
    Line 43
    The operation could not be performed because OLE
    DB provider "OraOLEDB.Oracle" for linked server "ORCL" was unable to begin a distributed transaction.

  • Financial Reports 9.3.1 - Query is too large and cannot be executed

    Hi,
    I'm trying to pull a Financial report from one of my ASO cube, version 9.3.1 and received the following error.
    "Query is too large and cannot be executed. The product of member counts across all dimensions in the query exceeds 2^64..."
    The report is pulling from a combination of 6 different cross dimensions and drill down to the bottom level 0. I have read a couple of blogs with trying to change the buffer and sort buffer size from 10 KB to like 1000 KB within the database settings as well as the Pending cache size limit setting from like 32 MB to 64 MB on the Application setting. I've tried all combinations but nothing seems to work.
    However, I was able to retrieve the same combinations through Essbase Excel Add-in by addding the MAXFORMULACACHESIZE in the Essbase config setting. But this didn't work for the Financial Reports. I know that in version 11.1.2 has that MDX Query enable through reports which may help with the query. Unfortunately, that MDX Query enable is not available within version 9.3.1.
    Please help.
    Thanks

    John,
    The Database has data that is rolled up to all levels.
    I can open the report to Edit in the Financial Reporting Studio. This allows me to click on members in the grid, however, when I search for members I am unable to do so. I can drill down to the member and select it, but when I run the report in FR studio, I get the same error message 'Error: Invalid Report Object'.
    Thanks and Regards
    Kunal Tripathi

  • Error applying Adobe Reader 11.0.07 patch - "Error 2762. Cannot write script record. Transaction not started"

    I have a problem applying the "adobe reader 11.0.07" patch. I have downloaded "AdbeRdrUpd11007_MUI.msp" from Adobe site and tried applying the patch using the command.
    The following error is prompted
    "Error 2762. Cannot write script record. Transaction not started" at the end of installation, But the version is updated to "11.0.07" in ARP.
    This error is mainly related to custom action sequence in "Execute sequence".
    I have created logfile and checked. it points to the custom action - "CreateAcroPDFRegForIE11".
    Could someone help me resolve this issue?
    Thanks in Advance..

    Hello Kashif,
    Find the answers below:
    1) How did you install reader MUI for example by running setup.exe or through an AIP or may be via SCCM or GPO? Any customizations during first install?
         package is for SCCM  and the Installation is carried through msi . AIP
    2) Which version of Reader MUI do you have installed curently?
         Adobe Reader 11.0.05
    3) Which command did you use to run the patch?
         msiexec /p AdbeRdrUpd11007_MUI.msp
    4) Did you run the patch from an elevated command prompt?
         Yes
    5) Which OS version are you at?
         Windows 7 64 bit
    Am unable to share the log file, am just copying the lines where the installation stops and prompts error:
    MSI (s) (24:20) [11:26:44:071]: Doing action: CreateAcroPDFRegForIE11
    Action start 11:26:44: CreateAcroPDFRegForIE11.
    MSI (s) (24:20) [11:26:44:071]: Transforming table CustomAction.
    MSI (s) (24:20) [11:26:44:071]: Transforming table CustomAction.
    MSI (s) (24:20) [11:26:44:071]: Note: 1: 2262 2: CustomAction 3: -2147287038
    MSI (s) (24:20) [11:26:44:071]: Transforming table CustomAction.
    MSI (s) (24:20) [11:26:44:071]: Transforming table Binary.
    MSI (s) (24:20) [11:26:44:071]: Transforming table Binary.
    MSI (s) (24:20) [11:26:44:071]: Note: 1: 2262 2: Binary 3: -2147287038
    MSI (s) (24:20) [11:26:44:071]: Transforming table Binary.
    MSI (s) (24:20) [11:26:44:071]: Note: 1: 2762
    MSI (c) (80:E8) [11:26:44:243]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
    Error 2762.Cannot write script record. Transaction not started.
    MSI (s) (24:20) [11:33:58:305]: Product: Adobe Reader XI (11.0.07)  MUI -- Error 2762.Cannot write script record. Transaction not started.
    Action ended 11:33:58: CreateAcroPDFRegForIE11. Return value 3.
    Thanks In Advance..

  • /SAPMP/COCA cannot be executed

    Hi,
    I have an ECC 6.0 System with DIMP activated.
    However, for LPP (Long Products Planning) when I try to execute /SAPMP/COCA, it says tcode cannot be executed.
    Nor does the relevant "Basic setting for Mill .." node appear in SPRO.
    Pls. help.
    Thanks,

    Hello,
    I don't think this is the correct place to ask this question, since here is the forum of SCM(APO) system, while the transaction code you're asking for seems belong to for IS-MP-CA ... Sorry I don't know which forum it belong to
    A little hint: If you want to run a transaction code starts from '/', you'll need to add '/n' before it. So just try to input /n/sapmp/coca and run. Good luck~
    Best Regards,
    Ada

  • JITO1 show "cannot be executed"

    Hi experts,
      We need to use JIT calls and I run JITO1. The error message
    return "transaction code JITO1 cannot be executed". I have checked SFW5
    and enable enterprise_functions & enterprise_bussiness_functions. I
    found it's very strange. Sometimes I can run without any errors but
    somestimes(just 1 minutes later) I can't. Please help.

    SAP reply.

  • Search cannot be executed because the table has pending changes

    I'm getting the following error ..... The search cannot be executed because the table has pending changes that would be lost .... in the following scenario ....
    My 1st page is a search page with resulting rows from which the user can select specific rows to process ..... next button will populate the VO for the 2nd page by manually looping thru the selected rows in the VO of the 1st page. Loop logic is in the AM and it calls a method in the VORowImpl that uses setAttributeInternal .... the 2nd page displays the selected rows .....
    Pressing the back button of the 2nd page will display the 1st page and if the user tries to do a new search .... the error shows up.
    Any suggestions on how to handle this?
    Thank you.

    It seems to me that you are using the same VO on both the pages. If that is the case try to use separate VO for each page.
    And as suggested by Sumit, Never use/ rely on browser back button. Instead put a Back button on the second page through you can handle the event yourself rather than leaving on the mercy of browser.
    --Saroj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error: "The search cannot be executed because the table has pending changes that would be lost."

    Hello,
    I'm working a developing an OA page that will displays the contents of an Oracle table and allows the user to update records in a table as needed.
    When I hit submit button to save the changes in the update page, the control goes back to main page (where all the table records are displayed). It displays the updated record with the new information.However when I hit "Go" button on the mainPG, I get the error "The search cannot be executed because the table has pending changes that would be lost. and the changes are not committed.
    ANy suggestions on where I should look will be greatly appreciated.
    Posting code for my controller
    =======================
              if ( pageContext.getParameter("saveRate") != null )
              personam.invokeMethod("saveRateToDatabase");
    Code from my AM
    =============
        public void saveRateToDatabase()
          getOADBTransaction().commit();
          System.out.println("40--After commit has been executed");
    Code from my VORowImpl
    ===================
    package cggv.oracle.apps.gl.server;
    import oracle.apps.fnd.framework.server.OAViewRowImpl;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.AttributeDefImpl;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class xxCggGlRatesVORowImpl extends OAViewRowImpl {
        public static final int RATEID = 0;
        public static final int FROMCURRENCY = 1;
        public static final int TOCURRENCY = 2;
        public static final int FROMCONVERSIONDATE = 3;
        public static final int TOCONVERSIONDATE = 4;
        public static final int USERCONVERSIONTYPE = 5;
        public static final int CONVERSIONRATE = 6;
        public static final int MODEFLAG = 7;
        /**This is the default constructor (do not remove)
        public xxCggGlRatesVORowImpl() {
        /**Gets the attribute value for the calculated attribute RateId
        public Number getRateId() {
            return (Number) getAttributeInternal(RATEID);
        /**Sets <code>value</code> as the attribute value for the calculated attribute RateId
        public void setRateId(Number value) {
            setAttributeInternal(RATEID, value);
            //populateAttribute(RATEID, value);
        /**Gets the attribute value for the calculated attribute FromCurrency
        public String getFromCurrency() {
            return (String) getAttributeInternal(FROMCURRENCY);
        /**Sets <code>value</code> as the attribute value for the calculated attribute FromCurrency
        public void setFromCurrency(String value) {
            setAttributeInternal(FROMCURRENCY, value);      
        /**Gets the attribute value for the calculated attribute ToCurrency
        public String getToCurrency() {
            return (String) getAttributeInternal(TOCURRENCY);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ToCurrency
        public void setToCurrency(String value) {
            setAttributeInternal(TOCURRENCY, value);
        /**Gets the attribute value for the calculated attribute FromConversionDate
        public Date getFromConversionDate() {
            return (Date) getAttributeInternal(FROMCONVERSIONDATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute FromConversionDate
        public void setFromConversionDate(Date value) {
            setAttributeInternal(FROMCONVERSIONDATE, value);      
        /**Gets the attribute value for the calculated attribute ToConversionDate
        public Date getToConversionDate() {
            return (Date) getAttributeInternal(TOCONVERSIONDATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ToConversionDate
        public void setToConversionDate(Date value) {
            setAttributeInternal(TOCONVERSIONDATE, value);       
        /**Gets the attribute value for the calculated attribute UserConversionType
        public String getUserConversionType() {
            return (String) getAttributeInternal(USERCONVERSIONTYPE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute UserConversionType
        public void setUserConversionType(String value) {
            setAttributeInternal(USERCONVERSIONTYPE, value);
        /**Gets the attribute value for the calculated attribute ConversionRate
        public Number getConversionRate() {
            return (Number) getAttributeInternal(CONVERSIONRATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ConversionRate
        public void setConversionRate(Number value) {
            setAttributeInternal(CONVERSIONRATE, value);
        /**Gets the attribute value for the calculated attribute ModeFlag
        public String getModeFlag() {
            return (String) getAttributeInternal(MODEFLAG);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ModeFlag
        public void setModeFlag(String value) {
            setAttributeInternal(MODEFLAG, value);      
        /**getAttrInvokeAccessor: generated method. Do not modify.
        protected Object getAttrInvokeAccessor(int index,
                                               AttributeDefImpl attrDef) throws Exception {
            switch (index) {
            case RATEID:
                return getRateId();
            case FROMCURRENCY:
                return getFromCurrency();
            case TOCURRENCY:
                return getToCurrency();
            case FROMCONVERSIONDATE:
                return getFromConversionDate();
            case TOCONVERSIONDATE:
                return getToConversionDate();
            case USERCONVERSIONTYPE:
                return getUserConversionType();
            case CONVERSIONRATE:
                return getConversionRate();
            case MODEFLAG:
                return getModeFlag();
            default:
                return super.getAttrInvokeAccessor(index, attrDef);
        /**setAttrInvokeAccessor: generated method. Do not modify.
        protected void setAttrInvokeAccessor(int index, Object value,
                                             AttributeDefImpl attrDef) throws Exception {
            switch (index) {
            case RATEID:
                setRateId((Number)value);
                return;
            case FROMCURRENCY:
                setFromCurrency((String)value);
                return;
            case TOCURRENCY:
                setToCurrency((String)value);
                return;
            case FROMCONVERSIONDATE:
                setFromConversionDate((Date)value);
                return;
            case TOCONVERSIONDATE:
                setToConversionDate((Date)value);
                return;
            case USERCONVERSIONTYPE:
                setUserConversionType((String)value);
                return;
            case CONVERSIONRATE:
                setConversionRate((Number)value);
                return;
            case MODEFLAG:
                setModeFlag((String)value);
                return;
            default:
                super.setAttrInvokeAccessor(index, value, attrDef);
                return;
        /**Gets xxCggGlRatesEO entity object.
        public xxCggGlRatesEOImpl getxxCggGlRatesEO() {
            return (xxCggGlRatesEOImpl)getEntity(0);

    Hi,
    Check these links:
    Oracle Apps: Search cannot be executed because the table has pending changes that would be lost
    Re: Getting error in search page search cannot be executed
    http://jneelmani.blogspot.in/2009/11/oaf-search-cannot-be-executed-because.html
    --Sushant

  • "Error:The search cannot be executed because the table has pending changes that would be lost", after DELETE

    Good day,
    On Search Page, I have searched for the record(s) then deleted a record and got confirmation message i.e. Record has deleted. Next when I search for any record I'm getting below error.
    Error
    The search cannot be executed because the table has pending changes that would be lost.
    Could you please help me to fix this issue. Your response is highly appreciated.
    Item properties:
    Item Style : Image
    Action Type: Fire Action
    Event : delete
    Below is the code using in CO and AM
    Controller (processFormRequest):
    if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
              // The user has clicked a "Delete" icon so we want to display a "Warning"
              // dialog asking if she really wants to delete the employee. Note that we
              // configure the dialog so that pressing the "Yes" button submits to
              // this page so we can handle the action in this processFormRequest( ) method.
              String visit_id = pageContext.getParameter("visit_id");
              String employeeName = pageContext.getParameter("last_name") + ", " + pageContext.getParameter("first_name");
              MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName)};
              OAException mainMessage = new OAException("FND", "XXXX_EMP_DELETE_WARN", tokens);
              // Note that even though we're going to make our Yes/No buttons submit a
              // form, we still need some non-null value in the constructor's Yes/No
              // URL parameters for the buttons to render, so we just pass empty
              // Strings for this.
              OADialogPage dialogPage = new OADialogPage(OAException.WARNING,
                mainMessage, null, "", "");
              // Always use Message Dictionary for any Strings you want to display.
              String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
              String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
              // We set this value so the code that handles this button press is
              // descriptive.
    dialogPage.setOkButtonItemName("DeleteYesButton");
              // The following configures the Yes/No buttons to be submit buttons,
              // and makes sure that we handle the form submit in the originating
              // page (the "Employee" summary) so we can handle the "Yes"
              // button selection in this controller.
    dialogPage.setOkButtonToPost(true);
    dialogPage.setNoButtonToPost(true);
    dialogPage.setPostToCallingPage(true);
              // Now set our Yes/No labels instead of the default OK/Cancel.
    dialogPage.setOkButtonLabel(yes);
    dialogPage.setNoButtonLabel(no);
              // We need to keep hold of the employeeNumber and employeeName.
              // The OADialogPage gives us a convenient means
              // of doing this. Note that the use of the Hashtable is 
              // most appropriate for passing multiple parameters. See the OADialogPage
              // javadoc for an alternative when dealing with a single parameter.
              java.util.Hashtable formParams = new java.util.Hashtable(1);
    formParams.put("visit_id", visit_id);
    formParams.put("empName", employeeName);
    dialogPage.setFormParameters(formParams);
              pageContext.redirectToDialogPage(dialogPage);
        else if (pageContext.getParameter("DeleteYesButton") != null)
              // User has confirmed that she wants to delete this employee.
              // Invoke a method on the AM to set the current row in the VO and
              // call remove() on this row.
              String employeeNumber = pageContext.getParameter("visit_id");
              String employeeName = pageContext.getParameter("empName");
              Serializable[] parameters = { employeeNumber };
             // OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("deleteEmployee", parameters);
              // Now, redisplay the page with a confirmation message at the top. Note
              // that the deleteEmployee() method in the AM commits, and our code
              // won't get this far if any exceptions are thrown.
              MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName) };
              OAException message = new OAException("FND",
                "XXXX_EMP_DELETE_CONFIRM", tokens, OAException.CONFIRMATION, null);
    pageContext.putDialogMessage(message);
    Application Module:
      public void deleteEmployee(String visit_id)
            // First, we need to find the selected employee in our VO.
            // When we find it, we call remove( ) on the row which in turn
            // calls remove on the associated EmployeeEOImpl object.
            int empToDelete = Integer.parseInt(visit_id);
              OAViewObject vo = (OAViewObject)getNonEmployeesSummaryVO1();
        NonEmployeesSummaryVORowImpl row = null;
            // This tells us the number of rows that have been fetched in the
            // row set, and will not pull additional rows in like some of the
            // other "get count" methods.
           int fetchedRowCount = vo.getFetchedRowCount();
            // We use a separate iterator -- even though we could step through the
            // rows without it -- because we don't want to affect row currency.
            RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
              deleteIter.setRangeStart(0);
              deleteIter.setRangeSize(fetchedRowCount);
              for (int i = 0; i < fetchedRowCount; i++)
                row = (NonEmployeesSummaryVORowImpl)deleteIter.getRowAtRangeIndex(i);
                // For performance reasons, we generate ViewRowImpls for all
                // View Objects. When we need to obtain an attribute value,
                // we use the named accessors instead of a generic String lookup.
                // Number primaryKey = (Number)row.getAttribute("EmployeeId");
                Number primaryKey = row.getVisitId();
                if (primaryKey.compareTo(empToDelete) == 0)
                  // This performs the actual delete.
                  row.remove();
                    getTransaction().commit();
                  break; // only one possible selected row in this case
            // Always close the iterator when you're done.
            deleteIter.closeRowSetIterator();
          } // end deleteEmployee
    Thanks,
    Ravi

    Hi
    Check this link Getting error in search page search cannot be executed
    Regards,
    Dilip

Maybe you are looking for

  • I need to add a gap between songs when burning a CD

    I just upgraded to iTunes 9.2.0.61, hoping that it would solve my problem. I need to add (yes, ADD) a gap between songs. I'm burning a CD to be used during a performance, and there's a reason that I need 10 seconds of silence after the first song. I

  • At new Statement

    dear all, My problem is that , in the following code at new matnr. write: itab-matnr, itab-maktx. end at. It is displaying matnr properly .. but for maktx its is showing '****' . Can anybody tell why this happens .. How to solve that ? I have given e

  • Cannot print PDF's with Kyocera

    I am using a Kyocera 5050 in my office installed as a network printer that utilizes local authorization codes for each employee in order to track printing usage. Normally, a print job will be sent to the printer and a box will pop up asking for crede

  • How to Configure Workflow with Standard TCODE

    Hello Gurus,             I am new in Workflow. I have to trigger the workflow on the transaction MM02 on changing Material Plant Status to 41. I have ZECN object. but I am not aware with how this object is trigger on change of Material Status. Please

  • IPhoto '08:  Emptying Trash Can Hangs Application - Must FORCE QUIT

    Hi there, I currently have about 1700 photos in my iPhoto trash can. When i try to 'empty trash', i am prompted with the confirm message, to which i reply "OK" ......... and that's IT! It hangs. I have no choice but to 'force quit', as it is 'not res