BAPI_SAG_CHANGE to modify scheduling agreement

Hi,
I need to change item condition values on a scheduling agreement, i'd like to use the bapi BAPI_SAG_CHANGE.
Does anyone know how to do it?
I'm using sap ecc 6.0
Thanks!

I tried this batch but it doesn't work (well, it actually does work the first time I launch it, then it stops showing the dynpro SAPLV14A 0102):
   1                                                           T     ME32L     BS AA X   F
   2     SAPMM06E     0205     X                                                                               
3                                                                 BDC_OKCODE     /00
   4                                                                 RM06E-EVRTN     2324765
   5     SAPMM06E     0220     X                                                                               
6                                                                 BDC_CURSOR     EKPO-TXZ01(01)
   7                                                                 BDC_OKCODE     =KO
   8     SAPLV14A     0102     X                                                                               
9                                                                 BDC_CURSOR     VAKE-DATAB(04)
  10                                                                 BDC_OKCODE     =PICK
  11     SAPMV13A     0201     X                                                                               
12                                                                 BDC_OKCODE     =SICH
  13                                                                 KONP-KBETR(01)     2.580,00
  14                                                                 KONP-KBETR(02)     2.554,97-

Similar Messages

  • Error in modifying Schedule Agreement with reference to contract

    I have created a Schedule Agreement with reference to a contract manually.The contract is of type MK, while the SA is of type LP.
    The contract contains one Material which was successfully added to the SA.
    Now I am trying to automate the same using BAPI BAPI_SAG_CHANGE. This causes a short dump in the system -
    Runtime Errors       MOVE_CAST_ERROR
    Exception              CX_SY_MOVE_CAST_ERROR
    Short text              Dynamic type conflict when assigning references
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_MOVE_CAST_ERROR', was not caught in procedure "GET_CREQS" "(METHOD)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated. The reason for the exception is: It was tried to assign a reference to a rereference variable using the
        'CAST' operation ('?=' or 'MOVE ?TO'). However, the current content of the source variable does not fit into the target variable.
        source type: "\FUNCTION-POOL=MEOUT \CLASS=LCL_OUT_ITEM_SA"
        target type: "\FUNCTION-POOL=MEOUT\CLASS=LCL_OUT_ITEM_CON"
    Information on where terminated:
        Termination occurred in the ABAP program "SAPLMEOUT" - in "GET_CREQS". The main program was "RS_TESTFRAME_CALL". In the source code you have the termination point in line 105 of the (Include) program "LMEOUTP2F". The termination is caused because exception "CX_SY_MOVE_CAST_ERROR" occurred in procedure "GET_CREQS" "(METHOD)", but it was neither handled locally nor declared in the RAISING clause of its signature. The procedure is in program "SAPLMEOUT "; its source code begins in line 101 of the (Include program "LMEOUTP2F ".
    The following data was populated before calling the BAPI:(along with itemx table also)
    item-item_no
    item-agreement
    item-agmt_item
    The entire logic consists of updating the contract first with a new line item and then adding a line item in SA with reference to the new item in the contract.
    The contract updation is working correctly [BAPI_CONTRACT_CHANGE].

    Hi Bahrat,
    I am also facing the same issue now. Is this issue resolved for you?
    Please send the threads if any.
    Can anyone plz respond for the issue?

  • BAPI for Scheduling Agreement Scales

    Hello,
    I want to add Scales to my Scheduling Agreement.
    Tried using BAPI_SAG_CREATE, I was able to successfully create a Scheduling Agreement but it says that "No scales exist". According to the FM documentation, scales are not supported during the creation of outline agreements.
    Tried using BAPI_SAG_CHANGE using the Scheduling Agreement created but I always get a dump and points me to a standard code.
    Runtime Errors         GETWA_NOT_ASSIGNED
    ABAP Program         SAPLMEOUT
    Include                      LMEOUTP14
    Row                          1,454
    Module type              (METHOD)
    Module Name           POST
    If these BAPI will not work, my last option would be BDC.
    Thanks in advance.

    first see the documentations.
    Regards
    Peram

  • BADI for Scheduling Agreement

    I have created the BADI ZME_PROCESS_PO_CUST this badi is executed for normal PO's like thru ME21N but when i make the Scheduling agreement thru ME31L the this BADI is not executed is there any other BADI for Scheduling agreement. if so then help me out.
    abhishek

    Hello,
    BADI_SD_SCHDL_AGREE " BADI For Modifying Scheduling Agreements
    BADI_SD_SCH_GETWAGFZ Scheduling Agreement: Read WAGFZ from S073
    Thanks,
    Krishnakumar

  • Schedule line in Scheduling Agreement non modifiable

    Hi Friends,
    I'm creating Scheduling Agreement with VA31. The issue is that Schedule line category is coming as non-modifiable. Is it standard that in Scheduling Agreement, you can not overwrite default schedule line category? In customizing for Assign Schedule line categories, Manual schedule line categories are defined, but still I can not overwrite Schedule line category in VA31. Pl suggest what can be the reason. I don't have any ABAPer at my rescue.
    Thank you.

    Sgr,
    For Sch.Line Agreement for component suppliers,we cant change sch.line category as of normal sch.line agreement.
    Based on MRP for Delivery Schedule Types (Field available in Header Data under SALES view) and item category,sch.line category will be determined.
    MRP Indicator
    FORECAST
    JIT
    A
    L1
    CN
    B
    L1
    L1
    C
    BN
    L2
    D
    L1
    L2
    E
    CN
    CN
    However,To decide which type of delivery schedule is currently relevant for requirements and delivery, the system uses the JIT delivery schedule horizon and the material requirements planning indicator in the scheduling agreement header
    Try to change the MRP Indicator available in Header data to match your requirement.
    For more info,try this URL
    Scheduling Agreements for Component Suppliers (SD-SLS-OA) - SAP Library
    Regards
    Logan

  • Modify customer hierarchy in scheduling agreement

    Hello everybody,
    if I modify the customer hierarchy how can I update it in the scheduling agreement?
    Is there a way to update it or I have to delete and create the order after the modification?
    Thank you all
    Francesca

    UP!!!! Please help.

  • How to modify item quantity in an scheduling agreement

    Hi,
    I'm trying to modify target quantity (ekpo-ktmng) in an item of a scheduling agreement (you can see it in me33l transaction).
    When the users tries to modify, using me33l, the quantity of an item in an scheduling agreement, I need to pick this value (ktmng) and modify it according to some rules.
    To catch the value I use EXIT_SAPMM06E_016 user-exit, and when the user modifies a value in the i_ekpo register of the user exit I see the new value that the user introduced. But I need to put a new value and it isn't enough with modifying this structure (i_ekpo).
    So I think in a bapi, first of all I've tried with BAPI_PO_CHANGE but I receive the following error:
    "Not possible to process a scheduling agreement using this function"
    How can I change the target quantity of an item in a scheduling agreement?
    thanks in advance

    Thanks for your reply, I'm trying with the following piece of code:
    DATA: w_ekko TYPE ekko,
          t_ekpo TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
         t_ekpo2 TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
    START-OF-SELECTION.
      SELECT SINGLE * INTO CORRESPONDING FIELDS OF w_ekko
      FROM ekko
      WHERE ebeln = '5500000001'.
      SELECT * INTO TABLE t_ekpo
      FROM ekpo
      WHERE ebeln = '5500000001'.
      t_ekpo2[] = t_ekpo[].
      READ TABLE t_ekpo2 INDEX 1.
      t_ekpo2-ktmng = '69'.
      MODIFY t_ekpo2 INDEX 1.
      CALL FUNCTION 'ME_UPDATE_AGREEMENT_PO'
        EXPORTING
          i_ekko_new       = w_ekko
      I_EKKO_OLD       =
      I_LOGSY          =
        TABLES
      XEKBES           =
          xekpo            = t_ekpo
       YEKPO            = t_ekpo2
      XSVAB            =
    But I receive a dump from SAP.
    In t_ekpo I put all the items of the scheduling agreement, the I modify one of the (first) and store it in t_ekpo2, but I'm not very sure of this is the good way of working.
    Any help would be very appreciated.
    Thanks again

  • Quantity not modifiable in scheduling agreement for specific valuation clas

    Hi Gurus,
    My client wants once the scheduling agreement is created then the quantity should not be changed later. This they want only for a specifically for imported materials. So is it possible to make the quantity greyed in the change screen for a materials with specific valuation class.
    Regards,
    Yuvaraj

    Can you please let me know where I can check the authorizations? If you are mentioning about roles and authorizations (those Security team provides) those are all provided correctly.
    Thank you.

  • BAPI_SCHEDULE_MAINTAIN throws error for time- independent scheduling agreement

    Hi All,
    I get the below error while modifying a stock transport Scheduling agreement in UI5 using BAPI “BAPI_SCHEDULE_MAINTAIN”
    “Scheduling agreements with time-independent conditions are not supported”
    Found a note 1046794-
    "BAPI_SAG_CHANGE (and BAPI_SAG_CREATE) can only treat scheduling agreements with time-dependent conditions. Document conditions are not supported. Therefore, this kind of scheduling agreements cannot be processed. This is a missing functionality”
    To meet some finance requirements, we need to use time-independent conditions in the scheduling sgreement, in order for a custom condition type to be picked up.
    I'd appreciate any advice I can get about how to fix this functionality in the BAPI or alternatively how to link the pricing condition type to the Scheduling agreement document type?
    Thanks so much.

    Link between Time dependent / independent condition and Scheduling agreement document type is in configuration  under SPRO>MM>PURCHASING>SCHEDULING AGREEMENT>DEFINE DOCUMENT TYPES>SCROLL TO THE RIGHT here you find a check box Time-D.C.
    Thanks
    DD

  • Problem updating Volume in Sales Scheduling Agreement

    Hi gurus,
    we have problem with Sales Scheduling Agreement. It's about volume of material. First, I create a Scheduling Agreement for material A, what is 100 CCM of volume in its register master material. I create several forecast delivery schedule. After, I modify by other reasons the volume of material A in master material to 200 CCM. What is the problem? The problem is when system creates the deliveries for Scheduling Agreement, the packaging is did in base 100 CCM of volume and not is for 200 CCM.
    Besides of this, after if modify volume in master material I will add new forecast delivery schedules, the volume is calculated based in old volume factor: 100 CCM.
    We don't understand this behaviour in system.
    Thank you!!!!

    Hi,
    The reason is, the link of updating automatically from material master data to sales SA is broken!
    You should double check the volume at item level in Sales SA, enter the sales SA, select menu>Goto>Item-->Shipping, see the value of field "Volume", whether it's 200 CCM, or not? I think it should still be 100 CCM, change it to 200 CCM, that will be okay!
    Good luck
    Z.T

  • Scheduling Agreement Release Comparison

    Hi Experts
    does Scheduling agreement release comparison works for JIT delivery schedule (Doc Type LP) in SNC?
    if yes then how it works and how it is different than forecast delivery schedule release comparison (Doc Type LPA)
    Thanks

    Hi Indira,
           The are two ways to address your business case :
    1. The simple way is to forward the work item to the concerned person (by selecting the user from user list) for releasing the work item.
    2. In the second option, we need to modify the workflow. A conditional work item (Accept/Reject) needs to be inserted immdtly after the SA workitem to accept or reject the user decision. Based on the decision, the workitem will either show him the SAP user list to redirect the same for releasing or it should go to the concerned user automatically (in static agent assignment). In case of acceptance, it will go to next step bypassing the rejection loop.
    In case of any further queries, please revert.
    Regards,
    Ashish J. K.

  • Stock transport scheduling agreement SD Delivery

    Dear Experts.
    I am using stock transport scheduling agreement in order to show requirements from one plant to another plant belonging to the same company code.
    Delivery to the Stock Sched Agreem will be managed  thru the SD delivery processes.
    I use VL10I in order to create a delivery linked to the Sch Agrm, nevertheless the business processes requires that sometimes the delivery created is modified adding new materials.
    Need.
    I have not found any option on the VL02N which would allow add a new material linking it to a specific sched agreement ---(this same option exists for the case that a new material is delivered and has to be added and linked to an existing customer order)
    Does anybody know how can I do this from the delivery - VL02N??? I would prefer to avoid using VL10I again - which is actually the way I am getting this solved.
    Any help would be appreciated.
    Regards vpa
    Valentí

    Have you configured required settings for Stock transport scheduling agreement in SPRO (STO Settings)
    If yes check in SA r u getting shipping tab or not.
    Give some more details about your process .

  • BAPI for fetching the list of scheduling agreements

    This is my first post in SDN Forums so pardon me if I commit a mistake.
    My question is: Is there a standard BAPI for fetching a list of scheduling agreements?
    I know that there are BAPIs for creating and maintaining scheduling agreements like BAPI_SAG_CREATE and BAPI_SAG_CHANGE and iBAPI_SAG_GETDETAIL but each of these require the scheduling agreement number. My requirement is to list out all the scheduling agreements that are present in the system.
    I found a BAPI named BAPI_DOCUMENT_GETLIST and BAPI_DOCUMENT_GETLIST2 but I'm not able to find out what documents it is able to display. If I don't specify any selection criteria, it is fetching just two records of document type DRW. No other document of any other type is fetched.
    Another BAPI that I found was BAPI_SALESORDER_GETLIST in which if I specify the Transaction group as "3" (for scheduling agreement), it fetches them but those are related to Sales orders and not purchase orders.
    So, if anyone has any info and can help me out, I would really appreciate it.
    Edited by: rkarthea on Jul 30, 2010 10:44 AM

    Hi Raj,
    As I had said earlier, I need the Scheduling agreements related to purchase orders and not sales orders. The ones in EKKO table (Doc category: L).Will this program fetch this info?
    Also, I need a Java app (that's being developed) to fetch this info, so I'm looking for a BAPI. Is there any or can this program (if it fetches the right Scheduling agreements) be called from an external Java app?

  • BAPI_SCHEDULE_MAINTAIN - Scheduling Agreement  (Deleting Item Condition)

    Dear Friends,
    My requirements is change or create the Scheduling Agreement - Schedule Lines (ME32L). I am using BAPI -->
    BAPI_SCHEDULE_MAINTAIN
    Its updating correctly, but automatically the item condition price details are deleted.
    1st time i am facing this issue.
    kindly help to rectify this issue. I am waiting for your valuable response.
    FYI - this is my code
            t_schedule-item_no    = t_alv_output-it_no.
            t_schedule-sched_line = t_alv_output-sh_no.
            WRITE t_alv_output-de_dt TO t_schedule-delivery_date.
            t_schedule-quantity      = t_alv_output-de_qt.
            t_schedule-stat_date = t_eket_qty-slfdt.
            APPEND t_schedule.
            t_schedulex-item_no       = t_alv_output-it_no.
            t_schedulex-sched_line    = t_alv_output-sh_no.
            t_schedulex-sched_linex   = lv_x.
            t_schedulex-delivery_date = lv_x.
            t_schedulex-stat_date     = lv_x.
            t_schedulex-quantity      = lv_x.
            APPEND t_schedulex.
          CALL FUNCTION 'BAPI_SCHEDULE_MAINTAIN'
            EXPORTING
              purchasingdocument = t_alv_output_head-po_no
            TABLES
              schedule           = t_schedule
              schedulex          = t_schedulex
              return             = t_return.
    I am also tried
    BAPI_SAG_CHANGE
    . this also updating the Schedule Lines. but deleting the item condition records.
    Thanks & Regards,
    Durai V

    Kindly check notes 1034912 and 1046851
    Regards
    JP Milton

  • Update purchasing group in scheduling agreements

    Hi gurus,
    I'm trying to update purchasing group field in scheduling agreements, which are time-independent (EKKO-STAKO = ' ').
    In my environment, I'm not authorized to use CALL TRANSACTION statement.
    If possible, I'd need a way that works both in 4.6c and 6.0 versions.
    I have tried several options, but none works:
    -BAPI_SAG_CHANGE: "Scheduling agreements with time-independent conditions are not supported" (OSS note 1046794) (Also, this is not available in 4.6c)
    -BAPI_SCHEDULE_MAINTAIN: "Scheduling agreements with time-independent conditions are not supported" (OSS note 1046794) (Also, this is not available in 4.6c)
    -BAPI_AGREEMENT_MAINTAIN: Does not have the possibility to change field 'purchasing group'. (Moreover, it internally performs a CALL TRANSACTION).
    -ME_UPDATE_AGREEMENT_PO: I've been not able to change field 'purchasing group'.
    I'd be grateful about any hint. Thanks in advance!

    In case it is useful for anyone else, I have solved the problem using:
    CALL FUNCTION 'ME_UPDATE_DOCUMENT'
    Thanks anyway!

Maybe you are looking for

  • After installing  iMovie 4 my Bookmarks have disappeared!

    Actually, several things happened after installing iMovie. My ethernet adapter wouldn't work, but fixed that...kinda. It will now recognize my ethernet adapter if I plug it in after I boot. I also can no longer find my Download folder. There were thr

  • Using the LeaseRequest to unlock a lock.

    We are having locking issues in our application, we have the lease-granularity set to "Thread", and out application has a JSP that enables us to flush our caches. I am trying to enable an unlocking mechanism in this JSP to unlock these keys. I am usi

  • Cannot select Airplay Device for Output Audio

    I can't select my chosen AirPlay device for Output Device. It shows up as one of the options in the Sound System Preference, the Sound Selector in the Menu Bar or the AirPlay selector in iTunes (version 11.0.1). But, when I select it, it automaticall

  • How can we test XSL mapping program

    Hi Experts, I have XSL mapping program. How can I test this program. Please tell me how can I test this file. Thanks Balaprasad

  • OCR and voting disk locations

    How to check the location of the OCR and voting disk? How to know if they are on OCFS2? On Raw?