Change Partner in Opportunity

Hi all,
             Does anyone have a clear idea about how to change a partner, for a particular partner function, in CRM 4.0 opportunity. I tried using BAPI_OPPORTUNITY_CHANGEMULTI but it returns "Document cannot be saved" . I also tried using CRM_ORDER_MAINTAIN but here I am not getting any exceptions but I am unable to modify the transaction.
Any help is appreciated.

Hello,
When using CRM_ORDER_MAINTAIN and you want to change a partner (only valid for change!) you also need to tell the system the old/previous partner, else the system won't change the partner.
E.g. In partner function 'sold-to party' (partner_fct 000001) you want to change the BP from 254 to 299.
The ET_PARTNER table should have following entry
ls_partner-ref_partner_fct = '000001'
ls_partner-ref_partner_no = '254'    "OLD BP
ls_partner-ref_no_type = 'BP'        "BP = number / US = username (mostly used for person responsible)
ls_partner-ref_display_type = 'BP'
ls_partner-partner_fct = '000001'
ls_partner-partner_no = '299'        "NEW BP
ls_partner-no_type = 'BP'       
ls_partner-display_type = 'BP'
And of course create the corresponding entries in the CT_INPUT_FIELDS for each field that you fill.
The way of working is similar for the BAPI_OPPORTUNITY_CHANGEMULTI.
Golden tip: Do exactly the same action (in you case, change a partner) as you want to code in TAC CRMD_ORDER, just before pressing <ENTER> or save, place a breakpoint in FM CRM_ORDER_MAINTAIN, then you'll see how SAP fills these tables, if you code it in exactly the same way you're 100% sure it will work!
Reward points if useful,
Regards,
Joost

Similar Messages

  • Changes in crm2007 opportunity management?

    What are the changes related to opportunity management when we upgrade from crm5.0 to crm2007?

    Hi,
    you will find these things are new:
    -Graphical Maintenance of Buying Center
    -Copy Buying Center to Account to store as template
    -Download Buying Center Template from Account to Opportunity
    -Quotation Creation through Template in MS Word
    -Partner Re-Determination anytime during an opportunity
    -Opportunity Assessment based on Expected Sales Volume (e.g. certain assessment if over $1,000,000)
    -Tracking of competitor products and prices
    Of course the opportunity is also much easier to use due to the new UI layout without tabs.
    Regards,
    Tim

  • Changing partner profiles

    Hi All,
    Can someone tell me how to change partner profiles?

    Hi
    Use the TCode WE20 to change Partner profile
    http://help.sap.com/saphelp_sm32/helpdata/en/72/91ef3b06870a49e10000000a114084/content.htm
    Regards
      -Vinod
    Reward if found helpful.

  • CRM Sales Offer: Change Partner Address.

    Hi gurus,
    I need to change a partner address from a CRM sales offer. I'm using FM's CRM_ORDER_READ in order to get all order data.
    I don't understand very well the use of CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE.
    Can anybody help me?
    Thanks a lot!

    Hi,
    It's right to use FM CRM_ORDER_READ to retrieve data but you will not maintain partner address data using CRM_ORDER_MAINTAIN.
    You can change partner Address using FM BAPI_BUPA_ADDRESS_CHANGE.
    Best regards,
    Caíque Escaler
    Edited by: Caíque Escaler on Dec 2, 2010 6:11 PM

  • Manually changed partner information

    Dear all,
    if you manually change the partner address in SD documents, in VBPA you get the "E" in field ADRDA.
    Also in ADRC an new adress number is created. But where can I get the userid which is responsible for the change?
    Is there a field ERNAM for new ADRC entries or something else?
    Thanks for you help and best regards
    Jochen

    Dear Shiva,
    thanks for your answer, unfortunatelly you can only find changes in the sales order in a "high level" way which you can also see in VA03 under "Changes". The manually change of the partner is not monitored.
    For every manually changed partner a new entriy in table ADRC is created. Do you know if there is something like ERNAM in some subtable of ADRC?
    Thanks and best regards
    Jochen

  • Changing the Partner in Opportunity by Funciton module

    Hi,
    I am trying to change the employee responsible partner of an opportunity.
    I was unable to find the correct code.    I tried using the below code but i am unable to do.
    Please help me in this regard.   I have tried with FM 'BAPI_OPPORTUNITY_CHANGEMULTI'   But I am unable to understand how to pass the partner values to it.
    L_Guid = it_CRMD_ORDERADM_H-guid.      ."'4582EEBA723000A500000000837FBA1A'.
      INSERT L_Guid INTO TABLE Lt_Header.
    *move  '43A15126B7A2006502000000837FBA1A' to Lt_Header.
      CALL FUNCTION 'CRM_ORDER_READ'
        EXPORTING
          IT_HEADER_GUID       = Lt_Header
        IMPORTING
          ET_PARTNER           = Lt_GetPartner
        EXCEPTIONS
          DOCUMENT_NOT_FOUND   = 1
          ERROR_OCCURRED       = 2
          DOCUMENT_LOCKED      = 3
          NO_CHANGE_AUTHORITY  = 4
          NO_DISPLAY_AUTHORITY = 5
          NO_CHANGE_ALLOWED    = 6
          OTHERS               = 7.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    READ TABLE Lt_GetPartner INTO wa_GetPartner WITH KEY PARTNER_FCT = '00000014'.
    if sy-subrc = 0.
    data v_index like sy-tabix.
    v_index = sy-tabix.
    w_uname = 'salesrep1.
    ls_partner_com-partner_no = w_uname.
        INSERT ls_partner_com INTO TABLE it_partner.
    ls_input_field_names-fieldname = 'PARTNER_NO'.
        INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
        INSERT ls_input_field  INTO TABLE  lt_input_fields.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
       IT_PARTNER                    = it_partner.
    CHANGING
      CT_ORDERADM_H                  = CT_ORDERADM_H
      CT_INPUT_FIELDS                = lt_input_fields
    EXCEPTIONS
       ERROR_OCCURRED                = 1
       DOCUMENT_LOCKED               = 2
       NO_CHANGE_ALLOWED             = 3
       NO_AUTHORITY                  = 4
       OTHERS                        = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    append  L_Guid to lt_guids.
    CALL FUNCTION 'CRM_ORDER_SAVE'
      EXPORTING
        IT_OBJECTS_TO_SAVE         = lt_guids
    EXCEPTIONS
       DOCUMENT_NOT_SAVED         = 1
       OTHERS                     = 2

    Hi,
    Two problems that I found in the mentioned code are:
    <b>1. ls_input_field_names-fieldname = 'PARTNER_NO'.
    INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.</b>
    In between these two lines you should also add the following line:
    <b>ls_input_field_names-changeable = space.</b>
    <b>2. w_uname = 'salesrep1.</b>
    I am not sure if you can pass the user name directly instead of the BP number. There are some standard function modules for getting the BP number from user name. You can use that and then assign the BP number.
    Hope this helps!
    Jash

  • Change partner defintion in scheduling agreement VA32

    Hello all,
    we have created a scheduling agreement in VA32 and assigned several partners in Goto - Header - Partner.
    One partner is the Ship to partner.
    Now, we want to change the partner definition which is empty now. We want to add a value, so we changed that in the customer master data. But of course SAP is not going to take that change in the scheduling agreement which was created before that change was made in the customer master.
    My question now, is there a way to change the partner defintion in the scheduling agreement? Right now the field is gray, so we cannot make any change. I have also tried to change the customer and then change it back to the original, but it didn't show the "new" partner definition.
    Thanks,
    Anne

    Hi Anne,
    I tried this and so would suggest you to rather close the scheduling agreement and create another new  agreement and go ahead with the acitiviities as if not this solution then u may have to change it using table entries, but that is not advisable.  Better go with the first option.
    regards,
    US

  • Change partner function data in PO using EXIT_SAPMM06E_013(MM06E005)

    Hi all,
    I have an issue related to partner functions while creating purchase order.In the user exit MM06E005, we have EXIT_SAPMM06E_013 which is triggered when PO is created from Preq using tcode ME59. There is a table XEKPA in the fn mod EXIT_SAPMM06E_013 which holds the various partner function records corresponding to the PO.
        In our case we get two records in that table, the 2nd   record corresponding to partner function 'BA' (german) /'OA'(ENGLISH). ( U can find these in table 'WYT3' for partner functions where OA/BA is for ordering address of the vendor.) I am trying to modify this record corresponding to 'OA'. But when the PO is created and when I go to Partners tab in ME23N, I am not able to see the change I made in the internal table 'XEKPA' within the exit. Am I missing something while changing or should I go for a totally new exit/BADI for modifying this?
    Please help,
    Thanks,
    steve

    Hi Steve,
    Please try like this.
    DATA: WA_XEKPA LIKE UEKPA,
          WA_IDX   LIKE SY-TABIX.
    READ TABLE XEKPA INTO WA_XEKPA
                     WITH KEY PARVW = 'BA'.
    IF SY-SUBRC = 0.
      WA_IDX = SY-TABIX.
      WA_XEKPA-LIFN2 = '0000600100'.
      MODIFY XEKPA INDEX WA_IDX FROM WA_XEKPA
                   TRANSPORTING LIFN2.
    ENDIF.
    Regards,
    Ferry Lianto

  • In CRM relationship appends the Changed partner function in R/3 -Middleware

    Hi Experts,
    Partner functions in R/3 are mapped as relationship categories in CRM and the transfer is happening through middleware.
    However if I change the BP for an existing partner function in R/3, it is not changing the BP in corresponding relationship in CRM.Instead it is adding a new relationship category.
    Currently we are in CRM2007(6.0 version).
    Ex.
    - An account in R/3 has a partner function "Sold to Party" as BP Id "01234". This does create a relationship category in CRM "has sold to party" with BP Id 01234. -- it is working fine.
    - Later if I "change" the BP id 01234 to a new BP Id "05678" in R/3 for Sold to Party partner function, it does not update the relationship category in CRM. Instead it adds a new relationship category for "Sold to Party" with BP Id 05678.  This is issue now.
    We dont want to create a new relationship, instead we would like to update the relationship for new BP Id.
    If anyone has any any clue how to resolve this, please share your thoughts. It is a very critical requirement.
    Appreciate your help on this.
    appends relationship in CRM
    Regards,
    Srini

    Hi Shourav,
    Thanks for your reaply. I agree with you for the general scenario. But my question is littlebit different what you understand.
    I try to explain little bit detail this time.. Hope you undrstood my issue.
    We are facing issue in partner relationship deletion  functionality from ECC to CRM.
    Issue: Partner functions in R/3 are mapped as relationship categories in CRM and the transfer is happening through middleware.
    However if I change the BP for an existing partner function in R/3, it is not changing the BP in corresponding relationship in CRM. Instead it is adding a new relationship category.
    Ex.
    - An account in R/3 has a partner function "Sold to Party" as BP Id "01234" and a partner function relationship as ship to party with BP id  u201C05678u201D  and it is replicating this relationship correctly in CRM .
    - Later if I "change" the BP id 05678 to a new BP Id "05679" in R/3 for Sold to Party partner function, it does not update the relationship category in CRM. Instead it adds a new relationship category for "Sold to Party" with BP Id 05679. This is issue now.
    Any notes or work around solution for this issue is helpfull.
    Regards,
    Srini

  • Middleware: Changed partner function in R/3, appends relationship in CRM

    Hi Group
    Partner functions in R/3 are mapped as relationship categories in CRM and the transfer is happening through middleware.
    However if I change the BP for an existing partner function in R/3, it is not changing the BP in corresponding relationship in CRM.Instead it is adding a new relationship category.
    Ex.
    - An account in R/3 has a partner function "Sold to Party" as  BP Id "1234". This does create a relationship category in CRM "has sold to party" with BP Id 124.    -- Works fine. No issues.-
    - Later if I "change" the BP id 1234 to a new BP Id "5678" in R/3 for Sold to Party partner function, it does not update the relationship category in CRM. Instead it adds a new relationship category for "Sold to Party" with BP Id 5678.   ISSUE.
    We dont want to create a new relationship, instead we would like to update the relationship for new BP Id.
    If anyone has any any clue how to resolve this, please share your thoughts. It is a very critical requirement.
    Answer will be suitably rewarded with points.
    Thanks & Regards
    Vishal Mani

    Hi Michael,
    Thanks for asking . This Dinesh ( Vishal's colleague ) ..We found that the Dumps are because of the implmentation of the SAP Note 497146 which provides a enhancement to the existing FM BUPA_MWX_BDOC_MAP_REL_CENTRAL . This is throwing the short dump.
    We raised a OSS message and SAP replied back saying the behivour of the sytsem is as per standard and its not a bug .
    Can you please us to achive the following !!
    We want to avoid the replication of BP relationship ( sold to party to Z Custom A/c group  ) which does not have a Sales area ? Do  you know a BADI which can help us to achive this functionility ??
    I mean we want a control of the BP releationship replication via Middleware using BADI  .. Can you please help us here . Also please provide any list of BADIs which can help us on this ?
    Please get back at the earliiest , as we have a Go-live tommorow .
    Thanks and Regards
    Dinesh

  • BAPI to change partner data in Function location

    Hi,
    is there any BAPI,that can be used to change the Partner data in functional locations & equipments.
    Regards,
    Raghavendra

    You can use the BAPI <b>BAPI_EQUI_CHANGE</b> for this purpose.

  • Partner Function Check while changing partner Functions not assigned to SP

    Dear All,
    I have created a Partner profile and its working fine.
    But recently there was a problem reported, where in the User changed the Bill to Party at the Sales order header which was not defiend in the Customer Master, this Bill to Customer was defined in the same sales Area as the Order was.
    The Problem is it was a typo error by teh user while modifying the default Bill To. They realsied it only after the Invocie was sent to a different payer.
    Could we have a check built in where the system pops up error when we choose a partner function which is not assigned in the Customer master??
    And to my surpise now I noticed that its allowing me to enter any Bill to and payer Partned which is defined in the Sales Area as the Sales Order is.
    I expect to have someting in teh customisation to give up a error.
    Thansk for all your help.

    System will accept any SH/PY/BP in same sale area to put in sale order, this is the std functionality.
    In order to change this u need to use Userexit.
    In MV45AFzz and  Include in USEREXIT_SAVE_DOCUMENT_PREPARE you can have the same logic to put error while PY/SH/BP not in CMR.
    Sam

  • FM for change partner of a quotation

    Hi experts
    i need a FM for change the partner of a specific partner function on a quotation in r3.
    This because i can't map the currier from crm->r3.
    Can anybody help me?
    best regards
    Marco

    Just check for bapiquotationchange* in se 37....

  • Crm abap Changing partner of equipment

    Hi,
    I am new to crm and i need to change equipment master data.
    How can i change the partner numbers of sold to and ship to on equipment with abap.
    Thank you

    Hi,
    I am not sure about the tcodes. I am using crm_ui tcode and there i will go to customer & products -> equipments
    There i can change partners. I need to do it via abap.
    Thank you for your time.

  • Query in CRM to get data from Business Partner and Opportunity

    Need to develop a new query based on Business Partner and Opportunities in CRM. Not finding any link how to relate these two .

    Hi Vishal,
    BP is the Master Data, so load the master data first and then load the Transaction data for Opportunity Item and Header and then Create the quesry on the Opportunity Cube. Your problem is solved.
    Assign points if useful.
    Regards
    Vishwanath

Maybe you are looking for

  • Dynamic title bar

    Hi experts , can any body tell me how to create dynamic title bar in interactive report ,i.e, suppose we have 17 pages,every page should contain the same heading, and i have one more question what are the mandatory things required in data Dictionary

  • Running SEFAUtil remotely

    Hi, I have set up SEFAUtil on a computer where I am able to run it and it returns a correct output. Recently we developed an webservice that is running on a different server and needs to make some modification to Lync server using SEFAUtil. However,

  • Display link in CFDIRECTORY

    ive never used this tag before, and what i am trying to do, i'm not sure of... I would like to have the name of the file have a link around it, so you can click it and open the file... is this the best tag to use, or is there something better? <cfdir

  • BAPI or FM to create SCD (VI01)

    Hi All,     I am looking for a bapi or FM which can be used to create Shipment Cost Document. BAPI_SHIPMENT_CREATE - is to create shipment i.e. using VT01N BAPI_SHIPMENT_COST_ESTIMATE - is used for shipment cost estimation not creation. Regards, Leon

  • Can't wake my MacBook up from sleep after Mountain Lion update

    I have a MacBook Pro spring 2011 model. I did purchase the Mountain Lion update in September and this is when my problem started. I do have the put hard drives to sleep when possible turned off. The only change I have made to the Mac is the ram, I up