Set PO for delivery Complete

Hi,
Is there a BAPI to set the delivery complete of a PO even if there is no issued quantity for that  PO?
thanks...
james

Hello,
          Here is the Sample Code.
REFRESH po_head_d.
  REFRESH po_item_d.
  REFRESH return1.
  REFRESH po_header.
  REFRESH po_items.
  REFRESH po_itemx.
  REFRESH return2.
  CLEAR po_head_d.
  CLEAR po_item_d.
  CLEAR return1.
  CLEAR po_header.
  CLEAR po_items.
  CLEAR po_itemx.
  CLEAR return2.
  purchaseorder = ws_save_ebeln.
Get detail information for PO
  CALL FUNCTION 'BAPI_PO_GETDETAIL'                         "#EC *
    EXPORTING
      purchaseorder     = purchaseorder
      items             = 'X'
    IMPORTING
      po_header         = po_head_d
    TABLES
      po_items          = po_item_d
      return            = return1.
  CHECK sy-subrc EQ 0.
Process only service line items that are not marked
with delivery completed indicator
  DELETE po_item_d
    WHERE del_compl EQ 'X'.
Service line items are marked with a 'D'
  DELETE po_item_d
    WHERE item_cat_ext NE 'D'.
*EJECT
  LOOP AT po_item_d.                                       "#CCE
Determine if there are multiple
line items for the purchase order
    ws_index2 = ws_index - 1.
    WHILE ws_index2 LE ws_cnt_ekpos.
      ws_index2 = ws_index2 + 1.
      IF ws_index2 GT ws_cnt_ekpos.
        EXIT.
      ENDIF.
      READ TABLE i_ekpos  INDEX ws_index2.
      IF sy-subrc EQ 0.
        IF i_ekpos-ebeln NE ws_save_ebeln.
          EXIT.
        ENDIF.
        IF i_ekpos-ebeln EQ ws_save_ebeln AND
           i_ekpos-ebelp EQ po_item_d-po_item AND
           i_ekpos-elikz EQ 'X'.
          MOVE-CORRESPONDING po_item_d TO po_items.
          po_items-no_more_gr = 'X'.
          po_itemx-po_item    = po_items-po_item.
          po_itemx-po_itemx   = 'X'.
          po_itemx-no_more_gr = 'X'.
          APPEND po_items.
          APPEND po_itemx.
        ENDIF.
        IF i_ekpos-ebeln = ws_save_ebeln.
          CONTINUE.
        ENDIF.
      ELSE.
        EXIT.
      ENDIF.
    ENDWHILE.
  ENDLOOP.
*EJECT
  DESCRIBE TABLE po_items LINES ws_cnt_items.
  CHECK ws_cnt_items GT 0.
  CALL FUNCTION 'BAPI_PO_CHANGE'                            "#EC *
    EXPORTING
      purchaseorder     = purchaseorder
      poheader          = po_header
IMPORTING
  EXPHEADER            =
    TABLES
      return            = return2
      poitem            = po_items
      poitemx           = po_itemx.
  IF sy-subrc EQ 0.
    COMMIT WORK.
  ENDIF.
  IF sy-subrc <> 0.
    REFRESH messtab.
    CLEAR   messtab.
    LOOP AT return2.
      messtab-msgtyp = return2-type.             "Message type
      messtab-msgid  = return2-id.               "Message class
      messtab-msgnr  = return2-number.           "Message number
      messtab-msgv1  = return2-message_v1.       "Messages, variables
      messtab-msgv2  = return2-message_v2.       "Messages, variables
      messtab-msgv3  = return2-message_v3.       "Messages, variables
      messtab-msgv4  = return2-message_v4.       "Messages, variables
      APPEND messtab.
      CLEAR  messtab.
    ENDLOOP.
Hope this Helps.
Thanks and Regards,
Venkat Phani Prasad Konduri

Similar Messages

  • NEED VL02N VL09 USER-EXIT FOR DELIVERY COMPLETE INDICATOR IN PURCHASE ORDER

    I NEED VL02N VL09 USER-EXITS FOR DELIVERY COMPLETE INDICATOR IN PURCHASE ORDER POSITIONS.
    F.X: IF POST QUANTITY 10, BUT PURCHASE ORDER POSITION QUANTITY 30, I NEED AT ANY CASE TO SET DELIVERY COMPLETE INDICATOR FOR RELEVANT OUTBOUND DELIVERY AN P. ORDER POSITIONS.
    THANKS/

    Hi Malka,
    It's possible set the system to mark automatically the delivery completed indicator.
    First you need to set the under delivery and over delivery tolerances.You do this in customizing:
    Materials Management under Purchasing -> Material Master -> Define Purchasing Value Keys.
    Once you set this, you can insert this value keys on Material Master Record for the materials.
    When you create the PO with a material with this value keys set the system will check the under delivery and over delivery set on customizing.
    In customizing you also have the option to let the system mark automatically the delivery indicator based on delivery tolerances set.
    In Customizing for Inventory Management and Physical Inventory under Goods Receipt -> Set Delivery Completed Indicator, you can determine for each plant whether the system automatically sets the delivery completed indicator for delivery quantities within the underdelivery and overdelivery tolerances.
    You can test setting the under delivery for 0 (with a warning message) and see if the system will only mark delivery complete only for over delivery.
    You can also work with the following Badi: MB_GOODSMOVEMENT_DCI. This Badi also allows custom logic for setting the delivery completed indicator in a PO item.
    Message: M7 433 (The "delivery completed" indicator is set for the purchase order item)
    Regards,
    Rodrigo

  • Goods receipt for Delivery completed PO

    Hi,
    I have issue with a user(Only one user having this issue),who is able to receive the goods for Fully delivered PO.User can receive up to over delivery tolerance given in the PO.How to restrict this.
    Issue is this,
    Purchase Order qty=30 EA
    Over Dely Tolerance=20%
    Received through MIGO=30 EA
    After this also system allowing to receive goods for 20% of the order qty.
    Only one user having this problem.
    By Standard if i receive goods for delivery completed PO, the system will throw a message No selectable items found.
    With regards
    Ram

    Please check Material tolerence limits.If tolerence limit exist change the tolerance limit of material.

  • Automatic Delivery Completion Required Indicator to be defaulted to "SET"

    Hi Guru's,
    My client's requirement is whenever there is a GR posted in the system the system should automatically set the "Delivery Completion indicator" to complete even though there are open items in the purchase order.
    The reason is to discourage backorder PO processing and Goods Receipt should be happen only once for a PO.
    What we are aware is,
    1. I know the PO can be made for the quantity to be received, but that cannot be done since this is a service customer
         and there are mutiple sites where materials can be delivered.
    2. we are not using MRP as all are cost objects consumed materials for customer service order or cost center till we go
        to material requirements planning.
    3. 'DCI indicator in Mm->Inventory Management -> Plant Parameters or set DCI in SPRO does not solve the purpose, as we
         want the setting to be Always "SET" in the MIGO screen.
    4. Manually we can do this by settinng this in MIGO, but it should be automatic as the user may forget to maintain that and
        there will be more GR.
    Kindly let me know if you have any ideas around it.
    Regards and thanks in advance.
    Swagat

    Hi,
    Under the IMG path:
    Materials Management
    -> Inventory Management and Physical Inventory
       -> Goods Receipt
          -> Set "Delivery Completed" Indicator
    the flag for the automatic setting of the "delivery completed"
    indicator (V_159L_E-XELIK) should be set  for the Site .
    The system will  automatically flag the purchase order
    item as delivery completed, if the full ordered quantity is
    received. If NOt set,
    the user has to set the flag manually while receiving the
    purchase order item. In MIGO, this is made in the "Purchase Order Data"
    tab, when the "Del.Completed" Ind. is set to "2 - Set".
    Please, see the note 1093582 in this regard:
    "2.  Question
    Is it possible to set automatically the ELIKZ during goods receipt?
    Answer
    In Customizing for Inventory Management/Goods Receipt/Set Delivery
    Completed Indicator, you can define at plant level that the "delivery
    completed indicator" is set automatically in the order if:
         o  the total quantity was delivered
         o  the underdelivery or overdelivery lies within the tolerances"
    Therefore, the system will only flag the indicator automatically if this
    has been customized previously.
    For STO
    Kindly review the attached note 34737 which explain the logic of the
    delivery complete indicator for STO.
    I hope this helps you
    BR
    Nadia Orlandi

  • How to set delivery complete in scheduling agreement automatically

    Hi. I would like to request for help on how to flag delivery complete in an scheduling agreement?
    When creating a goods receipt against a scheduling agreement, do we need a user-exit  or how is it configured in order to check the quantity receivedthe quantity in the goods receipt and compare it with the quantity in the scheduling agreement (/- de tolerance) and, in case the full ordered quantity has been received, set the flag Delivery completed in the scheduling agreement.
    Thanks.

    Hi,
    We regret that the functionality  setting of "delivery completed"       
    indicator automatically for a scheduling agreement is not included in   
    the SAP standard system.                                                
    For scheduling agreements, you must maintain the final delivery              
    indicator only in the scheduling agreement item.                             
    A maintenance from the goods receipt is useless for scheduling               
    agreements since the current schedule line situation is generally not        
    final. Even if all schedule lines are supplied, this does not mean that      
    no new schedule line might be added. Therefore, for scheduling               
    agreements,maintenance of final delivery indicator is planned only from      
    the document item.                                                                               
    Regards,
    Edit

  • Setting flag delivery complete on purchase order with a report

    Hello!
    In our system we have many old purchase orders without delivery complete flag. Now it is very difficult to get a correct report with open deliveries. Now we should set the flag delivery complete on each old PO and his needs a lot of time and also we create every time a change message which is printed on different printers.
    Is there any chance to set this flag by a report whitout setting this flag hard on the database?
    Best regards
    Markus

    Hi,
    You can change directly the Po with the BAPI, and the system will make all necessary test to make sure the ELIKZ can be updated.
    if it can not, it will not be changed.
    Please take into account that when you change the field DELIV_COMPL(see structure BAPIMEPOITEM), this field is changing the "Outward delivery completed" indicator (EGLKZ in DB-Table EKPO). If you want to change the "Delivery completed" indicator
    (ELIKZ in DB-Table EKPO), please use field NO_MORE_GR for this purpose.
    Additionaly, please read note 582221(Q 29) for your referrence.
    Best Regards,
    Arminda Jack

  • Set delivery completed flag with a program

    Hi,
    We have a need of setting the delivery completed flag on a lot of POs. Is there a program that we can use for that?
    br
    Anders
    Edited by: Anders Öhrling on Aug 10, 2011 5:42 PM

    Hi,
    For mass Updation of delivery completed indicator for purcahse orders goto trns MEMASSPO and select the field MASSEKPO-ELIKZ and execute and copy all the purcahse orders and items and execute mark the check mark for delivery completed indicator in upper tab and enter the tab carry out mass change and save it..

  • Bapi Error:Quantity and / or " delivery completed ind. Or final issue ind.

    Hello Gurus
    We are working on BAPI:bapigoods_mvt_create with movement type 103, for goods receipt when we execute program am getting this error message "Quantity and / or " delivery completed ind. Or final issue ind. " will you pls help me to over come this error.
    Thanks in advance
    Madhava

    Hi,
    You are posting good movement for quantity 0.
    SAP can accept zero goods movements if this meant for setting up the delivery completed indicator.
    So either quantity should be entered or delivery completed indicator should be ticked if qty is zero.
    Check the quantity you are supplying for this bapi.

  • Minimum shelf life and delivery completed indicator at GR

    Dear Gurus,
    I have two questions:
    1. As per my knowledge minimum shelf life is "minimum number of days for which the material must be keep for GR to be accepted" , (i.e. if it is 10 days the material should accepted for GR only after 10days of production ) but if I do a GR for today produced material still I m not getting any error. Why?
    2. Since we can do GR for "delivery completed" indicator set items. Canu2019t we get an error message if we try to post GR for delivery completed item (e.g. what is the use of message numbers 433 and 025)
    Thanks,
    Chameendri

    Hi,
    Answer to Question 1:
    Total Shelf life - If total shelf life is maintained then the minimum shelf life will also to be entered mandatory. While taking
    GR for such item, it actually ask the user to enter the Manufactured date so that the system automatically calculates the
    expiry date.
    Minimum shelf life ( or Minimum remaining shelf life)- While taking the GR, it asks the user to enter the date of GR date so that it checks whether the
    days entered in material master has been satisfied. If the condition is not satisfied then it will not allow to take receipt for
    that item.
    Example A material has a minimum remaining shelf life of 20 days and a total shelf life of 30 days. You enter the goods
    receipt of a new batch on 23/02/12 and enter 11/02/12 as production date. The system calculates the shelf life expiration date 15/03/12 from the production date plus total shelf life (30 days). The batch still has a remaining shelf life of 18  days. The goods
    receipt is not accepted (short fall of 2 days from minimum remaining shelf life)
    Now if the production date is 14/02/12 then batch still has a remaining shelf life of 21 days The goods receipt is accepted
    Answer to Question 2:
    Not possible to restrict by activating system messages only
    So refer this  solution
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17281

  • Delivery completed indicator wrt Mat document & P.O

    Hello
    why is it that at times the
    "Delivery completed indicator of the material document not set  "
    while the "Delivery completed indicator of the purchase order item" is set.
    can anyone explain the logic behind this  ?
    Thanks

    Hi,
    Delivery completed indicator in the PO is set manually at the time of PO creation.
    After GR if the quantity of  GR is equal to PO quantity then it will be set automatically. Indicating that you cannot expect further GR for the PO item.
    Regards
    Ravi shankar.

  • 'Delivery Completed' and 'Final Delivery' indicators in me23n

    Hi Guys,
    What's the difference between the 'Delivery Completed' and 'Final Delivery' indicators in me23n?
    Best Regards,
    Alper Myumyun

    Hi,
    EKPO-ELIKZ ("Delivery Completed" Indicator)
    SAP help (pushing F1 on the field):
    Indicates that the item is to be regarded as closed.
    (SAP F1 in MIGO)
    Indicates whether the delivery completed indicator is set for this item in the corresponding purchase order.
    Use
    This indicates the current status of the purchase order item.
    EKPO-EGLKZ ("Outward Delivery Completed" Indicator)
    SAP help (pushing F1 on the field):
    If this indicator is set, no further outbound deliveries can be generated for the item.
    The indicator is used in conjunction with a partial delivery arrangement. If the partial delivery arrangement provides for just one delivery attempt, for example, the system automatically sets the "outward delivery completed" indicator when the outbound delivery is created.
    You can also set the indicator manually.
    Regards,
    Csaba

  • Delivery completed" indicator cannot be set for item 00001

    Hi all,
    I have done a inter company stock transfer order , with respect to that Order I made  Outbound delivery and posted GR with respect to outbound delivery. I have done  MIRO for  PO  for all the Item ,
    Now  I  need to  return some  material  to supplying plant for  some reason,  I tried  to  make GR (MIGO)  against the same  outbound delivery with movement type 122. the document is posted  but  when I tried to  make complete  delivery indicator  it does not allow me to do so .
    it says me
    Delivery completed" indicator cannot be set for item 00001
       Message no. 06 848
    Diagnosis
       You have set the "delivery completed" indicator for a stock transfer  item.
    system Response
       You can only set the "delivery completed" indicator in stock transfer  items if
       o   the sum of the goods issue quantities in the supplying plant equal  the sum of the goods receipt    quantities in the receiving plant.
       o   the sum of the delivery note quantities is equal to the sum of the goods receipt quantities.
    Regards,
    Dhilipan.

    I dont think you need to set "delivery completed" indicatory while returning from one plant to another.
    For example : You ordered 100 qty. and you are receving only 80 Qty. and you don't expect any receipts anymore. in this case you want to close the open purchase order with delivery completed indicator.
    But while returning to vendor or to another plant you are not referring the P.O directly and hence you dont need "delivery completed indicator'

  • Delivery completed indicator for STO cannot be set!

    Dear colleagues,
    There are number of STO’s those goods issue quantity > quantity of goods received. Because of this delivery completed indicator cannot be set due to message “06 848 - Delivery completed indicator cannot be set for item XXXXX”.
    There is an OSS note (167795) that allows to set delivery completed indicator for such purchase orders. Even though our SAP release is 6.04, report RM06EV70 does not exist (yet BADI ME_ARCHIVE_ACTIVE is active) in the system and OSS note cannot be implemented.
    Any help would be appreciated.
    Regards,
    Melih
    PS. Please do not provide answers like “the goods receipt must be first posted via the entire goods issue quantity; then you can post a scrapping via the shortfall quantity” since there are backdated STO’s.

    Hi,
    Find STO created for which plant in t.code:ME23N and check MRP parameter maintained for that plant in t.code:OPPQ( also check entry of that plant in t.code: OMCD).
    Also cross check which Field Selection Key assigned to your STO PO document type and check “Delivery completed" indicator” available as Optional entry in GR/IR control segment in your Field Selection Key.
    SPRO - > MM - > Purchasing -> Define Screen Layout at Document Level
    Regards,
    Biju K

  • Delivery completed indicator set still goods receipt can be done

    Dear SAPians,
    I have created a P.O of say 100 quantity against which i made a goods receipt of 50 quantity.
    After this i have set the delivery complited indicator in P.O but still i can make goods receipt.
    how do i stop these the GRNs
    Regards
    Sujit

    Dear Sujit,
    Just as what Kedar said, Delivery Complete is just an "indicator". It is used for MRP planning purposes and you can still perform receiving even with this indicator checked.
    To block receiving there are 3 ways to do it, i would recommend no.1.
    1) Change the quantity according to receipt quantity.
    2) Set the lock button for the particular line item, which is proposed by many in this forum. However i think it is not the right solution because, you will not be able to do Invoice Verification(MIRO) after setting the lock button! It also doesnt look nice.
    3) You can use Final Delivery field (set it to today so no further receiving can be done). But you also need to configure system message M7163 to Error for this to work. SAP default only sets this to Warning, where you can still proceed.
    Hope this helps.

  • Delivery Completed Indicator set during BAPI_PRODORDCONF_CREATE_TT

    Hi Gurus,
    I am using BAPI_PRODORDCONF_CREATE_TT to perform our production confirmation.
    I want to force a goods movement item to be "Delivery Completed". I found the field GOODSMOVEMENTS-NO_MORE_GR in the BAPI which has a component type ELIKZ. When i put an X for this item during the BAPI run, it does not change the status of the item in the production order as Final Issue.
    Is GOODSMOVEMENTS-NO_MORE_GR equal to the field "Indicator: Goods movement item completed" (ENDKZ) in the confirmation? They have the same description.
    I found another field which is GOODSMOVEMENTS-WITHDRAWN (KZEAR) but it also does not change the status of the item after BAPI run.
    Thanks in advance for all your help.
    Regards,
    john

    Hello John
    Indicator NO_MORE_GR should be used only for the goods receipt with movement 101 and it will not affect the components.
    Field WITHDRAWN is the correct field to be used to set the final issue indicator for a component, however, you must ensure that you are sending the correct reservation number and item.
    I suggest you to use BAPI BAPI_PRODORDCONF_GET_TT_PROP to get the proposed data for the confirmation, including the components, and change the values when necessary.
    BR
    Caetano

Maybe you are looking for

  • How can I make an Apple ID as a developer for apps ?

    How can I create an app and then post it to the App Store ???

  • How do I remove annoying word advertisement on every web page?

    Hi everyone, I hope I can get help on this. Recently, everytime I browse internet pages several words get highlighted and when I pass the mouse over the words they automatically pop up. It wasn't so annoying at first but more and more words are getti

  • Text header in sapscript

    Dear all, I try to insert text object VBBK, ID "0002" for instance into my SAPscript form. I've succeed to do it for a given sales order (using include in SAPscript) but since the text name = my sales order, I'll find it in every sales orders. While

  • Dual Screen Setup

    Hi, I've just bought a Mac Mini and I'm in the process of setting it up to use as a pc and also a media centre connected to my HD Tv and I have a few questions I was hoping someone here could help me with. At the moment I have the Mac's HDMI out runn

  • Why the Doc does not magnify its icons ?

    Hi everybody, I'm new with OSX software. I bought a second hand quad-core Mac Pro computer. I installed the Leopard OSX. After a clean installation my doc is not magnifying the icons, I did until now at least 5 clean installation of OSX with same bad