Reg.. Schedule lines

We have created a ztable by name zcpdcurr,zcpdhtry,....
I have fetching data from two tables zcpdcurr and vbep.. while fetching data i need to check the 'order qty(wmeng)' in vbep and 'cpd_qty' in zcpdcurr.
*If less then we need to make the cpd_qty in zcpdcurr equal with order_qty in vbep*
*If greater than we need to make the cpd_qty equal with order_qty in vbep*
so anyone can help me detailed code,.....
Edited by: murari sampath kumar on Jan 10, 2008 11:34 AM

Hi Murari,
First you need to compare the wmeng field in the vbep table with the cpd_qty field in the zcpdcurr table to know which one is greater.Then you can make the values equal.
For that you can use the following code.
TABLES : vbep , zcpdcurr.
DATA : BEGIN OF ITAB OCCURS 10,
WMENG LIKE VBEP-WMENG,
CPD_QTY LIKE ZCPDCURR-CPD_QTY,
END OF ITAB.
select single awmeng bcpd_qty into ITAB from vbep as a JOIN zcpdcurrr as b .
loop at itab.
IF itab-wmeng LT itab-cpd_qty OR itab-wmeng GT itab-cpd_qty .
zcdcurr-cpd_qty = itab-wmeng.
endif.
endloop.
Reward if helpfull.
Thanks,
Kashyap Ivaturi

Similar Messages

  • Reg: Schedule Line Date-confirmation

    Hi Frds,
    In my IDES system
    1. The schedule lines are preparing after two days from the date of sales order for every sales order.But I want to prepare on the same it self bcoz immediately I want to deliver.
    For this I have checked the Lead Time in Sales order & Load & Pick times in Shipping Point(OVXD) also. There is enough material in the plant.
    2. when I'm trying to create sales order on saturday or sunday it is displaying that no goods are accepted on the specified date.
    For this I have changed the days in factory calender in SCAL.
    Plz revert back me with new settings which I should check.
    Thanks in advance
    Regards,
    Ram

    Hi,
    Check if in material MRP view some lead time is entered like: GR Processing Time, Planned Deliv. Time, Tot. repl. lead time, etc.
    Further also check some safety stock quantity is entered in MRP 2 view, even though enough stock is available system will not allocate it in sales order & give further schdule line.
    Also check in the scope of availibility check in combination of  "02 + A", the tick "include safety stock".
    If required you can tick it.
    Hope this helps you.
    Regards,
    Dhananjay

  • Reg: Sale Order short close at Schedule lines level

    Dear Gurus,
    Requirement is to close all open schedule lines beyond one month.
    In detailed. User Enters Manual Schedule Lines as per the requirement of the customer say for 6 months.
    for Eg . Sale order entered on 1st of august to Dec with 500 qty, schedule 100 qty/Month, manually in sale order.
    Now if business delivers only 90 out of 100. they need to short close that particular schedule line only not the entire sale order or line item. I tried with Delivery block at schedule lines level. but it is not working.
    If any one has come across this scenario please share with me.
    Regards
    Praveen

    If we apply a delivery block the pending qty will automatically add to the last schedule date. Ex. if there is 3 dates in the schedule lines, and there is some 50 qty pending in second date, and if u apply delivery block it will carry forward that pending 50 qty to the third schedule line and adds up with it.
    But in my case i just want to close that pending 50 qty in second line item.
    Regards
    Praveen
    Edited by: Praveen_PG on Sep 15, 2011 1:28 PM

  • Unable to create Schedule line(Maintain sch.agreement)

    Hi experts,
    After running MRP i got Planned order for a certain material and for that material procurement type maintained as "Both internal and external" in material master. After completing the process planned order to purchase requisition, i separately created schedule agreement . Now here i am facing one problem that if i create schedule line with reference to purchase requsition i am getting the error Requisition doc. type NB not allowed with doc.type LP.
    pls anybody suggest is there any prob made in the above process
    Regs,
    SR
    Edited by: SP Ramesh on Jan 1, 2010 8:22 AM

    go to tcode OLME> schedule agreement> select the line of document type LP and then slecte the folled item category and then selce each item category one by one and then click on the second folders link document type and there give source document type NB
    cause of the issue is : the source document type NB is not set with LP document type of schedule agreement

  • Schedule lines Issue

    Dear All,
    We are using Scheduling agreements process.
    In this, the transfer of requirements is activated from the sched.lines to PP (t-code MD04) . So the system works accordingly. Now we dont want to carry forward the last months schedule line's balance qty to the new month. say,
    In a Sched.agreement, shedule lines
    01.06.2011 order qty 500....  delivered 200 qty
    01.07.2011 order qty 1000
    01.08.2011 order qty 600
    In June2011, 200 qty had been partially delivered. So business doesn't want to carry this balance 300 qty to production. Hence we assign schedling cat. CN on next month say on 1st of July'11 instead of CP for the June'11 sched.line.
    Here the balace 300 qty is been deducted from the order qty of July'11, so in MD04 for the month of July system shows only 700 qty (1000-300=700) which is wrong.
    1000 should be the production qty for the month of July'11 and June's shed.line should not reflect in Md04. . How to solve this delivered qty dedcting from the next month's requirement. Pls guide.
    P.S : however the 01.08.2011 does not have nay problem. It is getting reflected in MD04 as 600qty.
    Thanks,
    Reg,
    JJ
    Edited by: Jagsap on Jul 5, 2011 11:08 AM

    same issue we are facing. please tell me how to solve it.
    I have created Sales Order (Number 1032) with following scenario and posted one goods issuance against first delivery with less quantity.
    Sales Order Item
    Item               Item Desc                            Order  Quantity
    10                 High Speed Diesel (HSD)      5000
    Schedule Lines
    Line: 10
    Delivery Date: 07.07.2011
    Order Quantity: 1000
    Rounded Qty: 1000
    Confirmed Qty:1000
    Delivered Qty: 9500
    Line: 20
    Delivery Date: 07.07.2011
    Order Quantity: 1000
    Rounded Qty: 1000
    Confirmed Qty:1000
    Delivered Qty: 0
    Line: 30
    Delivery Date: 07.07.2011
    Order Quantity: 2000
    Rounded Qty: 2000
    Confirmed Qty:2000
    Delivered Qty: 0
    Now when i goto VL01N and execute delivery on 08.07.2011 with reference to Sales Order system sum-up the previous quantity + 2nd schedule line quantity means (1500). But our requirement is that it should only propose the order qty of current scheduling lines date instead of previous + current date quantities..

  • Delivery dates in schedule lines is not changing in sales order

    Dear all,
    delivery dates in schedule lines on line item in sales order is not changing.delivery dates are different in schedule line of partial qtys.i have to do same delivery date on all schedule lines.
    Regards,
    Praveen

    Hi Praveen
    1. Schedule Line dates can be changed manually or by doing an availability check only.
    2. In case if you change the delivery date in the header it will not change automatically in the line item level.
    3. You need to do it manually only.
    kindly let me know more details.
    reg
    dsk

  • Various date at first schedule line date

    Hi All,
    we are using RLT in our availability check & we run rescheduling of orders (V_V2) when some stocks from our plants comes in.
    on such cases , a back order on rescheduling gets updated with a new date, however during rescheduling, we prefer to not to adjust the the original dates in the first schedule line
    meaning i have a sales order with first date as 11th feb & i have a route of 2 days of route. so Mat avlbl date is 9th feb, Planned GI date is 9th feb, customer delivery date is 11th feb.
    but if i miss this order on 11th feb, & when i receive a stock on 15th feb, i will do a rescheduling at this point of time, i should not have any change in Mat avlb date/ Planned GI date for the first schedule line. but the new proposed dates should be seen only in the second line.
    meaning - first line will have 9th feb as mat. date &  Planned GI date &
    the second date will have 15th feb as mat.date & Planned GI date & the customer delivery date for the second line will be 17th Feb.
    is this possible.
    now i have both lines are getting updated with 15th feb & this needs to be seen only in the second line.
    thanks & Regards
    Ilango

    hi AA,
    This doesnt seems to be a Std process. GR happens for current date. and you can alter Actual PGI date but the document date (delivery) shall not be prior to MAD or Transportation planning date of Order. i guess this may require an OSS.
    Reg
    Mahesh

  • PGI date is before Schedule Line date.

    Hi
    We have a scenario which I want to understand. There was ZERO stock on 01.04.2009 in my plant. The stock received on 14.04.2009 but while doing the GR, the posting date changed to 05.04.2009. Now a sales Order created on 14.04.2009 with schedule line confirmation on 14.04.2009. When we checked the delivery and its material document generated after PGI it shows the posting date of 04.04.2009. All the dates in Delivery has been changed to 04.04.2009, however actually the delivery created on 14.04.2009.
    Now my querry is how the system allow to do the PGI on 04.04.2009 when there was no stock for the material on that date, and the schedule line is for 14.04.2009. Is this the standard behaviour?, if yes, Can we restrict it, so that PGI can not be done before the Schedule Line Date or before the actual availability of material.
    Thanks in advance
    Regards
    Amitesh

    hi AA,
    This doesnt seems to be a Std process. GR happens for current date. and you can alter Actual PGI date but the document date (delivery) shall not be prior to MAD or Transportation planning date of Order. i guess this may require an OSS.
    Reg
    Mahesh

  • Using SQVI to generate report of open and released delivery schedule lines

    All,
    I'm using SQVI  to generate an excel spreadsheet for some buyers to show open released schedule lines because they are a 1 line item per scheduling agreement company.
    I used the logical database MEPOLDB instead of a table joint and pulled fields from EKKO(vendor, SA #,&purchasing group), EKPO(Material Number), EKEH(schedule line type), and EKET(delivery date, scheduled qty,previous qty).
    Does this sound like I'll get the results I want on paper as long as I use the right selection criteria, because the report I'm getting isn't quite what I expect? I am unable to identify which lines are authorized to ship vs. trade-off zone, planning, etc. in the report thus far.

    Hi Mark,
                 I have faced same requirement. I am not sure about transporting to TST and PROD. I done by this way.
    After generating SQVI program in DEV , I assigned that program  to a transaction and tested in DEV. Later i have regenarated SQVI in Production. then I assigned the generated Program to same transaction in DEV. And transported the Tcode assignment of program to Production..
    About authorization , if its not sensitive report, BASIS can restrict at transaction level.
    Regards,
    Ravi.

  • Some info abt SCHEDULE LINES - VBEP; VBBE for OPEN quantites?

    Hi Experts,
    Pls. clarify me that,
    Am trying to show up the OPEN or BALANCE or BACK quantities in the report FOR EACH SCHEDULE LINE FOR EACH ITEM/POSNR.
    So, I need to look/subtract the VBEP-WMENG, VBFA-RFMNG for Delivery i.e. "J" VBTYP_N and the BALANCE I hv to show up.
    So, pls. let me know How Can I build the logic betwn VBEP, VBFA, VBBE? Is VBBE-MBDAT is comes into picture?
    thanq

    no reply

  • Link between Delivery and Sales Order Schedule Line

    Hi Gurus,
    I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
    For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
    Report should be something like this
    Sales Order    Item   Schedule Line    Delivery    Del Item   Confirmed Order Qty
    O1                 10      1                       D1           10            5
    O1                 10       2                      D2            10            5
    O1                 10       3                      D3            10            4
    How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
    We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
    Please help.
    Regards,
    Gaurav

    Hi,
    I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
    Sale order   Item    Schedule line  qty
    SO1            Item1     Sch1            10
    SO2            Item1      Sch2           10
    Delivery Item QTy
    DO1       IT1   15
    DO2       IT1    5
    In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
    So I am not sure if you can establish a one to one link, please check with your SD consultants.
    Regards,
    Ashwin G

  • How to put schedule lines for one year  in a schedule line agreement

    dear all
    thanks for the support till now from the forum
    now i need some seetings by which the scheduling agreement will autoumatically take the schedule line for one year automatically
    in my client we are getting open PO so
    we have to make one agreement acording to that PO and thats for one year
    and this one yr will have same quantity to be produced everyday
    means 12nos of material every day for 12 month and this will be for every day
    and as per that it should generate a sales order.i need to put schedule line automatically not mannually one by one for each date.so wat is the settingand how to reffer this scheduling agreement we can produce sales order.
    please help
    subrat
    Message was edited by:
            subrat panda

    Dear Subrat,
    you cannot create a yearly schedule line in the scheduling agreement. It is not possible due to format restrictions of the date field. But what you can do is the follows (it is the modification, but it should work with the help of user-exits):
    1. You can split the year schedule line to the monthly schedule lines. There are two ways to do it. If you apply the DELINS IDOC, then you can do it already during transfer of the data to the application (itr is the best way). Here you can use, for example, user-exit USEREXIT_ZUORDNEN_IDOCS (include LVED4FZZ) or customer function EXIT_SAPLVED4_002, called from the subroutine USEREXIT_DYNPRO (Include LVED4F0U). Alternatively, you can use the user-exit USEREXIT_MOVE_FIELD_TO_VBEP (Include MV45AFZZ) within the call transaction, then it will work also in the dialog case.
    2. After getting the monthly schedule lines, you can create a planning delivery schedule, where you can split mothly schedule lines automatically to daily schedule lines according to the customer factory calender.The settings for generation of planning delivery schedules can be found under:
    Customizing SPRO: Sales and Distribution => Sales => Sales Documents => Scheduling Agreements with Delivery schedules => Maintain Planning Delivery Sched. Instruct./Splitting Rules
    It is the only ways, how you can reach your aim. I hope, this information will help you further.
    Kind Regards,
    Akmal Vakhidov
    Development Support SD, SAP, Walldorf/Germany

  • Auto cancellation of schedule lines

    Hi,
    We have a requirement fo auto cancellation of schedule line such that after some time of schedule line delivery date system should cancel the schedule line if the GR has not been posted so that new schedule line needs to be generated by MRP .
    In standard scenario if the GR has not been done system will keep open the schedule line and will not generate new schedule line.
    Is there any config setting is there??
    Thanks
    Prasad

    Hi Bhavin,
      Two report program are there to cancel error msgs automatically..
    1) RSQIWKEX
    2) RSXMB_CANCEL_MESSAGES
    Regds,
    Pinangshuk.

  • Partial delivery per item in sales order and ATP - schedule lines

    Hi,
    I've problem regarding ATP- schedule lines and partial delivery flag.
    In sales order there is flag Partial delivery per item B / 1 . That means create only one delivery even with quant 0. That comes from customer master or customer info-record and it is OK.
    Please look at next example.
    Customer requires:
    10 PCS of materail A on date X. Only 5 PCS are available on date X.
    10 PCS of material B on date X 0 PCS are available on date X, 10 PCS are available on date Y.
    So if we create outbound delivery on date X it will contain only 5 PCS of material  A. No successive deliveries will be created for material A because of the flag B/1. That item is closed.
    Problem is with material B.
    The sales order will be open because of material B and on date Y we can easily create another delivery with 10 PCS of mat B.
    That is wrong. Agreement with customer is only one delivery for ALL items in sales order. If we create delivery on date X it should contain only materials which are available on date X and sales order should close.
    Do you know how to fix this problem?

    Hi,
    I've think you didn't understand my requirement. I allways get schedule lines but they are confirmed on different dates.
    Example in same sales order we have:
    Schedule line for item A:
    DATE X confirmed quantity 10
    Schedule line for an item B.
    DATE X confirmed quanitity 0 (zeroe)
    DATE Y confirmed quantity 10.
    I would like to create outbond delivery on date X with:
    item A quantity 10
    item B quantity 0.
    And if that hapens than B/0 rule will work or reference customzing that you suggested before. So order will be closed because all items are processed or referenced once.
    Do you know how to do that?
    Regards

  • Firming of schedule lines

    Dear All,
    We are using scenario where we are planning purchase requisitions in APO and sending them in ECC. In ECC we are converting them in to schedule lines.  Once schedule lines they get firm in ECC and for APO as well. But we want to change them through APO in forecast delivery horizon i.e. outside JIT horizon. JIT horizon would be 4 days and 10 days FRC horizon.
    Is it possible to unfix/ un firm schedule lines outside JIT horizon?
    Is there any user exit for this??
    Please advice.
    Thanks & Regards,
    Shirish Kulkarni

    Hi
    I do not think such facility is avaialable in Std SAP.
    Regards
    YMREDDY

  • Order of delivery schedule line counter at schedule agreements from MRP run

    Currently we are using schedule agreements for our long term external suppliers, but we are facing a problem with the order of new delivery schedule lines created during MRP run.
    Because of master data settings like, lot size, rounding value, plan delivery time and planning time fence to set as firm new requirements, multiple schedule lines are created with no order for schedule line counter.
    Does anyone is aware of a BADI, user exit or customizing control to have this schedule line counter in order?
    Thank you
    Daniel Guillen
    IT
    Skyworks Inc.

    Hi,
    Pls put this query in SD fourms  and get immly help because this is technical fourms.
    Anil

Maybe you are looking for

  • Finding a position of an item in a list.

    What i am looking to do is find the position of an item in a list. for instance if my list contains [a, b, c, d, e] and on my command line i put a f d, i want it to return a value of 3 for the position of the 'd' in my list. Could anyone please advis

  • Displaying content based on browser

    Not sure if this is the right place or not, but is it possible in Flash to do something like this... detect the user's browser position movie elements according to each browser The issue is that my company is currently building sites using all Flash

  • DUAL ATI HD 4870

    Can anyone tell me if it is possible to have dual ATI HD 4870 graphic cards in a current Mac Pro. I had one delivered this week and I wish to run dual 30 inch monitors, the mini display port will not display full res. There seems to be only 2 PCI-E A

  • Multi currency payment program

    Hi Experts, how to implement multi currency payment program for international payroll. and also how to implement multi currency offcycle payments. give me some brief procedure, right now my client doing only one currency, upgrading to multi currency

  • NoClassDefFoundError WsnInitialContextFactory com/ibm/ejs/ras/Tr

    This is a very well known question. I try to call datasource from a POJO. My code is: Hashtable properties = new Hashtable(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); properties.put(Context