Sales Order userexit

Hi folks
I try to replace default value of VBAK-KKBER with another value during sales order creation in VA01. I could find structures like VBAK, XVBAK, YVBAK, SVBAK, etc in MV45AFZZ. I assigned new value for KKBER field in these structures and tested. I tested userexit_save_document, userexit_move_field_to_vbak and another userexit EXIT_SAPFV45K_001. But could not replace VBAK-KKBER value, after sales order creation VBAK table shows old default value.
Anyone can give me an idea to solve my issue.
All helpful answers will be awarded.
Thanks
HBK

Bala,
Set a breakpoint at the place where you change the KKBER value.  When you reach that breakpoint, step thru it.  Then immediately after you set the value to your liking, create a watchpoint in the debugger on VBAK-KKBER.  This will expose the code that is changing VBAK-KKBER from your value to another value.
Investigate why that is happening and address it then.
I might also suggest changing the value in UserExit Userexit_save_document_prepare INSTEAD of userexit_save_document.

Similar Messages

  • How to get xveda values in sales Order userexit MV45AFZZ

    Hi guys,
    Tables XVEDA and YVEDA has no entries in sales order userexit. Do you know how to get contract end dates of line items in sales order user exit

    Used function module SD_VEDA_SELECT to solve the issue

  • How to Carry out New Pricing in Sales Order userexit

    Hello,
    In userexit save_document_prepare of program MV45AFZZ, I'm adding an entry in XKOMV for a header pricing condition ZD01.  After saving, if I go back into the order and go directly into the line item conditions, the ZD01 does not exists at the item level.  If I navigate the the header conditions and then go back to the items, ZD01 appears as it should.  I believe what is happening is that the header condition is not being distributed to the line items unless New Pricing is carried out.  If I manually enter the ZD01 condiiton instead of relying on the userexit code, everything works fine.  The header condition is properly distributed to the line items.  Therefore, I believe the configuration is correct.  My question is, "How can I programatically trigger New Pricing from a sales order userexit".  Is this possible in SAVE_DOCUMENT_PREPARE or do I need to do it somewhere else.".
    Thank you,

    this problem has been resolved.  The problem was that I was appending the header condition to XKOMV instead of inserting the header condition as the first line in the table.  SAP will carry out the new pricing if the header condition is on the first line.

  • Sales order Userexit to copy item text from one line item to other

    Hi Gurus,
                 I have an urgent issue. Based on item category in sales order, for one line item, I am getting item text. Now I have to copy same item text to other line item.
    Till now I tried save_document_prep & save_document to
    build object tdname & fetch all tdid from table stxh for object 'VBBP'.
    After that READ_TEXT and SAVE_TEXT function module.
    But during creation of sales order I am not able to get any value in STXH table for created sales order. Now I want to know from which internal table I can get item text ?  (some internal table should be there like xvbap to get text per line item)
    Or is there any other way to do this... Please help.
    Points will be rewarded.
    Thanks,

    Hi ,
    try something like this .
            l_name = ls_vbap-vbeln.
            IF l_name IS INITIAL.
              l_name = 'XXXXXXXXXX'.
            ENDIF.
            CONCATENATE l_name ls_vbap-posnr INTO l_name.
            CALL FUNCTION 'READ_TEXT'
                name            = l_name
    Regards
    Prabhu

  • Duplicate Sales Order - UserExit or BADI

    Hi,
    I have a requirement for one of my workflow.
    When duplicate sales order is received through EDI , I need to notify to Customer service team.
    If purchase order and ship-to is same and PO date is within 30 days, need to notify that it is a duplicate sales order. Do we have any user-exits or BADI'S for this requirement?
    Thanks
    Ashu
    Edited by: Ashu on Jul 8, 2009 9:10 PM

    Hi Ashu,
    Customer function module EXIT_SAPLVEDA_001 (with include ZXVEDU03). This is called for every segment.
    Customer function module EXIT_SAPLVEDA_011 (with include ZXVEDU13). This is called after segments are filled. I suppose this is the correct one. Make your validation and fill the error table DERRTAB with the message.
    Customer function module EXIT_SAPLVEDA_010 (with include ZXVEDU12). This is used to change the idoc status, as well you can trigger the workflow.
    Customer function module EXIT_SAPLVEDA_005 (with include ZXVEDU07). You can check this.
    All my suggestions are based after checking the code. Please debug before you use them.
    Please update the thread with your approach.
    Thank you,
    Goutham.

  • Sales order should get block if XYZ payment terms is used

    Dear Expert,
    The requirement is like,
    If user add payment term XYZ  manually in salse order then that sales order should get block for review purpose.
    Note:
    if user add that payment term in sales order client want that order should block no matter what reason ,  here client not concern about credit limit and any outstanding from customer side ,
    Thanks in advance
    hanumant

    Hi,
    You need to block orders with payment terms XYZ, or only when user changes from ABC to XYZ??
    If first one is your requirment, you can do with userexit - USEREXIT_SAVE_DOCUMENT, and you need to create status profile for sales document type and assign to order type, in status profile put status AUTO - automatically approved, LOCK - when XYZ is payments terms it wil not and not create delivery & REJC- Rejected, when approver dont want to approve he can reject.
    In sales order userexit you need write logic when paytemnt terms is XYZ then put status as LOCK.
    New repor need to create to approve LOCKed orders so that user execute and approves or rejects.
    If only user change to XYZ, then you need to write logic in prepare userexit, but it will be tricy, need to store values in tempapory memory, ceck with abaper,

  • Sales Order Costing. Error values, need BAPI or Userexit or Enhancements

    Hi Experts,
    I have a situation to solve the Errors in Sales Order Costing.
    My Error is,  its not splitting values equally,,, (BOM Item Price Values)
    for example...
    let i have a parent Item A.
    and Child Items as A1, A2, A3.
    Now the Qty of A is 100. for each item the price value is 50. so the total value is 5000/-
    Now If i need one A, then I need 8 A1's, 4 A2's, 3 A3's.and let think A1 value and A2 value and A3 value (single Unit ) are equal. and let the value be 100.
    but in BOM i can see all the values of A1, A2, A3 as same. (500, 500, 500) but it should be (800, 400, 300)
    The single Unit Price is not multiplying with Quantity, but its equally splitting.
    Please tell me Can I find and BAPI or Userexit or any enhancements or any Configurations to do.
    Thanks & Regards
    Dileep .C

    no replies and my thread was dead.

  • Userexit/Function after sales order save

    Hi,
    I want to get sales order and line item number, which I want to pass to function module immediately while sales order creation.
    To get sales order and line item number after sales order save in VA01 is there any userexit or function?
    I tried with userexit_save_document and userexit_save_document_prepare, but it did not solved my purpose.
    Please reply.
    Thanks

    Hi ,
    Could you please let me know what you have written inside your FM which called in update task.
    I have same kind of requirement where i need to update soem custom fields of vbak tables. Here is the details given below .
    CALL FUNCTION '/LGC/SDFGWW_VBAK_UPDATE' in update task
      EXPORTING
        i_vbak          = vbak
        i_sdtv45a       = sdtv45a (Local structure which value i want to update in vbak)
        i_vbeln         = vbak-vbeln.
    Code inside the FM .
      i_vbak-/lgc/banknum  = I_SDTV45A-zcheqbsbno.
      i_vbak-/lgc/bankaccnum = I_SDTV45A-bankn.
      i_vbak-/lgc/cheqnum = I_SDTV45A-zcheqno.
      i_vbak-/lgc/cheqname = I_SDTV45A-zcheqna.
    Please have a look into it and let me know where i am doing wrong.
    Thanks,
    Satya
    Message was edited by: satya pujahari

  • Sales order Payment term modify Userexit

    Hi Experts,
                    I am working on sales order VBKD modify userexit, in this based on customer, customer group & one maintained z field from MARA they created Ztable to pick Payment term.
    For line item which doesn't have payment term (KONP-ZTERM) at condition record (XKOMV), I have to pick from Ztable & update header payment term (line item 000000).
    This was working fine but problem arise for couple of material, inside userexit when line item is coming XKOMV is not filled inside userexit. when this should possible?
    Points will be rewarded.
    Thanks,

    When the payment term is changed in the Sales Order level it DOES NOT change the BP's default payment terms.
    Ans 2: only for the present Order
    Ans 4: The payment term setting at the order level is only for exception where someone authorized can change it at the order level.  If you prefer not to let the user change the payment term at the Sales Order level then you can manage this through Authorizations
    Nothing at the document level will change the MASTER.  Only changes made at the Master level are permanent from that point on.

  • Userexit/Badi for vendor or enduser addition/change in sales order creation

    Hello Gurus,
    I need a userexit/badi that gets triggered on the addition/change of partners in sales orders
    I need to make some validations when the user adds/changes the vendor or
    enduser in the sales order creation.
    I tried many exits that I could find from forum but they were not able to asist.
    Any help would be much appreciated.
    Thanks in Advance,
    Sumit.

    Well, if all else fails, USEREXIT_MOVE_FIELD_TO_VBAK will definitely be called when you change partners... but of course it will be called much more often than at only partner changes. Still, internal table XVBPA shows the current partners, so you could compare its content with the earlier state of the table to recognize a partner change you're interested in.
    Strangely, the usual Y-table (YVBPA) is not populated, not sure why, otherwise the comparison would be even easier.

  • Userexit to update sales order no for packaging material during PGI

    Hi,
    Scenario is like this:-
    1.Sales order will be created for material X
    2.Delivery will take place and packaging of material X will take place.
    3.The packaging material will come as a line item and we do PGI by picking the quantity.
    4.Now when we see the accounting document for PGI,we get the sales order reference for X.
    5.We are not getting the reference of Sales order no for packing material while seeing the accounting document in  PGI.
    6.Since the packing material is not maintained in Sales order thats why the sales order no is not getting updated in the accounting document.
    7.NOW I WANT TO UPDATE THE SALES ORDER FIELD FOR PACKING MATERIAL ALSO ONCE THE PGI IS TAKING PLACE.
    Can any one suggest me if there is any userexit to update the sales order field for accounting document of packing material once PGI happens.
    regards
    Somnath

    Hi,
    Since packging material is not sales order item so it can't be accounted in PGI packging material is aour internal stock and not sellable stock.
    Reward points if helps.
    Thanks & Regards
    Sasikanth.Ch

  • Userexit to limit over delivery tolerance in Sales order

    Hi,
    I want to limit delivery  over tolerance to particular range while creating sales order or change in sales order. so anyone can tell me in which userexit i can do this.
    Awaiting for earlier response.
    Thanks in advance.
    Regards,
    Piyush Gajera

    hi
    Here is the list of user exit related to VL01N :
    V02V0001   - Sales area determination for stock transport order 
    V02V0002   - User exit for storage location determination 
    V02V0003   - User exit for gate + matl staging area determination 
    V02V0004   - User Exit for Staging Area Determination (Item) 
    V50PSTAT  - Delivery: Item Status Calculation 
    V50Q0001   - Delivery Monitor: User Exits for Filling Display Fields
    V50R0001    -  Collective processing for delivery creation 
    V50R0002    - Collective processing for delivery creation 
    V50R0004    - Calculation of Stock for POs for Shipping Due Date List
    V50S0001    - User Exits for Delivery Processing 
    V53C0001    - Rough workload calculation in time per item 
    V53C0002    - W&S: RWE enhancement - shipping material type/time slot
    V53W0001   - User exits for creating picking waves 
    VMDE0001  - Shipping Interface: Error Handling - Inbound IDoc 
    VMDE0002  - Shipping Interface: Message PICKSD (Picking, Outbound) 
    VMDE0003  - Shipping Interface: Message SDPICK (Picking, Inbound) 
    VMDE0004  - Shipping Interface: Message SDPACK (Packing, Inbound)

  • Populating Contract Dates in Sales Orders using userexit

    Hi All,
    We want to use a userexit to populate the conract start date and end date based on some rules during sales order processing. Contact data displayed in VA01/VA02 is stored in VEDA table. Is it possible to use MV45AZZ user exit for this purpose?
    Thank You.
    Regards,
    Amit
    Edited by: Amit Kokane on Feb 13, 2009 4:31 PM

    Hi Jelena,
    Thanks for the response. We are not using the contracts at all. We are creating the sales order without any refrence. We want to use the revenue recognition for ceratin service items on sales orders for which we need contract start date and end date to be defaulted based on some rules. We had tried populating the VEDA, XVEDA tables in save prepare routine of MV45AFZZ for same but we observed that when system calls SD_VEDA_UPDATE FM during the saving, all the data in internal tables get refreshed and systen reads the data from screen.
    Can you please explain the use of ASSIGN with '(SAPLV45W)VEDA' to update the data in VEDA table in USEREXIT_MOVE_FIELD_TO_VBAP?
    Thanks again.
    Regards,
    Amit

  • Userexit to prevent negative stock in Sales order

    Hi
    Is there any userexit avilable to prevent negative stock in sales order.
    When i an creating a sales order, the schedule lines are getting confirmed without posting any stock. In availablity check when click on ATP quantity it shows negative stock.
    Despite having negative stock it is alllowing me to create sales order and create delivery but no PGI. It gets block at PGI. Now i want to know is there any Userexit through which i can prevent negative stock in sales order. Thats ig stock in negative , it should not allow to save the sales order.
    Any help will be really useful.
    Regards
    Jalaj Nakra

    Exit MV45AFZZ will be useful.

  • Outbound Cif userexit for Sales order

    Hi All,
    Is there any outbound cif userexit for sales order. I need to modify few data in outbound userexit in R/3 side.
    I know there is a Inbound userexit in APO but the requirement is such that I need to modify data in R/3 since data is available only in R/3.
    Regards,
    Prashant.

    Hi Prashant,
    yes, there is such an EXIT - it's 'EXIT_SAPLCSLS_002' which is called from function 'CIF_SL_DOC_SEND'. This is the very last place to modify data before sales documents are sent to APO.
    Hope this helps!
    Best regards,
    Sebastian Göbel

Maybe you are looking for

  • What's new in Process Control 2.5?

    Hi, I'm looking for information about what is new in Process Control 2.5(compare to the 2.0 version) Thank you in advance for your help, Regards, Julien

  • Problem with the file /proc/sys/kernel/hotplug which is incorrect

    Hello, Since few days, I can't import photos from my camera with my user (that work in root), I open a thread in this forum (http://bbs.archlinux.org/viewtopic.php?pid=348659). After investigations, the problem come from the content of the file /proc

  • Brush resize with [ ] deletes layer

    Hello, ALL!     I have Photoshop CS4 x64 Extended installed on Windows XP x64 and there is a problem with resizing brushes with brackets []. Pressing these buttons leads to active layer deletion. Undo restores layer and resizing work ok for a while,

  • My mouse pointer disappears when at rest--only in firefox. (Logitech M305)

    Only since upgrading to 3.6.15, the pointer disappears at rest. When I move the mouse, it reappears, with a one-second delay, so that I am only sure where the pointer is when I am moving it! I'm using Windows Vista Home Premium

  • Headings in the output data

    i am using dynamic field catalog in one if the report. in the selection screen i have MONTH/YEAR AS SELECT OPTION.IF I ENTER 200801 FROM THERE TO TILL SYDATUM DATA WILL DISPLAY SO I CANNT DECIDE how many month/year columns will come depends on select