[CRM] Change sales office from within an order

We've been trying to get the following to work... as you might guess, so far without success.
From within a CRM order, if we change the partner number for the department a check is being done whether that partner belongs to the same sales office. If that's not the case, the sales office has to be adjusted.
Since this might have an effect on authorization, the changing of the sales office has to be done in a separate job (action). In this job, I do the following:
- Retrieve data on the object
- crm_order_read for that object
- select the correct sales office
- prepare the crm_orgman structure with the new data
- crm_order_maintain with the crm_orgman and inputfields tables
- optionally commit work, bapi_transaction_commit etc.
For as far as we can see, the data is correct. However nothing is being changed. Ideally what I'd like to do is break into the process, change the object that's being processed in memory, and let the system do its job.
What we've also tried is (shame):
- Retrieve data on the object
- crm_order_read for that object
- select the correct sales office
- direct update the corresponding tables with the new values
This works, but as soon as we return control to the system, the changed values (verified, if we look at the tables the values are changed) are reset to what they were.
It's taking way too much hours for something that should be (in my eyes) a pretty simple action. Any suggestions? Thx in advance!

Hi Egbert,
Please take a careful look at the GUIDs you are using: if you are using the orgman structures, the REF_GUID is not the ORGMAN-GUID but instead the ORDERADM_H-GUID. Can you confirm if this has been checked and if it then still is not working? The COMMIT_WORK BAPI is also not necessary.
Kind regards,
Joost Janssens
PS Please reward points if this reply helped you!

Similar Messages

  • Copy sales office from contract to sales order

    HI,
    How can i copy sales office from contract to sales order.is there any requirement in the standard process?
    Regards,
    Ramky

    Dear Ramky,
    I think, the requirement will get full-filled with Standard Settings, itself:
    Check with Copy-Control Settings (in T. Code: VTAA) b/w Sales Order--Contract.
    For the Combination (Contract-to-Sales Order), select "Item" from Left-hand Dialog-Structure, and afterwards, select "Item-Category".
    Now, on to next screen, maintain as following:
    Copying requirements 303
    DataT 151 General item data
    DataT 102 Bus.data/item compl.
    Best Regards,
    Amit

  • Download Sales Office from CRM to CDB

    Hi all,
    I am trying to download the replication object DNL_CUST_S_OFFI (sales office) from CRM to CBD. However, there is no such load object available when i try to run in R3AS. I got the error There is no object definition for object when load in R3AS. May i know what is the correct adapter object name for this replication object DNL_CUST_S_OFFI?
    Thanks

    Hi,
    Make sure Sbdoc DNL_CUST_S_OFFI is active and generate services for it using SMOGGEN. Then the data will be written into CDB tables like SMOTVKBT/SMOTVKBZ(I'm not sure about the exact one)
    Then do an extract of the object DNL_CUST_S_OFFI to download the data to the client.
    Goto smoeac : filter the mobile sites : Click the requisite mobile site and Start an extract : Select Customizing Objects (double click)
    Now you'll get a list of replication objects : Select the bulk Replication object DNL_CUST_S_OFFI and start extract.
    Tnx.

  • How to change Sales office in Bussiness partner details

    Hi ,
          I am unable to make changes in Bussiness partner details ie in Tcode BP .Since the Sales area data has been desabled .
    So can any one guide me how to change sales office in BP
    regards,
    divya

    Dear Anirudh ,
    When i checked the org Structure ,there same user has been assigned to two sales offices.
    So when it is taking the sales area data ,it is capturing the data from jammu sales office rather than Chandigarh.
    I can't change the User that has been assigned for more than 2 sales offices b'cos of the restriction of User-id
    So please help me.
    regards,
    divya

  • Changing sales office in sales office using save_document user exit

    Hi,
      My requirement is to change the sales office to 109 based on some conditions.
    Here i am using FORM USEREXIT_SAVE_DOCUMENT   user exit in the sales order to do it.
    but it is not taking this value .
    Can any one suggest me any other place i.e. user exit where we can change sales office depending on some conditions.
    Thanks & regards
    Manjari.

    You have to use userexit 'USEREXIT_SAVE_DOCUMENT_PREPARE' because when exit 'USEREXIT_SAVE_DOCUMENT' is called all the order data has already been submitted into update task. So if you want to change data in the order and have it saved with it you need to use 'USEREXIT_SAVE_DOCUMENT_PREPARE'.
    Regards,
    Michael

  • Not able to change sales stage from requirtement to reqmt analysis

    in opportunity Not able to change sales stage from requirtement to reqmt analysis
    Error Message:SBL-DAT-00284
    Details error msg is:
    Unable to evaluate workflow rule for foll reason
    Update probability between 0 & 100%(SBL-ODS-00500)
    Edited by: user1074008 on Sep 22, 2010 10:17 PM
    Edited by: user1074008 on Sep 22, 2010 10:18 PM

    Looks like a bug...
    Previos Post Activity Status = Submitted - Access Denied

  • BAPI to change sales office of the contract

    Hi to all
    I want to change sales office of the contract(VA42), through BAPI.
    could any one suggest me which BAPI i have to use.
    Now i am trying to use BAPI_CUSTOMERCONTRACT_CHANGE.
    but its not updating.
    regards
    raadha

    Hi Radha,
    Have you saved the change properly? Are you calling the function module 'BAPI_TRANSACTION_COMMIT' after making the changes ?
    Let me know if you are doing the same.
    Thanks,
    Samantak.

  • Need to change sales tax from point of sale to point of delivery

    Hi all,
    Recently the tax laws were changed such that sales tax is to be collected based on where the product will be delivered to (rather then where the product was sold from).
    Briefly we are an agency with mulitiple divisions, and within those divisions several sales offices.  Previously, a sales would be made from the sales office, and based on the tax rate for that division and sales office (county/city) the sales tax would be calculated.
    Now we need to shift that so that a sales can still be made from a division/sales office, but the collected tax is based on where the product will be delivered to. 
    I'm sure there is a way to set this up, but I'm at a loss as to where to start. 
    One of teh options the customer suggested was to have a sales area set up with all the cities and tax codes in it.  Then assign that sales area to each of the sales offices.  Is this possible? Or do you have to have a separate sales area for each sales office?
    I'm open to any suggestions you may have as I'm not very familiar with this side of SAP (sales distription and taxes).
    Thanks in advance for your thoughts!
    Laurie

    Thanks Bill.  As it turns out, we are in the US where jurisdiction is an option I guess so this procedure may not be needed.  As I dig further it appears we are currently setup to use TAXUS procedure which utilizes tax codes - a limited number.  But since the recent change, we may need to switch to TAXUSJ. 
    Does this ring a bell for anyone?  If it is what we need to do, what need I be aware of that will change in the rest of the system?
    Thanks for your answers so far!
    Laurie

  • Remove "Sales Office" from VA01 screen

    Hello All,
    We're using 4.6C and the initial VA01 screen consists of:
    Order Type
    Sales Organization
    Distribution Channel
    Division
    Sales Office
    Sales Group
    However, I'd like to remove Sales Office and Sales Group from the initial screen. Is there a way to do it?
    Thanks in advance!!!
    Regards,
    Olyn

    Hello,
    This you can try using TRANSACTION VARIANT in SHD0 transacion code
    In the SHD0 transaction give the Transaction code as VA01  and then choose the Transaction variant and select the variant which contains Sales office and sales group as fields and then  choose the Icon of change and it will pop up one screen where you can find various options to display, mandatory, Invisible and without content.
    Choose INVISIBLE for these fields and it will accomplish your task.
    Hope it is clear,
    santosh

  • Change sales office and sales group after delivery and invoice is created

    Dear All,
    after we create invoices for 60 sales order we found that the sales office and sales groups are wrong, we need to change these orders,
    is there any way rather than cancel the invoices ?

    Are they greyed out?? check with T.code MASS , obejct type BUS2032 and select sales header and input your sales order > execute

  • Change grub resolution from within grub console

    Hello!
    I'm looking for a way to change the grub resolution from within the grub console. Note, that I am not looking for a way to change the grub resolution in the config files!
    This is why I'm asking: my laptop stopped booting whenever the grub resolution is not set to 800x600x32. This is very strange and I do not know the reason for this issue. It hasn't been a problem so far, because I'm just using the config file to set the resolution to 800x600x32.
    Now I'm trying to reinstall, but the live discs won't boot since the resolution of grub is not 800x600x32. I tried dropping to console and typing
    set gfxmode=800x600x32
    set gfxpayload=keep
    load_video
    insmod gfxterm
    but nothing happens.
    So the question is: Is there any way to change the resolution of grub from its own console? Or is there a way to manipulate the live images before burning them in order to start grub with the desired resolution?
    Thanks so much!
    Last edited by mjb (2013-10-09 19:00:15)

    mjb wrote:
    Hello!
    I'm looking for a way to change the grub resolution from within the grub console. Note, that I am not looking for a way to change the grub resolution in the config files!
    This is why I'm asking: my laptop stopped booting whenever the grub resolution is not set to 800x600x32. This is very strange and I do not know the reason for this issue. It hasn't been a problem so far, because I'm just using the config file to set the resolution to 800x600x32.
    Now I'm trying to reinstall, but the live discs won't boot since the resolution of grub is not 800x600x32. I tried dropping to console and typing
    set gfxmode=800x600x32
    set gfxpayload=keep
    load_video
    insmod gfxterm
    but nothing happens.
    Did you add
    terminal_output gfxterm
    at the end. Although I doubt whether that will change the currently set menu resolution.
    So the question is: Is there any way to change the resolution of grub from its own console? Or is there a way to manipulate the live images before burning them in order to start grub with the desired resolution?
    You may want to checkout grub-emu (available in grub-bzr aur pkg, not in core/grub). It emulates a grub menu from which you can test all graphics related stuff. I haven't tried it myself though.

  • Adding/changing sales office

    Hello,
    I need to rename  current sales office and I need to know following:
    - which transaction exactly I have to use for this purpose,
    - can I change it directly on PRD server without need to go through steps DEV-QAS-PRD and does thi column have any dependence with other elemnts in SD?
    Any help is appreciated and many thanks in advance for prompt reply!
    Cheers;)
    Sam
    Edited by: samnovice on Feb 1, 2012 10:49 AM

    which transaction exactly I have to use for this purpose,
    Use Tcode OVX1.
    can I change it directly on PRD server without need to go through steps DEV-QAS-PRD and does thi column have any dependence with other elements in SD?
    Based on standard, change of name of sales office will not have any impact. Other then, if  in some enhancement or thats hardcorded for any output type program.
    And not advisable to change directly on PRD.
    Regards
    JP

  • Changing Property Values from within a Function

    I'm wondering how I can change a property of an instance from
    within a function inside a method. I have some code here...
    Basically I just need to set _lynn_idle to false when a tween is
    occuring and _lynn_idle to true when the tween is finished.
    Unfortunately I can't seem to simply set it to false or true inside
    these listener functions like I'm able to anywhere else (seems the
    variable is only local to the function when I need it to access the
    variable associated with the instance). Any help is much
    appreciated.

    Inside callback handlers the class members go out of scope.
    To remedy use a local (local to the function) reference to the
    current object.

  • Get sales office from sales area

    Hi gurus
    I'm looking for a FM or METHOD for get all the sales office linked at one sales area....
    somebody can help me??
    regards
    Marco

    Hi RAJ.
    thanks for your reply.
    I no need the mapping trought the two system.
    I need only of the mapping trought sales area and sales office in CRM....
    thanks
    Marco
    Edited by: Menegazzo Marco on Jul 5, 2010 3:46 PM
    Edited by: Menegazzo Marco on Jul 6, 2010 9:36 AM

  • Changing Book/Page from within a pageflow

    We need to define a pageflow action which has the same effect as the user clicking
    on a Book (or Page) tab, i.e. switches to another portlet/pageflow - preferably
    at the "begin" action.
    That's probably 2 problems:
    1) define an action to simulate the user clicking on Book tab
    2) define book tabs so that the pageflow state is reset to the begin action
    This sounds as though it may be related to howie's <"Reset" pageflow portlet state>
    problem.
    Just to stop you taking the easy route...
    1) can be solved simply by forwarding to /portal/my.portal?_nfpb=true&_pageLabel=book_search
    (where book_search is the definition label of the book I want to go to)
    I don't like this because:
    a) this has hardcoded the portal name, which will be different on the live server
    b) it hasn't solved problem 2 because _nfpb=true has maintained the pageflow state
    in book_search
    2) I can lose pageflow state by removing _nfpb=true (see above), but then I don't
    actually arrive at the right page!
    Can anyone help?

    Try
    on (release) {
    getURL("
    http://site.com/team.html","_self");
    }

Maybe you are looking for

  • Follow up transactions

    Hi All, I am trying to create a follow up transaction from quotation to sales order, but the items are not getting copied to oder. As the product i have chosen is configurable, iam doing the configuration in quotation it self and then when i try to c

  • Mac startup disk memory problems

    Hello Apple Community.. I have a trouble starting up my mac and I thought entering startup disk mode would solve my problems.. There are two disks named Untitled, placed the one under the other. The first one says that I have 19 MB (!!!) available an

  • Show negative values as 0 in BEx Report

    Hi Gurus, I have a report which shows negative values for POs in BW BEx. The user wants all negative values to show up as 0 in the report. Is there a way I can show that as 0 in the report  for all negative numbers easily. Any help is deeply apprecia

  • Microsoft Word consistently becomes active window when clicking between dual screens and programs

    13" MBP 2.3 ghz i5 8GB Ram Running 10.9.2 Microsoft Word 2011 Dual screens with amazon Mini Display to VGA adapter When I am running word between an external monitor and my MBP, Microsoft word always interrupts any clicks between programs and between

  • Bypass page alignment

    can i bypass the printer alignment page?       Ive printed dozens of these and have yet to make any adjustments.  hp loves to waste my expensive ink      deskjet 3051a