Issue in Updating Sales Order Document flow

Hi Experts,
We have developed a Z Program for posting Material document for the deliveries of Sales Order. This program runs in Batch job everyday.
Here we are getting an issue like in some of the cases it's not updating the Document flow of the Sales order though its Posting Material Document for the Delivery of Sales Order. If there will be a bulk amount of data then its creating issue in updating the Document flow ( Either the 1st set of record or last set of records).
We are using BAPI 'BAPI_GOODSMVT_CREATE' for posting Material Document for the delivery and FM 'RV_DOCUMENT_FLOW_UPDATE_U' for updating the document flow.
It seems it giving issue with bulk amount of data. Will it a time issue?
If any one have faced such issue, please throw some pointers.
Thanks in advance!
Regards,
Priyabrata.

It could be a timing issue. After you create the material document, try to enque the material document and move to the next step  only if the enque is successful.  Keep trying to enque the material document until u are successful. But make sure you exit the loop after certain number of tries to avoid endless loops.  Here is a sample code:
  DO 20TIMES.
    CALL FUNCTION ;'ENQUEUE_EMMKPF'
      EXPORTING
        MODE_MKPF      = co_e
       MBLNR          = xxxxx
      MJAHR           = xxxx
      EXCEPTIONS
        foreign_lock   = 1
        system_failure = 2
        OTHERS         = 3.
    IF sy-subrc EQ 0.
dequeue/unlock the notification again
      CALL FUNCTION DEQUEUE_EMMKPF
        EXPORTING
          MODE_MKPF= co_e
       MBLNR          = xxxxx
      MJAHR           = xxxx
     EXIT.
    ELSE.
in case of no success, wait 1 seconds, before try again
      CALL FUNCTION 'RZL_SLEEP'
        EXPORTING
          seconds        = 1
        EXCEPTIONS
          argument_error = 1
          OTHERS         = 2.                               "#EC *
    ENDIF.
  ENDDO.
Regards,
Jitendar

Similar Messages

  • Sale order document flow-u0091Service Documentsu0092 is coming which should't aper

    New Issue with Sales order document flow:
    When linking from a sales order in document flow, we were reviewing why the description information varied.  In looking at different values, we clicked on a new item within document flow that allows you to like to ‘Service Documents’.   This is new in 6.0, or it was previously deactivated in 4.6C.  If you link from a sales order to a service document, in ECC 6.0, you will get a short dump because the document flow is so great (viewing order #any in VA03 and use document flow and then select the service documents button    as seen on the screen below
    A Short dump will occur in program SAPLDOCUMENT_FLOW_ALV.
    Here in ECC 6.0 is how it looks from sales order 9806:
    Documents created from 2004 through 2007 are coming up as linked to this sales order and that is incorrect.  There is some type of linkage issue.  In the 4.6 C environments, the ‘service documents’ link is not visible from document flow.
    Can any body functional / technical Help on this urgent???

    Hi Sanjay,
    Go to the order VA03 --> Environment --> status overview. The exact status of the header and item can be found here. You may have chances to know why the status is being processed.
    Also 
    Check whether you have checked 'document flow update' field at item level in copy control
    Check your settings for completion rule in item category
    If it is due to incorrect status message, run report SDVBUK00. That might fix the error. It is recommended to run this first in test mode.
    Br, Sats.

  • Contract not visible in sales order document flow

    Hi
    I am supposed to create sales order from Contract.The requirement is that only header data should be copied.Thus  In Copy Control configuration I did not maintain item level and schedule line level settings for these document types. The issue is that after running the whole cycle from Contract -->SO --> Delivery --> Invoice when I see the Sales Order document flow I can see all other documents but not the contract.Also In Contract document flow I can see only sales order but not delivery and invoice.Please guide.

    Hello,
    Update Document Flow option is available only at Item Level in copy control setting from Contract to Sales Order.
    Check out your Copy Control Records at Item Level. There would be "2" mentioned in "pdate document flow" box.
    2 means Create doc. flow records except for dely/goods issue/billdoc. Here you to maintain "X" for Complete Document flow.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • PO is incorrectly showing in other sale order document flow

    Hi expwrs please help me on this issue. One PO is incorrectly showing in other sale order document flow and there is no relationship between PO and sale order. Why it is showing incorrectly.

    Hi,
    First you check the SO created with reference and then check teh PO type (based on item category).
    I think with of any reference the PO will never show on doc flow,

  • Sales order document flow and delivery document flow are not in sunc

    Hi ,
    whan I look at the Sales order document flow  there are lot of line items rejected with specific reason , but for the same line items already delivery and PGI in place . When we try to do the invoice it shows error , it can't be invoiced because line items in sales order are rejected .
    Ideally in business when delivery and PGi created for the sales order , it should not allow the line item to reject . system should look at follow on documents in place . Reverse process should follow .
    Pls provide solution to stop item rejection when follow on delivery document in place .
    thanks and regards.
    Sunil Tripathy

    Hi,
    Goto the T.Code "VOV7".
    Select your item category.
    Details.
    Maintain the Completion rule as "A(Item is completed with the first reference)".
    Save.
    If you do this after the follow on document is created,the item is completed and you cannot reject the item.
    For your second question,
    Goto the T.Code "VTLA".
    Select your valid combination.
    Click on item.Select your item category.Details.
    There is a check box called as "Update document flow".Tick that one.
    Save.
    Regards,
    Krishna.

  • Sales order document flow error

    we do credit memo for one sales order, in the sales order document flow, the credit memo accounting document's status is not cleared. how can we changed it to be cleared?

    Hi,
    Clearing will be done by finance after the payment is given to the customer. This clearing is done by transaction F-22.
    VKM3 is used for releasing document blocked for credit management and not for clearing the accounting document.
    Regards
    Karan

  • Invoice/billing document Number  not appearing on sales order document flow

    Dear all,
    After saving the sales order invoice when i check in va02 sales order document flow invoice number is not generating

    Really something is wrong in your configuration.  When your delivery status shows Being Processed, I could see subsequent two documents, viz.Confirmation of Service and GD doc reference as complete.
    Can you let me know how many line items that delivery contains?  The reason for this query is normally, for stock item, we see Material Document reference and for non-stock item, we see Confirmation of service.  But in your case, I could see both.  From your VBFA table screen shot, I could see two different material document references.
    G. Lakshmipathi

  • Sales Order document Flow in Reports

    Hi All,
    I am develoing a Custom Sales Order report in ALV.  Here the requirement is to include the Document Flow for the line item.  This should be similar to the Icon in VA03 transaction.  When I click this icon in my report, it should display the document flow (same as that of available in VA03 transaction).  Can you suggest how can I get Document Flow icon in my Report?
    Thanks in Advance.
    Regards Munna.

    Just to save time for others who have the same requirement , use below,  fill the structure with sales order and other details. Leave the posnr blank if you need document flow , else fill the posnr if it is item level.
    CALL DIALOG 'RV_DOCUMENT_FLOW'
            EXPORTING
                 VBCO6      FROM VBCO6
                 MAKT-MAKTX FROM SPACE
                 KNA1-KUNNR FROM kunnr2000
                 KNA1-NAME1 FROM name
                 MAKT-MATNR FROM SPACE
                 IVKORG     FROM VKORG
                 IVTWEG     FROM VTWEG.
    No custom screen required, no tree control required, no coding required except that you need to call this at right place in your module pool/ report etc. SAP internally uses this for display in SAPMV45A.
    Hope it helps.
    Regards/Ajay

  • Sales order Document Flow

    Hi,
    I have a requirement to create an application which shows the data as seen on the "Document Flow" screen of a Sales Order.
    I must be able to enter the Sales Order Number and the application must display the status of the order, just like in document flow.
    Can someone let me know how to go about this?
    Any bapis, relevant tables, etc ?
    Thanks and Regards,
    Reena

    Hi Reena,
    I would try to call the transaction BAPI (release 4.6C) in sap backend and go to the sales order section and check the input and output parameters of standard SAP BAPIs you need (look for example to BAPI_SALESORDER_GETLIST).
    In my case, we have developed our own BAPIs based on standard BAPIs from SAP.
    Hope that helps!
    Regards,
    Frank
    By the way, if you are in higher releases like mySAP ERP 2005 there are much more interfaces for Sales Order than in release 4.6c. Don't know your release so I think it's perhaps important to know that for you...

  • 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

  • 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

  • COGS issue in the sales order

    Need your help to resolve below issue.
    A sales order is created with multiple line items. The user created delivery and invoice document for one of the line item in the sales order. The line item cost was active in the sales order and invoice document. The value was determined from the material master record.  The user then created delivery document for other line items in the sales order, but invice document creation ends with an error message that "Sales order is incomplete so billing can not be carried out" VF 069
    The first invoiced item has become inactive in the sales order now and the sales order goes into incomplete status. The system is blocking the invoice document creation for rest of line items. Could you tell me why the line item cost became inactive. Also tell me how to resolve this issue.

    I dont think,
                   There is any problem with Cost in Sales order line item.
    Cost copied from MMR is statiscial & always in display mode.
    Goto VA02- key in order no n press entere.
    now from menu bar- Goto- Edit - Incompletion log ( Cntrl + F8).
    if any field is missing , then maintain the field  to complete the sale sorder.
    incompletion log will be maintaiend @ order n item level. check in Item category for the incompletion procedure & check the fields maintained in incompletion procedure in Tx: OVA2.
    Regards,
    Reazuddin MD

  • Sales Orders not flowing in COPA if Credit block is set

    We are implementing COPA for reporting in BW. The Billing information is flowing well in COPA. However, we have one issue with Sales Orders. Here is the scenario:
    When we create a new Sales Order without any credit blocks, the information is flowing to COPA Tables in R/3. However, if the Sales Order is blocked for Credit reasons, then the Sales Order information is not available in COPA. The moment the Credit block is released we are able to see the info in COPA Tables.
    The requirement is to have the Sales Order information availabe in COPA no matter what. Is there a way via which we can make the Sales Order info flow in COPA the moment it is created, no matter it has any blocks.
    Any info on this is highly appriciated.
    Thanks
    Srini

    Hi,
    I think it is a standard behaviour of Co-PA.Refer the note: 139725
    With rgds,
    Anil Kumar Sharma .P

  • 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

Maybe you are looking for

  • No Open Items were found

    Hi I am trying to clear open items using F-44 I am getting an error "No Open Items were found" . But when i go and see in FBL1N , I can see the open items there. What can be the reason ? PS: The posting date of the items is in 2005. Is this causes an

  • Transferring Photos From PC to iPod

    i am having trouble transfering photos from my pc to my ipod it wont let me put them all on there and there is enough avalible space is there any solutions to this. my iPod is on ios 6 and my itunes is 11.1 and it and 4g ipod touch

  • Moving flat network to VLANs

    I have a facility that is currently running a single class C network with a mix of hubs and switches. We are upgrading their infrastructure to be completely switched and implementing VLANS at the same time. I am planning to use a 3560 as the core swi

  • Using encryption on one drive of server for W7 clients

    Hi, I run Win 2008 R2. It has an SSD boot drive, 9 Spinners and a USB attached drive. The Spinners are 2 & 3 TB drives. Two of the 2TB drives are set up as a spanned volume One of the spinners has several partitions. I am considering encrypting the d

  • I m new for SAP script can anyone tell me step by step

    hi i m new for SAP script can anyone tell me step by step. how i can work with sap script and how can i call report programe by sap script thanks .