Updation Error in Schedule line category using 'BAPI_SALESORDER_CHANGE'

HI ,
I am using BAPI_SALESORDER_CHANGE to Update schedule line category for an order.But the issue is...the entries are updated if it is having single schedule line item,but if more than on item it is giving error in Last Record.
15192625   000200 0001 2.608.596.065               130,000  21.09.2009 ZX CP
*15192625   000200 0002 2.608.596.065                 0,000  04.02.2010 ZX CP
*EV1                  335System error: Schedule line 0002 for item 000200 does not exist
EV4                  219Sales document 0015192625 was not changed
i have written the code like below:
loop at i_ma4_etenr.
          i_salesdocument = i_ma4_etenr-vbeln.
         i_order_header_inx-updateflag = 'U'.
        r_schedule_lines-itm_number = i_ma4_etenr-posnr.
        r_schedule_lines-sched_line = i_ma4_etenr-etenr.
        r_schedule_lines-sched_type = i__ma4_etenr-ettyp .
        APPEND r_schedule_lines TO i_schedule_lines.
        CLEAR : r_schedule_linesx.
        r_schedule_linesx-itm_number = i_y16v_ma4_etenr-posnr.
        r_schedule_linesx-sched_line = i_y16v_ma4_etenr-etenr.
        r_schedule_linesx-updateflag = 'U'.
        r_schedule_linesx-sched_type = 'X'.
        APPEND r_schedule_linesx TO i_schedule_linesx.
endloop.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
          EXPORTING
            salesdocument               = i_salesdocument
            order_header_inx            = i_order_header_inx
          TABLES
            return                      = i_return
            schedule_lines              = i_schedule_lines
            schedule_linesx             = i_schedule_linesx.
Thanks in Advance,
Sateesh Kumar.

Hi,
As you are facing error , so check wheather in VA02 schedule line fields have been uploaded or not initially.
If they are not uploaded then you will be facing the error.
Otherwise check:
Did you pass the X fields for the schedule lines properly. As you are changing only the schedule lines, Just pass the SCHEDULE_LINES , SCHEDULE_LINESX Internal tables.
Please also check whether anything is passed to ORDER_ITEM_INX- UPDATE field. it should be blank.
May it helps you.
Regards,
DS.

Similar Messages

  • How to use bapi to change so's schedule line category

    dear friends:
       I try to change so's schedule line category using bapi "BAPI_SALESORDER_CHANGE", but it doesn't work,the code is as following:
      T_SCHEDULE_LINES-ITM_NUMBER = ITAB-POSNR.
      T_SCHEDULE_LINES-SCHED_TYPE = ITAB-ETTYP.
      T_SCHEDULE_LINES-SCHED_LINE = '0001'.
      APPEND T_SCHEDULE_LINES.
      T_SCHEDULE_LINESX-ITM_NUMBER = ITAB-POSNR.
      T_SCHEDULE_LINES-SCHED_TYPE = ITAB-ETTYP.
      T_SCHEDULE_LINESX-SCHED_LINE = '0001'.
      T_SCHEDULE_LINESX-UPDATEFLAG = 'U'.
    who can tell me the reason.thanks in advance.

    Hi 
    First try to execute same bapi in test mode and then check thwe respective SO if this work then you have to commint the changes through program, some more help on this topic
    The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.

  • No schedule line category could be determined during quantity adjustment

    Dear sir,
    i m getting this error while doing va31 plz helep me reagrding this  matter?
    error- No schedule line category could be determined during quantity adjustment.
    Regards,
    Debesh Tripathy
    Regards,
    Debesh Tripathy

    Hi,
    Go to IMG u2013 SD u2013 Sales u2013 Schedule Lines u2013 Assign schedule line categories.
    Over there check the assignment of your combination.
    Item category which is determined in scheduling agreement.
    Then MRP type which you have given in the material master data.
    So first note down these setting then check the combination of this setting in path given above.
    If there is no setting made then click on the new entry.
    Give the assignment of your combination and save it.
    Now try to create your document in the VA31 and check whether every thing runs fine or not.
    Regards
    Raj.

  • Need BAPI Name for updation of Subcontracting scheduling line agreement

    Hi All,
            Can anybody please tell me BAPI Name for updation of Subcontracting scheduling line agreement from EKET table?
    Note: BAPI_PO_CHANGE is not useful for me.
    Thanks and Regards,
    Atul.

    Hi Muralidhara,
    Can you please give some more details for this BAPI..
    I tried using it , but getting an error "No instance of object type PurchSchedAgreement has been created. External reference:"
    and "Enter G/L Account" (Infact I did specify G/L account in account assignment table)
    with regards,
    Kirti

  • Schedule Line Category change-USER EXIT

    REQUIREMENT:
    When saving a SALES ORDER, Change the schedule line category on the SALES ORDER from CP(Standard Availability Check) to CS(Third Party Processing u2013Trigger Purchase Requisition)
    Initially when we create the SALES ORDER, we have Schedule line category CP to generate schedule lines based on stock availability
    SO Date- 09/14/2010
    Schedule line 0001--- 09/14/2010 --- Confirmed Qty (0) --- Sched Line Categ(CP)
    Schedule line 0002--- 09/16/2010 --- Confirmed Qty (1) --- Sched Line Categ(CP)
    Config Change: We have changed the Schedule line category- CS to turn off Purchase Order Scheduling (Indicator turned off--P.req.del.scheduling)so that when we change the schedule line category, no PO scheduling happens again
    Our requirement is that when saving the sales order, we want to change both the schedule lines item category-0001/0002 from CP to CS
    SO Date- 09/14/2010
    Schedule line 0001--- 09/14/2010 --- Confirmed Qty (0) --- Sched Line Categ(CS)
    Schedule line 0002--- 09/16/2010 --- Confirmed Qty (1) --- Sched Line Categ(CS)
    After saving the order, a Purchase Requisition is generated for the Schedule Line 0002..
    MY QUESTION:
    Is this possible using the BAPI_SALESORDER_CHANGE without changing the dates on the schedule lines or deleting any schedule line
    Thanks
    Kumar

    Hello Kumar,
    Please check the User exit and let us know whether your requirment is met or not.
    #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.
    Regards,
    Sarthak

  • Credit exposure and the Schedule line category

    Hi,
    I have a problem in credit exposure update in FD33.When I use the schedule line category xx which has req/Assembly marked in schedule line category settings is updating the sales order values in Fd33 even if the sales order (while creating) is blocked due to credit.
    Whereas I use the schedule line category YY which has req/Assembly not marked in schedule line category settings is not updating the sales order values in Fd33  if the sales order(while creating) is blocked due to credit.
    Is this the standard behavior? If so Why.
    Regards
    Babu

    Hi Babu,
    Yes, this is a standard behavior.
    Please refer to note 393304.
    If the flag "transfer of requirements" is not set, that means that credit-blocked order won´t update credit values.        
    In this document has a complete explanation regarding this proceeding.
    I hope it can help you.
    regards
    Ruy Castro

  • Schedule line Category CN not defined.

    hi all,
    I am trying to create sales order using FM BAPI_SALESORDER_CREATEFROMDAT2 in a program.
    when i am giving multiple line items i am getting error Schedule line Category CN not defined.
    this is happening when there is multiple schedule line items and they have different schedule item category.
    if schedule line item category is same for all items it is creating sales orders.
    even if there are items having schedule item category 'CN', they are processed correctly. the sales order is getting created. the problem arises only if there are mixed schedule item categories for multiple items.
    is there any error in coding or some configuration is missing. I have searched a lot on SDN but did not find any specific solution??
    Can anybody provide some help??
    Thanks!!

    no solution

  • Change Schedule Line category through user exit - Issue with transfer of requirements

    Dear All,
    There is a user exit in Sales Order program MV45AZZ - PREPARE_TO_SAVE . It is currently being used to implement code to change schedule line category based on the status of the sales order.
    When Blocked , category is set to ZP, and when Released then it is set to CP.
    Now, when we change ZP to CP manually through VA02, I am able to see the requirements transferred in tcode MD50.
    The problem is, when user changes status of sales order from blocked to released, the userexit changes categories from ZP to CP, but the requirements are not transferred ( cannot see it in MD50 ).
    I tried searching the SCN, tried googling it, its been a week now and I havent found any clear solution.
    So, far what I understood is Availability Check needs to be carried out again. But I am not clear how to trigger it again.
    Are there any indicators that need to be set or any internal tables to be updated or any FM to call or any other user exit to place the code in.

    ?? Any suggestion friends ?

  • BAPI Error: No schedule lines due for delivery up to the selected date

    Hi,
    I have created a program to create delivery orders with reference to sales orders using BAPI - BAPI_OUTB_DELIVERY_CREATE_SLS.
    After execution I get the error: No schedule lines due for delivery up to the selected date
    Please help.
    Thanks in advance!!!
    Regards,
    Sriram

    hi,
    this is to inform you that,
    please check the schedule line date in the sales order because the date is not matching here for the BAPI to upload.
    here,  for example the schedule line is 4 days after and you are running BAPI today. that will mismatch no.
    the same thing is happening in uploading case also.
    so please check the date.
    because in teh sales order if teh schedule line date is today it will accept the uploading with out throwing any errors.
    regards,
    balajia

  • Schedule line number determination - Schedule line category CP(MRP)

    Hello All,
    I want to know on what basis schedule line numbers getting determined.
    Schedule line category: CP-MRP
    Sales order line items getting confirmed based on the Planned order--> production order created through MRP run.
    I have created sales order line item 1 with 100 quantities. for example I created today. RDD also today.
    3 production order created.
    Those production orders confirmation date as below.
    Production order 1 - 60 quantities - 14.04.2014
    Production order 2 - 30 quantities - 16.04.2014
    Production order 3: 10 quantities - 18.02.2014.
    There are four schedule lines for the line item 1.
    All the 4 lines showed as per the confirmation date order.
    But the schedule line numbers are not as per the above order.
    For example,
    Schedule line number   ----- delivery date ----- Confirmed qty
    1.                                         09.04.2014            0
    3.                                         14.04.2014            60
    2                                          16.04.2014           30
    4                                          18.04.2014            10
    On what basis this schedule numbers getting determined? Is there any standard procedure ?
    Why schedule line numbers not inline with the confirmed date?
    Let me know if you need more information.
    Thank you.
    Regards,
    Rakkimuthu C

    Hi,
    Schedule line number is the number that uniquely identifies the schedule line .
    Use 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.
    Note 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.
    The schedule line number will get created automatically by the system. I hope this will clarify your doubt. Thanking you.

  • Error "No schedule line due for delivery upto the selected date"

    Hi Experts,
    I am getting an error while creating outbound delivery for sales order.All items have same item cat and schedule line category,same customer.
    The sales order have three items with delivery date of 18.09.2008.the material stock is available for all three material and there is no planned issue for these material.
    In sales order schedule lines for all three items is confirmed on 18.09.2008. When I create a delivery on 04.09.2008(before the chedule line),it allows to create delivery for the two items but when I create delivery for material 3 on 04.09.2008(before the chedule line),it is giving error "No schedule line due for delivery upto the selected date" .on going to help it gives information that check whether the order item to be delivered contains confirmed schedule line.I checked the confirmed schedule line is on 18.09.2008 (though we have availbe stock on 04.09.2008).
    Kindly guide me how to resolve the issue,here I want to create delivery prior to the delivery/Schedule line date in Sles order.for 2 items it works but for third it is giving error.
    Is it something to do with Material group 5 in material master sales view for the 1 and 2nd mtrl it is 14 days for for the third it is 7 days?
    Sarvesh
    Edited by: Sarvesh Vashist on Sep 5, 2008 5:31 AM

    Hi Experts,
    I am getting an error while creating outbound delivery for sales order.All items have same item cat and schedule line category,same customer.
    The sales order have three items with delivery date of 18.09.2008.the material stock is available for all three material and there is no planned issue for these material.
    In sales order schedule lines for all three items is confirmed on 18.09.2008. When I create a delivery on 04.09.2008(before the chedule line),it allows to create delivery for the two items but when I create delivery for material 3 on 04.09.2008(before the chedule line),it is giving error "No schedule line due for delivery upto the selected date" .on going to help it gives information that check whether the order item to be delivered contains confirmed schedule line.I checked the confirmed schedule line is on 18.09.2008 (though we have availbe stock on 04.09.2008).It allows to create a OBD either I change the delivery date in sales order to 04.09.2008 or create a delivery with delivery date 18.09.208.
    Kindly guide me how to resolve the issue,here I want to create delivery prior to the delivery/Schedule line date in Sles order.for 2 items it works but for third it is giving error.
    Is it something to do with Material group 5 in material master sales view for the 1 and 2nd mtrl it is 14 days for for the third it is 7 days?
    Sarvesh
    Edited by: Sarvesh Vashist on Sep 5, 2008 5:31 AM

  • Sales order we have made schedule line category catCN but still reqt coming

    Dear Sir,
    Sub : For sales order 5000060 line 10 we have made schedule line category as CN but still system is giving requirement against this order (while running MRP T code MD50)
    Details:
    One user has made one FG material delivery with PGI without putting the picking quantity. He had put zero picking qty. When we click PGI button System does not allow to do PGI without putting the picking qty but how he could do it we do not know. Now there is no goods issue material document instead one confirmation of service document is there in doc flow .we can not open this document. if we click display by selecting this document in document flow system gives error - NO document created for confirm service/cancel transaction
    All the delivery fields are gray out. Delivery qty is there in this delivery hence at sale order schedule line tab against the schedule line system is showing delivered qty -2.
    Goods movements status is B- partially completed.
    Also system is not allowing to reverse the delivery- it is saying-no data available for this selection criteria. Hence we are not able to do delivery against this item. Hence we have created sale order line item 20 & transferred this stock to line item 20 & did subsequent transactions.
    Now system giving requirement for line item 10 .We have made schedule line category CN still system is giving requirement against delivery number  in T code -MD 50 against sale order line item- there is customer order ,delivery, production order .delivery number never comes in MD50 .it is giving requirement against delivery.
    Kindly let us know how to stop the requirement to generate from this sale order line item
    Also kindly let us know how user could make this & how this might have happened & how to restrict this in future.
    Regards

    Dear Sir,
    When we create a sale order default sch line category is CN after few days (there is a specific reason) we change it to CP & run MRP
    In this case we made the product by doing this but while doing delivery .user did some mistake & did PGI without picking qty in delivery.Now this qty is in delivery but there is no material document that stock has not yet moved .Since there was a problem in the delivery we have trasfered this stock to sale order line item 20.& did further transactions.
    Afte this we did schedule line cat from CP to CN
    But in MD50 system is giving the requirment against sale order ,delivery
    Regards

  • Question on Schedule Line category in Sales Order not relevant to MRP

    Hi experts,
    I want to know whether the sales order having any schedule line category like CP, CN, etc will not be relevant for MRP. In other words, If I do the MRP run for the Sales Order Requiremnt having any Schedule Line Category in particular will not generate any procurement proposals like Planned order/ Purchase Requisitions. Please advice me on the same.
    Regards
    Brijesh

    Dear Brijesh,
    Please find some info related to scheduled lines below,
    The various schedule line categories are controlled in different ways:
    The schedule line AT in inquiries is used only for information.
    No requirements are transferred and no availability check is carried out for the schedule lines BN and CN.
    Requirements are transferred and the availability of the material is checked for the schedule lines BP and CP.
    No stocks are managed for the schedule line categories BT, CT and CX. No goods issue is posted for the categories BT and CT. However, goods issue is posted for CX.
    The schedule line categories BV and CV are controlled in the same manner as the categories BN and CN. However, requirements can be passed on for analysis purposes.
    Goods receipt is posted for the schedule line DN in a returns document.
    The schedule line categories CN, CP, CT, and CV are relevant for delivery; the other schedule line categories are not.
    *Control Elements for Schedule Line Categories
    Different schedule line categories are permitted according to the sales document type and item category you are using. You can use control elements to tailor the schedule line categories to meet the special demands of your installation. You can also define new schedule line categories.
    Hope this helps.
    Thanks
    Murtuza

  • 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

  • Account assignment in schedule line category for third party sale

    in settings for schedule line category CS -for third party sales, in the field Account Assignment category we assign X-all auxiliary account assignment.
    what is the purpose and reason for using account assignment category in third party and at what point of time this comes into picture in third party sales process

    Hi Sudha A,
            Procureement against customer requirement will be booked against cost or expense account. So when creating PO, this account assignment category is determination factor for respective G/L accounts in MM.
    - Account assignment category will have general modification assigned. in MM account determinatoin OBYC settings-
    Valuation group code(this needs to be confirmed) + General Modification + valuation class determines G/L account.
    This is how G/L account will be displayed in PO - item level - account assignment tab.
    To see the settings in account assignment category - check the help of the field & choose customization & observe in details.
    Hope it clears,
    Regards,
    Reazuddin MD

Maybe you are looking for

  • Created and changed columns strategy in HtmlDb?

    I have two date columns on all my tables created and changed. Created is not null. The columns are maintained by database triggers. I would like for these two columns to be displayed but not changed in a form. I have tried different ways to do this:

  • I want to use imessage on my pc

    Hi, I no longer have my iphone, but still have my ipad mini. I want to use imessage on my pc, Can i do this!, and if so, how do i do it?... Thanx in advance for any and all replies that may come...

  • CS3 Bridge forces Windows Aero to Basic after installing Quicktime

    Hi, I have been running Adobe CS3 Bridge (and Photoshop) without any problems on Windows 7 Ultimate until Apple forced me to install Apple iTunes. iTunes in turn forces me to install Apple Quicktime. Since I installed Apple iTunes + Apple Quicktime,

  • Edit & create item to FormsCentral

    Hi everyone,      We are a Marketing Research Agency, we´re dabbling in web survey application, but we have some questions that are not met within the features included: Text Field Text Field (multi) Date Field Email field Golf only option Country of

  • Prompt user, when hitting with SUBMIT button

    Hello folks, I have application with student record, on 1st page user enters student's name and on 2nd page user enters students grade and their are two buttons on 3rd page saying SAVE and SUBMIT, with the hitting of both the buttons students record