Block the Quantity in Sales Delivery

Hi,
I want to block the Quantity in Sales Delivery if it is Exceeding the Quantity in Sales Order.
The scenario is..............
I m creating a sales order for one or more line items with Quantity as 100.
based on this sales order i m creating a Sales delivery (it can b partial too)
if the Deliver Quantity exceeds the Order Quantity,
either it shoudn't allow the Document to b added
or show a error msg
Thanks in advance

Hi,
Please select this and paste in "SBO_SP_TransactionNotification"- Stored Procedure
IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'15')
BEGIN
declare @numlinii int
SELECT @numlinii = (LineNum + 1) FROM DLN1
WHERE DLN1.DocEntry = @list_of_cols_val_tab_del AND
((Quantity > BaseOpnQty))
ORDER BY LineNum ASC
IF (not ISNULL(@numlinii, 0) = 0)
BEGIN
SET @error = 10
SET @error_message = N'Quantity is invalid in Line ' + CONVERT(nvarchar(4), @numlinii) + N' !'
end
END
SAGAR

Similar Messages

  • Block the Schedule line for Delivery

    Hi,
    I have a requirement in which I want to block the schedule line in my sales order for delivery.
    Also I want that system should not perform the availability check and block the stock on the requested delivery date.
    We want the order handler to take a desicion and remove the block, and then the item should be relevant for availability check.
    To cover the 1st req of keeping the block, I will use a schedule line cateogry which has a delivery block setup in IMG.
    Will setup the schedule line cateogry accordingly.
    But I am not sure how to achieve the 2nd req to not to confirm the schedule line qty till the block is there.
    Kindly advise.
    Regards,
    Harsh

    Hi Harsh,
                 2 ways to achieve this,
    1- Create new reason for rejection & you can stop the requirements to flow to MD04. ( assumption is, item will be waiting for further activities by the Order handler )
    2- Tx: OVB8 & OVB5
    check whether you can include your own logic which is applicable only for newly created delivery blocks. This transactions works well for Delivery block "01"- credit block- for not to transfer requirement to MD04.
    Hope it may work for you.
    Regards,
    ReazuddinMD

  • How can i limit the quantity in sales order

    Dear sd gurus
    how can i restrict no of items in sales order? ex:sales
    order has been created for 10 items and all the 10 items
    quantity should be 72 not more than that and system should
    not allow to enter the quantity.where we can configure for
    this.
    thank s
    venu
    Please search the forums before posting - see [rules of engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]. You have been warned before about this. 
    Edited by: Ian Kehoe on Mar 5, 2012 5:31 PM

    Hello,
    I believe your requirement is possible in SAP Standard.
    You will have to go for ABAP Development & apply a Exit in Sales Order.
    You can use Program MV45AFZZ & apply ehtier userexit_field_modification or userexit_move_field_to_vbak or userexit_read_document or userexit_save_document
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • Can I block the blank lines in delivery note?

    Hi Experts,
    I want to block the blank lines when creating or changing delivery note because  I don't want user to add new items manually.
    Can I realize such a requirement?
    Hope anyone can give me some solution.
    Thanks.
    Best regards,
    Chris Gu

    Go to OVLK,  select the delivery type and execute.  There maintain routine 201 against the field ItemRequirement.  Similarly, for new item category, go to zero184  and donu2019t maintain any item category under the tab MItC
    thanks
    G. Lakshmipathi

  • CM: how to block the last new sales order only and not all of them?

    Hi,
    We are testing the FSCM-CM and try to figure out this:
    We have for a customer a number of open sales orders that are all below the credit limit.
    Now someone creaetes a new order and with that amount the limit is exceeded.
    The system reaction is that all open orders are blocked.
    How can we set the system that only the last one is blocked?
    Thanks in advance
    Hein

    Hein,
    I dont think there is any standard function which specially points to the last order. System will consider all the orders in which the customer is involved. I think, the above post suggest the of number of days but not the last order. Try to play with the attributes of system messages and I am sure you will get a clue from it..
    Reward if helpful..
    Thanks,
    Srib

  • Block the GR of late delivery item in PO

    Hi All
    We normally maintain multiple delivery schedule dates for all the PO items. For example the line item 1 qty is 100. But the delivery dates are split into as follows.
    1. qty 50 - delivery date 14-05-2007
    2. qty 50 - delivery date 25-05-2007 in the item details - delivery schedules.
    Now the business requirement is to through an error message during MIGO for the late deliveries against the above dates.
    I tried to use the Latest GR date in the item details delivery tab. It does not take into the multiple delivery dates. All it does is to check the multiple GRs against one controlling date.
    Is there any other setting to check the GR against the multiple PO dates set in the item details - delivery schedules tab.
    Please reply
    Thanks in advance
    Raj

    Hi,
    I don't think that there is a way of doibng this in standard SAP.
    The latest delivery date (as you have found out) is not considering the delivery schedules on the PO it is simply checking against the date on the PO item line (which is the oldest date of the schedules that exist).
    So I can only see a user exit in MIGO or a code modification being the answer. This should not be a risky modification because it just needs to substitute the schedule date for the check. The biggest problem is when you have multiple schedule lines, which line is relevant to the one being GRd? The system can't tell if it is the first one that is late or if it is a future one that is early. It would have to read throuigh the GRs so far and make assumptions about which deliveries relate wto which schedules .
    For example, if you have 4 schedules each a week apart and each has a qty of 10. If there have been 15 received so far, which schedule is being GRd when the next items arrive? Is it the missing 5 (that may be late) or were the 5 an overdelivery and the next delivery may be from a future schedule?
    I hope that you can see my point, the coding is not that simple.
    My own recommendation is to use a simple ABAP to read through the schedules and report on any that appear to have not yet been delivered although the date has passed. So report on it rather than try to get MIGO to act. I know that this would be after the event but at least you would be able to return the stock.
    If this solution is not acceptable, then the opnly other solution I can suggest is to NOT use schedule lines, just use one PO line for each delivery. I know this is extra work and not a simple task but I am not sure what else can be done?
    Steve B

  • Blocking the Storage Locations from Delivery

    Hi
    We have maintained for a plant different Storage locations like FG-Store,PRD-Store,WIP-Store etc
    If the same material exist in the FG-Store ,PRD-Store
    Can i restrict the Delivery to Happen only from FG Store & not from PRD-Store ?
    What is the config required for it?
    Regards
    AK
    Edited by: Ajithk on Jun 15, 2010 1:46 PM

    Hi,
    Please check the path
    SPRO-->MATERIAL MANAGEMENT->INVENTORY MANAGEMENT & PHYSICAL INVENTORY-->AUTHORISATION MANAGEMENT->AUTHORISATION CHECK FOR THE STORAGE LOCATION
    In that choose your plant and storage location and activate the AUTHORISATION
    and  it maintain the authorisation profiles for the object  M_MSEG_LGO and you can't create a goods mvoement from this storage location.
    Please try this and revert
    regards,
    santosh

  • Delivery quantity greater than confirmed quantity in sales order

    Hi experts,
    Quantity in delivery order can be changed to more than the confirmed quantity in sales order when there is sufficient stock. (Setting "Check overdelivery" in 0VLP already maintained "B-Situation rejected with an error message").
    Anyway in system to check only "confirmed quantity" can be delivered?.
    Regards,
    Liang

    Thanks Ankur for your reply.
    The "Overdeliv. tolerance" in customer master allow customer to deliver more than the quantity in sales order.
    But my situation here is to control the deliver quantity base on confirmed quantity in sales order.
    For example, i have quantity 10 for an item in sales order, and i only confirm 5 to deliver. Let's say my stock has more than 15 quantity, during DO creation, system will proposed 5 but i can manually change quantity to 10.
    I would like to control only confirmed sales order can be delivered. Is this only can control using user exits?
    Best Regards,
    Liang

  • How to change actual quantity in Outbound delivery User exit

    hi all ,
    My requirement is to change the quantity of outboud delivery according to some logic .but my issue is after writing the code MV50AFZ1 , system is not considering the quantity changed by me , it is taking the quanity directly from sales order confirmed quantity .
    please anybody help on this issue  .

    Hi,
    Under which user exit have your written your code:
    USEREXIT_MOVE_FIELD_TO_LIKP or
    USEREXIT_MOVE_FIELD_TO_LIPS or
    USEREXIT_SAVE_DOCUMENT or
    USEREXIT_SAVE_DOCUMENT_PREPARE
    I think if you write your code within the USEREXIT_SAVE_DOCUMENT, it should work.
    Regards,
    Subramanian

  • Allows to change quantity in sales order lesser that already billed

    Dear All,
    I am new to SD and I have encountered an issue. Please help me finding a solution. The details are given below:
    1. I have a sales order with 1 line item with quantity 5
    2. I bill the sales order for quantity 4
    3. Someone goes and change the quantity in sales order to 2 which is wrong because an invoice of 4 has already been raised.
    4. System gives a information message telling that an invoice has already been raised for quantity 4 but the person ignores and saves the sales order.
    I would like system to display an error message and stop the person from saving the sales order in this scenario.
    Kindly let me know where can I make the changes in configuration to achieve the same.
    Regards,
    Rajesh

    Hi Rajesh,
    Thats why the above solution has not worked. The above solution is for delivery related orders.
    I have tried the same scenerio as yours, I mean the order related Billing and Once the billing is done then I again open the order and tried to change the quantity.
    System give me the red error
    For item 000010, the following has already been invoiced:                   3 PC
    Message no. V1518
    That was the error Rajesh, As per my understanding we cant customize V1 Messages. These are hard coded in the progam.
    Please contact to your ABAPer and ask him/her to analyse the process in Debuging mode.
    One more interesting thing I have found
    My credit memo request already billed for 3 quantities
    When I am tring to decrese the quantity, it gives me red error V1518.
    But when I increase the quantity its give me same error V1518 but only as information, after enter it accept.
    I think it really needs technical analysis.
    Hope this helps,
    Regards,
    MT
    Edited by: M T on Mar 1, 2010 6:44 PM

  • Problem in confirming quantity in sales order

    Hi,
    Quantities are not confiming in sales order after releasing the QM LOT by transaction QA16. Here the stock is posted to unrestricted stock but the table QALS is not updated accordingly which causes the problem in confirming the quantity in sales order.
       Is there any scope of reversal of the QM lot so that further the lot can be released  by QA32 or QA11.
    Further when a lot is releaded the status of the lot is updated as the usage decision has been made. Where this status is stored?
    Regards
    Indranil

    Hi,
    Have yoou give the document category for quotation as B. Please try ginvg the same and run.
    Thanks
    Shiva

  • Block the payment

    Expert
    How to block the paymnet of a delivery till inpection stock is accepted
    Pls give me in details step
    Faisal

    Follow
    1.click  QM in Procurement tick in QM view.
    2.Enter control key related to Invoice Block in QM view .
    This will allow to block invoice unless UD of the lot is not taken
    Now still if you can't do then user user exit in MIRO : MIRO before UD posting is LMR1M001
    This will definitely work' !!

  • Blocking Quantity in Sales order

    Hi,
    We have a requirement to block Quantity in sales order.
    PP is not integrated with Sales order, its a MTO ( but actually client does not follow MTO in SAP)
    Once the production is completed for that sales order......he want to block the sales order quantity either manually or automatically ( they use a z transaction to declare production complete against sales order ) but this should not stop him doing delivery and billling.
    Please let me know how can we do this.
    Thanks
    Venkata Rama Reddy.K

    Hi,
    The Process goes this Way
    Sales order is created and confirmed ( by mail ) to PP that production should be started.
    PP completes the production and they update the qty against sales order number in a z transaction once production qty matches work order qty. the z transaction stops adding qty in this z t.code.
    What customer wants is once they update this ztransaction with complete Qty ( which equals sales order Qty) , the sales order item quantity should be locked automaticallly so that quantity can not be modified once this z transaction is completed.
    Hope this information provides clarity.
    Please suggest a solution.
    Thanks
    Venkata Rama Reddy.K

  • Delivery blocked the requirements

    Dear All,
    in my plant i have sufficent stocks to place an order and that order can be confirmed without any deviation from the quantity.
    but now i am facing the issue with the order confirmation when order is created with the available quantity in the plant .
    when i looked at the stock requirement list only partial quantity is confirmed and remaining quantity was blocked by the delviery document which was created way back in the year 1999.
    all items in this delivery was already confirmed ,PGI is also done and billing was generated and cleared as well nothing is pending.
    why this old delivery is now appearing in the stock requirement list?
    how to remove this docuement from the requiremnt list?
    please advice me.
    TIA
    KOGI

    HI,
       1.One alternative is that reverse  the delivaries and put reason for rejections for the corrsponding sales order.
      2. delete all delivaries which are appearing now in the requirement list and put reason for rejections for the corrsponding sales order.
      3.search for any SAP notes.
    Regards,
    kishore.

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

Maybe you are looking for

  • My MAC does not find my iPhone when trying to sync

    I installed 'OS 10.10, yosemite, and when I plug my iPhone into the computer, it sees the phone, but after creating a new playlist on my mac, in iTunes, then try and syvc the two, the computer 'whirrs' for awhile and then comes back with the error me

  • Sorting internal table

    Hi all, I have a scenario wherein i have to sort the internal table without using the sort function( i.e sort syntax).Is there any logic. Can nebody pls help me out. Regards Jak

  • Can Mac Mini boot XP from an External HD ? ? ? ?

    Hi All, Just a quick question. I have a recently deceased PC. RIP. I was able to salvage my boot drive with much of my media content. I would very much like to buy a Mac Mini to use as a PC / Media Center. Can a Mac Mini boot Windows XP from an exter

  • Can I download photoshop for my Macbook version 10.6.8?

    Hello, I would like to download Photoshop on my Macbook 10.6.8 but cannot seem to figure out which version it supports. Any help would be very appreciated. Thanks, Shannon

  • ECC upgrade impact on data archival

    Friends, We are working on the data archival SAP version 4.7, parallely ECC upgrades activities are going on.  We are working on the archive tools like transactions SARA, SARI etc as part of archiving.  Not sure on what changes to the features will b