Shipping point , delivery creation date

Hi :
  I have a custom table with fields :
belnr, posnr, btyp, aufnr, ebeln, ebelp, livbeln, liposnr,matnr,wadat,kunnr,werks,bmeinh,getri,inaktiv,wabukz,erdat,aedat,loekz.
Custom Transaction with fields :
vbeln (field name belnr) , aufnr, delivery vbeln ( field name livbeln ),werks, mat .avail.dat (  mbdat ), transport.plan date(tddat),
matnr, and sales order item (posnr).
I have to select sales order , item from custom table based on plant (werks) shipping point , and delivery creation date.
how can i relate shipping point and delivery creation date to my query.
For delivery creation date, it should be selected based on current date+-2 and should choose MBDAT OR TDDAT which ever is earlier based on current date.
I would appreciate if anyone can give me som idea and full points r rewarded.
Thx.
Rag

Hi Pankaj,
Please try to use BAPI 'BAPI_DELIVERYPROCESSING_EXEC' for creating delivery form sales order , you can pass value and create delivery.
you can refer below code, it may be helpfull for you to create delivery.
DATA: BEGIN OF t_vbap OCCURS 0,
        vbeln LIKE vbap-vbeln,
        posnr LIKE vbap-posnr,
  zmeng LIKE vbap-kwmeng,
        matnr  LIKE vbap-matnr,
        werks  LIKE vbap-werks,
      END OF t_vbap.
DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
      WITH HEADER LINE.
DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
      WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
SELECT vbeln posnr zmeng matnr werks
       INTO TABLE t_vbap
       FROM vbap
       WHERE vbeln = v_vbeln.
LOOP AT t_vbap.
  t_request-document_numb = t_vbap-vbeln.
  t_request-document_item = t_vbap-posnr.
  t_request-quantity_sales_uom = t_vbap-zmeng.
  t_request-quantity_base__uom  = t_vbap-zmeng.
  t_request-id = 1.
  t_request-document_type = 'A'.
  t_request-delivery_date      = sy-datum.
  t_request-material = t_vbap-matnr.
  t_request-plant = t_vbap-werks.
  t_request-date = sy-datum.
  t_request-goods_issue_date = sy-datum.
  t_request-goods_issue_time = sy-uzeit.
  APPEND t_request.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
     TABLES
          request      = t_request
          createditems = t_created
          return       = t_return.
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc = 0.
  MESSAGE e208(00) WITH 'Delivery creation error'.
ENDIF.
COMMIT WORK.
Regards,
Prasenjit

Similar Messages

  • Bapi for creation of delivery by using SO,shipping point,delivery creation date

    Hi experts,
    I am looking for bapi that takes sales order,shipping point and delivery creation date and generates delivery.
    I have tried with bapi GN_DELIVERY_CREATE but i am not able to understand whether this bapi is used for inbound or outbound deliveries.If this bapi is ok then what are the mandatory fields for this bapi.
    Regards,
    Pankaj Jain

    Hi Pankaj,
    Please try to use BAPI 'BAPI_DELIVERYPROCESSING_EXEC' for creating delivery form sales order , you can pass value and create delivery.
    you can refer below code, it may be helpfull for you to create delivery.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
      zmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr zmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-zmeng.
      t_request-quantity_base__uom  = t_vbap-zmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
         TABLES
              request      = t_request
              createditems = t_created
              return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    Regards,
    Prasenjit

  • Very urgent : shipping point and delivery creation date

    Hi :
    I have a custom table with fields :
    belnr, posnr, btyp, aufnr, ebeln, ebelp, livbeln, liposnr,matnr,wadat,kunnr,werks,bmeinh,getri,inaktiv,wabukz,erdat,aedat,loekz.
    Custom Transaction with fields :
    vbeln (field name belnr) , aufnr, delivery vbeln ( field name livbeln ),werks, mat .avail.dat ( mbdat ), transport.plan date(tddat),
    matnr, and sales order item (posnr).
    I have to select sales order , item from custom table based on plant (werks) shipping point , and delivery creation date.
    how can i relate shipping point and delivery creation date to my query.
    For delivery creation date, it should be selected based on current date+-2 and should choose MBDAT OR TDDAT which ever is earlier based on current date.
    I would appreciate if anyone can give me som idea and full points r rewarded.
    Thx.
    Rag

    Hi,
    Try this:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    regards,
    Anji

  • Shipping point and delivery creation date

    Hi :
    im selecting sales orders , items and schedule line
    from a custom table based on plant, shipping point and delivery creation date. 
    Is there any relation between Schedule lines and delivery creation date.
    For delivery creation date d_date = SY-DATUM,  and should select Mat Avail dt MBDAT or Trans. planning dt TDDAT which ever comes earlier.
    vbep-edatu = itab-d_date.
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep on a1posnr = vbepposnr
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    can anyone help me with this select statement.
    Thanks.
    Raghu

    Hi,
    Try this:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    regards,
    Anji

  • Delivery Creation Date under Shipping Tab in Purchase Order

    Hi All,
    When my client creates a Purchase Order with 5 line items, for 3 itmes he can create Delivery ( with delivery date of 25/03/2010) however for line itme 40 and 50 it gives error while creating delivery ( 0 units available of that material)
    Stock exist in delivering plant as checked in MMBE.
    On checking the PO, the difference i could find between line items 10.20.30 (which can be delivered) and line item 40, 50 (which cant be delivered) is that under Shipping tab for item 10,20 and 30 Delivery Creation Date is Blank. However for item 40 and 50 Delivery creation date is maintained same as delivery date i.e. 25/3/2010.
    In VL10B we have already tried inputting Delivery creation date as 25/03/2010 and then executing after supplying the PO number but it still gave the same error messgae.
    Kindly guide as it is stopping Business. A speedy reply will be highly appreciated.
    Thanks in advance.
    BR,
    Anshul

    Re: Only 0 KG of material available
    Kindly check above mentioned thread.

  • Delivery creation date under shipping tab in STO

    Dear Experts,
    please explain me how the Delivery creation date is calculated IN STO order, and the same date is carried to the MRP date of Supplying plant in MD04.
    thanks
    Satya

    Please check these answered links:
    Delivery Creation date in STO
    Re: Delivery dates in STO
    STO Delivery date
    Edited by: Afshad Irani on Apr 29, 2010 10:04 AM

  • Incorrect delivery creation date in stock transport order

    Hi,
    I've checked SAP notes and forums but no answers to this one....hope you can help.
    I have 2 plants, in separate company codes.  One orders from the other using a full inter-company process.
    The issue is, when i raise a PO the delivery date (shipping tab) is updated correctly, using the agreed lead time (planned delivery days)
    However, the Delivery Creation Date is usually updated with 'todays' date.  It's as though the planned delivery days on the material master or PIR is being interpreted as a transit time between the plants.
    This has 2 undesirable effects:
    1.  The supplying plant has no notice, requirement date is NOW
    2.  Delivery creation batch jobs create deliveries which aren't really due yet
    I really need the Delivery creation date to be a true material availability date  ie the date the goods are required to be available in the supplying plant.  For us this would be 3 days (transit time between plants) before the delivery date. 
    Any help greatly appreciated.
    Regards
    Guy

    Guy,
    true lead time.
    is a bit ambiguous.  The system does exactly what you tell it to do.  'True Lead time" is not defined in SAP.  What do you mean by this term?  Are you talking about "Total replenishment lead time" in the material master?
    Anyhow, you are telling me you want the delivery creation date to be "three days prior to Delivery date".  No problem, set PDT to 3 days.  So, if you today created an STO with a delivery date of July 30, and the PDT was 3 days, the delivery creation date would be July 27.  If you also want cushion, then today convert the STPRs with a delivery date of July 30.  Don't wait until July 27 to convert these PRs.
    How are you creating STOs today?  You mentioned delivery dates being populated by the system.  How? What transaction/what program?  If your current process is to automatically convert all existing STPRs into STOs, then you probably need to consider adding some time to Purchase Req processing time.  OMEW in config.
    Rgds,
    DB49

  • Delivery creation date

    Hi Gurus,
    We have an STO that has the delivery creation date on the shipping tab and when we create delivery for the corressponding STO line items  the delivery creation date<LEDAT> is disappearing on the STO line item.
    Is this an SAP standard???
    Is there an enhancemnet that we can add delivery date field<EINDT> on the selection screen of VL10B transaction????
    Thanks
    SAM

    Hi John
    Thanks for your reply.I have an STO whose delivery creation date exists before creating the delivery from the STO but after running VL10B delivery is getting created and when I go to STO line item in the shipping tab the delivery creation date is dissappearing.
    I am wondering if this is an SAP stanndard????????
    Thanks
    SAM

  • Delivery creation date field in STO

    Friends,
    I have created 2 STO's ...for 1st STO i can see the delivery creation date in Shipping tab......however for 2nd STO shipping tab is there but  the delivery creation date field is blank...
    what could be the reason...how this gets calculated ?
    Regards,
    Vijay

    Hi,
    Whenever you create a STO and save it, the delivery creation date is
    determined based on the delivery date and planned delivery time.
    (Note 498143 question 2)
    And if certain STOs are subjected to release strategy, the delivery
    creation date is not populated for those STOs. Once the STOs are
    released you will have the delivery creation date populated correctly.
    regrads,
    Lalita

  • Default 'Delivery Creation Date To' on VL10G

    Hi All,
    We've upgraded SAP4.7 to ECC6.0. After that, The default value on 'Delivery Creation Date To' in tcode
    VL10G,  it's showing 30 days ahead from current date.
    Is there any configuration to change it to current date?
    It was current date in SAP 4.7.
    Thanks for help.

    Hi,
    The default value in the field 'Delivery Creation Date' was due to the list profile maintained for the transaction VL10G.
    To change this default value to any desired value(Todays Shipping Date) do the following.
    Go to -->'User Role' tab in the transaction VL10G.
    Click the 'Role' button, select the role in change mode.
    Change the default value in the field 'Rule DlvCrDate' to the desired value.
    Thanks,
    Srikanth.G

  • Converting Delivery Creation Date/Time into the Local Date/Time

    Hi
    I have two fields like 'Delivery Creation Date' and 'Delivery Creation Time' in ECC system . My user wants the Delivery Creation Date / Delivery Creation Time in Local time of Plants .
    For example :
    Delivery    Plant       DelivCreationDate       DelivCreationTime   DelivCreationDate(Local)   DelivCreationTime(Local)
    312456          1650               11/2/2007                     4:30                          11/2/2007                          3:30
    Here the Plant 1650 is in Mexico . The above delivery is created in Canada in ECC system according to the candain time .
    But user wants to convert the Candain Delivery Creation Date and Time into the Local Date/Time of specific plant .
    So we need to convert the  Candain Delivery Creation Date and Time into Mexico timings .
    How can it is possible this one and user wants to automate this process .
    Please let me know
    Mubeen

    DATA :
    timestamp like TZONREF-TSTAMPS,
    time like sy-uzeit,
    date like sy-datum.
    The following function module is used to convert the
    time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
    EXPORTING
    i_datlo = <source_fields>-delivery_date
    i_timlo = <source_fields>-delivery_time
    I_TZONE = CAD'
    IMPORTING
    E_TIMESTAMP = timestamp.
    The following function module is used to convert the
    above obtained timestamp to MEX  timezone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
    EXPORTING
    i_timestamp = timestamp
    I_TZONE = MEX
    IMPORTING
    E_DATLO = date
    E_TIMLO = time.
    CAD and MEX are variables i have used...
    the challenge is to find the canadian and mexican time zone....CAD and MEX.
    which you can get by performing a lookup in table T001W and passing country as parameter.

  • VL10A - Delivery creation date

    Hi 
    I have a issue in VL10A
    sales order creation date and sales document date is on 29.05.2011, Requested delivery date is on 30.05.2011
    Scehdule line confirmed date is 30.05.2011
    When i processed for the dleivery list display in VL10A for this sales order
    Delivery creation date is shown as "27.05.2011"
    Can any one tell me why the dleivery creation is back date
    Regards
    KK

    Hi  Ankur,
    THanks for the inputs
    Bu this is single sales order, this dleivery link with only one sales order
    When we check the VL10A display list it will shows us the creation delivery date as 27.05.2011
    In delivery the creation date is 30.05.2011 as per the requeted delivery date in the sales order

  • Problem related to Outbound Delivery creation via Background Job

    Hi ,
    We are using the program RVV50R10C for creating OBD incase of STO .
    Z variant is created to take care of selection parameters which inlcudes Shipping Point , Delivery creation date , Calc Rule, Delivery priority and shipping conditions.
    The job is scheduled to run for every 10 minutes .
    As planned the job is running for every 10 minutes but the OBD are created after 1 hour .
    What are possible causes of this error.?
    Please note that there exists enough stock.
    Regards
    Ramesh Ch

    I think you will have the same problem when doing it manually with VL10B.
    The creation is based on entries in an index. there is a userexit where you can influence how and when an entry goes into the index.  E.g. you can speed up the overall performance if you do not update the index all the time, instead you are doing this with a background job from time to time.
    Check if this is the case in your system.
    this note may give you some hints:
    Note 356061 - Incorrect index compilation caused by own checks

  • Loading Date\Time per Shipping Point

    Hello all
    we need to fill SO with certain values: on item level  "Loading Date" field (there should be value of next day after SO creation) and "Loading Time" ("_00:00_" value). These two fileds should be filled only for certain shipping points.
    Is it possible?

    Hi,
    It is not that easy.
    The time mentioned in the Delivery or Transportation scheduling mentions the lead time and not the date . The dates are decided by delivery scheduling namely backward or forward scheduling. In your case, if you want to control this in masterdata, you have to  maintain the procurement type of material as either inhouse  production or outward procurement. In either case, you have maintain the production or procurement lead time as just one day. In this case, the next day becomes the material availability date (MAD). The same date will also be updated as Loading date. Based on the loading leadtime maintained in the shipping point, the further dates will be decided.
    So the production or procurement lead time will decide when ur MAD will be and based on that ur loading date will be updated. Maintain ur masters accordingly in material and ur reqmt will be fulfilled.
    Hope this helps

  • Delivery creation based on Customer Preferred Days

    Hi,
    We are on SAP 4.7 version.
    My requirement is to have delivery create date (i.e. schedule line date) to be based on certain specific days of the week. For example one customer picks up their goods on Wednesdays only. I want all deliveries due before wednesday to be created on wednesday. These days are specific by customer. I therefore cannot set up shipping point calendars.
    How can this be achieved ?
    I tried, Unloading points -- calendar assignment in customer master. It does not help is determining the schedule line date. I only get a warning message saying "customer will accept delivery on dd/mm/yyyy".
    Any suggestions are highly appreciated.
    Regards,
    Ron

    Hi,
    You should be able to do it via route scheduling - I haven't used it myself yet, but see an extract below from SAP Help about Route Scheduling. In Route Scheduling you can specify by customer what dates and times the customer can receive a shipment. The system does backward scheduling based on the date and time that the customer can receive the shipment, and the delivery creation date should be based on the route schedule. The key is to ensure that the route schedule is used to determine the delivery creation date. Like i said, i havent done this before, but it is worth investigating.
    =================================================================================================
    Processing a Route Schedule  
    Implementation Options
    Wholesale trade customers and stores can receive goods at regular intervals. These delivery rhythms have an influence on the workload in the warehouse. To help delivery planning, the route schedule serves as a tool for planning regular, repetitive customer deliveries on a particular route. At the time of planning, potential deliveries that have not yet been created are grouped in the route schedule. When the deliveries are created, the system can automatically determine a route schedule and assign it to the delivery. All deliveries with the same route schedule and the same date can be processed together in the shipping point. All these deliveries leave the shipping point together at a particular time. They are distributed along the same geographical route.
    · Deliveries for route schedule MO10H leave the shipping on Mondays at 10:00 in the direction of Philadelphia.
    · Deliveries for route schedule MO10M leave the shipping point on Mondays at 10:00 in the direction of Boston.
    · Deliveries for route schedule MO10S leave the shipping point on Mondays at 10:00 in the direction of New York.
    You can print picking lists for all deliveries that belong to route schedules MO10H - MO10S together.
    Maintenance of the itinerary should be uniform for all the route schedules used. To ensure exact planning, maintain the itinerary for all the route schedules. If rough planning is sufficient in this case, you do not need to maintain the itinerary for a route schedule.
    If you do not define any goods accepted times in the customer master for the unloading points of the ship-to party, the system assumes that the goods acceptance is possible at any time. The system determines the delivery time from the departure time in the route schedule plus the required traveling time to the ship-to party, as set in the itinerary (specific move time). This delivery time must be within the goods acceptance time of the unloading point of the ship-to party. If not, the respective route schedule is not determined during delivery creation.
    For more information on route schedules, refer to the Implementation Guide (IMG) under Route Schedules.

Maybe you are looking for

  • No popup when using cl_bsp_utility= download

    Hi friends, I´m using cl_bsp_utility=>download method from my BSP to download a file. I´ve never used it, but as long as I could see in the forum, it´s suppossed to open a popup to choose the file destination, right?... Well, I´m getting nothing...wh

  • How do I download Logic Pro to a macbook with no disc drive if I previously bought the disc version?

    so basically i bought logic pro 9 a while ago when it came out, and i have it in disc-form. i am thinking of getting a macbook air, or the new macbook pro's which have yet to be announced that will probably have no disc drive. how can i get logic pro

  • Considering switching to PC, can I import my itunes library?

    I am considering switching to a windows PC from a Mac, it is time for a new laptop and I can get a decent windows PC for less than half of a comparable Mac. My one concern is my Itunes library, which is on my Ibook. Can I transfer this to a new windo

  • Application message help could not be called Message in SABAPDOCU888

    Hi,                                                                       After the application of the Support Package 21 in the DEV, help is not functioning correctly, for example, in top of word WRITE (in a publisher ABAP), I pressure F1, opens hel

  • Skype not load correctly in my win 8..

    hallo everyone ihave problem with my Skype application.. after installing in my win 8.. Skype not load correctly in my win 8.. it display  like this.. anyone know why this happens?? Itry to sign in in there, but it just not respond..