Cannot update sales order link on an activity

I have an addon that creates CRM activities after an order has been updated. This is working fine in the SBODemo_UK database but fails when I run it against a customer database. An extract of the code is: -
    oItem = oForm.Items.Item("8")
    act1.GetByKey(ActKey)
    SorderNo = oItem.Specific.value - 1
    act1.DocType = "17"
    If act1.DocEntry = "" Then act1.DocEntry = SorderNo
    act1.Details = Remarks
    act1.Update()
    GetDIConnection.GetLastError(nErr, errMsg)
    If (nErr <> 0) Then
           SBO_Application.MessageBox("Failed to update order activity " & errMsg)
    End If
This code is executed after the order has been updated and I have verified this by stopping the code at the start of the section above and used Enterprise manager to see that the order has hit the database.
The only difference that I can see between the two databases is their size with the customer database having 5000 orders in it. I wondered if there was some sort of delay in the SDK seeing the new order being added because of the size of the database but I deleted all but 200 orders and still have the problem.
Does anyone have any ideas?

Edward,
not only are the systems the same I am running the databases on the same machine which is my development laptop. I have just created a database from scratch and installed my addin and it works OK there. The addin auto creates the fields and tables required so it should be doing the same for all databases that I install it to.
Gordon

Similar Messages

  • Cannot update sales orders

    Hi experts
    I  have a problem when I am trying to update some sales orders, an error appears
    In "To Whse" fields, enter valid values  [Message 0-0]
    i can not find sap notes  that can help me to solve this issue.
    I recently did an upgrade from 2007A Pl 47 to 8.8 PL 12
    Do you know have can i solve this?
    Please help me
    Regards
    Yen

    Hi Gordon
    The orders are already created on the system
    I can create news, i can update anothers
    but for exemple, is  try to duplicate one of this orders an error appears
    "internal error (-10)
    I did  try   to deleting every format search
    in some of this documetns the colum Warehouse is empty, if i try to fill the  warehousecode  anyway the error appears
    NOTE:
    i dont have anything on transaction notification

  • CIC Activity and Sales Order Link Tables?

    Hello Experts,
    Can somebody let me know the CRM Customer Interaction Center(CIC) activity and its leading Sales Order Link tables or the data model?
    If somebody could point me to CRM CIC Data model it would be real helpful.
    If you have any document please send it to [email protected]
    Thank you
    Arun

    Arun,
    You should be able to use the document flow function mod : 'CRM_DOC_FLOW_READ_OB' to get any leading documents
    CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
         EXPORTING
           IV_HEADER_GUID  = wa_activity_guid
         IMPORTING
           ET_DOC_FLOW_WRK = lt_doc_flow.

  • How to update sales orders using B1WS in SAP 8.8 PL18

    Hello all.
    We are having a problem updating sales orders using Sap Business One Web Service ( B1WS ).
    We are running SBO 8.8 PL18, MS-SQL 2008, and all is fine when using the SBO client.
    But when it comes to updating sales orders through B1WS we just cannot get it to work.
    We can add new orders easily without problems. Updating orders always gives this error:
    \[ORDR.PayDuMonth\]\[line: 0\] , 'Field cannot be updated (ODBC -1029)'
    We have checked and verified multiple times that our setup is correct.
    Also the WDSL files are verified.
    We can update orders just fine using the sboclient.
    And using B1WS we can basically do everything, besides updating.
    We have also tried this on different company db's, so we are quite sure this is not
    something related to some general setting we missed, but who knows?
    We have tried different ways to "assemble" the order before updating, but it always
    ends with the above error.
    Here is an example of one of the tests, where we load an order by docentry,
    increment the quantity of all open lines by '1', and then try to update it.
            protected void Page_Load(object sender, EventArgs e)
                // First we login
                string sessionId = "";
                LoginService.LoginService l_login = new LoginService.LoginService();
                LoginService.LoginDatabaseType l_dbtype = LoginService.LoginDatabaseType.dst_MSSQL2008;
                LoginService.LoginLanguage _lang = LoginService.LoginLanguage.ln_English;
                string _server = "SAP-8_8PL18";
                string _licserver = "SAP-8_8PL18:30000";
                string _db = "my_test_company";
                string _user = "manager";
                string _pass = "********";
                try
                    sessionId = l_login.Login(_server, _db, l_dbtype, true, _user, _pass,
                               _lang, true, _licserver);
                catch (Exception ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                if (sessionId == "")
                    Response.Clear();
                    Response.Write("No sessionId");
                    Response.End();
                // We are logged in and have a sessionId
                // Now load a valid open order by docentry
                try
                    OrdersServiceRef.OrdersService orderService = new OrdersServiceRef.OrdersService();
                    orderService.MsgHeaderValue = new OrdersServiceRef.MsgHeader();
                    orderService.MsgHeaderValue.SessionID = sessionId;
                    orderService.MsgHeaderValue.ServiceName = OrdersServiceRef.MsgHeaderServiceName.OrdersService;
                    orderService.MsgHeaderValue.ServiceNameSpecified = true;
                    OrdersServiceRef.DocumentParams docParams = new OrdersServiceRef.DocumentParams();
                    docParams.DocEntry = 31; // Docentry of a known open order
                    docParams.DocEntrySpecified = true;
                    OrdersServiceRef.Document order = orderService.GetByParams(docParams);
                    OrdersServiceRef.DocumentDocumentLine line = null;
                    for (int i = 0; i < order.DocumentLines.Length; i++)
                        line = order.DocumentLines<i>;
                        if (line.LineStatus == OrdersServiceRef.DocumentDocumentLineLineStatus.bost_Open)
                            line.Quantity += 1;
                    orderService.Update(order);
                catch (System.Web.Services.Protocols.SoapException ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                catch (Exception ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                Response.Clear();
                Response.Write("All OK");
                Response.End();
    I hope that someone has an idea as to why this happens.
    The customer often changes quantity or adds lines on their orders,
    and the only way to solve it so far has been to make a new order and
    close the old one.
    Thanks in advance
    J. Thomsen

    Hi,
    Welcome you post on the forum.
    Have you checked if you only update a specific line instead of a loop?
    Thanks,
    Gordon

  • Update Sale Order Header Text through Enhancement

    Hi Experts,
             I Have a requirement to update the sale order Header Text , when the sale order is opened in VA02 and saved.
    Here in I tried using edit_text, it updates sale order header text  directly in DB during run time even before the save action is completed.
    But I need to just fill the header text and that has to be saved during the save action only.
    I tried coding the same in the user exit (userexit_save_document) but this user exit gets triggered only when there is some changes made to the document when opened in VA02 & Saved.
    Is there any  user exist to pass sale Order Header text and save when save button is clicked irrespective of the document been changed or not.
    Thanks in advance
    Sathish

    Hi Brad Bohn,
        My actual requirement is to trigger an Idoc when the user goes to VA02 transaction and clicks save.
    IDoc gets triggered only when there is some changes to that document, that is through NAST table entry based on the output configurations in NACE transaction.
    Now that the user wants to trigger an IDoc even if there is no change (ie. to reprocess the IDoc) when he just opens a sale order in VA02 and click save.
    It is not possible to trigger an IDoc through configurations when there is no actual change in VA02 and saved.
    So it has to be forcefully sent by making some additions to the Order through coding, so I choose that Text box to fill some additional data and save .
    Kindly Let me Know any thing could be done for this scenario.
    Thanks in advance
    Sathish

  • What happens sales order linked with wip job is cancelled

    HI,
    what happens sales order linked with wip job is cancelled ?
    actually if wip job is cancelled then sales order lines is on hold ?
    i wanted to know what if sales order of that wip job item line is cancelled say example  if that wip job already is in processing .
    please help me
    Thanks in Advance.

    If WIP job cancelled or Requisition/PO is cancelled, corresponding order line reservation will be cleared and will go to 'Supply Eligible' Status. Progressing this line will again follow the WIP/Requisition path based on item.

  • Error while updating Sales Order : Another user Modified Table (RDR1 )

    Hi All,
    I am getting an error message while running the following steps.
    Steps
    1)     Pull an entry from sales order.
    2)     Add new data to line.
    3)     Update the sales order.
    a)     Sap updated the data.
    b)     Through code using DI API we updated some UDF.
    4)     With out closing / Pressing OK button…
    5)     We added new data to line.
    6)     Then Press update.
    An Error will through by B1 as “Another user modified the table(RDR1 ).” Before going to the code where we are handling the update of UDF.
    But after the 3rd step above when we do
    4) Close the window or pressed ok
    5)  take the sales order window again pull the data
    6) Add new Data to line.
    7) Update sales order then it will go smoothly.(Updating by B1 and from code )
    Can anybody tell me why this happens?And any workarounds to solve this?
    Deepesh

    are u adding a matrix row thru the code? I get this error when I am adding rows and I get the rownumber out of sync.
    if so get the max (lineid) from rdr1 and then check against the matrix.rowcount before adding a row. if lineid is greater that matrix.rowcount take lineid + 1 and assign it to the matrix.row, else take the rowcount + 1
    if not, and as a workaround, then you can try using the SBO_SP_transactionnotification stored procedure.

  • Update sales order qty through BAPI_SALESORDER_CREATEFROMDAT2

    HI
    Can anybody help me out.  I have the requirement for creating sales order through BAPI_SALESORDER_CREATEFROMDAT2. The sales order is created but with 0 quantity.
    I am using fields RNDDLV_QTY and TARGET_QTY and REQ_QTY in schedule lines & also setting the update indicator to 'X'  in the corresponding itemx structures.
    In fact it used to work earlier and has stopped now. I am also checking if there could be any change in configuration but don't think this should be the reason.
    Can someone guide me as to which quantity fields of the BAPI are the right ones to update sales order qty?
    thanks

    Hi,
    You are using the correct fields i.e. TARGET_QTY and REQ_QTY. Just check if you are passing the same Item Number in both the tables.
    Hope it helps...
    Lokesh

  • Sales order link to MRP run

    Dear gurus,
    I have one query regarding sales order link to MRP run.
    I had created sales order by VA01 & also independent requirement in MD61.
    Both are acknowledged in MRP run.I know the requirement in MD61 transferred for MRP run(MD02/MDBT/MD01).
    But my question is how sales order requirement considered in MRP run i.e. link to MRP run.Is there any customization?
    Pl.suggest the same...
    Rg,
    Tushar

    Hi,
    Strategy 11  :-
    Sales Order creation - no impact.
    BSF    Gross planned independent requirements 
    KSL    Sale from stock without independent                                                                               
    Requirement reduction
    Goods Receipt - minus the quantity for the oldest planned independent in demand management. For e.g. if PIR is 100 and delivery 90, PIR becomes 10 (withdrawal 90).
    Delivery - no impact as delivery is issue from sales order.
    Hope clear to you.
    Regards,
    R.Brahmankar

  • Updating Sales Order Status in Batch

    Hi
    Please let me know if we can update Sales Order Line details like Ship To Address , Date , Status in a batch?
    We are using 11.5.10
    Thanks

    Use the Order management API or the OM interface tables.
    See irep.oracle.com for details.

  • Email Sales order link from SAP Work Place

    Dear SAP Gurus,
    Well guys i have to mail the sales order link through the work place but its not working for the sales order. but its working for delivery order and billing document...so i want to know that why its not working?
    Regards,
    Mohsin

    Dear All,
    Can u please help me on this situation? I will be very thankful to u....
    Regards,
    Mohsin

  • Updating Sales Order no in Production Order

    we have csenario for Sales Order :  Inquery - Quotation - Sales Order .
    In PP we have MTO scenarion . when i run MRP and convert the plan order to Production Order , in place of Sales Order it was updatin Quotation in Production Order .
    we have checked SD config for sales doc Item category =TAC and in Material Master we will used Item Category = NORM
    Please suggest is there any other setting for updating Sales Order no in Production Order .
    Thnx.

    Hi,
    I assume that you are using the strategy 20 (MTO). Go to OVZG here select the class 040 Indiv.cust.w/o cons., keep BLANK for account assignment consumption and rerun the whole cycle and check.
    Thanks
    Hrishi

  • Updating Sales Order Retrospectively with PGI figure

    Hi
    Does anyone know if there is a way of retrospectively updating sales order with the value that has actually been POST GOODS ISSUED
    Thanks
    Tony

    What do you mean by Value? does the Value of the item change during PGI?
    If you mean to say, quantity, then yes, After PGI, go back to your order and change the order qty = PGI qty.
    Regards
    Sai

  • Error message when updating Sales Orders

    Hi Experts
    Following an issue over the weekend when I was forced to perform a  hard reset we are now experiencing error message when trying to update some sales orders. 
    This entry already exists in the following tables " ADO1 (ODBC - 2035) [Message 131 - 183]
    it is not happening on all orders - i think only ones which were on the system prior to the reset.
    We also use webtools and the B1SyncService seems to be causing the SAP B1 system to become unusable - following each attempt to sync there is an error in the event log:
    Event Type:     Error
    Event Source:     B1SynchService
    Event Category:     None
    Event ID:     0
    Date:          29/06/2009
    Time:          13:42:38
    User:          N/A
    Computer:     SQL01
    Description:
    A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
       at netpoint.api.data.DataFunctions.ExecuteScalar(String SQL, String connectionstring)
       at NetPoint.SynchSBO.SBOObjects.SBOUtility.SetCompany(Company TheCompany, SecurityTicket securityTicket)
       at NetPoint.SynchSBO.Synch.SetCompany()
       at NetPoint.SynchSBO.Synch..ctor(SecurityTicket ticket)
       at NetPoint.SynchSBO.Synch..ctor(SecurityTicket ticket, Int32 pricinginterval)
       at NetPoint.SynchService.NPSynchService.Synch(String profile, Mutex mutex)
       at NetPoint.SynchService.NPSynchService.Main(String[] args)
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    For now I have had to stop the SyncService to prevent B1 from becoming unusable (users are unable to start any AR module), but even after I have stopped the syncservice I still have the error when updating sales orders.
    Regards
    Jon

    Dear Johnny,
    the error reported sounds like a DB Corruption. I would advise you to log a message to SAP Support including all the details in order to obtain the error message. It is also a good idea and it will speed up the process if you include some print screens showing exactly the error message.
    Hope my reply helps you to solve the issue.
    Regards,
    Wesley Honorato

  • Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng)

    Hi,
    I have a requirement to use a Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng), which one (Function Module or BAPI) should I use? is there any sample codes?
    Thanks a lot!!

    Hi,
    *& Report  ZTEST
    REPORT  ztest.
    DATA : wa_header TYPE bapisdh1x,
                i_item TYPE TABLE OF bapisditm WITH HEADER LINE,
                i_itemx TYPE TABLE OF bapisditmx WITH HEADER LINE,
                i_return TYPE TABLE OF bapiret2.
               wa_header-updateflag = 'U'.
               i_item-itm_number = '000010'.
               i_item-target_qty = '4'.
               APPEND i_item.
              i_itemx-itm_number = '000010'.
              i_itemx-updateflag = 'U'.
              i_itemx-target_qty = 'X'.
              APPEND i_itemx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = '1234567890'
        order_header_inx            = wa_header
      TABLES
        return                            = i_return
        order_item_in                 = i_item
        order_item_inx               = i_itemx
    Hope this will help you.
    Regards,
    Anand.

Maybe you are looking for

  • Only one Apple ID but still got a 90 day lockout

    Hello, I'm hoping someone can help me with this as Apple has been no help. I subscribed to itunes match a couple of months ago to use with my imac, 64 gb iphone 4s, and apple tv. Over time due to itunes match, my iphone has filled up to near capacity

  • Sending a URL in a WF notification

    Hi All, I am new to WORKFLOW and have an object to be developed. The requirement is to send a URL in an email notification to the notifications screen of the Workflow Administrator. Workflow Administrator >> Administrator Workflow >> Notifications. T

  • Enforce setting private variable in subclass with abstract method

    Hi, Is this something that is common usage/practice?: public abstract class Base {     private int importantPrivateVariable = setImportantPrivateVariable();     protected abstract int setImportantPrivateVariable(); }I would like to enforce the extend

  • Changing pixel density metadata in JPEG

    Hello: Does anybody know of a way/utility to batch mode change the pixel density metadata in JPEG files? I have this Phillips digital frame which won't display images properly when the JPEG DPI information is 72, regardless of the real pixel width an

  • Adobe PDF 8.0 Printer not working

    I have tried to use the Adobe PDF 8.0 printer but all it does is send the info to the printer and then the Queue stops. I have had a look at other forums and tried everything like deleting the printer and then going into acrobat and repairing it and