Order schedule lines not created using BAPI_SALESORDER_CREATEFROMDAT2

Hi experts,
  I am creating sales order using BAPI_SALESORDER_CREATEFROMDAT2. I want to update the Order quantity in VBAP-KWMENG.I got the information from SDN when including the Schedule line in BAPI 'BAPI_SALESORDER_CREATEFROMDAT2  '.
  I tried by using Update flag = 'I'.I am not able to update, what are the values to be passed and how to update the field.
Is there any other way..Please suggest me..
Thanks&Regards,
Karthik.

Hi, In the BAPI if you look at the tables parameter you will find ORDER_ITEMS_IN and ORDER_ITEMS_INX as well as ORDER_SCHEDULES_IN and ORDER_SCHEDULES_INX. To update KWMENG you will have to pass that value to ORDER_ITEMS_IN-TARGET_QTY and update the same in the table ORDER_ITEMS_INX (ORDER_ITEMS_INX-TARGET_QTY) with 'X'.
For updating schedule line go for ORDER_SCHEDULES_IN-SCHED_LINE and update X for the same in ORDER_SCHEDULES_INX.
Try looking into the following code, I am filling in both the Item data as well as the Schedule line data.
  loop at t_mdata into fs_mdata.
    fs_item-itm_number  = fs_mdata-posnr.
    fs_itemx-itm_number = c_flag.
    fs_item-material    = fs_mdata-matnr.
    fs_itemx-material   = c_flag.
    fs_item-target_qty  = fs_mdata-kwmeng.
    fs_itemx-target_qty = c_flag.
    fs_item-item_categ  = fs_mdata-pstyv.
    fs_itemx-item_categ = c_flag.
    fs_itemx-updateflag = c_flag.
      APPEND fs_item TO t_item.
      APPEND fs_itemx TO t_itemx.
    fs_sline-ITM_NUMBER  = fs_mdata-posnr.
    fs_slinex-ITM_NUMBER = c_flag.
    fs_sline-SCHED_LINE  = c_sline.
    fs_slinex-SCHED_LINE = c_flag.
    fs_sline-REQ_QTY     = fs_mdata-kwmeng.
    fs_slinex-REQ_QTY    = c_flag.
      APPEND fs_sline TO t_sline.
      APPEND fs_slinex TO t_slinex.
  endloop.                             " Loop t_mdata
c_flag contains 'X'.
fs_item is of structure ORDER_ITEMS_IN.
fs_sline is of structure ORDER_SCHEDULES_IN.

Similar Messages

  • Schedule Lines not created from MRP

    Hi !!
    I have a finished product ""111-2523-64"" and in its BOM i have a semifinished product ""111-2523-64-010"" produced(Inhouse)& three raw materials .
    For the Raw Materials I have made the scheduling agreement & source list with indicator ("2"" create schedule lines automatically""
    Problem -: Now when I run the MRP using T-Code MD02 the system is planning the finished & semifinished product 
    *but no schedule lines are created for the raw materials.*
    Please Guide , Itz very urgent.
    Regards
    Rahul Bhardwaj
    9909986406

    Dear Rahul,
    When u r running MRP maintain '3' for Delivery Schedules Field under MRP Control Parameters ( T Code MD02). Sheduling Agreement should be valid. If there is sufficient stock on hand compared with the requirement then system will not create any Schedule Lines. In material master of raw Materials on MRP2 view Procurement Type should be Maintained as 'F'. If u have maintained 'E' or 'X' then MRP run will not create schedule lines.
    Regards
    Sunil Kumar

  • Sales Order Schedule line not populating in the Production order

    Queation: Is there a way to tell the system to look at the sales order, line item AND schedule line. It is displayed in MD04 but it doesn't carry over to the Production Order. We are a MTO and this information is relevant in a number of ways. 
    Please Help.

    Vickie,
    If you are using MTO scenario then when you run the MRP for the material, it will create a planned order for that sales order based on the dates calculated from the sales order schedule line (Shipping tab)...
    So now when you convert the planned order to production order, all the sales order details will get copied.
    try and revert back.
    Swapnil

  • Sales order Schedule line not showing in prod. order

    Hi
    I am using Make-to-order production. In my production order i can able to see the sales order number, item number but not able to see the schedule line number. It is showing zero. But in table VBEP table when i checked, system gives the sales order number (eg.1511632), item number  (10) and schedule line number (0001).
    Why in production order screen and AFPO table i am not getting schedule line number(field name-KDEIN).
    Regards
    Ganesh M

    Hi,
    When an item has more than one schedule line, the system automatically assigns a unique number to each line. The number is displayed in the details screens for schedule lines.  The schedule line number serves internal purposes and does not, for
    example, determine the sequence of schedule lines in the overview screen. The schedule lines on the overview screen are sorted by date.
    Please go to Sale order view from MD04, Click on Item no. and go to schedule line tab page, now you can see the line items and if you want to see in detail click each line item, it will show line item number clearly.
    Regards,
    Santhamoorthy

  • Automatic schedule lines not creating after MD03

    HI Gurus,
    When I am running MD03 system is creating Pur. Requisitions instead of Schedule lines
    I am running with
    NETCH
    2
    3
    1
    1
    1
    29102011
    Data maintained
    1.Material master /vendor master Auto po ticked (MRP type VB ROP 500 ,Safety stock 600, current stock 200)
    2.Sch. Agreement created with LP (validity period, Qty ok)
    3.Pur. Info rec maintained for vendor material for the plant.
    4.Source list maintained with Vendor,scheduling agreement no ,item no, MRP indicator 2 Fixed vendor ticked
    Now after Running MD03
    Pur. Req created for 400 qty
    but when I click on Procurement proposal manually I can select Del. Schedule and create
    but system is asking Agreement no. item,qty etc (I already maintained Source list system is asking again )
    Then why not system creating automatically..
    Please help..
    Thanks in advance

    Thanks  Jürgen,
    It was a problem of Date ,validity period of the SA.
    which I sort out any way thank you. for your input

  • JIT schedule lines not created automatically

    Hello All,
    I'm not able to get the JIT schedule lines automatically for some of the scheduling agreements. I'm familiar with the SA process and schedule lines, but never came across JIT and SA release. Can anybody help me to provide possible reasons of not getting the JIT schedule lines created for SA.
    Thanks,
    Amit

    Hi,
    Check following points -
    1) Scheduling agreement is released.
    2) In Source list of the material, the Scheduling Agreement & the relevant line item is mentioned. In the MRP area the option '2 - Scheduling Agreement delivery schedule generated automatically.
    3) If required quota arrangement is also maintained.
    Regards,
    Prashant

  • Sales order not created using BAPI_SALESORDER_CREATEFROMDAT2

    HI,
    I have used the bapi BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. I have passed the parameters, doc_type, sales_org, distr_chan, division, partn_role, part_numb and material.
    It displays back the message as
    sales_header_in createds,
    sales_item_in created,
    sales document not yet complete : Edit data.
    Standard Order 135428 has been saved.
    But when i check the same standard order in VA03 ( or vbak ), its not present.
    I have also run BAPI_TRANSACTION_COMMIT, to commit work. But still cant figure out.
    Any suggestions plzz...
    regards,
    Taj

    I am able to create the sales order when i am entering these details in VA01. I mean the sales document type and othr details.
    But when i pass the same parameters in bapi. This doesnt happen. Is there any thing more that needs to be passed.

  • Interesting and an  imporatant issue at sales order schedule line.

    hi all,
    interesting and an  imporatant issue at sales order schedule line.
    i created a sales order with 10 qty.and the system proposed a two schedule lines.
    let's say to order created date is 27.11.2008.and the requested delivery date is 27.11.2008.
    but the stock is not available today then the system proposed two more schedule lines apart from the 27.11.2008.so now there are three schedule lines like below.
    schedule line date                      Material availabilyt date   delivery date                   
    27.10.2008 with zero quantity.     
    28.10.2008 with 5 qty.                28.10.2008                     29.10.2008
    02.10.2008 with 5 qty.                02.10.2008                     03.10.2008
    now the delivery and pgi already for the schedule line 28.10.2008.
    then when i run the availability check on 01.11.2008 system is over writing the material vailability date as today at the scheduleline number two.
    now i can able to view only two schedule lines only.
    schedule line date                      Material availabilyt date   delivery date                   
    28.10.2008 with 5 qty.                01.11.2008                     29.10.2008
    02.10.2008 with 5 qty.                01.11.2008                     02.11.2008
    now my concern when we reschedule the avalability check it should notchange the Material availability date of the schedule line which i already delivered.
    Regards,
    sheshukumar

    can any one repsond for this.....

  • Creating Outbound deliveries based on the sales order schedule lines

    Dear all.
    Is it possible to create outbound delivery documents based on the sales order schedule lines?
    Eg:
    Let's say I have sales order line item 10 with below mentioned requested delivery dates in its schedule line level.
    30.07.2009
    10.08.2009
    20.08.2009
    30.08.2009
    Will it possible for me to create different deliveries for those 4 schedule lines individually? I should be able to create 10.08.2009 delivery without clubbing 30.07.2009 delivery with it.
    Appreciate your help!

    I'm not sure because I'm not before SAP but try transaction VL10E that is to create delivery for schedule lines. I'm not sure what are the split criterias.
    Please check OSS note 113411 tha has many OSS note reference in this subject.
    Regards,
    Csaba
    Edited by: Csaba Szommer on Jul 29, 2009 2:38 PM

  • VL01N does not to pick Sales order schedule line quantities

    Hi,
    I need to get Sales order schedule line quantities into VL01N when creating a Delivery document. Currently irrespective of the schedule line size quantity the existing stock quantity is picked into VL01N.
    Is there anyway to get this done? doe it require a user exit modification or cna this be done via IMG.
    Thanks & Rgds,
    Pradeep
    Edited by: PRADEEP GUNAWARDANA on Aug 1, 2009 5:06 PM

    Hi DB49,
    Thanks for responding.
    Let me clarify, the schedule line item i meant was, in my case this is an AFS scenario were we maintain size wise quantities.
    My issue being for example;
    Sales order line item 10 - Qty 1000 (sizes S - 250, M - 500, L - 250)
    Stock created in excess of this requirement, so size S - 1000, M - 1000, L - 1000 in stock
    In VL01N, when creating the DN for line item 10, it picks the Quantities in stock (which is 1000 each) ... instead of limiting it to the Sales order quantities of sizes S - 250, M - 500, L - 250.
    Hope this is clear ... please advice.
    Thanks,
    Pradeep

  • How to control not to confirm quantity in sales order schedule line

    Hi,
    We have a problem with confirmed quantity in sales order schedule line.
    When I reject a position in a sales order, confirmed quantity still remains with quantity ( diferent to 0).
    I need in some cases that system not to confirm quantity in schedule line at item level.
    I've tried to do this with a new routine in OVB8 transaction, but it didn't work.
    Could you help me? How can I avoid the system to confirm quantity in a sales order item?
    Thanks in advance....

    Hi Lakshmipathi,
    I'm sorry. The rejection was a bad example.
    I need, in some cases, that the system doesn't confirm quantity in sales orden item. We have a custom field in sales order item and we need to confirm with 0 quantity , when that field has a specific value.
    Due to that field is a custom field, I need an exit, or rutine, or .. i don't know...to inform a standard field too ( delivery block, rejection...) something to get confirmed quantity to 0.
    I've tried with rutine in OVB8. But It didn`t work
    I've tried with delivery block, but with this all items in sales order, confirms with 0. I need at item level.
    Thanks

  • Sales order schedule line quantities in decimals

    Gurus - Required your help to resolve the following scenario.
    I'm facing with the problem where schedule lines of a sales order allocated with decimal quantities even though materials with UOM as EA(Each). For example Material A of sales qty 13 has the schedule lines allocated as 11.960 and 2.040. The delivery has been created as per the schedule lines with qty 11.960 and 2.040 and it has been pick/packed and delivered to the customer. Now, while issuing goods for the delivery, received the error message as <b>"Serial number management only allows whole numbers".</b>
    Can anyone provide what are the possible ways to round the delivered qty and issue the goods, when the delivery is complete?

    Sree - Question 1 - Why would you deliver the product and then try goods issue it (In general ;)...anyway....I know, a lot of companies do that way....
    Question 2 - How much exactly did you ship out, surely must not have shipped products in decimals, since you've EACHES defined and not KGs....or LBs...
    I would suggest finding out the correct quantities shipped out and then cancelling this delivery document....you can then go on to modify sales order schedule line accordingly and then process it again..."WHAT ABOUT PICK PACK DETAILS"....before cancelling this delivery doc out..capture the packing details (HUs) and then apply them to the new delivery doc... if you are using external system for packing HUs.....process the IDOC (or file etc) using the new delivery doc number....
    Hope you got the direction )
    Thanks
    Nikhil

  • 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

    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

  • Schedule lines not generated after MRP run

    Dear All,
    I am trying to create Schedule lines through MRP run , but instead system creates MRP element PRqRel  and its PurRqs when i check in MD04 ,  the following are the prerequisite i done before MRP run , but still Schedule lines are not generating.
    1.activated checkbox source list in material master.,Procurement type is F, MRP type PD , lot size MB , marked JIT  Scheduling indicator as 1 in Pur view of material master , no MRP group is used in our process.
    2.Maintained Inforecord.
    3.Maintained source list for the material and marked MRP relevant as 2. Validity also checked.
    4. Quota arrangement for this vendor only.
    5. Created New scheduling agreement.
    6. Material is not sent for subcontracting.
    7. Ran  MD02 with following parameters ,
    Processing key NETCH Net Change in Total Horizon
    Create purchase req. 1 Purchase requisitions in opening period
    Delivery schedules 3 Schedule lines
    Create MRP list 1 MRP list
    Planning mode 3 Adapt planning data (normal mode)
    Please let me know if i am missing something
    Thanks in Advance
    Benny

    Hi,
    Please check the below links...
    Schedule Lines not getting created in MRP
    Schedule Lines not generated for MRP Type PD
    Kuber

  • Delivery date in PO schedule lines not equal to delivery date in PO confirm

    Hello expert.,
    I use PO with account assignment E for sales order purchasing coming from a TAB sales order category.  In the PO I have schedule lines define according to the lead time from the materila masetr of the info records.  The schedule lines in the PO update automatically the schedule lnes in the sales order and therefore the planning on the sales and delivery side is done according to the delivery date indiacte in the schedule lines of the PO (table EKET).
    I use also inbound deliveries to indicate when the goods arrive.  At that time, I can realize that the lead time / the quantity delivered by the vendor does not correspond to what was palnned in the schedule lines of the PO.  When I save the inbound delivery, the confirmation is indicated in the PO in the PO confirmation tab with the delivery date equal to today (table EKES).
    The issue I have is that the schedule lines of the PO is not in line with what is in the confirmation tab for both the quantity and the date.  Therefore, even though I have goods arrived that could be delivered to the final customer earlier, the system doesn't recognize it because the schedule lines in the PO remain with the original planned date and quantity and as a consequence also in the sales order schedule line.
    Does anybody can give me a way, a trick or a mechanism to align the delivery date and the qauntity in the PO between the schedules lines tab and the confirmation tab?
    Thanks a lot for your support.
    ALJ
    Edited by: Andre Louis Jadot on Nov 26, 2010 8:15 AM

    Dear,
    This is very intersting.
    Delivery date is come in purchase order from plant delivery time (MRP2) in material master.
    Exa:
    If you enter plant delevery time as 10 days in MRP2 of material master.
    So system calculate delivery date as under.
    Plant delivery time : 10 days.
    PO creation date : 08.05.08.
    System consider delivery date 21.05.08
    System add 3 days in your plant delivery time.
    So 3+10 = 13, Delivery data:- 08.05.08 + 13 = 21.05.08.
    Please check it in your quality client, If it is useful for you please revert back with points.
    Regards,
    Mahesh Wagh.

Maybe you are looking for

  • Scrren Resolution in BSP

    Hi, I have to navigate to WEB GUi on click of a button. The screen size should be a full screen. How can I achieve this irrespective of any screen resolution of the PC. Following is the BSP Javascript code. Can anyone suggest, how to approach? <thtml

  • Journal entry workflow

    Hi, Workflow required for approval for a parked document. Depending on the amount in the document, it goes for approval to different people. Can anyone tell me which BO to be used and is there any standard wf template for this? in which BO do we get

  • Need help with compiler error

    'class' or 'interface' expected public static int getNewAmount() ^ Can anyone tell me what to do? Thx.

  • CC 2014 trial expired on first launch!

    I had a recent email that told me that my trial period would be reset for CC 2014. However, after downloading and running the apps, none will launch as CC thinks my trial period has expired. What did I do wrong?

  • Document entry screen Variant

    Hi Sap Experts, What is the purpose of Document entry screen variant and Business area financial statement  in company code global parameters (OBY6). Regards, Prabhakar