Skip to Content
avatar image
Former Member

Link Sales Order Schedule Lines to Delivery

Hi we have a custom report we use to gather all the inventory information, as well as open orders and deliveries. We are running in to a a bit of a snafu when it comes to the order's schedule lines. It seems we can not find a good link between the delivery and order's schedule line for the sales order item. Any one got some thoughts? Thanks.

-Larry

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    May 04, 2010 at 04:20 AM

    Hi Larry,

    The link are there in standard tables.

    Depending on the types of information that you want to gather from Sales Schedule Line, you can use the below logic:

    1. Give your program selection screen for VBAK-VBELN (optional), VBAK-AUART (optional), VBAK-VKORG (mandatory) and VBAK-AUDAT (mandatory). Give as much selection possible to narrow down the search and so that the program can run more efficiently.

    2. Based on selection screen input + VBAK-VBTYP = C, get all VBAK-VBELN.

    3. Where VBAP-VBELN = VBAK-VBELN, get all VBAP-POSNR, and for information at Sales Line Item, get all respective VBAP-MATNR, VBAP-KWMENG and respective VBAP-MEINS, VBAP-WERKS and VBAP-NETWR. Store in Z-table.

    4. Where VBEP-VBELN = VBAP-VBELN, VBEP-POSNR = VBAP-POSNR and VBEP-ETTYP = XX (Schedule Line Type - you do not want to retrieve all types. Name only a few.), get all VBEP-EDATU, VBEP-VBEP, VBEP-BMENG and VBEP-LMENG. Not forgetting also VBEP-WADAT if u require. For 3rd Party Sales, Requisition number can be obtained from VBEP-BANFN.

    5. Where all data are obtained, populate in ALV for respective Sales Order and group accordingly. ABAP will know what to do.

    6. Where LIPS-VGBEL = VBEP-VBELN and LIPS-VGPOS = VBAP-POSNR, get all LIPS-VBELN.

    7. Then gather all your required fields in LIKP and LIPS table accordingly.

    Hope this helps.

    Thanks.

    Rgds.

    Edited by: PKW on May 4, 2010 12:21 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 04, 2010 at 02:38 AM

    Hi,

    You need to find out common field in tables VBEP and LIPS and LIKP.Ask your abaper to write a program by linking these table refering a common field.

    thanks,

    Vrajesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 04, 2010 at 03:29 AM

    Hi,

    There is no link between Schedule line and the delivery line item.

    To overcome this,

    1. Create append structure in the LIPS table to accommodate to carry the schedule line item of sales order in each delivery document + Line Item combination. (This will be a problem when only, a delivery line item contains goods from multiple schedule lines)

    Therefore you have to ask user to use VL10E to create deliveries. (Which means your creating deliveries for schedule line level, so that you have one to one link between delivery and schedule lines)

    2. Use this user-exit u2013include MV50AFZ1. Can save the particular sales order schedule line in the LIPS, earlier created append structure field.

    Best regards,

    Anupa

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 04, 2010 at 06:33 PM

    This still leaves me with out the schedule lines. And ABAP is only going to link by some random sequence, i.e. returned line order or maybe ship date order. I am thinking keying off the schedule date to try and get close. This is still not perfect, but it is all I got at the moment.

    LIPS.VGBEL = VEBP.VELBN

    LIPS.VVPOS = VEBP.POSNR

    LIPS.?????? = VEBP.ETNER

    So maybe LIPS.EDATU like VBEP.ERDAT +/- 4 days

    What we are trying to do is link deliveries not confirmed to the schedule lines so we can see the open amounts.

    -Larry

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Sorry for the misunderstanding. SAP includes deliveries not PGI'ed / not confirmed as part of the order fulfillment correct?

      I am seeking to back that amount out and have it as a separate amount, sine the inventory is still in the plants unrestricted balance and the delivery has yet to be confirmed /.PGI'ed. In doing so I need to match the delivery not PGI'ed to a schedule line(s).

      I think we have found a soultion to do this we are going retrieve the order/line/schedule and quantity delivered removing the zero amounts, then working in descending dates of the schedule lines apply the amounts of the unconfirmed / PGI'ed deliveries.

  • avatar image
    Former Member
    May 05, 2010 at 06:11 PM

    Thanks for the feed back all, I think we have to to just do a few extra steps to get the results we wanted and could not link directly to our desired answer.

    Add comment
    10|10000 characters needed characters exceeded