User exit - VA01 - Adding new line items while Sales Order Creation

Hi All ,
I have a requirement where : in VA01 , i have to add new line items using USER EXIT or BADI.
The scenario is : we maintain Characteristics for Material. When we select a particular characteristics, Factor and length will be displayed in a Popup. we can specify the Factor and lenght.
Here , if i specify Factor as 10 and lenght as 1000. the Material has to be cut / split into 10 items of 1000 mts each. and the ITEMs table control should get 10 ITEMS .
How to add new items using User exit or Badi in VA01 while creating a sales order.
i have identified the user exit . What code should be used to add new line items.
kindly help me in solvng this.
Waiting for your replies.
Thanks in advance.
Suki.

hi
wich user exit do you take for that ???

Similar Messages

  • Adding new line item while save

    Hi all,
    use an implementation of BADI  ME_PROCESS_REQ_CUST in the MM-Purchase-Requisition, method IF_EX_ME_PROCESS_REQ_CUST~POST while save.
    based on the line items available(USER ENTERED) i have to add few more line items based on the account assignment category and quantity while save.
    How to create new line items (copying the existing line item and change the quantity ) and save the requestion with the additional line items. I used this code. while calling the method CRETE_ITEM  create based on the object REF_ITEM  in the MY_STATE.
    the REF_ITEM object is Initial . so while creation the empty object is created.
    kindly help to give tips/details  to handle.
    Coding:
    data: l_item_list TYPE MMPUR_REQUISITION_ITEMS,
    l_item TYPE MMPUR_REQUISITION_ITEM,
    l_item_akt TYPE mereq_item,
    l_item_ref TYPE ref to IF_PURCHASE_REQUISITION_ITEM.
    l_item_list = im_header->get_items().
    loop at l_item_list into l_item.
    l_item_akt = l_item-item->get_data( ).
    IF l_item_akt-MENGE > 1 AND
           l_item_akt -KNTTP = 'A'.
          DO l_item_akt -MENGE TIMES.
             l_item-item= IM_HEADER->CREATE_ITEM( IM_ITEM =  l_item-item).
            INSERT  l_item INTO TABLE IT_ITEMS_list.
    %%%%%  here i checked useing    get data  method  i am not getting any data other than relesing procedure data.
    I used SET_DATA method to set the data. even I am not getting data.
    endloop.
    (Debugging the code, I manage by doubleclicking while create Item  method the fieldcontent of l_item (e.g ) to show the content of the class-attribute my_state. This works only if the field “Interface” in the Debugger is empty because then I see the attributes of the class. If the field Interface is filled with “IF_PURCHASE_REQUISITION_ITEM”, there aren’t any attributes shown.)
    Thanks in advance for your kind help!!
    Nicole

    I searched sdn and found this not possible.

  • User Exit / BADI Update new line item in BSEG in MIGO/MB1B Transaction

    Hi All,
    I Require a BADI or user exit in MIGO transaction from which i can add or change the BSEG line item before Posting the FI document.
    Regards,
    Madhukar Shetty

    Hi Asik,
    Thanks for the the reply, but can tell any other badi or exit from where i can add/append a new line item in the accounting document getting posted from MIGO or MB1B.
    Regards,
    Madhukar Shetty

  • Inserting new line item in Sales order

    Hi,
    We are doing a feasibility check to find out whether a new line item can be successfully inserted into a sales order based on certain pricing conditions that is received through an ORDERS05 inbound idoc.
    I tried adding a new segment E1EDP01 to the existing idoc in the user exit EXIT_SAPLVEDA_011 assuming that the VA01 posting program would accept the new line item but that approach is not working.
    Looking at various posts in the forum, I gather that the best way is to use the function 'BAPI_SALESORDER_CHANGE'. Can anyone please let me know how exactly a new item can be inserted using this function module?
    Any help would be appreciated.
    Thanks

    Hi Sneha,
    Please use the FM 'BAPI_SALESORDER_CHANGE' to add a new line item as under:
    CALL 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument               = "Pass the Sales order no here"
          order_header_inx            =  "Pass the value of update flag as I as u need to "
                                                   "insert a new line item"
        TABLES
          return                             =  "Will contain the error/success messages"
                                                   "after the processing"
          ORDER_ITEM_IN            =  "Here pass the item info tht needs to be added"
    Also do a Commit Work after this FM call to reflect the changes in database.
    Regards,
    Chetan.
    PS: Reward points if this is helpful.
    Message was edited by:
            Chetan H. Dubey

  • Create a new line item in sales order

    Hi,
    I have to create a new line item in a sales order. The scenario is that if we donot find the desired quantity from a plant. Then we have to go ahead and pick the remaining quantity from another plant and automatically create a new line item.The new plant is picked from a custom table so u need not worry about it.
    According to me I will have to use the BAPI for it but one constraint is that while creating a sales order the order number assignment is not done until saved. So what can be done in the case if its a new document.
    Kindly let me know if there is any appropriate user exit or if someone has worked on a similar requirement.
    thanks
    Varun

    Hi,
    Thanks for your response. I have tried to use these exits already but the problem dat comes here is dat when we try to use the BAPI we donot have any sales document created in the first instance(i.e. while creating an order) so the BAPI returns error and when i tried to populate the itabs in the program directly the new values just wont get processed.
    I think like: in case its a new document and we face this scenario I can just terminate the document creation and create a new document using the BAPI with proper plant assignments.But i am doubtful about the stability of this process.
    Kindly comment.
    Thanks
    Varun

  • What user exit can add / delete lines on a sales order?

    Hi experts -
    We are going to be using a 3rd party to give us pricing, so we need to make a call for each line item to get prices.  This may give us free goods, so we will need to add / remove lines from a sales order.
    Any ideas what exit will allow us to do this?
    Thanks,
    Mark

    Hi,
    Try BAPI:
    BAPI_SALESORDER_CHANGE
    Regards,
    Gilberto Li

  • *insert new line item in sales order*

    Hi guys,
    I have requirment where, user would enter a material and system determines if free material is to be added to it. thats standard based on configuration.
    the user is maintaing ztable for additional free product for the material. now, i want to insert the third additional item along with other items. this has to be added before saving and it has to show on screen before user saves it.
    Thanks,
    Abhi.

    See, if u debug and enter the exit, then it shows 2 line item  in xvbap[] i.e. sale material and free material.
    now i want to add third add. free item. if insert in internal table xvbap[], it doesn't show on screen
    i want the solution for that.
    can anybody help me with that.

  • How to make the line items of sales order cannot be deleted.

    Hi All,
    Is there any Enhancement spots or user-exits which make the line items of sales order cannot be deleted if item category is 'TAN'.
    Thanks in Advance,
    Sudhakar Reddy .A

    Hi All,
    If you doesn't want to delete sales order line items then we have write in the Include Program which has mentioned below and in the form .....endform.
    Program Name :  Include MV45AFZB
    _Example:_
    form userexit_check_xvbap_for_delet using us_error
                                              us_exit.
    IF .......
      US_EXIT = CHARX.
    ENDIF.
    endform.

  • Is it possible to limit line items in sales order????

    is it possible that i can limit the ender user adding more line items in sales order???

    hi
    there is such standard restriction setting, but instead can use USEREXIT_SAVE_DOCUMENT_PREPARE (user exit)
    Reward if Useful
    Thanx & regards.
    Naren..

  • To add line items to sales order using User exit.

    Hi ,
    I have to add line items to sales order .
    I have tried adding the code in usr exit move field _VBAP // Check VBAP and in savedocument _prepare . But in all the places I dont see it in VA01 . I can see it in the VA02 and VA03 . But I am not able to save the order as they have made the flooring term as mandatory field, and I am supposed to populate the XVBKD structure for this.
    Pls tell me whts the procedure like say , should I popluate the XVBKD / XVBAP / and should i use the bapi_SALES_ITEM_CHECK to populate the structures at the save_document prepare.

    Hi,
    1. It is not possible to delete records using DTW, only importing new records or updating existing ones are supported. These are the only valid operations via DTW.
    2. It is possible to delete the contents of an edit text field by using the character / or -1. However it is not possible to clear an entire row/line using this notation.
    Thanks & Regards,
    Nagarajan

  • Is there a user exit to modify PO line item level..

    Dear Friends,
    Is there a user exit to modify PO line item level..
    Ravi

    Hi...I'm not sure on any available customer exits for this purpose. However you can use the check function exit 'EXIT_SAPMM06E_012' of customer exit MM06E005 and using memory pointers you can change the item level data.
    The other option is to use BADI ME_PROCESS_PO_CUST's method PROCESS_ITEM to change the item level value. I would prefer the BADI rather than the customer exit.. Hope it works..
    Thanks,
    Jude

  • Add Line Item In Sales Order VA01

    HI All,
    I  have new requirement in creation of sales order . Here we have free promotion sales . Here if customer buy one material then he will get some other material as free .In standard sap we can give only one line item as free not more than that .
    Here our requirement is more than one line item . I suggested them maintain all the free materials in one Ztable when ever the original material  will come for  sales order then i have to fetch these materials from ztable  automatically and it should create sales order. I started doing this using user exit  FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    These are the below links i checked in our sdn.
    Adding Line items to sales order on creation using User-Exit in VA01.
    Please give me some idea on this .
    Regards,
    Madhu.

    Hi Asik,
    Thanks for your reply.In my case i can not got for Bom  because the schemes will change for every ten days. I think Bom  creation will fill a lot of data but it wont solve my issue.
    Regards,
    Madhu.

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • Need a user exit to add custom partner function in sales order @ item level

    Hi,
    Need a user exit to add custom partner function in sales order at item level. Goto --> Item --> Partner.
    Thanks,
    Thiyagi

    HI Leo
      To add a condition price for a condition type, this has to be assigned in the <b>pricing procedure</b>. For each condition type in a pricing procedure, we will have <b>access sequences</b>. If we follow this approch, the price is automatically extracted basing on the access sequences when condition records are maintained. For this, no coding is required and everything can be done by configuration by Functional consultant.
       Naren is right to point out on the same.
      If you need to change the price for a particular condition which already exists, you can go by <b>pricing routines</b>. Go through transaction <b>VOFM</b> for the same. 
       I advice you to discuss with your functional consultant and understand the requirement and then go for modifying accordingly.
    Kind Regards
    Eswar

  • Delete the line item in sales order in VA01/VA02 when the quantity is modif

    Hi SAP,
       I have requirement to delete a line item in sales order.Please suggest me to do the same.
      THe scenarios is , we are inserting a free good line item based on some condition and quantity, If the quantity is modified  the free good line item inserted needs to be deleted.
    Waiting for your responce
    Thanks,
        Billa
    Moderator message : Spec dumping is not allowed,search for available information. Thread locked.
    Edited by: Vinod Kumar on Nov 14, 2011 1:54 PM

    Hi,
    Can you also check the SALES LINE.
    Sales line is the combination of SALES ORGANISATION + DISTRIBTION CHANNEL +PLANT.
    Hope it was not maintained.
    Transaction code : OVX6
    PATH:  IMG->ENTERPRISE STRCTRE->ASSIGNMENT>SALES AND DISTRIBTION->ASSIGN SALES ORG- DISTRIBTION-PLANT.
    please revert if the error still exists.
    santosh

Maybe you are looking for