Program to update Delivery dates of STO based on Material availability

Hi,
We have requireement in which, we need to material availability check for the materials on daily basis. This is only for Stock Trasnfer orders.
Suppose there is STO ( Stock Transfer Order) 1 that has been created for material M1 for qty 20. The scheduled delivery date for the material is tomorrow. Now I create another STO 2 today for the same material and same quantity. The scheduled delivery date that was proposed was 7 days from today.
Some one deletes the STO 1. Now Material M1 with qty 20 is avaiable to use. I then go in the system, open STO 2 in change mode. Select the line item and click on Material availability check. When I do this, the new delivery dates are proposed.
This is standard sap functionality.
We have required to do this programmatically. Is there any standard SAP program which will check all the STO's by there creation date and do the material avaibility check automatically and re-set STO dates.
Regards,
Shahu

Instead of all that, you could just use stock transport scheduling agreements.  MRP can update those automatically during its processing.

Similar Messages

  • Delivery split for STO based on Material Loading Group

    Hello, I want to split the Delivery created from STO based on material loading group. I checked SAP Note:166397 and it requires copying routine. But this solution is not accepted and looking for other solutions. Please help with any user-exit or badi which can solve the purpose. Delivery needs to be created from VL10B transaction.
    Edited by: ananthula sumanth on Aug 6, 2010 9:12 AM

    The copy routine is designed for this purpose - it's not clear why the client does not allow the use of it. In my opinion you should find the root casue of their resistance and offer an acceptable solution (if it is possible).
    If you want to solve it in another way I guess you should go into a big development and develop your own copy routine functionality which could mean much more work (for you) and money (of your client) - instread of modifying a copy routine (maybe within few minutes).

  • Delivery Date in STO ( UB) & PO (NB)

    Hi, I have a question, delivery date in STO (UB documnet type) or PO ( Doc type NB) what it refer? ( item-->delivery date)
    I mean the date on which we are going to receive the goods or the date on which either vendor or supplying plant going to transafer or ship the goods?
    Since we are able to create outbound delivery in STO using VL10b transaction only if the delivery date in PO is greater than or equal to VL10b delivery date.
    Also let me know, how the delivery date will be determined in PO/STO automatically. when i enter the material , plant and qty automatically delivery date is getting determined?

    Hi,
    The delivery date is the date on which we receive goods.The process of delivery date determination is in the moment you enter a material number and hit enter, SAP moves the current date into the delivery date, and depending on planned delivery time of material master it add those days to the current date. If the data entered is sufficient to determine already the info record, then it takes the planned delivery time from there into consideration. Thanking you.

  • Function Module or BAPI to update Delivery Date (LIKP-lfdat)

    Hello friends,
    I have a requirement to update Delivery Date (LIKP-lfdat) , is there any Function Module or BAPI to do that? any sample codes are appreciated.
    Thanks a lot!
    Edited by: Qiwei Yin on Dec 11, 2008 8:50 AM

    hi
    try this
    BAPI_SALESORDER_CHANGE
    hope this helps
    regards
    Aakash Banga

  • Bapi to update delivery date in confirmation tab in purchase order me22n tc

    Hi All,
    I am writing a BDC to update the data in confirmation tab for puchase orders for enjoy transaction.
    Please let me know how to updated delivery date in confirmation tab in purchase order(ME22N) using a bapi.
    I tried using BAPI_PO_CHANGE but found no parameter related to confirmations tab.  this BAPI has every thing to update like header data, item data, scheduling data..... except confirmation.
    So please let me know how to update the data in confirmation.
    We need to use only enjoy transaction ME22N not ME22 in BDC thats why we are looking for a BAPI.
    Regards,
    Venkat

    Hi
    Check the table parameter POCONFIRMATION in BAPI_PO_CHANGE
    U can see the field DELIV_DATE in the structure BAPIEKES.
    DELIVERY_DATE in the structure BAPIMEPOSCHEDULE as well.
    Regards,
    Dwaraka.S
    Edited by: Dwarakanath Sankarayogi on Feb 5, 2009 7:57 AM

  • Problem updating delivery date onto quotation

    Hi All-
    We have process, After creating sales order, will convert that into purchase req and again convert purchase req into STO's..
    Problem here is, if we make change delivery date onto STO's, should be reflect onto Purchase Req and also onto sales order...
    Anyone if you know the solution, please reply to my question and also let me know if there any user-exits to the sameissue...
    Thanks,
    Sony

    Hi,
    Pass the following values...
    POACCOUNT LIKE BAPIMEPOACCOUNT...
    poaccount-TAX_CODE = ? (value)....
    That should take care of the missing field.
    Regards,
    Madan..

  • Problem while updating Delivery date uisng BAPI_PO_CHANGE

    Hi friends,
    Iam facing a problem while updating delivery date of a purchase order using the bapi BAPI_PO_CHANGE
    After the bapi is getting triggered iam geting sy-subrc = 0
    But in the return parameters iam getting 3 error messages so iam unable to update the  delivery date..
    Error meesage which iam getting are
    a) Purchase order still contains faulty items
    b) Enter Tax Code
    c) Instance 1000001 of object type PurchaseOrder could not be changed.
    How can i correct it..
    Please find my code below
    LOOP AT it_eket INTO wa_eket.
        wa_poschedule-po_item = wa_eket-ebelp.
        wa_poschedule-sched_line = wa_eket-etenr.
        wa_poschedule-delivery_date = wa_eket-eindt.
        APPEND wa_poschedule TO poschedule.
        wa_poschedulex-po_item = wa_eket-ebelp.
        wa_poschedulex-sched_line = wa_eket-etenr.
        wa_poschedulex-po_itemX = 'X'.
        wa_poschedulex-sched_lineX = 'X'.
        wa_poschedulex-delivery_date = 'X'.
        APPEND wa_poschedulex TO poschedulex.
    READ TABLE IT_EKPO INTO WA_EKPO WITH KEY EBELN  = WA_EKET-EBELN
                                             EBELP = WA_EKET-EBELP.
          IF SY-SUBRC = 0.
          WA_POITEM-PO_ITEM = WA_EKPO-EBELP.
          APPEND WA_POITEM TO POITEM.
          WA_POITEMX-PO_ITEM = WA_EKPO-EBELP.
          WA_POITEMX-PO_ITEMX = 'X'.
          APPEND WA_POITEMX TO POITEMX.
         ENDIF.
        CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            purchaseorder = wa_eket-ebeln
          TABLES
            return        = t_bapiret2
            POITEM        = POITEM
            POITEMX       = POITEMX
            poschedule    = poschedule
            poschedulex   = poschedulex.
        READ TABLE t_bapiret2 INTO wa_bapiret2 WITH KEY type = 'E'.
        IF sy-subrc NE 0.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =.
          IF sy-subrc = 0.
            WRITE :  'DELIVERY DATE UPDATED'.
          ENDIF.
        ENDIF.
    how can i correct it...
    Regards
    Kumar

    Hi,
    Pass the following values...
    POACCOUNT LIKE BAPIMEPOACCOUNT...
    poaccount-TAX_CODE = ? (value)....
    That should take care of the missing field.
    Regards,
    Madan..

  • Problem in updating delivery date in va02

    hi abapers,
    my requirement is to update the delivery date in va02 at header level. i have this code in sapmv45a, include is mv45afzz,
    written code in move_fields_to_vbak.
    when ever iam running the va02 tcode i am getting my updated delivery date , when iam saving again this exit triggering so that again delivery date is updatting.
    here x is the updated date getting from z function module. iam pasing this value to below statement
    vbak-vdatu = x.
    so that how to stop triggering the code  while saving.

    hi abapers i posted the code, here the problem iam facing is that, when ever iam opening the va02  tcode updated delivery date  is coming but when ia msaving again this is triggering so that first updated date is again updating .
    here x is the day no comes from function module  in below code , iwll compare x with following zroutern  function module .
    suppose .
    updated date is 17.12.2010 so that i will push to vbak-vdatu = 17.12.2010. but here again date_compute_day is again calcultaing day from 17.12.2010 so that again that day  which is stored is x again compared to zroutern function module .
    here i aim is when ever i get updated date then  it shuold come out of this application .
    plese suggest .
    READ TABLE XVBAP INDEX 1.
    READ TABLE XVBPA WITH KEY  VBELN = XVBAP-VBELN
                               "POSNR = XVBAP-POSNR
                               PARVW = 'WE'.
    IF SY-SUBRC = 0.
      L_KUNNR = XVBPA-KUNNR.
      ENDIF.
      IF SY-UZEIT+0(2) >= 15.
        E_RDD = SY-DATUM + 2.
        ELSE.
          E_RDD = SY-DATUM + 1.
          ENDIF.
          IF E_RDD > VBAK-VDATU.
            OP_RDD = E_RDD.
            ELSE.
              OP_RDD = VBAK-VDATU.
         endif.
              CALL FUNCTION 'DATE_COMPUTE_DAY'
                EXPORTING
                  DATE          = OP_RDD
               IMPORTING
                DAY           = X.
      CALL FUNCTION 'ZROUTESCHEDULE'
        EXPORTING
         KUNNR         = L_KUNNR
        VSBED         =
          VSTEL         = VBAP-VSTEL
          ROUTE         = VBAP-ROUTE
       IMPORTING
         ZRETURN       = IT_RETURN.
    READ TABLE IT_RETURN INTO WA_RETURN INDEX 1 .
            IF       WA_RETURN-MONDAY    = 'X'.
                     wa_days-num = '1'.
             append  wa_days to it_days.
            ENDIF.
           IF        WA_RETURN-TUESDAY   = 'X'.
                     wa_days-num = '2'.
            append   wa_days to it_days.
           ENDIF.
           IF        WA_RETURN-WEDNESDAY = 'X'.
                     wa_days-num = '3'.
            append   wa_days to it_days.
         ENDIF.
           IF        WA_RETURN-THURSDAY  = 'X'.
                     wa_days-num = '4'.
           append    wa_days to it_days.
             ENDIF.
            IF       WA_RETURN-FRIDAY    = 'X'.
                     wa_days-num = '5'.
            append  wa_days to it_days.
             ENDIF.
           IF     WA_RETURN-SATURDAY  = 'X'.
                  wa_days-num = '6'.
         append  wa_days to it_days.
         ENDIF.
           IF    WA_RETURN-SUNDAY    = 'X'.
                 wa_days-num = '7'.
         append  wa_days to it_days.
            ENDIF.
    SORT IT_DAYS BY NUM.
    CLEAR WA_DAYS.
    IF NOT IT_DAYS[] IS INITIAL.    "#1 CHECKING
    READ TABLE IT_DAYS INTO WA_DAYS WITH KEY NUM = X.
    IF SY-SUBRC <> 0.
    IF NOT IT_DAYS[] IS INITIAL.
    LOOP AT IT_DAYS INTO WA_DAYS.
    IF WA_DAYS-NUM GT X.
      Z  = ( WA_DAYS-NUM ) - X.
      UP_DATE  = OP_RDD + Z.
      EXIT.
    ENDIF.
    ENDLOOP.
    ENDIF.
    SORT IT_DAYS BY NUM DESCENDING.
    IF UP_DATE IS INITIAL.
      IF NOT IT_DAYS IS INITIAL.
      READ TABLE IT_DAYS INTO WA_DAYS INDEX 1.
      Y = X - WA_DAYS-NUM.
      UP_DATE = OP_RDD + 7 - Y.
    ENDIF.
        ENDIF.
       VBAK-VDATU  = UP_DATE.
    ENDIF.
    CLEAR: X,UP_DATE,Y.
    ENDIF.   "#1 CHECKING
    ENDIF.    "1 YVBAK
    ENDIF.

  • To update Delivery date in PR through IW32

    Hi All,
    I have a requirement to update Reqt.date whihc i achieved by writitng the logic to update RESB table in WORKORDERupdate BADI.
    whenever i create new order or change a existing orders and add components and try to save. the Reqt date get changed based on the calculation i have written .. i.e . for checking the planned delivery time/days..
    this was automatically getting reflected for delivery date field when PR was created.
    Once PR is released and i try to add component and save, PR gets created automatically and the requirement date is also updated but Delivery date field is not gettin update in PR.
    Please suggest ideas.

    Hi,
          To modify the delivery dates as per our logic the below user exit might be  suitable :-
    COZF0002 Change purchase req. for externally procured component
    Note :- If the component has material master record then system will take Planner delivery time into consideration for calculation of delivery time into consideration for calculation of delivery date i believe so
    You can also check  BADI :-IWO1_PREQ_BADI BAdI for Manipulation of P.Reqs from Orders + Networks
    regrds
    pushpa

  • Planned order creation via MRP depends, If we change Delivery date in STO

    Hi,
    Planned order  creation via MRP depends, If we change Delivery date in Stock transfer Order.
    I created STO with delivery date as 31.1.2012 and when i checked MD04, i can see Planned order created on 27.2.2012 with the same above STO quantity .
    Now when i changed the delivery date as 30.1.2012 and runned MD03, and then checkd MD04, planned order disappeared.
    Why Planned order got created when STO delivery date was 31.1.2012 and when I changed the delivery date in PO, planned order disappeared.
    MRP profile details :
    Plnd delivery time   1
    GR processing time   1
    Planning time fence  38
    Tot. repl. lead time 38
    Can you please let me know why system is beaving in this manner?
    Regards
    Utsav

    Hi,
    Normally , MRP runs based upon the requirements.If your STO is created for a date , system checks through the availabiloty check wheather there exists any stock for that date to get deliverred in the supply plant .If there exists for that date the stock , planned order will not be created.If no stock available then a planned order will be created in MRP.
    cHECK the availability check parameters assigned to material master in supply plant.
    Regards,

  • Delivery dates in STO

    Hi All,
               Please let me know how the delivery dates are getting calculated in STO while creating a STO in the shipping tab. What all parameters are considered while calculating the delivery date.
    Regards,
    Ashwin

    Hi,
    During the STO po creation process  system checks the avalability of the material in the supplying plant.in the check it will consider the possible incoming of materias like PO, ORDER etc in the supplying plant abd decides about the possible availability date in the supply plant.
    You would have observed a warning message while PO creation saying that 'material not available or psrtially available etc.
    This date is the base for the delivery by the supplying plant.Based upon this date system calculates when to deliver , transport,pack , etc in the supplying plant.
    please check the availabllity check at OMGN t code.
    Ofcourse system will take the deliverey date as per your wish with a warning message during creation of PO but may not deliverer at VL10G/B if there is no stock.
    Regards,

  • Inbound idoc for updating delivery date of purchase order

    Hi All,
    Our vendor sends a delivery file consisting of delivery date and quantity(could be partial) for line items of a purchase order.
    I need to update the Purchase order line item with the delivery date and quantity sent from the Vendor. It should add a new confirmation line with custom confirmation category in the confirmation tab of the line item in the Purchase order.
    Each time we get a delivery file we need to add a new confirmation line in the confirmation tab of the purchase order line item.
    How can I get this working using inbound idoc processing? Which Idoc type should I use to solve my issue. Will ORDERSP work for my scenario?
    Thank you,
    Sonali.

    >
    sonali ashi wrote:
    > We have all EDI set up done for ORDERSP idoc in our system. Problem when I use this idoc type by default system is always adding confirmation catgeory 'AB' but we want our custom  category to be added instead of 'AB'.
    > Edited by: sonali ashi on Dec 23, 2010 9:47 PM
    Confirmation category used for order acknowledgement is define in configuation. You can change that from AB to your custom condition and EDI should pickup that.
    SPRO->Material Management->Purchasing->Confirmation->Define Internal Confirmation Category
    >
    sonali ashi wrote:
    > I have also noticed that 'AB' confirmation accepts only full quantity order acknowledgement through Idoc processing.
    > Manually I can add a "AB" confirmation for partial quantity but in the idoc processing it fails.
    > Edited by: sonali ashi on Dec 23, 2010 9:47 PM
    Check tolerance limit defined for confirmation category in 'Conformation Control' Node in SPRO at same level as above.
    Regards,
    Pawan.

  • IDoc programming for Requested Delivery Date - Inbound ORDERS

    Hi Folks,
    I want to manipulate Requested Delivery Date on the Sales Order.
    The Field for Req Del Date is RV45A-KETDAT.
    But this value is stored in VBAK-VDATU.
    When i am trying to modify this value using dxvbak structure, this value is getting populated correctly, but not updating in the table.
    Look at the code snippet below.
    if zedidc-sndprn = '0000902000'.
            IF ze1edk03-iddat = '002'.
              MOVE ze1edk03-datum TO zvbak-vdatu.             " Requested Delivery Date
               zvbak-vdatu = sy-datum + 7.
               BREAK-POINT.
               dxvbak = zvbak.
            ENDIF.
            endif.
    What's wrong here??
    Thanks,
    Matt

    Done

  • Updating delivery date in PO

    How can I update the delivery date in Purchase Order after getting confirmation from vendor ? If I update item delivery date, I loose the original delivery date.

    Hi,
    You have to use this ASN or inbound delivery functionality for your requirement.
    If you change the delivery date in PO it becomes a amended PO
    Thanks
    suresh

  • Update Delivery date programatically for inbound delivery

    Hi all,
    I need to update the delivery date in the inbound delivery programatically...How cna i do that?any FM available?
    The field to be updated is LIKP-LFDAT.
    Thanks.

    Check WS_DELIVERY_UPDATE ,   BAPI_INB_DELIVERY_SAVEREPLICA
    ALso check how to change delivery date (LFDAT) in a inbound delivery

Maybe you are looking for

  • Blank screen after logo at startup

    I have an HP laptop (G72-B66US) running on 64-bit Windows 7 Home Premium. Since I bought it over a year ago, it had been running fine, until one day it failed to boot up to Windows, leaving only a blinking cursor in the upper-right corner of an other

  • Quick Look quits when trying to preview .mov videos...

    Process:         com.apple.qtkitserver [19556] Path:            /System/Library/XPCServices/com.apple.qtkitserver.xpc/Contents/MacOS/com.apple. qtkitserver Identifier:      com.apple.qtkitserver Version:         1.0 (1) Code Type:       X86 (Native)

  • Memory Leak for Graphics2D.drawString?

    Hi, all!! I am a Java Programmer who is experienced in Swing application on a windows platform. I have developed a code snipplet to print out to use Graphics2D.drawString method. Then, I have encountered the performance degrade that the number of obj

  • Cannot use at photoshop cc that  color efex pro4

    how can i do

  • How to get top most rows col into a vriable.

    hi, i want to get the smallest "Tid" greater than v_Id1 into v_b which method i should use both are working. 1) SELECT * INTO v_b FROM ( SELECT TId FROM tt_T WHERE TId > v_Id1 ORDER BY TId ) WHERE ROWNUM <= 1; 2) SELECT * INTO v_b FROM (SELECT Tid FR