Batch updation error from Sales Order

Hi All,
I am facing a problem in my addon while Adding/Updating Sales Order.
In my addon, after adding or updating Sales Order, checking the Pval.ActionSuccess property , I am updating the batch allocation for the quantity in the order into IBT1 using DI API.  It was working nice. But in one company database it is causing issue. Sales Order is getting added/updated. But after that when the batch is updated using DI API, it is showing the error below.
Another user has altered the quantity of batch 000001
in Whse 01 in row 1  [(----) 29-9]
Please help me in this issue.
Jisha

Hi Jisha,
I would change the trigger on which you decide to change the batch. You may correct me if I am wrong, if you wait for a pVal.ActionSuccess, I'd say this is a user interface action. Maybe there is a timing difference. When you are waiting for DI-API to complete I try something like this:
RetVal = Order.Add()
                        If RetVal = 0 Then
                             'You Batch actions here
                        End if
Hope this helps.
Kind regards,
Winfried Tiemessen

Similar Messages

  • Intalled Base update Automatic from sales order

    Hi
    From CRM Sales Order it has to update, Automatic Ibase Update throuh Action.
    As per SAP Standrard will it work then how if not then development required what are the steps to to be fllowup for the development please me out if any body work on IBase.
    Regards
    ilyas

    Hi Ilyas
    as to the best of my knowledge, this is not directly possible. The direct integration would work from the creation of functional locations and equipment in ECC (as of CRM 7.0), there are also standard mechanisms for replicating equipment in earlier CRM versions. However, in our case we had to enhance those mechanisms to fully support our requirements (e.g. replicating ship date).
    Equipment replication (CRM 2007): http://help.sap.com/saphelp_crm60/helpdata/en/46/cc79505ec61525e10000000a114a6b/frameset.htm
    CRM 7.0 Replication of Functional Locations: http://help.sap.com/saphelp_crm70/helpdata/EN/f8/f1b305ffdf468ba0a6bd10c2d4f654/frameset.htm
    Hope this helps.
    Best
    Christian

  • Address not copied from Sales order/Delivery to Shipment Document

    Hello Experts,
    I need your help on Addrss of ship to in shipment document.
    Sales Order[VA01] >> Delivery [Vl01N]>> Shipment [VT01N].
    User changed the Address of ship to party (Header level) in Sales Order and It reflected to delivery as well and I believe It should also update the address in Shipment document.
    But when I checked the Address of the Customer/Unloading point in Shipment Document [VT03N] (as below) I found It was not updated It was same as Customer Master Record and I believe It directly copied from Customer Master Record.
    BUT While creating the Shipment system is copying the data from Customer master Record not from Sales Order /Delivery. Logically system should copy the updated address from Order/Delivery BUT It is directly copying from Customer Master i don't know where is the setting of this ??
    Can anybody help me on this ? How system takes the customer (ship to party) address in shipment ? Where are the setting of these.
    What I need to do so system take the updated address from Sales Order/Delivery not from Customer Master Record (Ship to party).
    Can I change the address of customer in shipment document ??
    Awaiting your precious reply.
    Thanks,

    Hello Samir,
    Thanks for your response.
    I think you get my question in wrong way.
    I am sayingCustomer master data was not changed.
    User just changed the Address in Order (Order > Header >> Partner tab >> Change ship to address/overwrite ship to address).
    Overwritten Address / Updated address are copying in Delivery BUT not in Shipment document.
    What I need to do?  system should copy the updated address from Sales Order/Delivery BUT it is copying from Ship to party.
    I hope this time i am clear to explain my issue.
    Thanks,

  • Condition update error  :There is no condition update from sales orders.

    I am testing the condition update by condition type K005 , which have been set the condition update indicator ,and I have also set the Max.number.of.orders  to 1 , but after I created the first sales order ,the condition record still make effect in the second  and third sales order ,which was created without referece to the first one .
    And  when I  look at the cumulative value in the condition record ,it says "There is no condition update from sales orders."
    Anyone can give me some light ?
    BTW , the sales order type is ZOR ,which I copy from the standard order type .And the item category is ZTAN , copy from  standard IC TAN .
    thanks for your help in advance .

    hello, friend.
    there are at least 3 things that you will have to check, since records for condition type K005 is created for a specific combination:
    1.  check if the item category with condition update was the one determined in the order
    2.  check if the customer has a valid K005 record
    3.. check if the material has a valid K005 record
    also, since you specified "1" as maximum number of orders, this could have prevented any updates.
    regards.
    Edited by: jonathan y on Sep 17, 2009 2:59 PM

  • No revenue update from sales order

    Hi
    I have created SO with account assignment for a WBS billing element. In config I have make the indicator on for revenue value should automatically  update from sales order.
    But neither the revenue from sales order is updating in any of my PS report nor the actual revenue too after billing cycle.
    Does it need some more customisation checking.Cannot find any solution from earlier similar threads.
    Zinni

    To analyze the error, proceed as follows:
    1. Is an account displayed in the sales and distribution document in the condition detail screen (for example, condition PR00) ? Is there a cost element in this account and are you allowed to post sales revenue to it? (cost element category) If the answer is yes, then proceed to 5. If no, then proceed to 2.
    2. Check the relevancy for billing of the sales and distribution document item in Customizing (-> Sales and distribution -> Sales -> Sales documents -> Sales document item -> Define item types).  If 'Not relevant for billing' is entered, correct this.  This will probably clear the error. If 'I' (according to billing plan) is entered, the system only updates sales revenues if billing plan dates exist in the sales document.
    3. Check in Customizing that a billing type is assigned to your sales document type (-> Sales and distribution -> Sales -> Sales documents -> Sales document header -> Define sales document types). The billing type can be found in the 'Billing document' block. The relevant billing type depends on the defined relevancy for billing (see point 2). If no billing type is entered, enter one.  This will probably clear the error.
    4. Check in Customizing that an account determination procedure is assigned to the billing type determined in step 3 (-> Sales and distribution -> Billing -> Billing documents -> Define billing types). If no account determination procedure is entered, enter one. This will probably clear the error. If an account determination procedure has already been assigned, the error is probably caused by an incorrect structure of this plan. Check the plan.
    5. You will probably not be able to correct this error yourself. However, you can provide some information beforehand. Enter parameter MCL in your user master record and valuate it with 'X' (upper case) (-> System -> User profile -> User parameters). You activate an user-specific TRACE function this way.
    6. Change, for example, the pricing date or item value in the quotation or sales order and save the change.
    7. Execute Transaction MC30 for your user ID (/NMC30). You now see a list of all data structures that were set up for the Logistics Information System (LIS) in step 6. Check whether structure S008 is contained in this list. This information is required to further analyze the error.
    8. If structure S008 is contained in the MC30 log, call Transaction SA38, program name RKPSSHOW, -> Execute (F8), enter the number of the affected sales and distribution document and press -> Execute (F8) again. The output list (or the fact that no list is generated) is also needed for analysing the error further.

  • Budget error while creating delivery from sales order

    hi Gurus,
    System is throwing error PB603 "Item 004 WBS element ABC-XXX budget exceeded" while creating delivery from sales order.
    I am picking material from unrestricted plant stock (not in project stock).
    I am also confused as sales order has 3 line items & error shows Item 004 !

    Hi Kuldeep,
    Check this note,
    Note 159387 - Message BP603: incorrect line item is displayed
    Its valid only till 4.6. Might give you some idea but.
    Regards,
    Gokul

  • Update Purchase Requisition from Sales Order

    Hi,
    My requirement is to Update Purchase Requisition from Sales Order based on the Vendor number in
    Purchase Requisition .
    I have used Userexit         :- MV45AFZB
                     Customerexit :- EXIT_SAPFV45E_002
                     BADI             :- ME_REQ_OI_EXT, ME_REQ_POSTED
    for my requirement, but in vain.
    Of these Userexit  MV45AFZB, Customerexit EXIT_SAPFV45E_002, BADI ME_REQ_OI_EXT are getting triggered in Sales order creation but, Purchase requisition is not yet triggered and we dont have the VENDOR value with which i need to do perform some checks and update the Purchase requisition.
    After I SAVE sales order, BADI ME_REQ_POSTED is getting triggered.Here, the purchase requisition is created ( not yet inserted into the database ) .I also have required VENDOR value, but in the given
    BADI ME_REQ_POSTED I can make checks according to my requirement but not able to update the new values into purchase requisition.
    Literally speaking, Iam struck up..Dont know what to do.....
    Please let me know any Userexit/BADI/BTE where I can  Update Purchase Requisition from Sales Order based on the Vendor number in
    Purchase Requisition .
    Thanks,
    Shivaa..

    Hi Max,
    It just struck to me...
    As suggested by you, I thought of calling BAPI BAPI_REQUISITION_CHANGE  from user exit USEREXIT_SAVE_DOCUMENT in MV45AFZZ .
    I f I give PReq no. , BAPI BAPI_REQUISITION_CHANGE  will take the particular PReq no., from database and then change it according to our requirements...
    But, in our scenario I am calling the BAPI BAPI_REQUISITION_CHANGE  and passing a PReq no..which doesnt exist in the d/b itself.....
    Anyways, let me try......
    Meanwhile ,please suggest any other options for resolving the issue in question......

  • Assign batch number from sale order to production order automatic

    Dear all, I have a question for all. Please help me in this case
    My scenario is make to order
    I have a sale order, when i create sale order, i have assigned batch number at each line item.
    When i run MRP for sale order (MD50), the system generate a planned order for it and I've converted to production order.
    So when I view production order, I think that batch number what I've assigned to sale order will be assign to production order but that is not happen.
    So, can you help me solve this problem. I think that sap can assign batch number from sale order to production order automatic but i don't know how to configure that
    Thanks all

    Hi,
    To the best of my knowledge, when system is generating planned order / production order from sales order system doesnt copy batch number from sales order.
    In fact , you are following wrong practice for generating batch no.
    Follow procedure like this :
    Create sales order without any batch assigning there. Run MRP with MD50 and then convert planned order to Production Order.
    While creation / releasing of Production order, you have option to generate batch automatically by following way :
    Go to OPKP (Production Scheduling Profile) -> Take your plant & give suitable name to Production scheduling profile-> Batch Management tab -
    > Automatic Batch creation in the order maintain this field as
    1     Automatic batch creation at order creation
    or
    2     Autom. batch creation at order release
    This will generate batch number automatically at the time of creation or release of order.
    Then follow same process i.e. Goods Issue, Confirmation & GR for production order.
    So you will get sales order stock in the form of batch managed.
    Check & revert if any issue in above flow.
    Regards,
    Tejas

  • Project Revenue Plan Not Update from Sales Order Item

    I am generating a network and project from the sales order item using Assembly processing. I am using milestone billing on the sales order item and the milestones attached to the project network activities are appearing as billing blocks on the sales order item billing plan. However, the project revenue is not getting updated from the sales order billing plan. Can someone please help?
    I have deleted the billing plan on the billing WBS element and activated revenue planning update from sales order in cusomization for PS. I am looking at CNS41 under the project revenue sched in version 0. Is there a different report I should be looking at?
    Regards,
    Venkat.

    HI Venkat,
    You are looking at the correct report & I believe you have also done the necessary customization. If you create a sales order and reference it to a quotation, the related plan values in the WBS element are refreshed automatically.
    When the payment data is recorded, the terms of payment and the customer payment history are taken into consideration. One of the probable causes could be the credit limit of the customer might have been exceeded. Take help of your SD consultant & increase the credit limit for that customer (from the sales document), t-code FD32 if it is permitted in the business.
    After the new credit limit is set execute the following steps:
    u2022     Go to the t-code Change billing request (VA02)
    u2022     Open the required billing request
    u2022     Remove the account assignment of WBS element from each line item
    u2022     Save the billing request
    u2022     Reopen the billing request in change mode
    u2022     Reassign the WBS elements to all line items
    u2022     Now the changed credit limit will take affect
    u2022     Check the Planned Revenue for the said project in CNS41, it should get updated.
    Rgds
    Deepak

  • Error while creating Delivery Note from Sales Order

    Hi,
    I am trying to create Delivery Note from Sales Order. But, I am getting one error sayin "An Item with no delivery quantity is not permitted.Item will be deleted". Hence, the delivery note was not created.
    Can you please let me know, why this error comes. And how to rectify this error.
    Please let me know, what are all checks, I need to do, to know this error.
    Thanks,
    Sandeep

    Hi
    There may be following reason :-
    Either the relevant Item Category is not relevant for Delivery, Check the Item Category in Sales Order and then check the settings of this Item Category in VOV7.
    Also check the relevant Schedule Line in VOV6, it should be relevant for Delivery.
    The Other reason may be that your schedule line in Sales Order is Not confirmed for Available Quantity so check the Sales Order> Line Item> Schedule Line.
    Regards
    Amitesh Anand

  • BAPI or FM to create outbound delivery from Sales order

    Hello All,
    My requirement is to create a outbound delivery from sales order. Also i need the batch number and texts to be updated in the delivery.
    For this i need a single FM. The catch is that we don't have the batch number and texts in the sales order. That i have to take from some other delivery. I can get all the information .
    The problem is that i can not find a FM through which i can create the delivery from the order and update the same.
    I should not use two FM.
    Could you please tell me some FM which does both in one go?
    Thanks and Regards,
    Rahul Sinha

    Hi
    Hi,
    You can use the BAPI BAPI_DELIVERYPROCESSING_EXEC.
    Check this sample code..
    PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln LIKE vbap-vbeln,
    posnr LIKE vbap-posnr,
    kwmeng LIKE vbap-kwmeng,
    matnr LIKE vbap-matnr,
    werks LIKE vbap-werks,
    END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
    WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
    WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
    INTO TABLE t_vbap
    FROM vbap
    WHERE vbeln = p_vbeln.
    LOOP AT t_vbap.
    t_request-document_numb = t_vbap-vbeln.
    t_request-document_item = t_vbap-posnr.
    t_request-quantity_sales_uom = t_vbap-kwmeng.
    t_request-id = 1.
    t_request-document_type = 'A'.
    t_request-delivery_date = sy-datum.
    t_request-material = t_vbap-matnr.
    t_request-plant = t_vbap-werks.
    t_request-date = sy-datum.
    t_request-goods_issue_date = sy-datum.
    t_request-goods_issue_time = sy-uzeit.
    APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    TABLES
    request = t_request
    createditems = t_created
    return = t_return
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
    MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    Write: / 'Delivery ', t_created-document_numb.
    Regards,
    Sreeram

  • Update LineNum in Sales Order line Details

    Dear All,
    I have imported a sales order into a database from another database on SAP B1 2005A using DTW. The sales order has only one line item.
    However, after importing, the linenum of the target table RDR1 is 0 while the source has it as 1. All the other fields have been updated with the correct data.
    I am trying to update the same sales order's LineNum to 1 using DTW with the 'update' option ticked and the process runs successfully. However upon checking the database I find out that it has added another line item with the same details. Can a linenum field be changed/updated? The reason behind my need to change the linenum is because after trying to import a sales delivery linking it to that sales order it gives me an error :[DLN1.BaseEntry][Line: 1] 'No matching records found [ODBC:2028]'.
    Kind Regards,
    Asif

    Asif,
    The number of lines in the Sales Order does not neccesarily co-relate to the line number.
    Just a simple example:
    Create a Sales Order....Add a line item..add Sales Order
    Open the same sales order..delete the line item (delete row) and add the same item / another item.  Though the Sales Order seems to have only one item..now if you check RDR1 the linenum would be 1.
    The architecture of SAP B1 is to generate a new linenum each time you add a row.
    Thats probably why you are seeing the difference.
    If you want to match the target linenum. simply delete the row and add the same line item and Update SO.
    DTW will not update the linenum as it is system managed. 
    My recommendation for your situation is - if you do not have the same item more than once on a Sales Order - then it is better to get the BaseLine from the Database you imported the Sales Orders to.
    Let me know if you need any further direction with this.
    Suda

  • VERSION FIELD FROM SALES ORDER NOT APPEARING IN COOIS REPORT

    DEAR ALL,
      I am working on make to order scenario. Version field from sales order not updated when im taking MRP Run for specific Sales order in COOIS Report. But when iam creating production order with T. COde CO08 field getting updated. Its very important to get vrsion field as we have maintain old sales order No. in same. How this problem will get resolved?
    Regards
    Atul

    Atul,
    "MRP run" does not normally create production orders, MRP creates Planned orders.  Planned orders do not contain Sales order version.   I have never used this field before, but I would not be surprised if the behavior you are describing is 'standard'.  When you create a production order using CO08, you are creating a 'production order with reference to a Sales order' (which contains Sales Version).  When you create a production order using, say, CO40 or CO41, or using a program such as PPBICO40 in Batch, you are creating a 'production order with reference to a Planned order', (which does not contain version).
    If it is imperative that you have the Sales Order version number in all production orders, you could see if Planning Strategy 82 (Assemble to order) production orders contain the data you seek.  Otherwise, I am afraid you will have to have your ABAPers write some custom code to update this field in the production order.
    Another way to get sales order data into the production order, that does NOT require custom code, is by using Item Texts in the Sales order.  Any text placed in the Sales Order Item Text Field Production Memo (Text ID 0006) can be configured to be duplicated automatically in the Production order in an MTO environment.  Production Memo then displays as another Tab in CO02.
    Regards,
    DB49

  • Revenue not flowing from Sales order to PS so no WIP in PS/WIP

    Hi,
    We are following PS with MTO scenario.
    For calculating WIP in projects we are unable to get the actual revenue flow from Sales order to PS so entire amount in PS/WBS is sitting in WIP but its wrong.
    User wants to do the Delivery and billing form Sales order only.
    Can you please help us how to calculate the WIP in this scenaio.
    Thanks,

    Hi,
    Have you made the account assignment as WBS Element in the SO line item. Ift his is done, once you create an invoice from SO the actual revenue will get updated in WBS Element.
    Regards
    Sreekanth

  • PO creation from sales order

    Hi 
    we have a scenario where in we are creating a manufacturing order ( This is a sales order with no delivery relevance and billing relevance ), we use this to transfer requirement fo sales order to production( production is not in SAP) via interface .
    We need to create  PO when we get the confirmed dates from legacy system . We planned to create the PO from sales order directly . How can we do this ?
    Also my dubt is when we get the confirmed dates from  legacy system in to SAP , do we need to update the PO which in turn would need to update sales order schedule lines or can we directly update schedule lines in Sales order .
    IPlease let me know in detail if possible .
    Regards
    Ramanathan

    Hi
    You can use BAPI : BAPIPO_CREATE1_   for creating PO from sales order , you can pass the SALES ORDER no into the item level field : CRM_SALES_ORDER_NO---'' YOUR SALES ORDER '' . and fill the corresponding ITEMX for the field .
    Regards
    Swapnil

Maybe you are looking for

  • Vista SP2 and Access connections requiring manual reconnect

    Hi, I'm experiencing a problem after the installation of Windows Vista SP2 on my Vista Business. After a reboot, I must always manually 1) disconnect the WLAN connection and then 2) reconnect to establish a working WLAN connection and to gain access

  • ALV Sorting Not Working after Adding Checkbox to ALV

    Hi All. I am currently doing an ALV report using REUSE_ALV_GRID_DISPLAY function. I am sorting the list by Employee Name and Personnel Area. It works fine where the personnel are field and employee name field are merger together for same personnel ar

  • How to convert an Image to a byte array?

    I want to make a screenshot and then convert the image to a byte of arrays so I can send it through a BufferedOutputStream. try                robot = new Robot();                screenshot = robot.createScreenCapture(new Rectangle(500,500));        

  • C4795 Wireless Setup Issue

    Please help.  I have a HP C4795 that I'm trying to figure for wireless access.  It is currently set up on my home network to a Windows XP printer and all other PCs have access to it.  However, I want to make sure it's wirelessly connected as well.  I

  • Rule containing "Mark as Read" and "Move to Folder" does not remove New Mail Notification

    I asked this question in another forum here (sorry for not linking, but the forum would not let me because my account is not yet verified): http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/rule-containing-mark-as-read-and-m