Sales Order Items align with Truck quantity

Hello Gurus,
We are in the design phase and there is a requirement from the client that
The Sales Order can be with multiple line items. But every line item weight would be equal to a truck weight/capacity. The rest of the items needs to be rejected.
Example: If 1st line item weighs 10tons and has 20 pallets, and the truck can load only 19 pallets bcoz of weight, then we should be able to reject the 20th item.
How do we do this ?
rgds..Ameet

Hi
Before going to any solution  I would like to known some open question below..
1 Take an example that you have some container  whose size may be big but the weight may be lessu2026.
2. In the above scenario it looks that you wonu2019t have place to load material in the truck as you have not over loaded.., what will be the action on that case
Assuming that youu2019re  not considering any the size of the material and concentrating the weight of the material (which may be not much real scenario)
Create a custom table say named by u201CZ_Truck_ capacityu201D which  you can define by any place in the sales order (may be by some PO type). But I would prefer to say that you maintain the custom table with respective to the Shipping Condition and the Truck capacity.
So in MV45AFZZ in VBAP section you can write the logic that
u201CIf the SC is u2019 10u2019  then go and check the table u201CZ_Truck_ capacityu201D to know the capacity of the vehicle .
If the capacity is >= the total weight of all the item (I think the weight can be get from MVKE or MARA or may be some MM table, please have a look for this) then allow the sales order or give an error or massage as per the business requirement.
Hope that may help you some how

Similar Messages

  • How to know if a Sales order item created with or without reference

    Hi,
    I am working on user exit USEREXIT_MOVE_FIELD_TO_VBAP, and I just wanted to know if there is a way to know if a sales order item is created with or without reference to a contract.
    I need to write the code in USEREXIT_MOVE_FIELD_TO_VBAP, however, when an SO line item is created with reference the userexit is being called twice and when the SO line item is created without reference the user exit is being called only once.
    My aim is to check if a SO line item is created with reference to a valid contract. If the item is without reference to a contract or the referenced contract is not valid, then I will have to determine the contract based on the customer contracts.
    Any help on this would be greatly appreciated.
    Best regards,
    Siva

    Hi Vindo,
    The Userexit USEREXIT_MOVE_FIELD_TO_VBAP is called twice when the SO line item is created with reference to contract. The first time the user exit is called there will be no value filled in vbap-vgbel and the second time it comes to the userexit then vbap-vgbel will have a value. I think CVBAK-VBELN will contain the reference if the so line item is created with reference and the value of CVBAK-VBELN contrains blank if the item is not referenced. Anyway thanks for your reply.
    Best regards,
    Siva

  • Sales order item details with condition types

    Hi Guys,
    I am uploading the sales order details using DIRECT INPUT method in LSMW, one line item having 5 condition types, but in the item level structure BVBAKPOM, I can able to MAP  only four condition types.
    Is there any way to map more then 4 condition type in the ITEM level structure? Or do we need to loop the item level structure.
    Waiting for your valuable replies
    Thanks,
    Gourisankar.

    Hi Harish,
    INOB table key is CUOBJ, At run time the VBAP-CUOBJ is not generated yet. Its value is now "999999999999990001".
    I guess once the order is created we will get an entry in INOB.
    Do you have any other way with which INOB entry can be selected ?
    Thank You.

  • Sales order item quantity not rounded and allowing decimals with UoM EA

    Hi gentlemens,
    I noticed something strange in our SAP ERP system.
    When we enter a material in a new sales order item, we are allowed to enter quantity 1,5 EA (1 and half Each).
    But when I check the config of the UoM EA in table T006, the number of decimals (field DECAN) is 0 and the decimal place for rounding (field ANDEC) is also 0.
    As far as I remember from other other SAP system, there should be an error message when entering the quantity 1,5 EA saying that decimals are not allowed for this unit of measure.
    Can someone help and tell me wich error message or which rounding program should normally be active when entering decimals with uom EA ?
    Thanks and regards,
    BDT

    Hi Mani,
    Thanks for the thread reference. I found the related OSS notes yesterday evening but this was for procurement.
    Here the question I have is more for a sales item.
    The strange case we are facing is:
    In a sales order, we can enter a particular material as a standalone item with a quantity of 1.5 EA without any problem.
    But if we create the same new item as a sub-item of a previous one (filling UEPOS), with qty 1,5 EA, then a rounding is triggered by the system based on the T006 config.
    I am wondering if this is a problem with the SAP standard program or if we did anything wrong in the past in our system?
    Best regards,
    BDT

  • Free goods determined in Delivery over Order Quantity in Sales Order Item

    Hi Gurus,
    I've a problem about using free goods determination.
    First I created free goods master record with following information
    ZG1010012060075 From 100 PC -> Free good ZG1040012060075 2 PC
    Free goods Category = '2' (Exclusive)
    Free goods delivery control = 'E' (Delivery proportional to quantity in main item)
    Then I've created Sales Order with
    Item 10 ZG1010012060075 4,000 PC.
    Item 11 ZG1040012060075(Free good) has been automatically determined for 80 PC
    Then I've splitted Item 10 into 4 deliveries. The result of free goods determine in each delivery are as follow:
    Delivery#1)
    Item10 ZG1010012060075 = 1,176 PC
    Item20 ZG1040012060075 = 24 PC
    Delivery#2)
    Item10 ZG1010012060075 = 1,176 PC
    Item20 ZG1040012060075 = 24 PC
    Delivery#3)
    Item10 ZG1010012060075 = 1,176 PC
    Item20 ZG1040012060075 = 24 PC
    Delivery#4)
    Item10 ZG1010012060075 = 472 PC
    item20 ZG1040012060075 = 9 PC
    *Remark : Total quantity of 'ZG1040012060075'(free goods) = 92424+24 = 81 PC
    (Greater than 80 PC)*
    I think the system determined free goods in Delivery#4 correctly due to rounding up. But It might not be over the order quantity in Sales Order Item 11. Even though I've set the item category in delivery with Check overdelivery = 'B' (Situation rejected with an error message), the free goods are determined over order qty. BUT if I change delivery qty in delivery#4 Item20 from 9 PC -> 8 PC -> 9 PC, the error message occurred.
    My point is to fix the system not determine free goods in delivery items over order quantity in sales order item.
    Has anyone met this situation before? Do you have any idea about this issue?
    Best Regards,
    Prachya Lalitnorasate

    Dear Sai,
    Thank you for your advice, but it didn't solve my problem.
    I would like the system to determine free goods with proportional to main item AND In the last delivery main item delivered completely free goods must be determined equal to remaining open delivery item.
    Do you have any idea about configuration/customization?

  • Cancel Confirmed Quantity in Sales Order Item (VA02)

    Dear All,
    I am having the following scenario :
    Customer have created a Sales Order, item 10, schedule line 1 with quantity 120.  The delivery date is 2011.12.22. 
    They have confirmed the quantity using the "Check Item Availability" function. 
    They have then changed the delivery date from 2011.12.22 to 2011.12.23.  The problem arises that in the "Availability Overview", the system still show the confirmed quantity is on 2011.12.22.  It doesn't release the confirmed quantity after we have changed the delivery date.  And what is worst is the system is prompting me that no stock is available on 2011.12.23.
    Does anybody knows how to release the confirmed quantity in the schedule line.  I have tried in VA02 by modifying the schedule line details.....  but does not work..
    Thanks.

    Hello,
    One easiest way is to reject the line item and add a new line, make the delivery date as 23rd. Once you reject the line item the confirmed schedule line get reversed.
    You can try with CO09 also.
    Regards,
    SAM

  • Duplicate planned order is generated with  one sales order item.

    dear :
    when the production order is confirmed with sales order item.the other new planned order is generated.
    the   requiremet quantity of sales order item  is  1,but the custstock  is 2 .display exception:26. in md04.
    please help me analyze it .
    best regards.

    Hi
    Please check rescheduling horizon in OPPQ(by default it would be 100).
    May be you would have shifted the dates of production order after converting from planned order which had crossed rescheduled horizon. This would generate additional planned order to maintain initial dates.
    If this is the case, increase Rescheduling horizon.
    Regards,
    Krishna Mohan

  • Reg Open sales order item and the quantity

    Hi experts:
    I am getting open sales order item based on inner join of tables(vbak, vbap, vbep). Not using vbbe table in inner join as it doesnt carry all pending open records.
    can any one say how open sales order items  and their quantity can be retrieved?
    I searched forum and saw usage of vbuk and vbup tables, but it does not accomplish our scenario.
    Thanks in advance,
    Sashti.

    Hi,
    1) fetch the header information from VBAK table.
    2) Based on VBAK table fetch all the line items from VBAP table.
    3) Now fetch from VBFA table.
    *-Fetch from VBFA to get the delivered qty
      SELECT vbelv               " Preceding sales and distribution document
             posnv               " Preceding item of an SD document
             rfmng               " Referenced quantity in base UOM
        FROM vbfa
        INTO TABLE lt_vbfa
         WHERE vbelv   = gv_vbeln
           and vbtyp_n = 'J'.
    4) By comparing VBFA-POSNR just filter the records from the VBAP internal table. Remained lines are open lines of the sales order.
    Regards,
    ~Satya

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI

    I am having a problem when creating a sale order using BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    Problem is that sale order item quantity field is not populating
    code is as follows
    ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
    ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
    ORDER_ITEMS_IN-TARGET_QU = 'LB'.
    ORDER_ITEMS_IN-TARGET_QTY = 1.

    Hi,
    Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
    Regds,
    Rudra

  • Help:the sales order is created with a 0 quantity

    I am able to create the sales order now. and it is showing up in SAP too.
    But i have one more problem.
    The sales order is created with a 0 quantity.
    I was passing quantity in the field COMP_QUANT of the table ORDER_ITEMS_IN.
    Can anyone help me with this, as to what field of the table ORDER_ITEMS_IN should be updated to show the quantity in the sales order
    Thanks

    This is the mistake...
    ORDER_ITEMS_IN-COMP_QUANT you populated, but you missed
    ORDER_ITEMS_INX-COMP_QUANT = 'X'.
    because of this it is not updated.
    try this..
    regards
    vijay

  • Sales order item quantity update based on goods issue quantity

    Could any one explain me how to achieve the below functionality in SAP.
    Sales order item quantity needs to be updated based on the goods issue quantity when goods issue happens. 
    Tried to achieve the above functionality thru user exit.  But I could not found any user exit.  Could any one help me in finding out the user exit for a delivery which gets triggered when goods issue happens? 
    Or is there any other way thru which we can achieve the above functionality?  For example by using copy control, or requirement stuff. 
    Your inputs are highly appreciated.
    Thanks in advance.

    I dont y u got such type 0f requirement.Do one thing find out BADI it should be activated only when we are going PGI , in that badi try to chage Sales order <b>BAPI_SALESORDER_CHANGE</b>.
    for BADI search in SPRO / Se80.
    Regards
    Prabhu

  • Sales order item Qty check with sale plan qty

    Dear all
    How its poosible  - While creating sales orer system should  check sales order item qty, delivery date    with sales plan qty  for that period. If total sales order requirement qty greater than sales plan qty then system should give error msg.  System not consider stock & inward / outward mvt . only check plan qty.
    in details
    1>  Create Weekly sales plan   -  w.r.t  Material & Plant   -  ( T code u2013 MC87 )
      Eg .   Material  - FG001   , Plant 1001  ,   Week 11.2011  -  2000 Kg 
    2>  Now creating sales order . system check  sales order item qty  & plan qty as per delivery date or week
    Eg .  i> Sales order  no. 1 -  delivery week  u2013 W 11.2011   , item u2013 FG001 ; Plant u2013 1001 ; Qty u2013 1500 kg 
    Requirement :  System check u2013 delivery week u2013 11  according to that  sales plan qty for that material & plant is  2000 kg ;
    total actual  Sales order qty =  1500 kg . so condition is fulfill  system allow to create sales order.
    Eg. ii> Sales order no. 2 u2013 Delivery week u2013 11.2001 ,  item u2013 FG001 ; Plant u2013 1001 ; Qty u2013 1000 kg 
    Requirement :  System check u2013 delivery week u2013 11  according to that  sales plan qty for that material & plant is  2000 kg ; total actual  Sales order qty =  1500 + 1000kg =2500 kg .  so condition is failed  , ( sales requirement qty > sales plan qty ) system should not allow to create sales order, gives error msg.
    Thanks & Regards
    Pramod

    Hello,
    I have made something like that, to replace the defaut Check by one that check purchase order shipping date.. Here is a exemple code for trapping :
    You must place it in SBO_Application_ItemEvent
    if ((pVal.FormTypeEx == "139") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE) & (pVal.ItemUID == "38") & (pVal.ColUID == "11") & (pVal.Before_Action == true) & (pVal.InnerEvent == false))
                    CheckAvailability();
    Don't forget to disable the SBO Check Availability in the document's config form.
    Sorry for my poor english and good luck
    Chris.
    Message was edited by:
            Christophe Vuignier

  • BAPI-To create production orders with reference to sales order & item

    Hi,
    Can anyone tell me which is the best method to create open production orders?
    Is there any BAPI available for creating production orders with reference to sales order & item.
    I tried this BAPI "BAPI_PRODORD_CREATE".
    I am getting pop up to enter serial number while executing the custom program.
    Which table contains the serial number(effectivity parameters)?.

    I have custom screen fields on notification service!
    i think a bdc is better.

  • Bill Plan with Sales Order item rejected

    Milestone Billing Plan created.
    IMG Config Sales Order Item Reason for Rejection = BIC checked (Not Relevant for Billing)
    Add material on the (Billing Plan) Sales Order Item.
    Set the Item Reason For rejection (same reason as set in IMG config for BIC above)
    Create some Billing Plan dates (at the sales order header).
    [F3] back. You get an info message "Value-based differences in the billing plan cannot be allocated"
    Save the Order.. All is fine.
    If I do not set a reason for rejection on the item all is fine.
    Can anyone explain this ?

    Hi Friends
    I have resolved the problem myself. I have used sap note : 97272 and downloaded the utility/ correction program ZZUNREJE and ran it for rejected sales line item.
    The reason for rejection was successfully reversed without touching any of the associated POs.
    Regards

  • Creating new sales-order item with text using BAPI_SALESORDER_CHANGE

    Hi all.
    I want to create new sales-order item in an existing sales-order by using BAPI_SALESORDER_CHANGE. This works fine.
    I also want to enter item-texts for the new item in the same call, but this doesn't work.
    When I call the BAPI I do not assign an item-number for the new item, thus I have no item-number to assign to ITM_NUMBER in table ORDER_TEXT.  IF ITM_NUMBER is empty, it's treated as a header text....
    Any clues?
    Regards
    /Elisabet

    increment the last itemnumber and pass it to that.
    if they are following a sequence 10,20,30.
    find the next sequence and send it to the ITEMNUMBER field.
    or else you add the text after the Function call.

Maybe you are looking for

  • Interest Calculation for special GL items

    Hi Experts, We have posted some special GL indicator documents for the vendors, but in the interest calculation, that is not coming up. However the system is picking up all the others debit and credit items for that vendor. So what could be going wro

  • An error occurs when rendering to PDF from Reporting Services

    Hi there, I am hoping that someone can help me, i have looked everywhere and cannot find an answer to this error. I have a report from visual studio 2008 on reporting services and it displays however exporting to PDF gives me the following error. Ser

  • I can't  drag clips into my timeline - HELP!

    I am working on a project at the moment and I am having issues with dragging imported clips into my timeline. I click on them to drag them down but they go grey and stay put! What is going on, can anyone help me as this is quite an urgent project.

  • Computers Showing up twice in the network list even with Smb disabled?

    I've just purchased an Airport Express and figured it was time to get the network into shape. I've got 4 macs (MBP, MB, iMac, and PB) and one Windows box. In the sharing list, 2 of the macs show up only once, and 2 of them show up twice. I think I've

  • Showing records where groups of 4 are present

    I have an example table (input) where I want all records which can be grouped by 4 starting with number 1 (output). How could I accomplish this? input: id     le 1     a 1     b 2     c 1     d 2     d 3     d 1     e 2     e 3     e 4     e 1     f