Delivery quantity control Badi CL_IM_LE_SHP_DELIVERY_PRO

Hi ;
I want to check delivery quantity not to be greater than Po quantity , so on exit MV50AFZ1 save_document_prepare and badi CL_IM_LE_SHP_DELIVERY_PRO, save_document_prepare method . Both of them I can change lips-lfimg field and also another method of delivery read_delivery is passing on VL02N I see the change but it doesnt written at the screen which is displayed on delivery ,
Message was edited by:
        yanut

This issue is solved my self .
form userexit_move_field_to_lips.
     types: begin of ty_kna1,
             kunnr type kunnr,
             regio  type regio,
             end of ty_kna1.
   data :    it_kna1 type ty_kna1.
     types: begin of ty_ekpo,
             ebeln type ebeln,
             ebelp type ebelp,
             retpo type retpo,
             werks type werks,
             end of ty_ekpo.
   data :    it_ekpo type ty_ekpo.
   types:    begin of ty_zsloc,
             lgort type zlgort,
             end of ty_zsloc.
   data :    it_zsloc type ty_zsloc.
   data: wa_zsloc type ty_zsloc.
   select single kunnr regio from kna1 into it_kna1 where kunnr = likp-kunnr.
   shift likp-kunnr left deleting leading '0'.
   select single ebeln ebelp retpo werks from ekpo into it_ekpo where ebeln = lips-vgbel
                      and ebelp = lips-vgpos.
         select single kunnr regio from kna1 into it_kna1 where werks = it_ekpo-werks.
   select single lgort from zsloc into it_zsloc where werks = likp-kunnr
                  and region = it_kna1-regio
                  and ind = it_ekpo-retpo.
        wa_zsloc = it_zsloc.
          if sy-subrc eq 0.
            lips-lgort = it_zsloc.
            modify lips.
          endif.

Similar Messages

  • Maximum delivery quantity control

    Hi all,
    The sales order consists of 2000 KGS. Where as in delivery it should not allow to deliver the entire quantity to deliver, though the stock is available. Please advise is there any control, where we can control at delivery level for maximum delivery quantity is only 500 Kgs or something.. more than that it should not.
    Minimum delivery quantity control is there but that will not work here.

    There is control in 0vlp (zeroVLP) where if you maintain B  for the field "Check overdelivery",   system will prevent creating delivery if the quantity exceeds sale order quantity but not what you require.  If you want to control, you can try with delivery user exit V50S0001
    thanks
    G. Lakshmipathi

  • Delivery Quantity Control at Purchase Organisation Level

    Hi All,
    In this scenario, I would like to have a control on the Delivery quantity by a vendor.
    Quantity released: 100 pcs for Vendor ABC
    Total Number of Plants: 3
    Out of this 100 pcs, it can be delivered to any of the 3 plants by vendor ABC. Quantity delivered by vendor to these 3 plants should not exceed 100 pcs in total. How can we have a control for total released quantity at Purchase Organisation level.
    Breakup of quantity to be delivered to each plant cannot be given as releasing is done at corporate level.
    We checked same scenario by using purchase Info record maximum quantity field. We created purchase info record at Purchase Organisation level.
    Scenario 1. which i tested
    Maximum Qty:100
    PO creation
    Plant 1: 100 qty-- No error/warning
    Plant 2: 100 qty-- No error/warning
    Plant 3: 101 qty-- warning maximum qty exceeded than 100 pcs.
    Above scenario will not help me as I need to total release control on all plants together.
    Scenario 2. Expected
    Plant 1: 60 qty-- No error/warning
    Plant 2: 45 qty-- Error, Total released qty exceed by 5 pcs.
    Thanks and Regards,
    VV

    Hi
    You cannot do GR for a plant which is not given in Purchase order. Corporate level you can have contract but not Purchase orders. If you have reference purchase organization create a corporate contract and try creating a po against that contract.
    regards
    Antony

  • Change Delivery Quantity in BADI

    Hi Friends,
        I am working on  a BADI and there is some requirement for which I need to change
        the Delivery Quantity. 
        Can you please tell me which structure finally updates the TABLE LIPS so that I can change the
        delivery Quantity.
    Regards,
    Arpit

    HI Arpit,
    Please go through the post given below which can resolve your question on updating LIPS table using BADI.
    Re: user exit for LIPS table update
    Best Regards,
    Krishna

  • Picked Quantity to be made equal to Delivery Quantity in VL02n

    Hello Experts,
    Have a requirement, where upon when entering in VL02n with a delivery no, the Picked Quantity field (LIPSD-PIKMG) should be equal to Delivery Quantity (LIPS-LFIMG).
    Only the exit USER_EXIT_READ_DOCUMENT  of include MV50AFZ1 is being called when entering VL02n and in that i tried changing the value of LIPSD structure and even tried changing XVBFA-RFMNG field value, but it is not working.
    I understand that LIPSD is structure and noticed that picked quantity is getting stored in VBFA-RFMNG field...
    Please let me know if any one have come across the same requirement and resolved it technically, rather than functional approach of EK00 condition type or making the item category as non relevant for picking, we tried these options and it is not working for the business.  I got to see many previous threads on this topic, but there was no conclusion or technical solution provided.
    So looking for TECHNICAL solution based on your experience and whether it is resolved.  Its kind of urgent and would appreciate the help of experts who have resolved it earlier. thanks

    OK got it resolved.
    We have to use BADI LE_SHP_DELIVERY_PROC, methods CHANGE_FIELD_ATTRIBUTES and CHANGE_DELIVERY_ITEM. And it works.
    thanks

  • Order item done depending on the delivery quantity tolerance

    Hi,
    I am looking for an opportunity to put SD items to Status done, although the delivery quantity is not the same. With the VD51, the tolerance can be controlled, but the status of the position does not affected. An example, SD order position has a quantity of 10 pc, delivery quantity of 9, tolerance 80%. In that case I need a completed order Position, no backorder quantities.
    Thanks.

    Hi Ueli,
    in the standard, if difference between requested quantity and confirmed quantity lies among over and underdelivery, you´ll be able to create the delivery and the sales order line ítem will be set as completed.
    It will be completed once you´ve created your delivery.
    Check in shipping tab in sales order that for your line ítem over or underdelivery have been copied from info record as already suggested.
    Regards,
    JM

  • How to pick additional delivery quantity after creating Transfer Order .

    Hi
    Sales order has been created for 30 pc of material ,  with reference to this  sales order , delivery  has been created .Afterwards  I  created  transfer order in lt03 and got it confirmed  in LT12. However , PGI has not been carried out .
    Afterwards ,  I went to  VL02N and manually increased the materialsu2019 quantity to 60 pc in delivery  .
    In delivery packing status is partially picked .
    I request you to help me how can  I pick another 30pc as already transfer order has been created and confirmed for this delivery .
    Either system is not allowing me to cancel transfer order in order to create   fresh  transfer order to with reference to this delivery . Otherwise , I could have done it .
    Could you please suggest me , how to go about it .

    Hi
    There is an excellent way to handle your issue
    While creating TO in t code LT03 in the initial screen control tab if you give pick quantity as 2 after the TO creation the system will simultaneouslely do PGI also in a single shot
    This means the delivery quantity cant be changed in the VL02N
    The whole VL02N will be display mode fully greyed out
    That means after TO you cant change the delivery
    If extra qty has to be added then it has to be a separate order only
    I have practised this only and for the past two hrs i was breaking my head how come you are changing delivery after TO creation and for me it was in display mode(fully greyed out) even in VL02N and i found out i am using adopt pick qty as 2 in the initial screen of LT03 which does PGI in a single shot
    This should be a good solution for you
    Even the solution suggested by Mr.Raj Malhotra you will face the same problem
    Regards
    Raja

  • Requirement : delivery Quantity should be same as Order Qty

    The person entering the delivery qty shuold not be able to change the qty as entered in Sales order. how do we keep this control?

    Dear Ms Naik,
    Perhaps, it is currently beyond the scope of standard SD customising.
    You may explore the following:-
    Verify the delivery quantity during both creation and change, by  comparing this with the order quantity, by using the user exit for delivery processing MV50AFZ1.
    Preferably LFPMG is zero on saving.
    It may be meaningful to consider the following addition setting for the order item category.
    Set the completion rule to 'A' - mostly to safeguard an exploratory user from increasing the order quantity.
    Trust this helps you.
    Regards,
    K Gopidas.

  • Delivery quantity need not be exceed, After creating STO-PO in TCODE  VL02N

    Hello Gurus,,
    Greetings!!!!
    Tcode- VL02N...
    While we do PGI / SAVE after the changing the delivery quantity in Tab "Picking", it need to be checked that delivery quantity not be exceed then quantity entered while STO PO has been created for that particular PO.
    Means, in transaction VL02n  when we changes the Delivery quantity of tab "Picking" it should be equal or less then PO quantity,...
    When user put more picking quantity then it shows error that "it has been exceed" and it is working properly as well......
    But Problem I do have that user increase the Delivery quantity and put the picking quantity in terms of it so system is accepting this things..... but the Stock transport Order (STO) of that particular Purchase Order quantity is same as when created....
    And the requirement is that it is not increased then STO PO quantity.....
    So please please help to find out this solution whether this is solved using  BAdI or USER_EXIT....or any other solution please gurus ....I am facing this problem since long but can not find the solution ....I dont have that much experince in SAP-ABAP

    Hi,
    See Note 415716 - User exits in delivery processing. I think that USEREXIT_READ_DOCUMENT can work for your requirement. The question is fix a good filter to avoid problems in performance. For instance:
    CHECK ylikp-lfart = 'NL'.
    CHECK  t180-trtyp = 'V' .   "ONLY CHANGE
    and so on.
    Set the check:
    IF xlips-lfimg > ylips-lfimg.
      MESSAGE e(xxx)yy with....
    ENDIF.
    Remember check the UoM. If you don't have experience with ABAP, look for an ABAPer.
    If you don't have experience with userexits, please read carefully notes 381348 Using user exit, customer exit, VOFM in SD and 178328 Problems due to incorrect user exits in SD.
    I hope this helps you
    Regards
    Eduardo

  • Delivery quantity copy

    We are maintaining a forecast schedule on SD scheduling agreement. When transaction VL10a is run it shows the delivery schedule for delivery creation. When the delivery is created in from the transaction slecting a perticulat line, the delivery quantity is copied from scheduling agreement line item and not from forecast delivery schedules.
    e.g the line item on SD scheduling agreement have quantity 50. and the forecast schedule on the agreement is as follows
    4/15/2010  qty. 3
    4/20/2010 qty   5
    4/25/2010 qty. 3 and so on
    When the transaction VL10a is run for dates till 4/15/2010, the item with qty. 3 is shown for delivery creation. when the item is slected and delivery is created, the quantity on delivery is 50 ( the entire item quantiry).
    Let me know what settings needs to be done so that the quantity is same as on forecast delivery schedule line.
    Thank you
    Shrikant

    Hi
    Kindly check the copy control configuration in the t code VTLA as belwo
    Order requirements     101   Item                                                                               
    Item data              101   Item                      
    Item Ext. System       0                               
    Business data          2     Business Data                                                                               
    Update document flow         Pos./neg. quantity   +    
    Regards
    Damu

  • VL02N-Delivery Quantity can be changed in standered by the user

    Hi Gurus
    In STO Scenario After Making The Delivery VL10B Replenishment Delivery in Background
    In Change mode Delivery VL02N Delivery Quantity can be changed in std by the user how can i stop the changing the delivery quantity what should i do
    please its my client requirement
    Thanks in advance

    Dear Balarengan
    I have searched in MM forum and found this thread which is relevant to your requirement
    Forum post in ERP - Logistics Materials Management (MM): STO - How to control Over delivery ?
    STO - How to control Over delivery ?
    hope this helps you
    SAP has a logic for not controlling the over delivery in STO  in standard (unlike sales order  to delivery we have the controls in Zero VLP or 0VLP for this) because STO happens between plants of a same company code or different company codes .The movement of stocks are between plants But in a normal sales the delivery happens to a customer who is actually a third person and hence a user can misuse the delivery quantity
    A plant and an external customer cannot be treated as same
    Hence in SAP standards over delivery is not controlled in standard settings like item category etc
    Regards
    Raja

  • Problem when updating delivery quantity using 'BAPI_OUTB_DELIVERY_CHANGE'

    Hi experts,
    I have a requirement in which i need to update the material's delivery quantity in VL03N transaction.   For this im trying the BAPI
    'BAPI_OUTB_DELIVERY_CHANGE' and im passing the following values.
    HEADER_DATA : Delivery no.
    DELIVER : Delivery no.
    ITEM_DATA : Delivery no,
    item no,
    DLV_QTY quantity(changed),
    FACT_UNIT_NOM ( default to value '1')
    FACT_UNIT_DENOM ( default to value '1')
    ITEM_CONTROL : Delivey no,
    item no,
    CHG_DELQTY ( value "X")
    Then i use 'BAPI_TRANSACTION_COMMIT' for updating the changes. 
    Here the problem is, the BAPI is working fine for some quantity , say if i enter the DLV_QTY as 2 in ITEM_DATA, it is gettting updated.  But if i pass some other quantity , say 12, it is returning the folowing error.
    T ID                   NUM MESSAGE
    E VL                   363
    Pls tell why this error comes. and how to successfully update the delivery quantity for a set of material?
    Regards,
    Shanthi

    not answered

  • Sales order quantity equal to delivery quantity.

    31.10.2010
    Hi friends,
    To close all open orders I need to change the order quantity in the sales order to the total quantity delivered. Can you please advise how to go about this? Which table and which fields to use.
    Regards,
    Uday
    Moderator message: please try solving things yourself before asking, explain what you tried and where you are stuck when posting again.
    Edited by: Thomas Zloch on Oct 31, 2010 11:57 AM

    Hi all
      I am facing the same issue now. The system is not issuing an error message when delivery quantity exceeds order quantity and its letting me creating the delivery document and complete PGI. I have checked all the settings discussed in this thread.
    1.  0VLP Check Overdelivery is set to "B"
    2.  In VTLA, 'pos/neg' indicator is set to "+" sign for item category TAN (OR --> LF)
    3. Maintained the overdelivery tolerance limits in customer master.
    However when I set the 0VLP Check Overdelivery indicator to "A" instead, I am atleast getting a warning message. While it was B, I wasn't getting any message.
    I don't know what else could be missing or wrong. Any inputs would be highly appreciated.
    Thanks
    Vamsi

  • How to get the total no of delivery quantity in PO

    Hello,
    This is shehryar. my previous account got locked(dunno why  ) , so i have created a new acc.
    I want to display the total no of delivery quantity of a line item in PO. can it be done ?
    Thanks..
    Shehryar

    Here is a sample.  This works pretty good for me.  You must account for the reversals(102 movement types) also.
    report zrich_0001.
    data: iekbe type table of ekbe with header line.
    data: tot_menge type ekbe-menge.
    parameters: p_ebeln type ekpo-ebeln,
                p_ebelp type ekpo-ebelp.
    select * into table iekbe
               from ekbe
                       where ebeln = p_ebeln
                         and ebelp = p_ebelp
                         and VGABE = '1'
                         and ( bwart = '101'
                         or bwart = '102' ).
    clear tot_menge.
    loop at iekbe .
      if iekbe-bwart = '102'.
        iekbe-menge = iekbe-menge * -1.
      endif.
      tot_menge = tot_menge + iekbe-menge.
    endloop.
    write:/ tot_menge.
    Regards,
    Rich Heilman

  • Scheduling Agreement delivery quantity mismatch

    hi all SD Gurus,
    I've a scheduling agreement with a schedule line for 10 units. when i go for delivery delivery quantity is taken as 351 (as available quantity 694 - scheduled for delivery quantity 343). how can i get exact delivery quantity in delivery.
    also can u guide me for JIT scheduling agreement concepts???
    thanks in adv.
    amol
    Message was edited by: Chittaranjan Nivargi

    For R/3 4.6C see link below
    Ron
    http://help.sap.com/saphelp_46c/helpdata/en/78/2085347860ea35e10000009b38f83b/frameset.htm

Maybe you are looking for