ABAP program to change SD sales order originally created on CRM

Hello all!
Please, I would like to ask you some wisdom about this question:
I need to use a BAPI (BAPI_SALESORDER_CHANGE) or a call transaction (to t-code 'VA02') to modify in the R/3 system (v. 4.7) a sales order that was originally created in the CRM system.
If I try to do it manually, in t-code VA02, I get a message that this order must be modified only in the CRM system. I debugged and found that there are functions that check this and deny acces to the order.
I found this check on form FV45LF0M_MESSAGE_VARIABEL. This it the one that issues the error message.
Actually I need to find a way to, without modifying standard routines or tables, change the order the way I said.
Please, can someone help with some ideas?
Thank you very much for your time!
Best Regards,
Douglas Cezar

Rob, thanks for the answer.
To adress a specific business need, I have to update the order directly in the R/3 system, without having to go to the CRM system.

Similar Messages

  • What are the steps to send sales order custom field from CRM to ECC

    Hi Xperts,
      We have created a custom field in sales order [ VBAK] and successfully replicate its value from ECC to CRM. But while doing the enhancement to replicate the field value from CRM to ECC [ When the SO is created in CRM ] we are not able to do so.
    We used a FM in CRM0_300, but while replicating the SO from CRM to R/3 it is not getting called.
    Please help us by providing the steps to do the full enhancement to replicate the custom field of SO from CRM to ECC.
    Thanks in Advance.

    Hi Anjaneyulu,
    We are faced with a similar situation as you.
    Here is our scenario with the steps that we performed so far:
    1.  We have added a few custom fields in CRM 7.0 (Ehp1) using AET.
         The BDoc BUS_TRANS_MSG has been automatically extended with these custom fields.
    2.  On ECC side also, same custom fields have been added to VBAK and VBAP, using APPEND STRUCTURE. Fields were added to ADDITIONAL DATA TAB B in VA01 / VA02 transactions.
    3. Extended BAPI structures BAPISDITM and BAPISDITMX in both CRM and R/3 Side.
    4. As mentioned in the note 1053817, we have implemented BADI CRM_DATAEXCHG_BADI -> Method CRM_DATAEXCH_AFTER_BAPI_FILL in CRM (mapped fields from BDOC to BAPI structures)
    5. In the above note, for R/3 BAPI to R/3 API they have given to implement user exit USEREXIT_MOVE_FIELD_TO_VBAP which we found in MV45AFZZ. But in this we are unable to find BAPI Structure to map.
    Our issue is, when a sales order is created in CRM, it is getting replicated on ECC. But, only standard fields are getting replicated. The custom fields that we have added are remaining empty on ECC side.
    In CRM --> txn SMW01, we can see that the BDOC is populated with custom fields also.
    Could you let us know if your issue is solved completely. Are you able to see the value of custom field, in ECC? Did you use AET to add fields in CRM.
    Could you please give us the steps that you have done.

  • Change of Sales Order  automatically changes the purchase order

    Hi 
       I am working on a scenario where a  as soon as a sales order is created it will also create a purchase order on plant which will supply the item to the plant on which sales order is created.This works fine.
    Now when I change sales order( order qty ,requested delivery date, new item added) . On saving the sales order it should change the purchase order which has already been created by updating the schdule lines in the purchase order with new values from the sales order. It is all in same SAP instance.
    Here are possible ways I can think of:-
    1 Change of SO will create a SO IDOC . The SO IDOC should supply required values to the PO Idoc . The PO IDOC should get posted to SAP to change the existing PO.  Client does not have XI so we cant use XI for conversion.
    2 Changing a SO will trigger workflow.The Workflow executes ABAP program which takes data from SO and calls BAPI to change the purchase order and sends notification that PO has changed.   Which BAPI?
    Any thoughts are welcome. We are on 4.7 and we dont have XI. So please do not suggest XI based solution.
    Prashanta

    Prashanta,
    For your 2nd part of question, you can use 'BAPI_PO_CHANGE' to change the PO.
    Thanks

  • Interdependent Changes in Sales Orders (CRM -- R/3)

    Dear Sap gurus,
    at my current customer they have implemented warranty complaints in SAP CRM.
    This is a copy of the transaction type CRMC (service complaint)- Type leading transaction category = BUS2000120 (complaints).
    Once the complaint has user status 'closed' this complaint is sent to R/3 for further processing.
    At that moment no changes made in R/3 are replicated back to CRM.
    Note 642944 explains that ou can make changes independent of the system in which you originally created the order. This is called scenario A (compared to scenarios X , Y and Z which are described in oss note 705200 (which are valid for older releases of CRM and R/3). <b>Since we are using CRM 5.0 and R/3 (release 4.7 and one is SAP ECC 6.0) we fall into validity for scenario A.</b>
    You still have a bunch of other related OSS notes such as:
    - 630778: Scenario A: mutual change of sales documents
    - 620139: Scenario A: independent changes in sales documents- R/3
    - 720511: FAQ: Data exchange sales documents (CRM <-> R/3) II
    - 656224: FAQ: Sales documents data exchange (CRM>-> R/3)
    - 642269: Scenario A: mutual change of sales documents - CRM
    - 971782: New Badi for exchanging data from sales document lists
    - 541113: Data exchange scenario for orders (CRM-R/3)
    -490932: Data exchange of sales transactions between CRM & R/3
    <u><b>My question is the following:</b></u>
    Since they speak about sales orders/Sales documents etc all the time, I am wondering if all these notes also would apply in the case of CRM Complaints (CRMC with leading transaction category COMPLAINTS).
    I would like to avoid investigating every single note, if in any case these would not apply to Complaints.
    <b>(Just for the record: the reason why I ask is that for example Product proposal (in the cross selling context) is for example also not supported for Complaints in SAP CRM 5.0, as opposed to Sales orders and Quotations.)</b>
    Thanks for a quick answer for those that already have had experience.
    davy

    To start with I have to describe the actual scenario...(therefore I think Interdependent changes is not valid as Lorna explained already).
    <b>Scenario:</b>
    We are using Complaint management in CRM 5.0. combined with SAP ECC 6.0.
    Now we are not following the standard process flow which is described in:
    http://help.sap.com/saphelp_crm50/helpdata/en/ed/8816f949e90644ada2c210ba2316e0/content.htm
    When Creating a Complaint (CRMC) and adding a unit (individual object/material) at header level, and the spare parts (on item level) we do certain validation checks
    for warranty validity etc.
    On item level we can set the status on either "Accepted" or "rejected"(where we also indicate per item based on code groups if this should be
    - credit memo request
    - free of charge substitute delivery
    After all item statuses are either Accepted or rejected, the user status on header level automatically changes to 'immediate settlement'.
    When this is the case we can manually set the user status to closed on header level.
    At this very moment replication takes place in the form that a Sales Order is created in R/3 with either a credit memo request and/or
    a Free of charge delivery. (these have the same item category as in SAP CRM).
    so far so good. But in this stage no manual changes are possible anymore in the SAP CRM complaint.
    Changes can still be made on Sales order level in R/3 by adding for example another item (spare part).
    <b>My Question now is:</b>
    Suppose a change is made on sales order level (this sales order has the same number as the complain which was originally created in SAP CRM), how can we
    update the Complaint in SAP CRM?
    I first was looking at delta replication for sales documents (described in notes 642944 and 705200) but this is not valid since the actual complaint is not
    replicated to R/3 in the first place.
    The only thing I could think of is making use of some action (profile)...which might for example check if the R/3 sales order with same document number is changed.
    Anyone experience with setting up such a thing or perhaps has another suggestion?
    Thanks in advance
    davy

  • Report on changes to sales orders

    Hi Experts,
    I am looking for a way to report on changes to sales orders, specifically the row shipping date and quantity.
    I can see that the data is apparently in tables ADOC and ADO1 but am having trouble getting useful results. What I need is a report that, for sales orders only and for a date range, shows all changes to row quantities or row shipping dates. The type of output that would be useful is:
    Change date  - document # - row# - Item code - old shipping date - new shipping date - old qty - new qty
    filtered on change date for sales orders only. This seems beyond my preferred option of XL-Reporter and I'm getting lost in the history tables in creating a query.
    Best Regards
    Matthew

    Hi,
    Without doing the query for you, history tables are linked as the "normal" table but with the addition of the LogInstance column. Then the UpdateDate column (from base table ie. ADOC) will tell you when it was changed.
    Your query isn't an easy one... SInce you have to link an instance (ie. LogInstance = 1, which will be the original created object) to all the modified ones.
    Regards,
    Eric

  • How to restrict header text changes in sales order level

    Dear Experts,
    how to restrict header text changes in sales order level change mode
    thanks

    Hello Chandu,
    how to restrict header text changes in sales order level change mode
    In order to restrict changes to Sales Order Header Text, the appropriate User Exit would be USEREXIT_MOVE_FIELD_TO_TVCOM_H. With the help of ABAPer, you can include the simple logic on the basis of Header Text type such that whenever any changes are incurred on the Sales Order header text, updates would be prevented.
    Please try out this approach and let us know your latest observation on this issue.
    Regards,
    Sarthak

  • Different field mode(display/change) in sales order payment terms (VA02)

    Hello All,
    In the VA02 transaction, when we are changing the sales orders, in the billing document of that material shows different modes for different fields.
    VA02->DOUBLE CLICK ON THE MATERIAL->BILLING DOCUMENT->FIELD PAYMENT TERMS.
    For some orders, field is in display mode and for some orders, it is in changeable mode.
    Could anyone please let me know about this..?
    thanks and regards,
    MERVIN

    Dear Jignesh
    As you would be aware Payment Terms will flow in SO both at header level and at item level.
    So in order to control the item level changes, go to VOV7, select the item category and untick the box [Business Item]   By doing so, whatever header level datas flows into SO, that will be copied to item level also and you will be controlling the changes at item level and end users cannot make changes at item level.
    Now you have to control at header level for which you have to apply User exits in the program MV45AFZZ - USEREXIT_MOVE_FIELD_TO_VBAK
    thanks
    G. Lakshmipathi

  • Change of sales order address while changing the delivery address

    Hi,
    Problem: Changing delivery address in outbound delivery is changing the originating sales order address for one user while for a different user id the sales order and delivery has their different delivery addresses.
    Scenario:
    1. A new sale order is created and its address for ship to party is modified (to say A1)
    2. Delivery for the sales order is created and the ship to party address is modified (to say A2).
    While executing this scenario with two different users we are getting different result
    For user 1, after step 2 both the sales order and delivery has shipping address as A2
    whereas for user 2, sales order has address A1 and delivery document has address A2
    How can this difference in behaviour be explained?

    Found the solution myself,
    The standard behavior is being modified in the user exits V09A0001 ( Reference/duplicate decision making manual address). Also refer to note 97832 for detailed solution.

  • Change of sales order

    hi all
    when i am changing the sales order i am getting this error
    You are not authorized
    Message no. ZMSG000
    Please advise to solve this
    Regards
    Raj

    Hi ,
    This is a standard error  message. Take help of ABAPer to locate the relevant table and to proceed further.
    Link :--
    order closing problem
    At selection screen event
    http://www.scribd.com/doc/49868757/rascunho
    Thanks/Rajesh

  • Change the  sales order reason for rejection for line item

    Hi,
    i want to change the  sales order reason for rejection for line item.
    iam using bapi_salesorder_change.but i unable to change the sales order.
    if possible please provide me what are the fields necessary  for changing
    sales order reason for rejection for line item.
    Regards,
    Suresh

    This is the standard config to supress printing on the rejected item. Are you using standard programs or customised ?

  • Restrict manual change in sales order with respect to quotation

    Hi All,
    The user use to create sales order with respect to quotation.  The user can able to change pricing as well as some header and item fields.  How can I restrict user for manual change in sales order expect some specific fields.
    Thanks.

    Hi Sunil,
    It is possible through configuration better you can post in sd forums.
    For the condition type settings , ensure that the manual entries is 'D'. it wont allow any changes in the order.
    Regards,
    Madhu.
    Edited by: madhurao123 on Aug 1, 2011 1:08 PM

  • All changes in sales orders with in a week

    Hi gurus,
    I want to display a report to display all the changes in sales orders with in a week,
    Can anybody help me .If anybody already developed this report can you send to me.
    regards,
    D..

    Query table CDHDR and CDPOS with the following fields:
    CDHDR-TCODE = VA01 or VA02
    CDHDR-UDATE = <specified date range>
    Now select from CDPOS where
    CDPOS-OBJECTCLAS = CDHDR-OBJECTCLAS
    CDPOS-OBJECTID = CDHDR-OBJECTID
    CDPOS-CHANGENR = CDHDR-CHANGENR
    The rest of the details for the change can be found from the other fields in CDPOS. like tablename, fieldname, old value, new value etc.
    Hope this helps.
    Sudha

  • How to restrict the user from making any changes in Sales order- item level

    Hi to all
    How to restrict the users from making any changes in sales order at item level if the same sales order is released by senior user through status profile.
    Regards
    Anish Parikh
    Edited by: anish parikh on Jan 24, 2008 5:16 AM

    Hi Anish,
    This can be achieved through the roles and authorization.
    This can be done through the basis team. they can create user profiles and roles.
    For the roles they assign some transaction codes so that they can view the only assigned tr. codes.
    Like that ur requirement can be done.
    Also u can prevent the user to change any fields in the sales order screen (VA02). for that please modify the authorisations.
    Hope i answers.
    Reward points if useful.
    Edited by: kaleeswaran bhoopathy on Jan 24, 2008 9:57 AM

  • Find the user exit while creation and change of sales order

    Hi Team
    Below mentioned requirement , in which user exit i have to put below logic while creaion and change of sales order?
    u2022     The logic for the user exit to explode should consider the following assumptions and validations
    o     Customer master to have the entry at KNVV-KVGR1
    o     Material master to have the entry at MVKE
    o     UoM in the Sales order item (VBAP- VRKME) should be = Pallets PAL or tonnes (TES)
    o     Should have more than one line item or number of line items with UoM PAL or tonnes TES should be > 1
    for example :-->
    Product A with Scales mentioned below
    Product A     Quantity / Scale     UoM     Price(£)
         0-10     PAL/TES     20
         11- 20     PAL/TES     10
         21- 30     PAL/TES     5
         31-40     PAL/TES     2.5
         >41     PAL/TES     
    Product B with Scales mentioned below
    Product B     Quantity / Scale     UoM     Price(£)
         0-15     PAL/TES     25
         16-20     PAL/TES     20
         21- 30     PAL/TES     15
         31-40     PAL/TES     10
         > 41     PAL/TES     5
    u2022     Product A (qty 10PAL) + Product B (qty 15 pal) ordered in a single order with 2 line items.
    u2022     The expected results should be
    o     Product A qty 10 + B qty 15 added = 25Pal
    o     The system user exit should add the total number of pallets on the order line items and point towards the respective scales, so in this example prices against each line item should be the respective price against 25 Pal = 5£ for product A per pal and £15 for product B.
    Thanks in Advance.
    Puneet.

    Hi Team
    Below mentioned requirement , in which user exit i have to put below logic while creaion and change of sales order?
    u2022 The logic for the user exit to explode should consider the following assumptions and validations
    o Customer master to have the entry at KNVV-KVGR1
    o Material master to have the entry at MVKE
    o UoM in the Sales order item (VBAP- VRKME) should be = Pallets PAL or tonnes (TES)
    o Should have more than one line item or number of line items with UoM PAL or tonnes TES should be > 1
    for example :-->
    Product A with Scales mentioned below
    Product A Quantity / Scale UoM Price(£)
    0-10 PAL/TES 20
    11- 20 PAL/TES 10
    21- 30 PAL/TES 5
    31-40 PAL/TES 2.5
    >41 PAL/TES
    Product B with Scales mentioned below
    Product B Quantity / Scale UoM Price(£)
    0-15 PAL/TES 25
    16-20 PAL/TES 20
    21- 30 PAL/TES 15
    31-40 PAL/TES 10
    41 PAL/TES 5
    u2022 Product A (qty 10PAL) + Product B (qty 15 pal) ordered in a single order with 2 line items.
    u2022 The expected results should be
    o Product A qty 10 + B qty 15 added = 25Pal
    o The system user exit should add the total number of pallets on the order line items and point towards the respective scales, so in this example prices against each line item should be the respective price against 25 Pal = 5£ for product A per pal and £15 for product B.
    Thanks in Advance.
    Puneet.

  • How to trigger workflow from changes in Sales Order in CRM?

    Hi Experts,
    I want to trigger event at the time of saving the changes in sales order (TCODE- CRMD_ORDER).
    I have found one BO - BUS2000115 but it is getting triggered only after new creation of sales order.And there is no BO available when we change the sales order.For this reason I have created one customize event in BO(BUS2000115).
    Now my question is How should I link this customize event so that it will trigger after saving the changes ?
    I have seen SWEC transaction but was not able to find anything to link this customize event.
    Please help ....!!!
    Good response will be rewarded.
    Thanks
    Snehasish Das
    Edited by: Snehasish Das on Feb 14, 2008 2:31 PM

    In SWEC, actually you link the change document object to a Business object and its corresponding event , to which workflow should react to.
    If yo udo not find the entry then, yo unedd to create one with finding out the respective chage documnet object.
    Hope that helps.
    Regds,
    Akshay

Maybe you are looking for

  • New Resource Object Status

    Hello all, a. When you disable a user on OIM it disables all resources which are Provisioned or Enabled for that user b. When you enable a user on OIM it enables all resources which are Disabled My client would like to put in a new status for the Res

  • Several single value selection in InfoPackage Data selection using Routine

    Hi, I am trying to extract data from a table(containing Ticket data) in R/3 using Generic extractor with table. As the table is not supporting the delta functionality i have to do daily full load for more than 5 lak records. I dont want all the ticke

  • Uninstall Dreamweaver and Fireworks?

    I chose "custom installation" during my CS4 installation, but the installer went ahead and installed everything anyway. (Thanks, Adobe!) I would now like to remove Dreamweaver and Fireworks. Will a drag-uninstall do it, or is there an uninstall proce

  • CSS11500 - check via script and sending e-mail

    Hi together, I want to check some parameters via script on the css. That works fine. Is there any possibillity to send an email with the result of this check script directly from the css ? How do I have to configure the smtp server and the mailaddres

  • Parameter enque/table_size

    Hello all I would like to know what is the relation between the size of lock table ( defined by parameter "enque/table_size") and number of locks that could be handled. If found only one related information in OSS note 13907 but it didn't helped me.