Line item creation in sales order

Hi
I am working on User Exit USER_EXIT_SAVE_DOCUMENT_PREPARE. On saving a sales order i need to do some validations and based on the validations i need to add a line item to the sales order in the user exit.
What are the ways that i can create the line items through the user exit

Hi,
It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
Regards,
RS

Similar Messages

  • Delivery doc creation for a selected line item of the Sales order

    Hi folks,
        Can any one help me in how to create a delivery order for a selected line item of the Sales order.My requirement is the request comes from the web browser where a sales document and details of the items are shown the user select one line item and request for delivery create of that particular SO doc.I have used couple of FM to create delivery but the delivery create is depend on the schedule line dates so iam unable to figure out where exactly i can distinguish between the line items.
    Example:
    SO:- 11193645
    Line item -1 has 2 schedule line 06/11
                                     06/13
    Line iteam-2 has 1 schedule line 06/12
    so if i try to create Delivery doc for date 06/12
    it creates partially for line 1 and line 2.
    but my requirement is i wanted to create SO for only line item 1 as i wanted to process Del Doc for only line item 1.
    If you have any idea please help me.

    hi ,
    You can develop a customised FM to process the Idoc data .
    1. Read the Idoc data into internal table for the line items which need to be delivered .
    2. Run BDC for transaction 'VL01N' ( delivery creation ) through which  eliminate the line items which are not in internal table and save the delivery document
    Note : Because in VL01N , you specify the sales document with respect to which you want to perform delivery hence automatically all items are copied to the delivery document .
    During BDC recording , select items by " MOVING TO TOP"
    and then deleting the selected item
    If you face problem in BDC recording , i can help u that too .

  • Unconfirmed line items of a sales order into account in credit management

    Hi Gurus
    Updated the customer orders via prog. RVKRED09.
    There is only one open order for this customer = 720662. My question is: in the credit master the sales value/credit exposure is USD 77.100,00. The order is for USD 105,900.00 .
    Found out that line item 20 is not confirmed in the schedule lines. So the value in the sales value/credit exposure  equals item 10 and 30. So my 1question is: Where is the setting that  does not take unconfirmed line items of a sales order into account in credit management?
    Thanks in advance
    Regards
    Nalini Iyer

    Hi nalini
    Even though , you create a sales order for that line item , but if that item is not confirmed then the value  wont be considered.  into credit exposure. .
    But once it gets confirmed then the value will be taken into credit exposure..
    Regards
    Srinath

  • Route schedule not updated in some line item of a sales order

    Hi Gurus,
    All order are processed through the EDI interface automatically. Order
    XXXXXXXXX for USA customer 40000XXXX is maintained in route reschedule
    setup T-code VL52 on specific departure day thursday.
    above are line item of same sales order, with same shipping point and route .
    Why only some salesorder lines missing the route schedule ?? 
    Please Help
    Regards
    Abhilash

    When you post a query here, you need to have patience until some members go through your post.  Please dont expect somebody should respond to you immediately as everybody has their own priorities.
    Coming to your query, it could be due to many reasons as per the following note:-
    Note 1750978 - Route Schedule does not populate on sales order
    Go through the Resolutions given in the above note and check with your system
    G. Lakshmipathi

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • Keep Quote line item numbers in Sales order

    While creating a Sales order from Quote, SAP always creates line items with 100,200,300...and so on.
    If quote has 3 line items say 100,110, & 120 and we create a sales order with reference to this quote in VA01. The sales order line items become 100,200 & 300.
    The requirement is for Sales order to also have same line item numbers i.e. 100,110 & 120.
    To retain quote line item numbers in Sales order the ABAP change will be in VOFM or user exit?

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • Sample Material in the 3rd Line item of the Sales Order

    Hi,
    We have configured the system in the sales order as follows.
    1. Commercial Material
    2. Bonus Material.(ie Free Material)
    Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly let me.
    Regards
    Ravi

    Hi there,
    Enter the material in the sales order & change the item catg manually in VA02.
    But free goods & sample materials are dealt differently..
    Freegoods is entered as TANN item catg along with nornam TAN item in standard order OR.
    But sample materials or free of charge items are processed through different order type FD for eg.
    Even thought the item catg proposed in FD is TANN,, the whole process will not have pricing as TANN items arenot relevant for pricing.
    Regards,
    Sivanand

  • How to combine the line items of 2 Sales orders into 1 delivry

    how to combine the line items of 2 Sales orders into 1 delivry
    and their process, pre-requisites and tcode

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • Can we limit the no of line items in a Sales Order

    Can we limit the no of line items in a Sales Order.

    Hi Atul,
    You can use user exit USEREXIT_MOVE_FIELD_TO_VBAP in MV45AFZZ
    Reward points pls.
    Regards,
    Govind.

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • Limitation of line items in a sales order

    Dear Guys,
    Kindly confirm me whether I can make a single sales order with 500 line items or not ? Again if it no then how many line items can be taken in single sales order.
    Thanks and regards,
    Atul

    dear atul
    I think the correct reply would be 999,999 because data type of item number POSNR is NUM 6, which means that it can hold upto value 999,999.
    However, at the same time keep the following into consideration:
    1. FI document has a restriction of 999 line items per document. So, depending on the account settings, there will be a lower limit. E.g. if each Sales order line item results in 2 line items in the accounting document, then the max. no. of SO line items is limited to 499.
    2. If FI summarization is active, then the system summarizes the account postings, thus reducing the no. of FI line items. Hence, a SO can accomodate more than 999 line items. However, this means that certain line item level details will not be available to the Finance guys (which they may not like).
    3. As the number of line items in a Sales order increases, the system performance suffers greatly. There are performance fixes available, but in general, it is painful to load a SO with large no. of line times through BDC's. 10 Sales orders with 100 lines each consume less system resources than 1 Sales order with 1000 lines.
    rewards if it helps
    siva

  • Add new line item to free sales order

    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 .Please tell me if it is possible with configuration.
    Regards,
    Madhu.

    Hi,
    We also had a requirement where we needed to give some items free of charge in a standard sales order.We end up using the tann item categories for the item which are suppose to go free. Please note user will need to manually change the item category of the line items intended as free of charge.
    thanks

  • How to avoide entry of same material in  line item in same sales order?

    Dear SD Experts,
      In my project client has requirement related to Material in sales order. Client wants " while creating sales order (VA01) that time particular Material  should use one time in the sales order". If  same material used more than one time in item line in the existing sales order  that time system must  give the Error  Massage.
    Kindly suggest me how can I fulfill above requirement. 
    Regards,
    Manzoor Ahmad

    Hi Manzoor Ahmad,
    This is an interesting requirement  and this cannot be achieved through Standard SAP functionality. We can achive this through custom development in Userexit MV45AFZZ with the help of Developer . The logic has to be while creating sales order , you have created line no 10 with "matl no 1234 " and again trying to use the same material  in line no 30 , then the system has to check all the line items that are created before the line no 30 . This same logic need to be applied for Tcode VA02  also.
    Please post the  the solution once implemented.
    Thanks and regards
    Veera

Maybe you are looking for

  • Cost Estimates - system collects planed price for some raw materials only

    Hello I have a question regarding price determination for raw materials when creating cost estimates. My costing variant uses material future price (Accounting 1 view) in raw materials as a primary source for price collecting of raw materials and I w

  • Bit operations are very strange help me

    class BitDemo {      public static void main(String[] args) {                int bitmask = 0x0000000F;                int val = -3;                System.out.println(val & bitmask);  // prints "13" why not 3 int zmienna = -3; // 1000 ... 0011   ( 2^3

  • NOKIA C5 and problems with OVI and Windows 7 64Bit

    The phone does not recognize OVI (latest version). The S.O. and 64-bit Windows 7! I read on the Internet that several have the problem and find it shameful that Nokia has not been involved for months! Riccardo Solved! Go to Solution.

  • Nokia e50 software updater problem

    when i start it says:network conection lost.check your network conection or whether a firewall is preventing the aplication from working properly.but i don.t have any firewall..and don.t know what to do...can anyoane help?pls

  • Help no start button can't run apps

    I have an Acer E5-521 laptop I upgraded to the previous win 10 build and it worked great.  Now with build 10041 The start icon will not function. Left click on the start icon will cause a ding noise but no start menu. Right click on the start icon an