Sales order split line user exit MV45AFZZ

Hi Guys.
Requirement is to split the sales order line items into multiple based on certain requirement. I Started coding in MV45AFZZ (USerexit_Save_Document_Prepare).  Basically what i am doing is looping at XVBAP and based on some condition inserting additional line in XVBAP and adding a new line with new UOM and incrementing the POSNR.). The data seems to be ok to me. But when i save i am getting update terminated error.  Can anyone help me out ?
Thanks
Vikram.

Hi,
Ary you using any 'COMMIT WORK' there?? If yes, that may cause this kind of error. Appending the records in XVBAP with mandatory fields should work.

Similar Messages

  • Sales order Change document user exit

    A colleague of mine has been asked if there is a way of inserting a different username to the standard one when a change document is created for the sales order header.  Is there a userexit that would suffice?
    Thanks in advance
    Ian

    You have only one option as far as I know:
    All change document creation occurs in function
    CHANGE_POINTERS_CREATE centrally.
    The only option would be to apply a repair to this function to set the username (CDHDR-USERNAME) to the value you want. You would do this only for sales document change docs - object class is VERKBELEG I think. This is also held on CDHDR.
    Hope this helps.
    Cheers
    Colin

  • Is the Sales Order Item User Status available in user exit MV45AFZZ

    Hello,
    Does anyone know if a sales order line item user status is available within user exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT)?
    I need to send an email when the status changes from one specific value to another specific value but I don't seem to have access to what the latest value is in this user exit.
    I have found a table XTVSTAT which cntains some user status' but it's not clear which status maps to which line item.
    If anyone has any suggestion please let me know.
    Thanks,
    Ruby

    Hi,
    I do need to access the values as I need to check for a specific change to the user status from value A to value B.
    I have already tried debugging the user exit and searching through the available variables but the status information doesn't seem to be available.
    I guess I will have to try the output determination route. Can you explain this in a bit more detail please.
    Thanks,
    Ruby

  • Manually trigger Availability Check in the Sales Order User Exit MV45AFZZ

    Hi All,
    As per the normal scenario where sales orders are created and the schedule line delivery dates are determined.
    Based on some business logic for few customers we need to change the delivery priority and confirmation delivery date.
    We are implementing this logic in the user exit MV45AFZZ in the routine USER_EXIT_SAVE_DOCUMENT_PREPARE.
    The availability check logic is already implemented by then. Now we have scenarios where the date redetermined by the custom logic is greater than the one determined by the standard availability check done by SAP.
    We have changed the values of the field VBEP-EDATU as per our logic but we still have 2 lines in the schedule line data where the requested date is greater than the confirmed date.
    This can be tackled if we can redo the Availability Check.
    Can someone provide pointers on how can we trigger the availability check manually in the code.
    Regards,
    Karthik

    What was the solution?

  • VL01N does not to pick Sales order schedule line quantities

    Hi,
    I need to get Sales order schedule line quantities into VL01N when creating a Delivery document. Currently irrespective of the schedule line size quantity the existing stock quantity is picked into VL01N.
    Is there anyway to get this done? doe it require a user exit modification or cna this be done via IMG.
    Thanks & Rgds,
    Pradeep
    Edited by: PRADEEP GUNAWARDANA on Aug 1, 2009 5:06 PM

    Hi DB49,
    Thanks for responding.
    Let me clarify, the schedule line item i meant was, in my case this is an AFS scenario were we maintain size wise quantities.
    My issue being for example;
    Sales order line item 10 - Qty 1000 (sizes S - 250, M - 500, L - 250)
    Stock created in excess of this requirement, so size S - 1000, M - 1000, L - 1000 in stock
    In VL01N, when creating the DN for line item 10, it picks the Quantities in stock (which is 1000 each) ... instead of limiting it to the Sales order quantities of sizes S - 250, M - 500, L - 250.
    Hope this is clear ... please advice.
    Thanks,
    Pradeep

  • Urgent- Help abt  User Exit MV45AFZZ

    very good morning to all the SAP Masters out there....
    I had already posted a thread regarding the same but didnt get helpful answers...
    Hope I will get some this time...
    It is Interesting actually...
    I need ur help for solving an issue...
    when Sales Order is Being created...the Purchase Requisition and Requisition item is generated in the Schedule Line of Sales order's Line Items
    If I am not worng we are able to make changes in MV45AFZZ program for SalesOrder..
    So My requirement is..
    When Sales order is being created the value of KDMAT field of VBAP table should also be saved in EBAN-BEDNR...the length for BEDNR is 10 so it'll b taken care to limit VBAP-KDMAT with in 10 Chars...
    help me to Carry XVBAP-KDMAT into EBAN-BEDNR for VA01 Transaction....
    Points Rewrded for Helpful answers

    Hi,
    Why don't you try the exit
    V45E0001
    where the description says "Update Purchase Order from Sales Order"
    Please find below the documentation for the exit
    Update Purchase Order from Sales Order
    With this customer exit the standard system behavior regarding updating order data from the sales order can be expanded or restricted.
    The module is called up when the sales order is changed, as long as the conditions for changing the order have been filled. It transfers the document number, the purchase requisition number and a table for the fields to be changed in the order (T_PURCHASE_DATA). This can be expanded or restricted in the existing Customizing.
    The rule is: To change a field with the name FIELDNAME, a subprogram (form routine) with the name POSITION_CHANGE_FIELDNAME must exist in the program SAPMM06E.
    OR..in MV45AFZZ in userexit_save_document we need to write the code to manually update the table EBAN field by using abap code like modify table or seeking a BAPI..consider this as the last resort pls.....
    Reward if it helps
    Regards
    Byju

  • User exit MV45AFZZ - Unable to modify the code

    Hi,
    I am working in ECC 6.0 version and new to this editor.
    I need to do some changes in include MV45AFZZ,when sales order is saved.
    When i try to go to change mode,program is asking for 'Access key'.
    Whether i need to get 'Access key' from SAP,or is there any procedure for doing code changes in this exit?
    Please help.
    Thanks & Regards,
    Seshagiri.

    Hi Seshagiri,
    To modify the User exit MV45AFZZ you need to get the Access Key from the Basis.
    The Basis Team will Generate the Access Key so that you can make the changes .User exit MV45AFZZ is not yet Used so that why its asking the Access key.
    Thanks & Regards,
    Nelson
    Reward points if helpfull

  • User Exit Mv45afZZ for Promotional BOM

    Hi All,
    I am adding custom code to the user exit MV45AFZZ for Promotional BOM. The aim is to add a new entry in the Line tiems details with the BOM header data.
    Say if the initial order is  like this:                                       It should like this after user exit execution:
    Material         Quantity            Itm Ctg                                          Material         Quantity            Itm Ctg
      M1                   10                  X                                                   M3                   1                    Z
      M1                   10                  X                                                   M1                   10                  X
                                                                                    M2                   10                  X
    We assume that in the configuration, we have configured so, such that, BOM Item M3 comprises of Items (M2, M1) with 10 Qty each.
    For this purpose, we are adding a new row to the XVBAP table at runtime. But, when we post the order, finally the quantity field for item M3 is automatically getting changed to 10.
    Please help and revert back. Let me know if i have to clarify more on my doubt.
    Thanks
    Debabrata

    Hi,
    The userexit save_document_prepare will directly hit the tables like vbak and vbap. So, as i can see that you would like to change at the pricing conditions so it is better to user the user exit:userexit_pricing_prepare_tkomk...
    All the pricing conditions will be stored in the tkomp and tkomk tables.
    The changes can be happnd at this level also.
    Thanks
    rohith

  • Creating Outbound deliveries based on the sales order schedule lines

    Dear all.
    Is it possible to create outbound delivery documents based on the sales order schedule lines?
    Eg:
    Let's say I have sales order line item 10 with below mentioned requested delivery dates in its schedule line level.
    30.07.2009
    10.08.2009
    20.08.2009
    30.08.2009
    Will it possible for me to create different deliveries for those 4 schedule lines individually? I should be able to create 10.08.2009 delivery without clubbing 30.07.2009 delivery with it.
    Appreciate your help!

    I'm not sure because I'm not before SAP but try transaction VL10E that is to create delivery for schedule lines. I'm not sure what are the split criterias.
    Please check OSS note 113411 tha has many OSS note reference in this subject.
    Regards,
    Csaba
    Edited by: Csaba Szommer on Jul 29, 2009 2:38 PM

  • Sales Order Schedule Lines getting updated

    Hi,
    In my system when I am changing the delivery date of  'AB' confirmation in the Purchase order Item level confirmations, the corresponding  Sales Order' schedule line is also getting updated with the delivery date.
    So, my question is is this a standard SAP functionality or this fuctionality has been implemented through BADI, Exits etc.
    Regards,
    Rachit

    Rachit,
    This is standard SAP behavior. In 3rd party sale process, the changes done to PO (qty, dates) are updated automatically in the sales order.
    TW

  • How to control not to confirm quantity in sales order schedule line

    Hi,
    We have a problem with confirmed quantity in sales order schedule line.
    When I reject a position in a sales order, confirmed quantity still remains with quantity ( diferent to 0).
    I need in some cases that system not to confirm quantity in schedule line at item level.
    I've tried to do this with a new routine in OVB8 transaction, but it didn't work.
    Could you help me? How can I avoid the system to confirm quantity in a sales order item?
    Thanks in advance....

    Hi Lakshmipathi,
    I'm sorry. The rejection was a bad example.
    I need, in some cases, that the system doesn't confirm quantity in sales orden item. We have a custom field in sales order item and we need to confirm with 0 quantity , when that field has a specific value.
    Due to that field is a custom field, I need an exit, or rutine, or .. i don't know...to inform a standard field too ( delivery block, rejection...) something to get confirmed quantity to 0.
    I've tried with rutine in OVB8. But It didn`t work
    I've tried with delivery block, but with this all items in sales order, confirms with 0. I need at item level.
    Thanks

  • Plant restriction at sales order level by user

    Dear SD experts,
    Is it possible to restrict plant at sales order creation by user, if so, how this is to be configured.
    my requirement is user shall not able to create sales order(sales document) for plants restricted.
    pl help
    thanx in advance
    regards
    Srihari

    Dear Sir,
    Wud like to explain what circumstances i am asking this restriction;
    1. have total three plants - 1001, 1002,1003 & these plants are to three sales offices ie., SO1, SO2, SO3, respectively
    2. material extended to above plants with purchase & sales views
    3. I have three users user1, user2, user3 : these are are belong to three Sales Offices ie., SO1, SO2, S03 respectively,
    4. I have three sales document types say sd1, sd2, sd3
    Current settings are user1 can raise sales order for any plant ie., 1001, 1002, 1003, system is not stopping, as user1 is belong to Plant 1001 & Sales Office - SO1 only,
    my requirement is system shud not allow if user1 is trying to raise sales order for other than Sales Office & Plant.
    Hope u r clear about what circumstances I am asking this requirement.
    Experts can help us without User Exit & SHDO, is there any solution for restriction plant.
    Thanx in advance
    Regards
    Srihari

  • Locking Sales order and line item from reading

    Hi,
    I am writing an interface program to create an offer list inspection report. If two users are running the program at the same time, and if the first user read and processing a sales order line item, it should not read the same sales order line item twice for the second user.
    Please let me know if anybody has used locking sales order at line item level (VBAP).
    The enqueue function for VBAP is not working.
    Any suggestions will be helpful.
    Regards
    Ravikanth

    hi Ravi ,
    u Can lock the Sales Order for processing ,  u cannt restrict users @ tables level.
    u hhave to enqueue the VBELN
    Regards
    Prabhu

  • Sales order with line items having multiple values in multiple currency

    Please suggest solution for creating sales order having line items with multiple values in multiple currencies.
    e.g. Line Item A Qty/1 No,  value 100INR100$100EUR. Customer wants all three values to display at sales order line item level and create billing in 3 currencies.

    Hi,
    As far as my understanding it may be possible round the solution,
    For 1 company code we can able to maintain 3 currancies,
    1 currancy is hard currance & other two are dual currancies.
    Create sales order with 3 line items having 3 diffrant currancies
    Spilt invoice on the basis of currancy
    Last pass to this invoices to accounting.
    Whole process is
    Sales order >>> Delivery >>> Invoice 1, Invoice 2, Invoice 3(Split invoice on basis of Currancy).
    Consult with FI Team they will tell you about dual currancy & hard currancy
    Kapil

  • Interesting and an  imporatant issue at sales order schedule line.

    hi all,
    interesting and an  imporatant issue at sales order schedule line.
    i created a sales order with 10 qty.and the system proposed a two schedule lines.
    let's say to order created date is 27.11.2008.and the requested delivery date is 27.11.2008.
    but the stock is not available today then the system proposed two more schedule lines apart from the 27.11.2008.so now there are three schedule lines like below.
    schedule line date                      Material availabilyt date   delivery date                   
    27.10.2008 with zero quantity.     
    28.10.2008 with 5 qty.                28.10.2008                     29.10.2008
    02.10.2008 with 5 qty.                02.10.2008                     03.10.2008
    now the delivery and pgi already for the schedule line 28.10.2008.
    then when i run the availability check on 01.11.2008 system is over writing the material vailability date as today at the scheduleline number two.
    now i can able to view only two schedule lines only.
    schedule line date                      Material availabilyt date   delivery date                   
    28.10.2008 with 5 qty.                01.11.2008                     29.10.2008
    02.10.2008 with 5 qty.                01.11.2008                     02.11.2008
    now my concern when we reschedule the avalability check it should notchange the Material availability date of the schedule line which i already delivered.
    Regards,
    sheshukumar

    can any one repsond for this.....

Maybe you are looking for

  • Xorg need help - I fried my monitor

    :(:( I just fried my 3 year-old babe s monitor, might have been because of the &^%#@*#$ xorg.conf with auto generated xorg.conf by hwd -xa, i managed to have dwm for a while, and there came D-Day, i left the laptop on for a 3 hours working on other s

  • Is there a good book or tutorial about building a website in AS3?

    I haven't seen any.

  • ITunes + Crashed Computer = No More Songs

    Hi, I downloaded over 200 songs to one computer, which is now crashed. We got a new one, but when I signed into iTunes, none of my songs were there! I went to our local AT&T Store (My iPod is an iPhone) and they told me about something called an iTun

  • Error oracle.apps.xdo.security.ValidateException

    Hi, When trying to login in the BI Publisher, I am getting the following error: oracle.apps.xdo.security.ValidateException The username and password are correct and the xmlpserver is running. I am using the OC4J application server. Any ideas please?

  • Server Certificate on Weblogic 8.1

    Hi. I know it is really dumb to ask these questions but I urgently need to know these as I am on a very tight project schedule. So can someone please enlighten me. 1. If I use SSL protocol and configure to use server certificate, may I know when some