Query - Delivered quantity at schedule line of Sales Order

Hi,
I've realized a sales order report and i need extract for each schedule line the delivered quantity (VBEPD-VSMNG). How can i find the correct values?
Thanks and best regards.
Antonio

Hi.
You can use the function module RV_SCHEDULE_CHECK_DELIVERIES to get the delivered quantity corresponding to schedule line item  in sales order.
Please refer below code:
Internal table it_vbep has got field VSMNG which is the delivered quantity for each line item
  SELECT * FROM vbfa
    INTO  TABLE  it_xvbfa
    WHERE vbelv = <sales order numer>
    AND posnv = <sales order line item>
    AND vbtyp_v = 'C'.
    SELECT  * FROM vbup
    INTO TABLE it_xvbup
    WHERE vbeln = <sales order numer>
    AND posnr = <sales order line item>.
    SELECT * FROM vbep
    INTO TABLE it_vbep
    WHERE vbeln = <sales order numer>
    AND  posnr = <sales order line item>.
    SELECT  * FROM vbap
    INTO  TABLE it_xvbap
    WHERE vbeln = <sales order numer>
    AND  posnr = <sales order line item>.
    CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
      EXPORTING
        fbeleg                  = <sales order numer>
        fposnr                  = <sales order line item>
      TABLES
        fvbfa                   = it_xvbfa
        fvbup                   = it_xvbup
        fxvbep                  = it_vbep
        fvbap                   = it_xvbap
      EXCEPTIONS
        fehler_bei_lesen_fvbup  = 1
        fehler_bei_lesen_fxvbep = 2
        OTHERS                  = 3.
Regards,
Sameer

Similar Messages

  • How to deactivate schedule line in sales order

    hi friends,
    how can i deactivate the schedule line in sales order so that we can deliver the sales order after the schedule date. i can uderstand that system is not allowing before schedule date. but what if i want to deliver after that.
    Thanks in advance.
    Regards,
    Solomon

    hi,
    this is to inform you that,
    here you need to switch off:
    schedule lines allowed
    in schedule lines control data - remove or un check - availability/TOR
    In SPRO - Availability Check settings.
    but i have a question here:
    what is the business logic.
    do you want to do the same with all the sales orders or not.
    please update the forum
    then answer will be different
    balajia

  • Ignore the number of schedule lines in sale order item when run MRP

    Dear All,
    I have a problem when I create production order (discrete manufacturing)
    When I create a sale order with one sale order item and 3 schedule lines for this sale order item.
    After that, I run MRP for this sale order, what I get is 3 planned orders for 3 schedule lines. It means that I will have 3 production orders for 1 sale order item.
    I want  create one production order for one sale order item whatever the number of schedule lines in sale order item.
    I think I have to config in MRP. Please help me.
    Thanks in advance

    Dear
    Check in OPPQ then look in Master data Availability Check & strategy for material also check whether u have maintained strategy for same material and see did u extended sales views for other material
    As u said 3 schedule lines for this sale order item check whether u have extended sales views for next material
    With Regards
    Pushpalas

  • Link between actual ship date of an item and schedule line in Sales Order

    So, we are developing a custom report that compares actual Ship Date (Goods Issue Document MKPF-BUDAT) and the date the item should've been shipped (Schedule Line Date).
    I am able to link the GI Document to Delivery Document and can then link to Sales Order Number/Item Number.  However, a line item can have multiple schedule lines.  What logic can be put in the mapping so that the correct scheduling line is picked for the GI date to be compared against?
    Example:
    Sales Order 123
    Item 10 Product X - Quantity 10
    Schedule Line 1: 11/15/2014 8 pieces
    Schedule Line 2: 12/15/2014 2 pieces
    Let's say first shipment gets delayed 2 months and ships 1/15/2015
    Due date in report should know to select 11/15/2014 to calculate that shipment was late 60 days
    Any way to link delivery document to a specific schedule line??
    Thanks!!

    Hello,
    Just did similar development for customer report. List of deliveries based on sales order number and sales order line item numbers. Sort these deliveries either with number or actual goods issue date. Compare goods issue quantity with schedule line quanity and start allocating deliveries to schedule line. For example
    Schedule line 1 - 10 MT, Schedule line 2 - 5 MT. Now you have created 3 delivery. First with 7MT, second with 5MT and third with 3MT. Your first delivery will be for first schedule line. Your second delivery is for first and second schedule line and your thrid delivery will be for second schedule line
    Regards,

  • Printing last delivery date in schedule lines for sales order

    Hi!
    We should create a sales order with more then one schedule line. This schedule lines are only for internal use (only to plan our production) and not for printing on the sales order paper. Only the last line is the real delivery date which should be printed on the sales order paper. Now I'm searching for a solution to print only this schedule line.
    Have anyone a good idea?
    Thanks
    Markus

    Hi, 
    Select <required fields> from VBEP
    into table <itab>
    where vbeln = <order number>.
    sort itab by posnr etenr descending.
    read table itab into wa index 1.
    contents of work area will have the last schedule line details of order.
    Regards
    Vinod

  • Issue with Delivered Quantity in Schedule line level

    Hi,
    I have a situation where the Delivered quantity in the sales order line item is not correct. we tried creating a delivery for a line item ( after the initial partial delivery was made), the delivery document did not get saved, however the sales order line item got updated with the delivered quantity equal to the other quantity. which is now causing the issue that i am not able to create a new delivery against this line item, please let me know on the ways of proceeding. this had happened for quite number of sales orders as the delivery processing job had an issue.
    Tried using SDVBUK00 program ( specific to Sales order status update) but the results were no good.
    Do we have any other methods/ correction programs?
    Regards
    Ilango

    Are you able to create the delivery with ref to sales order again-then what error system throwing here--including the message number....
    Note: here i presume the error like---No delivery relevant items.
    Have you checked your VBFA here??
    Note: once you created a delivery with respect to sales order--just do picking(even without picking)--save this delivery--now check the delivery quantity in sales order--system will update delivery quantity in sales order schedule lines--test this.Here you can do only one thing--either VBFA(follow this delivery number) or delete the delivery document & recreate..
    Pl update--Hope this helps...
    Phanikumar

  • Quantity clubbed for two schedule lines in sales order

    Hi,
    One finished item F1 having strategy 20. special procurement key as 40( to get from another plant) Its sales order is created for 20 EA on 6 nov.So one line item in sales order.
    Item availability check is done.in schedule line I can see system proposes available date as 9 Nov. I manually split the quantity as 13 EA on 10 Nov and rest 7 EA on 18 Nov.
    Now in schedule lines tab I can see three line items:
    date      confirmed qty
    6 Nov      zero
    10 Nov      13 ea
    18 Nov        7 ea
    MRP is run. system generated Stock Transport Purchase requisition of 20 ea dated 6 Nov.Qty and date both is wrong. Why quantity gets clubbed?? Why date is picked as 6 Nov?? I expected system to create two Stock transport purchase requisition of qty 13 dated 10Nov and qty 7 dated 18th Nov.
    Please guide if there is any config mistake in PP or SD side.
    Regards.

    PP,
    That is pretty standard.  If you do not meet the customer's requested date when you confirm the sales order, the system assumes that you sitll intend to make the attempt.  MRP will produce a proposal based upon the customer's requested date and requested quantity.
    If you want MRP to consider the confirmed dates/quantities, set the Fix Date Qty flag in the sales order item.
    http://help.sap.com/erp2005_ehp_05/helpdata/EN/93/744bcb546011d1a7020000e829fd11/frameset.htm
    If your standard business process is that you always wish to plan based on the confirmed date(s) rather than the requested date, you can configure to have the Fix Date Qty flag defaulted; in OVZJ.
    Best Regards,
    DB49

  • How to get the Deliver Quantity against Schedule Line Quantity

    Hi,
    I have specific requirement for a report where we need to determine the delivery qty against the schedule line qty for a sales order. In sales order in schedule line tab system shows the delivery qty. The field is VBEPD-VSMNG. VBEPD is a structure and I could not find the table in which this is actually stored. Does anybody know how to get the delivery qty for schedule line?

    Hi,
    U can check the following tables:
    VBEP (Sales ScheduleLines) VBEP-VBELN =VBAP-VBELN and VBAP-POSNR = VBEP-POSNR
    LIPS (SalesDoc:Delivery Items) LIPS-VGBEL =VBAP-VBELN and LIPS-VGPOS =
    VBAP-POSNR
    VBEH (Schedule LineHistory) VBELN POSNR ETENR
    Regards
    Kannaiah

  • Schedule line in sales order

    Hello Friends,
    While creating sales order, a line item in sales order creates schedule line with delivery date and quantity. How does this happen and what are the criteria to be met to enable this to happen?
    Thanks

    The schedule line represents the customer intended delivery date and quantity to be delivered.
    This information is transferred to material requirements planning. This is known as Transfer of Requirements or TOR.
    MRP will then determine if there is enough quantity of stock available for the scheduled delivery date.
    If there is stock, then system would confirm schedule lines.
    For TOR to be carried out, the following criteria are to be met:
    A plant must be assigned to the sales document line item level.
    The schedule line category must be switched on for the TOR.
    The TOR must be switched on at the requirements class level.
    A checking group must be defined and allocated to the material master record in the sales/plant view in the availability check field.

  • Schedule Lines in Sales Order

    Hi Experts,
      We have an indent for material X with Qty 1200,Progressive monthly dispatch plan from customer for an Year.
    Material X 
    Delivery Date       Qty           CumulativeQty Planned              Actual Delivered Qty
    01.01.2011         100           100                                             100
    01.02.2011         100            200                                             50
         If I could able to deliver Qty 50 only in month 01.02.2011, Undelired qty of 50 has to automatically distribute to remaining months .
    Also wanted to get the report of Total Planned Qty, Actually Dispatched Qty and Remaining qty to be dispatched for the current month and whole Year. Please help me how can give solution to my client..
    Thank You
    Saravana

    Hi,
    As pe rthe client requirement, this process is not allowed in standard SAP, in this scenario you have to use the user exit as mentioned below-
    USEREXIT_MOVE_FIELD_TO_VBEP - Use this user exit to assign values to new fields at the level of the sales document schedule lines. The user exit is called up at the end of the FORM routine VBEP_FUELLEN.
    Thanks & Regards,
    Rahul Verulkar

  • Regarding Schedule lines in Sales Order

    Dear Friends,
    While Creating Sales Order the Order Quantity gets Confirmed and Schedule Lines created even though there is NO STOCK.
    Kindly suggest me for this.
    Thanks & Regards
    T.Arulvanan.

    Hi
    It is because the replinishment time is maintained in MRP 3 view in material master  as also blank and because you havent made the tick there the system assumes the quantity is available in 0 days and hence it is confirmig
    You have kept check without RLT as blank it means the system is checking with RLT and the RLT Time is 0 that means system assumes at the end of end of 0 days the stocks are available and finally it will hit you in PGI if stocks are not there
    Pls maintain rep lead time as two days in MMR in the MRP3 view and see
    While creating sales order the availability check pop up will come confirming the delivery after 2 days
    You can check and see
    Regards
    raja

  • Create a schedule line in sales order using Bapi

    Hi Guys,
    Here the requirement is automating the process of creating the schedule lines using Bapi.
    I am using the bapi BAPI_SALESORDER_CHANGE for the same.
    I could able to create a schedule line but the problem is,its not updating the CONFIRMED QUANTITY and COMMITTED  QUANTITY on
    sales order schedule line tab,its updating ORDER QUANTITY and ROUNDED QUANTITY.
    the structures and tables parameters i have updated are:
    IMPORT PARAMETERS: SALESDOCUMENT,ORDER_HEADER_INX-UPDATEFLAG= 'U'(change sales order).
    TABLES:SCHEDULE_LINES(ITM_NUMBER,REQ_DATE,REQ_QTY,DLV_DATE)
                   SCHEDULE_LINESX(ITM_NUMBER,UPDATEFLAG='I',REQ_DATE,REQ_QTY,DLV_DATE).
    Please help me out if i need to fill up any other parameters or anything am missing out here.
    Would appreciate your help.
    Thanks in Advance
    Ramu

    Dear Ramu ,
    Any solution to this Issue i have the same Requirement and faceing the very same problem.
    Thanks in advance for reply .
    Thanks alot.
    regards
    Prashant Singh

  • Schedule Line Category - sales order

    Hi All,
    I have 2 sales orders with the same material in the item shows 2 different schedule line categories.
    For example:
    Sales order 1 with Item A  - Schedule line category - CB
    Sales order 2 with Item A - Schedule line category - CN
    What could be causing this? Nothing has changed in the material master.
    Any input would be helpful.
    Thanks,
    Meghna

    In both the sales orders--- is the delivering plant is same or not??(pl check)
    Apart from the above suggestions--pl check whether this material has been maintained with different MRP types in different plants.
    Yes it is possible-
    1.a same item can contain two different schedule line categories either in one sales order if maintained in different line items or
    2. In different sales orders...
    If a item has been maintained with two different MRP types in different plants--then different schedule line categories can be determined.
    Pl update us.
    Phanikumar

  • Issue in schedule lines on sales order

    Hi all,
    While creating a sales order, system is creating schedule lines after two days of order creation. I want that schedule lines should be created for the same date.
    Please suggest that what should I do for this?
    Please respond.
    Best Regards,
    AI.

    hi,
    check whether any delivery scheduling is been maintained
    IMG>SALES AND DISTRIBUTION>BASIC FUNCTION>DELIVERY SCHEDULING AND TRANSPORTATION SCHEDULING>MAINTAIN DURATION
    choose shipping point and remove the "Loading time w.days" and "Pick/pack time wrkdys" if maintained any
    choose route and remove "transit lead time"
    now try with new sales order
    regards
    senya

  • Regarding multiple schedule lines in sales order with same date

    Hi All,
    we create the Orders from RFC and the orders are going to Multiple Schedule lines for the same date.
    period       delivery date          ordered quan       confirmed quantity
    D     10/11/2007                10                    0
    D     10/11/2007                 0                     10
    here for the same date in first line it is not confirming and in the second line it is confirming the quantity for the same date.
    On what conditions it is possible??????
    Any one have the solution for this Please send it to me [email protected]
    Regards,
    Prasad

    Just check the schedule line details i.e go to schedule line---shipping. You will find that although the del. date is same in both the case but the timings were different e.g material availability time etc will be different in both these lines. So though the dates may be same its time difference that's causing the second schedule line.
    Reward points if useful

Maybe you are looking for

  • I bought a Macbook Air, how can I change the icloud credentials for ownership..?

    I bought a Macbook Air used, the credentials in icloud, still shows the previus owner id, I contacted him, and he gave me the information, but I need to know, how can I changed that information, because I need to update that info with my credentials.

  • Regarding  the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    Hi I am using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send an email with tab delimited text file as an attachment. while doing this i'm facing the folloing issues. 1. a) Here the subject line field is char 50. My subject line is more t

  • ES repository access in CE 7.1

    Hi How can I access Enterprise Service Repository in CE 7.1   . I have successfully installed the same. But am not able to access backend systems. This is a trail version. Thanks. Regards

  • Getting contacts pictures to show on email preview

    How do I get my contacts pictures to show up on the preview of my inbox?   I thought that anyone I had in my inbox would show up next to their name. Thanks, Diane

  • LR2 "Edit in" options limited to only edit in CS3, Why?

    When I right click an image from the develop module and click "edit in" the only option I am given is "edit in photoshop CS3". Why would I not be given the other choices to merge as HDR or panorama or open as a smart object in CS3?? I am running LR2