Check Sales order item quantity

Hi,
The scenario is such that our client has a specific production capacity for specific item group. and he wants that the sales order should not be added if the quantity of an item in the sales order goes beyond the specific limit for a particular day.
Regards
SAB

Hi,
Can you be more specific in your question
Example : If you want to block booking of sales order for a limit i.e beyound this limit you should not book the sales order until you make the delivey
Create a UDF in Items - Items WareHouse - and enter the limit value in that respective UDF
and then create a SP to block the transactions
With regards.
Eshvanth Singh

Similar Messages

  • 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

  • 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 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

  • How to Fetch Sales Order Item Quantity from Customer table(ztable)?

    Dear Guru's,
    My scenario:
    While creating Sales order the item quantity should be fetched from a Ztable. So iam using the Userexit "V46H0001 - - Customer functions for resource-related billing", in that i have implemented my code in the Function Exit - EXIT_SAPLV46H_001 and the FM documentation says
    This function module allows you to change item information for generating a new item.
    In order to achieve this, you must change the relevant field in the structure C_VBAPKOM.
    So i activated that exit and wrote the following code to test it as follows;
    break-point.
    C_VBAPKOM-zmeng = 10.
    But it seems not working, even it doesn't stop at the break-point when i type the material number for the item in the sales order and press enter...
    Please guide me in this regard, am i correct in choosing the User-Exit? what else have to be done in order to fetch the item quantity from the ztable....
    Please suggest if there is some other way to do this, i also heard that we can do this through Routines...
    Thanks in Advance...
    Regards
    Karthik D

    I have solved this  and you can found how i solved in the last reply of the following thread....
    [SD UserExit - V46H0001 - Customer functions for resource-related billing|SD UserExit - V46H0001 - Customer functions for resource-related billing]
    Thanks
    Karthik D

  • Sales order item quantity is not copied to delivery order quantity

    hi,
    i am trying to make a delivery order w.r.t. sales order which have 10 quantity for a certian material. when i create it, all the data on sales order is copied to the delivery order automatically EXCEPT the material quantity which was 10. it was working perfect and i dont know what mistake i made. is there any way out?
    thanks

    Hi,
    While creating delivery, r u getting the following error..
    An item with no delivery quantity is not permitted. Item will be deleted.
    If so, you are maintainig picking location determination for that particular plant and shipping point combination.
    i.e.,
    in OVL3 , for ur plant , Shipping point, Storage condition(Taken from Material master- Plant/Stor1 View)
    you will be maintaining some storage location.
    But for that storage location, you do not maintain a stock..
    If you specify the storage location in sale order, the error won't come..
    Otherwise add stock to the storage location assigned in OVL3..
    It'll work..
    I have also got the same error..
    Hope it may be useful to you..
    Thanks & Regards,
    Venkatesh.S.P

  • Populate Sales order Item quantity in the TPVS optimizer

    Hello All,
    The requirement is to populate the order quantity next to the sales order in the optimizer screen,
    Is there a setting that is available in the Layout that will show the Freight units order quantity.
    Can you please advice on how to populate additional fields in optimizer  screen in TPVS?
    Thanks,
    Ramesh

    Thanks Senthil,
    Can you tell me how does the optimizer layout will be changed? I mean, this is an extra field that users would like to see next to the freight units. Do I need to add this as a custom field in the Field catalog for optimizer? Please advice.
    Ramesh

  • 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

  • Changes to sales order item not reflected if Call Transaction is used

    I m updating another Sales Order item quantity and reason for rejection programmatically from another sales order.
    The code is working fine and the quantity does get changed as well as the reason for rejection flag get set (if required). But if I go to the change log from the menu in VA02 for the order item which has been changed. It does not record the changes.
    I have tried using both BDC call transaction method as well as BAPI_SALESORDER_CHANGE in neither case the change log for the order which has been changed reflects the programmatically made changes?
    What m I doing wrong. Here is the code.
    IF v_update_order_flg = 'X'.
          REFRESH t_bdcdata.
          CLEAR s_bdcdata.
          REFRESH t_messtab.
          PERFORM bdc_dynpro USING 'SAPMV45A' '0102'.
          PERFORM bdc_field  USING 'VBAK-VBELN' <wa_r_rtb_posnrs>-zrtbvbeln.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
       For Going to  specific Item Number
          LOOP AT t_schedule_lines.
            PERFORM bdc_field  USING 'BDC_OKCODE' '=POPO'.
            READ TABLE t_item_in WITH KEY itm_number = t_schedule_lines-itm_number.
            PERFORM bdc_dynpro USING 'SAPMV45A' '0251'.
            PERFORM bdc_field  USING 'RV45A-POSNR' t_schedule_lines-itm_number.
            PERFORM bdc_field  USING 'BDC_OKCODE' '=POSI'.
            PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
            v_ro_qty = t_schedule_lines-req_qty.
            CONDENSE v_ro_qty.
            PERFORM bdc_field  USING 'RV45A-KWMENG(01)' v_ro_qty.
            PERFORM bdc_field  USING 'VBAP-ABGRU(01)' t_item_in-reason_rej.
          ENDLOOP.
          PERFORM bdc_field  USING 'BDC_OKCODE' '=SICH'.
          v_call_transaction_flg = 'X'.
          EXPORT v_call_transaction_flg TO MEMORY ID 'call_transaction'.
          CALL TRANSACTION 'VA02'
                       USING t_bdcdata
                       UPDATE 'S'
                       MODE   'N'
                       MESSAGES INTO t_messtab.
          v_call_transaction_flg = space.
          FREE MEMORY ID 'call_transaction'.

    Hi Srikrisna,
    This is a typical problem with BDC for updating QUANTITY and CURRENCY fields.
    You need to create a character variable of the same length as your quantity field. Move your quantity value to the newly created Character variable.
    Now use this new char variable in the BDC.
    This correction should solve your problem.
    NOTE: BDC RECOGNIZES CHARACTER FIELDS ONLY.
    Regards,
    Prakash Pandey

  • 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

  • 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

  • Credit Check for "Not Relevant" sales order items

    Hello All,
    I am having a situation where my client takes advance reservations almost an year in advance.
    The sales order items have schedule line category to not consume inventory and so the overall status on each line item is "not relevant". The credit status on the order is "not performed". Since the overall status is "not relevant", the sales order amount is not added to the credit master receivables.
    We have around 100K orders and I am trying to see if there is a good solution to do a credit check on all these orders.
    I am in a desperate situation and would really appreciate a quick response.
    Thanks very much for your help.
    AM

    Hi Shiva Ram,
    Thanks very much for your reply.
    When I change the schedule line category on the items, the overall status on the line item changes to "Open". The credit status of the order will be "not performed".
    If I were to create an advance order with items consuming inventory, it goes through a credit check with the existing configuration.
    AM

  • 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

  • Sales Order item should not be allowed to modify after doing PGI.

    Dear all SAP experts,
    When i create a sales order say for 10 pieces. Now I have created the delivery for all the 10 pieces & also created the invoice.
    My requirement is when i create a delivery for all 10 pieces then after doing the PGI the system should make the sales order line item & qty "grey" - I should not be able to change the sales order item in any respects.
    If not from delivery then when i save the invoice for that sales order then I should not be able to modify the sales order item & qty.
    With best regards,
    Allabaqsh G. Patil

    Hi
    I think there can be a problem in copy control
    In copy control at item level, in teh item category, ensure that the field "Update document flow" and the Pos/neg quantity are properly updated.
    Update document flow shoudl be ticked on
    Pos/neg quantity should be positive.
    Before doing this , check teh document flow of the sales order. Do the same after doign this configuration. Note the difference.
    This will solve your problem

Maybe you are looking for