Change characteristics via BAPI_SALESORDER_CHANGE

Hello,
We are trying to change characteristics from within a contract programmatically using bapi BAPI_SALESORDER_CHANGE .
How ever even after filling all the data, looks like the characteristics doesnot change.
I did go through an SDN post for the similar issue, though the thread says answered, I do not see a resolution in that thread. Kindly share the resolution, if some one has resolved it.
Thanks
HR

check the following logic
LOOP AT itab_ch .
*   Header update indicator
s_order_header_inx-updateflag = 'U'.
*  IF itab_ch-itm_number = zitem_num1.
*   Line items
  i_order_item_in-itm_number = itab_ch-itm_number .
  i_order_item_in-material =   itab_ch-material.
  i_order_item_in-target_qty = itab_ch-target_qty.
  i_order_item_in-sales_unit = itab_ch-sales_unit.
  i_order_item_in-val_type = itab_ch-val_type.
  i_order_item_inx-updateflag = 'I'.
  i_order_item_inx-itm_number = itab_ch-itm_number .
  i_order_item_inx-material = itab_ch-material.
  i_order_item_inx-target_qty = 'X'.
  i_order_item_inx-sales_unit = itab_ch-sales_unit.
  i_order_item_inx-val_type =  'X'.
  APPEND: i_order_item_in, i_order_item_inx.
**  Fill schedule lines
  i_sched-itm_number = itab_ch-itm_number .
  i_sched-sched_line = '0001'.
  i_sched-req_qty    = itab_ch-target_qty.
  APPEND i_sched.
*   Fill schedule line flags
  i_schedx-itm_number  = itab_ch-itm_number .
  i_schedx-sched_line = '0001'.
  i_schedx-updateflag  = 'I'.
  i_schedx-req_qty     = 'X'.
  APPEND i_schedx.
ENDLOOP.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument     = p_vbeln
    order_header_in   = s_order_header_in
    order_header_inx  = s_order_header_inx
    behave_when_error = 'P'
  TABLES
    return            = it_return
    order_item_in     = i_order_item_in
    order_item_inx    = i_order_item_inx
    schedule_lines    = i_sched
    schedule_linesx   = i_schedx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.
LOOP AT it_return.
  WRITE / it_return-message.
ENDLOOP.
Edited by: Krupaji on Feb 18, 2010 8:45 AM

Similar Messages

  • Error while creating change request via solman support desk message

    I have configured CHARM and my change req. is working for urgent correction, I have tested the entire workflow.
    however when i try to create a new change req. via support desk message --> create a change request open
    I get following error
    An action was terminated due to an exceptional situation.
    Message no. SOCM_ACTION_LOG 090
    Diagnosis
    An exception has been triggered in PPF action processing.
    System Response
    Action processing has been terminated. The status of the transaction is still incorrect.
    Procedure
    You cannot execute the action until the cause of the error has been removed.
    The error messages will be kept until the transaction is next checked for subsequent analysis.
    Procedure for System Administration
    If necessary, analyze other messages in the application log for the incorrect transaction. To analyze the termination, you can activate the breakpoints in the checkpoint group socm_exception.
    Additional Information:
    Exception CX_SOCM_PRECONDITION_VIOLATED occurred (program:
    CL_HF_HELPER==================CP, include:
    CL_HF_HELPER==================CM00A, line: 29).
    pls help

    Hi Yunus,
    Your probably have changed the transaction type SLFN to a the customer namespace Z or Y. If this is the case you MUST also "Define Mapping Rules for Copy Control".
    Goto SPRO -> SAP Solution Manager -> Scenario-Specific Settings -> Change Management -> Change Request Management -> Extended Configuration -> Change Transaction -> Change Transaction Types -> Copy Control for Change Request Management ->  Define Mapping Rules for Copy Control.
    Once at this point in the IMG make a copy of SLFN -> ZLFN. This will resolve your problem.
    Kind regards,
    Latief

  • Ps cs6 on mac. since installing yosemite, when working on an image if i want to change tool, via shortcut of wacom pen click, i now have to click on the image title bar, how can i fix this please?

    ps cs6 on mac. since installing yosemite, when working on an image if i want to change tool, via shortcut or wacom pen click, i now have to click on the image title bar, how can i fix this ?

    @Naiks, having suffered through unsuccessful synching attempts for Calendar and Contacts myself, l would suggest you try the following:
    UNINSTALL iCloud control panel from your PC. Seems silly, but do it.
    Go into Outlook, and look at the very top menu. Click FILE, then ACCOUNT SETTINGS, then click the popup box.
    You will see a list of all your email accounts. Make sure that ONE of them has a checkmark against it. If not, select the account your want as your default, and click "set as default.
    Exit out of Outlook and reboot your machine.
    Now reinstall iCloud, check CALENDAR and CONTACTS, and do as instructed when prompted.
    Reboot for good luck and now launch OUTLOOK. All that remains is to locate your iCloud Contacts and Calendar files, and make them your default.
    IMPORTANT: Don't panic if you can't find your contacts -- they're there. Click CONTACTS and you'll see you have several available contact files. Locate the one label "iCloud" in grey type. Right-click on it, select PROPERTIES, then click the Outlook Address Book tab. Check the box that says something like "Make this my default Outlook Address Book." Keep clicking "apply" and "okay" until you've exited out of the dialog box maze.
    You may have to do something similar with your Calendar files. I dd not, but if you need to, do it.
    Everything should now sync pretty seamlessly.
    I didn't have the exact same problem as you, but my dilemma was close enough. Good luck!
    Arthur P. Johnson

  • Changing quantity using bapi_salesorder_change function

    hi ,
    i am changing quantity using 'bapi_salesorder_change' function.what are the minimum parameteres that needs to be passsed to the function.i am not able to change the quantity for some items.also for some sales orders i am not getting any error message but commit work is not working.
    thanks ,
    nitin

    Hi Nitin,
    After you call the BAPI_SALESORDER_CHANGE, specifically call BAPI_TRANSACTION_COMMIT , as BAPI_SALESORDER_CHANGE does not run a database commit.(as per the documentation provided by SAP for BAPI_SALESORDER_CHANGE)
    Thanks
    Lakshman

  • Error while accessing E2E Change Analysis via SMD

    Hi All,
    I am having below mentioned error while accessing E2E Change Analysis via SMD.
    Error loading template 0TPL_0SMD_CA01_Q0001 
    Notification Number BRAIN 276 
    Let me know if you are aware about the solution.
    Regards,
    Vinit Pagaria

    Is the Queries and templates activated completely in BI-content/Client?
    Please check the same and if needed activate the queries again by running report :CCMSBI_SETUP_E2E
    Also refer to the SAP Note 1342231 - ST: Manual actvtn. of BI Content for E2E diagnostics SP18-22.
    Revert for any issues pls.
    Thanks,
    Jagan

  • Set Word 2013 Track Changes settings via Registry edits or Group Policy?

    Hi
    Would anyone know if there is a way of changing Track Changes settings via registry edits or Group Policy (e.g. changing Simple Markup All Markup)? I've had a look in Group Policy Admin Templates and the Registry but cant see relevant
    Thanks!

    Hi,
    The All Markup/Simple Markup selection is controlled by the RevModeShowSimpleMarkup value within the following registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options
    The value is 0 (zero) for All Markup or 1 (one) for Simple Markup.
    If we close all Word instances, and change the value to 1, then start Word, the All Markup option should be selected.
    In addition, some track change settings can also be controlled by the GPO settings in the following location:
    Administrative Templates > Microsoft Word 2013 > Word Options > Track changes and compare
    If you still need further assistance on this issue, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Change value via Iterator

    Hi,
    i have a code:
    Iterator<? extends LatLon> foobar = subsetBuffer.getLocations().iterator();
                    while(foobar.hasNext())
                        LatLon coo = foobar.next();
                        LatLon popcoo = XProj.GKSlo2WGS84(coo.getLatitude().getDegrees(), coo.getLongitude().getDegrees());
                        coo = popcoo;
                        System.out.println(popcoo);
                    }Where i get iterator and do something with its value (popcoo) and then i want to save that popcoo back to iterator. You know what i mean? I want to change value via iterator.
    Line coo = popcoo, doesn't work. How should i do that?

    Ivansek wrote:
    What if i have a iterator like this:
    Iterator<double[]> foo2 = subsetBuffer.getCoords().iterator();
    if i say here foo2.next()[0] = 2, the value doesn't write back into that variable.Yes, that change will be reflected in your original collection.
    What you seem to be confusing is that in one case you would like to change the collection to contain a different object, while in the other case you want to modify an object that is contained in the collection:
    Can i somehow transform double[] data type to Double[]? You can't, except by creating a new Double-array, so you couldn't influence the original object in any way.
    Then i could change a value, right?No, there's no difference between double and Double in this respect.

  • Change password via 3-Tier Desktop Intelligence

    Hi everyone,
    It would be highly appreciated if you could tell me how to change password via 3-Tier Desktop Intelligence.
    Version: XI3.0, XI3.1
    Thanks a lot!
    Lisa

    No problem.
    And for a work around you can have users
    login directly to the CMS (2-tier)
    change password
    then close deski
    as long as they know the difference they can then login to deski 3-tier with their new password.
    Another option would be to
    lookup the user account in CMC
    in user properties check the box "must change password at next login"
    Then even 3-tier users will be prompted to change their password the next time they login
    Regards,
    Tim

  • HT204053 I have changed my apple ID and I changed it via computer.  When I just went to update my apps, my phone is still showing the old apple ID so I can't log in to update.  How do I change the apple ID from my iphone?

    I have successfully changed my apple id via computer.  Now, how do I change it on my actual phone?  I have the 5.1.1 iphone 3G.

    I recently changed my email address and want to change my Apple ID account to match. I have created a new Apple ID to match the new account but now I can't sign into iCloud on our phones or computer with the old Apple ID. I can't make any changes on iCloud on our phones because it directs me to the old account, which I can't sign into. I also can't sign me in on my computer to make any changes. Help!!! Now I have two addresses and can't access the one that directly affects my devices. 

  • Problem in changing characteristics of material while sales order creation

    Hello,
    My requirement is to change the characteristics of the material in a sales order before the sales order is saved.
    I tried using 'BAPI_OBJCL_CHANGE' but it aint working. In the debugging mode it is found that the program is searching for entries in KSSK table which are not found. The object key passed to the BAPI is a combination of sales order number and the item number and the object table is VBPS.
    Is there any other way by which I can change the characteristics before the sales order is saved?
    Thanks in advance,
    Anurag

    Try to use CRM_STATUS_CHANGE_INTERN if it's system status
    and CRM_STATUS_CHANGE_EXTERN if it is user status

  • How to change characteristics values in PPDS planned order?

    Hi,
    I have few PPDS planned orders. I want to change the value of few characteristics of existing PPDS planned order.
    How can I do the same?
    Any standard T.Code or function module or report available to update the characteristics values of PPDS planned order in APO.
    Thanks in advance.
    Warm Regards,
    Surajit Das

    Hi Surajit,
    Char can be changed programatically.
    If you want to change the Planned Order characteritics before its creation, you can do so at the time Planning run itself (/SAPAPO/RRP3) in BADI /SAPAPO/RRP_SRC_EXIT, Method RRP_USEX_PLORD_CREATE.
    Planned Order characteritics can be changed after it creation.using BAPI BAPI_MOSRVAPS_SAVEMULTI3.

  • Control authorization of mass change functionality via PCUI

    Hi,
    We are having the following issues with the Opportunity iview, com.sap.pct.crm.opp.opportunities_s.(Business package for CRM 5.0 and contains functionality CRMD_BUS2000111).
    Once the user clicks Go..he has the list of Opportunities. He can select some or select all and use "Mass Change".
    We would like to control the functionality of "Mass Change" attribute in the backend CRM System so that only a few people can be authorized to do this. However we are not able to find any CRM authorization
    object that controls the mass change activity for opportunities and pursuits in the backend CRM System.
    What is the backend CRM Authorization object that controls this functionality in the backend CRM System ?
    Regards,
    Rajan.K

    Frank,
    In IW38/IW3N we added our own Mass-Change button (in addition to the standard option) via Enhancement Spot ES_EAM_LIST_ENHANCEMENTS_EXT. This was required to perform functions that don't exist in the standard mass-change function e.g. mass-add/delete operations, mass-un-TECO, mass-un-CLSD, etc.
    This Enhancement Spot may work for IE05 too.
    PeteA

  • Update of links in Indesign CS6 when changing asset via drive

    Hi,
    i am having an issue regarding the integration of Adobe AEM with InDesign CS6 via Drive:
    I have a indd document that has a link to an image, both are stored on a Adobe AEM 5.6.1 server and accessed via Adobe Drive 5.0.2.
    Now i tested the use case that the asset is changed and replaced on the AEM instance. I expect that InDesign tells me that the link has updated when I am opening the file the next time and the new asset is shown.
    Unfortunatly this expectation occurs very unreliably and I managed to update the image only a few times.
    However, if i link to an image on my local hard drive and i change it, InDesign reacts immediatly. So i think that Adobe Drive is the responsible part.
    So my question is: does anyone have the same experience when integrating InDesign with AEM via Drive and does anyone know a best practise to reliably update images when the target of a link has changed?
    Best regards,
    Holger

    While writing I made a mistake... It is true I could become aware of the Scorpio incompatibility.
    I also tried the same identical procedure with a Seagate one. This disk and the same procedure was performed by some people I know on many MacBookPro Mid-2010 and everything was OK.
    We do not understand why this problenm occurs.
    Furthermore, If I installed the system on the broken HDD (that works, but sometimes it fails so badly and makes the system experience kernel panic) I could boot from it.
    I guess it is because of the **** Apple FIrmware written on the label.
    Is it possible that I cannot manage to boot from my new HDD because it has not a "special" feature on it that makes it compatible with apple??? Why making things so **** difficult my god a closer world like Apple one is impossible to imagine.
    However Shootist007 thanks for your message, but given what I said I do not think is a cable problem.

  • Change fields via field.set

    I don't quite know if this is the right approach for the problem, but I hope, anyone can make that clear to me:
    I got two Applications called "app1" and "app2". app2 is a simple swing-application which, to make it simpler, only consists of a JTextField (pseudocode following).
    JTextField vlaue_1 = new JTextField("test");
    ...The application app1 now starts app2 (using Class.forName and Method.invoke). Then, it gets all of app2's fields, in this case value_1, via getDeclaredFields.
    import java.lang.reflect.Field;
    import java.lang.reflect.Method;
    public class app1 {
         public app1() {
              super();
           public static void main(String[] args) throws Exception {
                Class testClass = Class.forName("app2");
                Method mainMethod = findMainMethod(testClass, "main");
                mainMethod.invoke(null, new Object[] { String[] arguments });
                Field[] fields = testClass.getDeclaredFields();
         private static Method findMainMethod(Class clazz) throws Exception {
              Method[] methods = clazz.getMethods();
              for(int i = 0; i < methods.length; i++){
                   if(methods.getName().equals(name))
                        return methods[i];
              return null;
    Now, app1 knows about the TextField in app2.
    And finally, the question is: Can I change the String in app2's value_1 into something different out of app1? For example, app1 says "Hey TextField, you are no 'test' any longer, you are now a 'foo'" and app2 updates its swing-GUI instantly?
    I already tried a field.set(Obj arg1, Obj arg2) and got only exceptions, but probably because I don't quite know which objects are meant for arg1 and arg2.
    Perhaps someone has some (pseudo-)code to clarify this issue.
    Any help would be nice. Thanks

    Ok, the original code for app2 is the following (the app doesn't make much sense, was only created for testing this issue):
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class TestApp extends JFrame implements ActionListener{
         public static JTextField wert1 = new JTextField("15");
         public static JTextField wert2 = new JTextField("12");
         public static JLabel ergebnis = new JLabel("0");
         public static JButton berechnen = new JButton("Berechnen");
         public TestApp() {
              JFrame frame = new JFrame("TestApp");
              JPanel north = new JPanel();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add(north, BorderLayout.NORTH);
              north.add(wert1, BorderLayout.CENTER);
              north.add(wert2, BorderLayout.CENTER);
              frame.getContentPane().add(ergebnis, BorderLayout.CENTER);
              frame.getContentPane().add(berechnen, BorderLayout.SOUTH);
              berechnen.addActionListener(this);
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              TestApp gui = new TestApp();
         public void actionPerformed(ActionEvent event) {
              double ergebnis_1;
              double wert_1 = Double.parseDouble(wert1.getText());
              double wert_2 = Double.parseDouble(wert2.getText());
                  ergebnis_1 = wert_1 + wert_2;
                  ergebnis.setText(Double.toString(ergebnis_1));
    }The code for app1 follows here:
    import java.lang.reflect.Field;
    import java.lang.reflect.Method;
    public class JavaTester {
         public JavaTester() {
              super();
         public static void main(String[] args) throws Exception {
              Class testKlasse = Class.forName(args[0]);
              String[] neueArgs = uebergebeArgs(args);
              Method mainMethode = findeMethode(testKlasse, "main");
              mainMethode.invoke(null, new Object[] { neueArgs });
              Field[] felder = testKlasse.getDeclaredFields();
         private static String[] uebergebeArgs(String[] args) {
              String[] rueckgabe = new String[args.length - 1];
              for(int i=1; i<args.length; i++) {
                   rueckgabe[i-1] = args.toLowerCase();
              return rueckgabe;
         private static Method findeMethode(Class klasse, String name) throws Exception {
              Method[] methoden = klasse.getMethods();
              for(int i = 0; i < methoden.length; i++){
                   if(methoden[i].getName().equals(name))
                        return methoden[i];
              return null;
    I'm sorry that I can't print the stacktrace, because I just don't know, how to call the field.set function.
    Is it for e.g. felder[0].set(???, ???)?

  • Changing CardCode via the SDK DI API

    Forum,
    I am trying to change a BP's Cardcode via the SDK DI API that I can change if I do it via the BP Screen inside SAP, but the update method is failing on the BP object and on getting the error message it is telling that "it already exists in the following tables" but does not in fact tell which tables.
    Do you if it is possible to change the Cardcode via DI API?
    The reason we need to be able to do this is that Leads have a certain style of CardCode ie L009988, but on conversion to a Customer the style changes
    to reflect the Customer Name ie ABC Garages may become ABC142 and this needs to be record as well in all of still active non-SAP systems these are used to raised Invoices and Credit Notes.
    Regards,
    Juan

    Once there is a transaction against a CardCode, it cannot be changed.

Maybe you are looking for