Can't Delete/Change Schedule Line in Sceduling Agreement

Hi
   I can't delete schedule line in scheduling agreement.
   Actually The PO History has diff data & Scheline screen have diff data.
   In Po History the Delivered Qty is 1520 GI Qty is 1520 GR Qty is 1520 but when I checked in Delivery Schedule screen in ME33L the data is diff.
   The Scheduled Qty 1520  Delivered Qty is 1520 GI Qty 360 & GR Qty 360.Even when I am trying to reduce the Scheduled Qty to GR Qty that is 360I am getting message Quantity 360 less than delivered qty 1520.
    Kindly help me to resolve this problem.

Hi..
The Scheduling agreement is one which is created runing MRP not VA31.
I know that is two transaction data in SAP.
One is Sales Data other one is Purchasing Data.
This is second one.
Thank you your response.

Similar Messages

  • Deletion of schedule line in PO using BAPI_PO_CHANGE

    Hi ,
    Can anyone give me the code to delete a schedule line in a po using the bapi bapi_po_change.
    Useful answers will be rewarded.
    Regards,
    Sowmya.

    Hi,
    Refer below code
    *&      Form  sub_populate_data
          text
    FORM sub_populate_data .
    *--Local Variables
      DATA : l_ipdate      TYPE rc65a-datefrom,
             l_fdate       TYPE sy-datum.
      IF NOT it_succ_file[] IS INITIAL.
        LOOP AT it_succ_file INTO st_succ_file.
          st_ipfile = st_succ_file.
    *--Sales Document
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = st_ipfile-vbeln
            IMPORTING
              output = st_salesdoc.
          st_ord_headx-updateflag = c_u.
    *--Sales Document Item
          st_schedule_line-itm_number = st_ipfile-posnr.
          st_schedule_linex-itm_number = st_ipfile-posnr.
          st_schedule_linex-updateflag = c_i.
    *--Schedule line date
          l_ipdate = st_ipfile-edatu.
    *--Call function module to convert the date format into current user format
          CALL FUNCTION 'CY_CONVERT_DATE'
            EXPORTING
              date_string_imp = l_ipdate
            IMPORTING
              date_exp        = l_fdate.
          st_schedule_line-dlv_date = l_fdate.
          st_schedule_linex-dlv_date = c_chk.
          st_schedule_line-req_date = l_fdate.
          st_schedule_linex-req_date = c_chk.
    *--Order quantity in sales units
          st_schedule_line-req_qty = st_ipfile-wmeng.
          st_schedule_linex-req_qty = c_chk.
          APPEND st_schedule_line TO it_schedule_line.
          APPEND st_schedule_linex TO it_schedule_linex.
    *--Clear
          CLEAR : st_schedule_line,
                  st_schedule_linex.
          AT END OF posnr.
    *--Perform to delete the existing schedule line
            PERFORM sub_delete_schedule_line.
          ENDAT.
          AT END OF vbeln.
    *--Clear
            CLEAR : st_erfile.
            READ TABLE it_erfile INTO st_erfile WITH KEY vbeln = st_ipfile-vbeln
                                                         posnr = st_ipfile-posnr
                                                         BINARY SEARCH.
            IF sy-subrc EQ 0.
              g_error_records = g_error_records + 1.
              g_total_records = g_total_records + 1.
            ELSE.
    *--Call the bapi to update sales order schedule line
              PERFORM sub_call_bapi.
            ENDIF.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sub_populate_data
    *&      Form  sub_call_bapi
          text
    FORM sub_call_bapi.
      g_total_records = g_total_records + 1.
    *--Call BAPI to update sales order schedule line for simulation mode
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = st_salesdoc
          order_header_inx = st_ord_headx
          simulation       = c_chk
        TABLES
          return           = it_return
          schedule_lines   = it_schedule_line
          schedule_linesx  = it_schedule_linex.
      IF NOT it_return[] IS INITIAL.
        READ TABLE it_return INTO st_return WITH KEY type = c_e.
        IF sy-subrc EQ 0.
          g_error_records = g_error_records + 1.
        ELSE.
          REFRESH : it_return.
    *--Call BAPI to update sales order schedule line
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument    = st_salesdoc
              order_header_inx = st_ord_headx
            TABLES
              return           = it_return
              schedule_lines   = it_schedule_line
              schedule_linesx  = it_schedule_linex.
        ENDIF.
        LOOP AT it_return INTO st_return
                          WHERE type EQ c_e.
          st_erfile = st_ipfile.
          st_erfile-message = st_return-message.
          APPEND st_erfile TO it_erfile.
          APPEND st_erfile TO it_file.
          CLEAR : st_return.
        ENDLOOP.
      ENDIF.
      IF it_file[] IS INITIAL.
    *--Call BAPI transaction commit to change the schedule line
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_chk.
      ELSE.
        ROLLBACK WORK.
    *--Call BAPI transaction rollback to rollback the schedule line
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.
    *--Clear
      CLEAR : st_salesdoc,
              st_ord_headx.
    *--Refresh
      REFRESH : it_return,
                it_schedule_line,
                it_schedule_linex.
    ENDFORM.                    " sub_call_bapi
    Regards,
    Prashant

  • Unable to delete delivery schedule lines in MD04

    Hello All,
    In an intercompany process, plant A (receiving plant) placed an order
    through Schedule Agreement on plant B (sending plant). Accordingly
    schedule lines are released. Plant A received material but schedule
    lines are still reflecting in plant B of same qty's.. but not in plant
    A. Now we are unable to delete / remove schedule lines in plant B of
    stock / requirement list (tcode MD04).
    We would like to know why we are unable to delete these schedule lines
    in plant B. Pls. let us know how we can delete?
    Thanks

    But again system is not allowing to receive, stating qty is exceed over SA / PO.
    I have not seen that you mentioned this earlier. Instead you wrote earlier:
    In SA history we see only goods receipt happened through movement type 101 followed by invoice receipt. From supplying plant there was NO out bound or goods issue happened. .
    CAn you start again explaining your situation as it is totally unclear if you have problems with receipt or with goods issue?
    Of course you should only receive after it was issued.
    You should double click the message to get the long text along with the message number. the message number would help us to find a solution for you.

  • BAPI to read and change schedule lines in APO

    Hello experts,
    We want to firm schedule lines inside the firm zone of the APO procurement scheduling agreements with a daily job. For this we are trying to use BAPI BAPI_POSRVAPS_GETLIST3 and BAPI_POSRVAPS_SAVEMULTI3. The getlist one does not return schedule lines, it returns purchase orders and purchase requisitions. Are these the right bapis to read and change schedule lines in APO? or is there anyother one we can use?
    Thanks and regards,
    Ergul

    Hi,
             You can use the below code to read the schedule lines.
    Checking a session exists
        CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
          IMPORTING
            ev_simsession = gv_sims
            es_gen_params = gv_params.
    If not create a new session and read it
        IF gv_sims IS INITIAL.
          CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_CREATE'
            IMPORTING
              ev_simsession = gv_sims.
          CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
            IMPORTING
              ev_simsession = gv_sims
              es_gen_params = gv_params.
          g_cre_chk = 'X'.
        ENDIF.
    CALL FUNCTION '/SAPAPO/CMDS_TPSRC_GET'
        EXPORTING
          iv_ebeln                       = p_l_t_acknh_ebeln
          iv_ebelp                       = p_l_t_acknh_ebelp
        TABLES
          et_tpsrc_all                   = lt_tpsrc
        EXCEPTIONS
          matid_not_found                = 1
          locfrom_not_found              = 2
          locto_not_found                = 3
          scheduling_agreement_not_found = 4
          error_selecting_schedagreement = 5
          OTHERS                         = 6.
      IF sy-subrc = 0.
    reading the scheduling agreement records
        READ TABLE lt_tpsrc INTO ls_tpsrc INDEX 1.
        CALL FUNCTION '/SAPAPO/PWB_BZQID_GET_ORDER'
          EXPORTING
            iv_simid               = '000'
            iv_bzqid               = ls_tpsrc-bzqid
          IMPORTING
            ev_ordid               = lv_iordid
          EXCEPTIONS
            lc_connect_failed      = 1
            no_elements            = 2
            unit_conversion_failed = 3
            OTHERS                 = 4.
        IF sy-subrc = 0.
          CALL FUNCTION '/SAPAPO/PWB_GET_RELATED_ORDERS'
            EXPORTING
              iv_ordid             = lv_iordid
              iv_order_type     = '16'
              iv_simid            = '000'
            IMPORTING
              ev_ordid          = lv_eordid
            EXCEPTIONS
              order_not_found   = 1
              lc_connect_failed = 2
              no_elements       = 3
              OTHERS            = 4.
          IF sy-subrc = 0.
            APPEND lv_eordid TO lt_ordid.
            CALL FUNCTION '/SAPAPO/DM_PO_READ'
              EXPORTING
                iv_simsession     = gv_sims
                is_gen_params     = gv_params
                it_ordid          = lt_ordid
              IMPORTING
                et_schedule       = p_lt_sched
              EXCEPTIONS
                lc_connect_failed = 1
                lc_com_error      = 2
                lc_appl_error     = 3
                OTHERS            = 4.
          ENDIF.
        ENDIF.
      ENDIF.
    Use '/SAPAPO/CMDS_SNP_MM_ORD_MODIFY' function module to change the schedule lines (Pass '16' to iv_order_type parameter).
    Let me know if u have any issues.
    Regards,
    Siva.

  • Mass Deletion of Schedule Lines

    Dear Friends,
    Our client's requirement is to mass delete the schedule lines generated through MRP by wrong production schedule. They want to delete it once in a month.
    regards,
    Ask

    Dear,
    I'm not sure just try this,
    Go to SM30 table MASSFLDLST
    add field LOEKZ
    You defined in customizing table T161 field STAKO- LOEKZ
    Then you can delete it through MEMASSSA T.Code
    Else better you use tools like LSMW to close those unwanted schedule lines.
    Regards,
    R>brahmankar

  • How to change schedule line fields when save sales documents in va01/va02

    Hi, every Experts,
    I want to change schedule line when save the sales documents in va01 or va02, such as change delivery block or schedule line category.
    of course, can use user exit USEREXIT_SAVE_DOCUMENT_PREPARE, but I do not know to use this user exit, I am newer about ABAP.
    Please help me , thanks.
    best regards
    Passion Wu

    Hi,
    For changeing schedule line: select line item, GOTO --> item --> schedule lines --> enter the confirmed qty.
    USEREXIT_SAVE_DOCUMENT_PREPARE program is MV45AFZZ
    For your reference
    USEREXIT_SAVE_DOCUMENT_PREPARE - Can I use in button, but skip
    regards,
    Mohanprabu C

  • Change schedule line category

    HI,
    I wonder if somebody can give an idea of how to change schedule line category of non-stock products by order type.
    Thanks,

    Hi,
    Did you check the userexit FORM userexit_move_field_to_vbep in the include MV45AFZZ
    Thanks,
    Naren.

  • Deletion OF schedule LInes from APO SPP(Spare Parts Planning) through ABAP.

    Dear All,
    I need to delete the schedule Lines from APO SPP(spare parts planning ) system.I am looking for any available BAPI provided by SAP for this purpose.Please provide me help if any of you folks previously in your project went through this requirement.
    If any other way is there other than BAPI please suggest.
    Regards
    Mukesh Pandey

    Hi Siddartha,
    That option is not working.
    Thanks

  • Deletion of schedule lines

    Hi,
    Is it possible to delete the schedule lines in mass in 4.6 versions. I know that it is possible in ECC 6.0.
    Regards
    Nilesh

    Hello Pravin,
    You correctly know that it is possible to delete the schedule lines in ECC 6.0.
    But unfortunately there is no transaction by which mass deletion of schedule line is possible in 4.6.
    User has to delete it individaully.
    Thanks

  • Change Schedule line in Scheduling agreement by function.

    I want to know that is enalbe to change schedule line in Scheduling agreement by function( 'BAPI' or Standard function).
    I known that is possible by BDC.
    But I have to change many records. So I want to know faster method.
    Please let me know what function enbale that.
    Thank you for your interest.

    Hi..
    The Scheduling agreement is one which is created runing MRP not VA31.
    I know that is two transaction data in SAP.
    One is Sales Data other one is Purchasing Data.
    This is second one.
    Thank you your response.

  • How can create and change PCA line items.

    How can create and change PCA line items.
    Please tell me the process and t.codes.

    If you are in version < 4.7 ee then use 9KE0 tcode for passing profict center entries or trasnafer of balances from one profit center to another.
    If you are in new GL regular FI entry like FB50 will hold good for account types "S"

  • 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 ?

  • Mass Delete of Schedule Lines generated through changes in prod Schedule

    Hi friends,
    Kindly provide me the process of mass deleting schedule lines which are created through changes in Production Schedule in the month end.
    Regards,
    Ask

    Hi,
    Try T.code Me17
    thanks
    Rakesh

  • BAPI FOR Deleting a Schedule Line Item from EKES and EKET tables

    Dear All,
    I would like to for deleting one of the line item from EKES (Po Confirmation ) and the respective line item from the EKET(PO Schedule Line Item Table).
    Assume that am allowing the user to select the lineitem from zprogram screen and collecting the PO and Its LIne Item details in an internal table.
    Can i Use
    <b>BAPI_PO_Change</b> , if so , can anybody tell me the steps to follow to use this bapi for deleting the PO lineItems, since i m going to try BAPI for First time.
    pls help me out
    Message was edited by: Raja K.P

    Hi raja ,
    loop at iekko1.
        w_index = sy-tabix.
        item-po_item   = itemx-po_item   = iekko1-ebelp.
        item-quantity  = iekko1-mng01.
        itemx-quantity = iekko1-mng01.
        if iekko1-wamng = iekko1-wemng.
        itemx-no_more_gr = item-no_more_gr = 'X'.
        else.
        itemx-no_more_gr = item-no_more_gr = ''.
        endif.
        append item.
        append itemx.
          clear return[].
          call function 'BAPI_PO_CHANGE'
               exporting
                    purchaseorder = iekko1-ebeln
               tables
                    return        = return
                    poitem        = item
                    poitemx       = itemx.
          if return[] is initial.
          commit work and wait.
          call function 'DEQUEUE_ALL'.
    search for deletion fields which u have to mark 'X'.
    before calling  this BAPi u have to lock the PO by using ENQUEUE.
    <b>
    FU BAPI_PO_CHANGE
    Text
    Change purchase order
    Functionality
    Function module BAPI_PO_CHANGE enables you to change purchase orders. The Change method uses the technology behind the online transaction ME22N.
    Alternatively, the IDoc type PORDCH1 is available. The data from this IDoc populates the interface parameters of the function module BAPI_PO_CHANGE.
    Functionality in Detail
    Authorization
    When you create (activity 02) an Enjoy purchase order, the following authorization objects are checked:
    M_BEST_BSA (document type in PO)
    M_BEST_EKG (purchasing group in PO)
    M_BEST_EKO (purchasing organization in PO)
    M_BEST_WRK (plant in PO)
    Controlling adoption of field values via X bar
    For most tables, you can use your own parameters in the associated X bar (e.g. PoItemX) to determine whether fields are to be set initial, values inserted via the interface, or default values adopted from Customizing or master records, etc. (for example, it is not mandatory to adopt the material group from an underlying requisition - you can change it with the BAPI).
    Transfer
    Purchase order number
    The PurchaseOrder field uniquely identifies a purchase order. This field must be populated in order to carry out the Change method.
    Header data
    The header data of the Enjoy purchase order is transferred in table PoHeader.
    Item data
    The item data of the Enjoy purchase order is stored in the tables PoItem (general item data). Changes regarding quantity and delivery date are to be made in the table PoSchedule.
    Use the table PoAccount to change the account assignment information.
    Services and limits
    Changes to existing items cannot be carried out with the Change method. It is only possible to create new items.
    Conditions
    Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. A new price determination process can be initiated via the parameter CALCTYPE in the table PoItem.
    Vendor and delivery address
    The vendor address in the table PoAddrVendor and the delivery address in the table PoAddrDelivery can only be replaced by another address number that already exists in the system (table ADRC). Changes to address details can only be made using the method BAPI_ADDRESSORG_CHANGE.
    Partner roles
    You can change all partners except the partner role "vendor" via the table PoPartner.
    Export/import data
    Export/import data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items. Changes to the export/import data of existing items are not possible.
    Texts
    Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText. Texts can only be replaced completely.
    Version Management
    You can make use of the Version Management facility via the table AllVersions.
    Return
    If the PO was changed successfully, the header and item tables are populated with the information from the PO.
    Return messages
    Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
    Restrictions
    With this function module, it is not possible to:
    Create subcontracting components (you can only use existing ones)
    Create configurations (you can only use existing ones)
    Change message records (table NAST) and additional message data (this data can only be determined via the message determination facility (Customizing))
    Attach documents to the purchase order
    Change foreign trade data
    Change service data
    Change or reexplode BOMs
    A firewall prevents the manipulation of data that is not changeable in Purchasing according to the business logic of the purchase order (e.g. PO number, vendor, etc.).
    PO items with an invoicing plan cannot be created or changed using the BAPIs
    In this connection, please refer to current information in Note 197958.
    To change addresses with numbers from Business Address Services (cantral address management), please use the function module BAPI_ADDRESSORG_CHANGE.
    To change variant configurations, please use the function module BAPI_UI_CHANGE. More information is available in the BAPI Explorer under the Logistics General node.
    In the case of changes that are to be made via the BAPI_PO_CHANGE, a firewall first checks whether the relevant fields are changeable. This approach follows that of the online transaction. Here it is not possible to change the vendor or the document type, for example.
    Example
    Example of changes made to a purchase order with:
    1. Change in header data
    2. Change in item
    3. Change in delivery schedule
    4. Change in account assignment
    5. Change in conditions
    6. Change in partners
    Parameter: PURCHASEORDER 4500049596
    Parameter: POHEADER
    PMNTTRMS = 0002
    PUR_GROUP = 002
    Parameter: POHEADERX
    PMNTTRMS = X
    PUR_GROUP = X
    Parameter: POITEM
    PO_ITEM = 00001
    CONF_CTRL = 0001
    Parameter: POITEMX
    PO_ITEM = 00001
    PO_ITEMX = X
    CONF_CTRL =  X
    Parameter: POSCHEDULE
    PO_ITEM = 00001
    SCHED_LINE = 0001
    QUANTITY = 10.000
    PO_ITEM = 00001
    SCHED_LINE = 0003
    DELETE_IND =  X
    Parameter: POSCHEDULEX
    PO_ITEM =  00001
    SCHED_LINE =  0001
    PO_ITEMX =  X
    SCHED_LINEX =  X
    QUANTITY =  X
    PO_ITEM =  00001
    SCHED_LINE =  0003
    PO_ITEMX =  X
    SCHED_LINEX =  X
    DELETE_IND = X
    Parameter: POACCOUNT
    PO_ITEM = 00001
    SERIAL_NO = 01
    GL_ACCOUNT = 0000400020
    Parameter: POACCOUNTX
    PO_ITEM = 00001
    SERIAL_NO = 01
    PO_ITEMX = X
    SERIAL_NOX = X
    GL_ACCOUNT = X
    Parameter: POCOND
    ITM_NUMBER = 000001
    COND_TYPE = RA02
    COND_VALUE = 2.110000000
    CURRENCY = %
    CHANGE_ID = U
    Parameter: POCONDX
    ITM_NUMBER = 000001
    COND_ST_NO = 001
    ITM_NUMBERX = X
    COND_ST_NOX = X
    COND_TYPE = X
    COND_VALUE = X
    CURRENCY = X
    CHANGE_ID = X
    Parameter: POPARTNER
    PARTNERDESC =  GS
    LANGU =  EN
    BUSPARTNO = 0000001000
    Help in the Case of Problems
    1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
    2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
    3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
    Customer Enhancements
    The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
    EXIT_SAPL2012_001 (at start of BAPI)
    EXIT_SAPL2012_003 (at end of BAPI)
    The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
    EXIT_SAPL2012_002 (at start of BAPI)
    EXIT_SAPL2012_004 (at end of BAPI)
    These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
    There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
    Further Information
    1. Note 197958 contains up-to-date information on the purchase order BAPIs.
    2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
    3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
    4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
    5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
    Parameters
    PURCHASEORDER
    POHEADER
    POHEADERX
    POADDRVENDOR
    TESTRUN
    MEMORY_UNCOMPLETE
    MEMORY_COMPLETE
    POEXPIMPHEADER
    POEXPIMPHEADERX
    VERSIONS
    NO_MESSAGING
    NO_MESSAGE_REQ
    NO_AUTHORITY
    NO_PRICE_FROM_PO
    EXPHEADER
    EXPPOEXPIMPHEADER
    RETURN
    POITEM
    POITEMX
    POADDRDELIVERY
    POSCHEDULE
    POSCHEDULEX
    POACCOUNT
    POACCOUNTPROFITSEGMENT
    POACCOUNTX
    POCONDHEADER
    POCONDHEADERX
    POCOND
    POCONDX
    POLIMITS
    POCONTRACTLIMITS
    POSERVICES
    POSRVACCESSVALUES
    POSERVICESTEXT
    EXTENSIONIN
    EXTENSIONOUT
    POEXPIMPITEM
    POEXPIMPITEMX
    POTEXTHEADER
    POTEXTITEM
    ALLVERSIONS
    POPARTNER
    Exceptions
    Function Group
    2012
    </b>
    regards
    prabhu
    Message was edited by: Prabhu Peram

  • Change schedule lines using bapi salesorder_change

    Hello,
    I am using 'SD_SALESDOCUMENT_CHANGE' to change sales order. schedule lines are not changed.
    I get an express inbox message saying :
    ===================================================================
    Update was terminated
    Error Info...   00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
    ======================================================================
    I don't know what to do.
    any body solved this problem? what is wrong in the way I wrote it?
    Thanks in advanced ,
    Sara
    I populate schedule lines this way:
          lv_schedule-itm_number = svbap-posnr.
          lv_schedule-sched_line = '0001'.
         lv_schedule-req_qty    = svbap-kwmeng.
          lv_schedule-req_date   = im_vbak-vdatu.
          move im_vbak-vdatu to: lv_schedule-tp_date,
                                 lv_schedule-ms_date,
                                 lv_schedule-load_date,
                                 lv_schedule-gi_date.
          append lv_schedule to et_schedule.
      * schedule lines X
          lv_schedulex-itm_number = svbap-posnr.
          lv_schedulex-sched_line = '0001'.
          lv_schedulex-updateflag = 'U'.
          lv_schedulex-req_qty    = 'X'.
          lv_schedulex-req_date   = 'X'.
          move 'X' to: lv_schedulex-tp_date,
                      lv_schedulex-ms_date,
                      lv_schedulex-load_date,
                      lv_schedulex-gi_date.
          append lv_schedulex to et_schedulex.

    Hi,
    The function I use is the one used in the BAPI CHANGE.
    Online changing the delivery date changes the date in the schedule lines.
    I can't understand why it is not updated.
    Sara

Maybe you are looking for