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

Similar Messages

  • 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

  • How are shipping point and delivery note connected ?

    I wanted to understand how is shipping point connected to process of creating delivery notes....can we configure sap using SPRO such that the delivery note creation happens automatically for certain shipping point once the order is created and saved ....and for certain shipping point the delivery note is not automatically created ( assuming we are using the same order type) but the determination of automatic DN creation is done by the value of the shipping points ??

    Actually what is shipping point?
    Shipping point is an independent org.unit which is linked to the plant and represent the point of departure or receipt of materials.
    Normally lot of shipping points are assigned to the plant.
    Relation:
                   Actually a delivery is created from a single shipping point only.. That is the reason when u complete the sales order, at the time of creating the delivery note, u are forced to enter the shipping point, without that the system willn't proceed further.
    Determination:
    It is determined with the formula of shipping conditions + loading grp + deliv. plant
    Answering to ur 2nd query,
    when u are creating the delivery from the sales order screen (by going to menu bar and click delivery), the system automatically assumes the shipping pt is from the sales order.
    But if u enter the different shipping point in delivery note creation, the system will thro an error that delivery split due to diff. shipping points.
    Hope i clarify ur queries, ur further queries are welcomable.
    Reward points if useful...
    regards
    Kaleeswaran

  • 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

  • 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

  • Sales orders and delivery creation

    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,
    Modify the Selec as below:
    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

    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

  • SHIPPING POINT AND STORAGE LOCATION DETERMINATION IN DELIVERY

    i made configuration setting for shipping point and storage location determination during delivery process. still system is not proposing this data during delivery.
      due to this reason lot of time is consuming during delivery creation.
    plz suggest the complete configuration flow for this determination.

    Dear Ram,
    Can you please specify the configuration that you have made? And which storage location determination rule are you using for your Delivery Type?
    Regards,
    Amitabha

  • 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

  • How to get automatic plant and shipping point and storage location

    hi,
    sap gurus,
    how to get automatic plant and shipping point and storage location automatically into the sales order
    i have done all the config settings for that
    but its not appearing automatically.
    regards,
    balaji.t

    Hi
    Balaji...
    U can get the plant in sales order,  by doing the default the same in customer master or in  material master. In customer master -- sales are data--shipping tab delivering plant there u can assign and get the same in order for that customer. it is better to do in customer master rather than in material master.
    Shipping point is getting determine in sales order and u can not make it default like plant. Shipping point is determine in the basis of Shipping condition of customer ( ship to party)+ loading group of material + Deliverying plant there u have to assing the shipping point and it will flow in the sales order. Tcode OVL2
    For S loc u have to enter manually in the sales order u can not get it automatically.
    Hope this will help you.
    Thx.

  • 2LIS_12_VCITM populates the same Shipping Point and Receiving Plant

    Hi Gurus,
    We are using 2LIS_12_VCITM extractor which answers all delivery-related requirements. However when I checked the data in RSA3, Shipping Point and Receiving Plant are the same. So I checked some sample deliveries in table LIKP and it shows the correct shipping point and receiving plant (which are different to each other). I checked VL03N and table LIKP is giving the correct shipping points and receiving plants. Receiving Plant or LIKP-WERKS and Shipping Point or LIKP-VSTEL. My question is how this happened? Consequently, when I initialized in BW, shipping point and receiving plants are the same which should not be.
    Thanks for all the help.

    The data for the 2LIS_12_VCITM is not just sourced by LIKP (Delivery Header), but by LIPS (Delivery Item) too.
    Plant, in this extractor, is sourced by LIPS-WERKS instead of LIKP-WERKS. The receiving plant is LIPS-UMWRK. If you require this data, you will have to enhance the structure and create the User Exit code in tcode CMOD to extract that particular data.

  • 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

  • PO creation Date and Invoice creation Date

    Hi,
    Can any one help me regarding which table I can look for PO creation date and Invoice creation date. I require these fields for my reporting requirement.
    Thanks in advance,
    Arvind.

    Thanks for your response Bala.
    I got the Table which I require. I have one more question on this.
    Can you tell me Invoice Creation Date is RBKP-BLDAT(Document Date in Document) or RBKP-BUDAT(Posting Date in the Document) and PO creation Date is EKKO-AEDAT(Date on which the record was created) or EKKO-BEDAT(Document Date in Document).
    Points already rewarded.

Maybe you are looking for

  • I have a mac mini which will not wake from sleep mode since installing yosemite.

    The cursor moves when using a track pad and magic mouse, but I can't click on anything. Also computer always starts in safe mode now. Am I the only one having this problem. I have sent the error messages to Apple, but have not seen any updates that m

  • PDFs from InDesign for print then web?

    The workflow is supposed to be: we simply take the PDF files which were created from InDesign and then sent to our printer, and give them to our web service company who has our online edition finished by morning. But we're upgrading our photo process

  • MBP Calibration won't stay

    Hi, I have a MBP 15" with an Envision external monitor hooked to it. When I bring it out from the Screen Saver, the Laptop LCD has this bluish tint to it. I click system preferences, display and "bam" problem solved. But the reoccurring problem is th

  • Re: BI Java JDBC Connector configuration Error

    Hi friends, Our BW 3.5 system is working on win2003 with ms-sql db with sp10/J2EE 6.40 with SP8. We installed the MS-JDBC driver & Configurd based on standard documentation. When we use to test connection using the link https://qbiwd1:50200/tjdbc/ser

  • Output type setting for MB1C  transaction

    Dear All, I have to attach a custom SAPScript in the output type so that when the goods movement will be done through MB1C transaction, the SAPScript will be printed. Can you please help me out how to attach to the output type. I assume the printing