Update Opportunity partners

Hi Experts,
i've created a report to massively update the opportunity into a CRM 6.0 system. I'm facing an issue while updating the partners: when i run the report i delete the partern using these functions in this order
-CRM_ORDER_MAINTAIN
lt_partner_com is the table for the parameter it_partner:
ls_partner_com-kind_of_entry = 'C'.
ls_partner_com-no_type = 'BP'. "-> if it is a business partner number
ls_partner_com-display_type = 'BP'. "-> if it is a business partner number
ls_partner_com-ref_kind = 'A'.
ls_partner_com-ref_guid = gs_outtab-guid. "-> OPPORTUNITY Guid number
ls_partner_com-ref_partner_fct = ls_partner-ref_partner_fct.  "-> Partner function to erase
APPEND ls_partner_com TO lt_partner_com.
lt_input_fields is the table for the parameter ct_input_fields:
ls_input_fields-ref_guid = gs_outtab-guid. "-> OPPORTUNITY Guid number
ls_input_fields-ref_kind = 'A'.
ls_input_fields-objectname = 'PARTNER'.
CONCATENATE ls_partner-ref_partner_handle ls_partner-ref_partner_fct INTO ls_input_fields-logical_key.
ls_field_names-fieldname = 'PARTNER_FCT'.
APPEND ls_field_names TO ls_input_fields-field_names.
APPEND ls_input_fields TO lt_input_fields.
-CRM_ORDER_SAVE
-BAPI_TRANSACTION_COMMIT (and wait)
-CRM_ORDER_INITIALIZE
then i use the same functions to add the new partner:
-CRM_ORDER_MAINTAIN
lt_partner_com is the table for the parameter it_partner:
ls_partner_com-ref_kind = 'A'.
ls_partner_com-kind_of_entry = 'A'.
ls_partner_com-no_type = 'BP'. "-> if it is a business partner number
ls_partner_com-display_type = 'BP'. "-> if it is a business partner number
ls_partner_com-ref_guid = gs_outtab-guid. "-> OPPORTUNITY Guid number
ls_partner_com-partner_fct = p_partfn.  "-> Partner function to add
ls_partner_com-partner_no = p_partnn.
APPEND ls_partner_com TO lt_partner_com.
lt_input_fields is the table for the parameter ct_input_fields:
ls_input_fields-ref_guid = gs_outtab-guid. "-> OPPORTUNITY Guid number
ls_input_fields-ref_kind = 'A'.
ls_input_fields-objectname = 'PARTNER'.
CONCATENATE ls_partner-ref_partner_handle ls_partner-ref_partner_fct INTO ls_input_fields-logical_key.
APPEND ls_field_names TO ls_input_fields-field_names.
ls_field_names-fieldname = 'DISPLAY_TYPE'.
APPEND ls_field_names TO ls_input_fields-field_names.
ls_field_names-fieldname = 'NO_TYPE'.
APPEND ls_field_names TO ls_input_fields-field_names.
ls_field_names-fieldname = 'PARTNER_FCT'.
APPEND ls_field_names TO ls_input_fields-field_names.
ls_field_names-fieldname = 'PARTNER_NO'.
APPEND ls_field_names TO ls_input_fields-field_names.
APPEND ls_input_fields TO lt_input_fields.
-CRM_ORDER_SAVE
-BAPI_TRANSACTION_COMMIT (and wait)
-CRM_ORDER_INITIALIZE
The first time i run the report, the partner is deleted, but is not added (and no errors from any function). The report display an AVL (it's a log); If I go back to the selection screen and run the report again, the partner is added correctly.
Someone has some idea? Thank you,
Antonio.

Hi,
I have also faced this situation while doing a product catalog upload program. But the solution to this which worked for me was not at all performance friendly.
I used WAIT UPTO n SECONDS and later BUFFER_SUBSCRIBE_FOR_REFRESH to get the desired result.
I don't know if this will work for you or not.
Hope it helps.
Regards
Sidd

Similar Messages

  • In Update_Opportunity_Pre error while updating opportunity status

    Hello,
    We are encountering an error 'In Update_Opportunity_Pre' in the log when trying to update apportunity status to a closed status using Update Opportunity API. Has anyone encountered this error before? If so, I would appreciate if you could share the fix/work around for this issue.
    Thanks,
    Dinakar.

    Hi,
    The log is as follows:
    Opportunity status changes to Cancelled
    ..... in pel_lead_utilities.update_oppty_header
    ..... Error Message In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre
    ..... AS_OPPORTUNITY_PUB.Update_Opp_Header
    ..... x_return_status = E
    ..... Error Details = In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre
    ... pel_lead_utilities.update_oppty_header :: v_return_status : E
    ... pel_lead_utilities.update_oppty_header :: In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre In Update_Opportunity_Pre

  • Update Opportunity Totals button on Opprtunity Product Revenue line items

    Hello,
    In our application, the sales process is managed at the product revenue level. Each product line item goes through various stages and could be in the intiall state or get cancelled as well. I need to exclude these product revenue line items while updating the Revenue amount at the Opprtunity Header. With the <Update Opportunity Totals> button, the total is updated at the header irespective of the product reveneue status. I think I need to build a custome webservice to do that.
    I need to find out if the <Update Opportunity Totals> button can be made read-only or removed based on roles and priveledges.
    Thanks

    Robin,
    You can't turn off the button, but OOTB functionality can help you manage this. In our case, we created a workflow for the Revenue Record Type. The workflow watches for changes to the status of any Opty Revenue record, via the "Before modifed record saved" trigger event. When a user changes the status of an Opportunity Product Line Item to a specified value, "Lost" in our case, the workflow automatically updates the Quantity value at the line item to 0, and the Revenue and Expected Revenue values at the Opty Product Line Item level are calculated to be zero accordingly. When the user updates the totals at the Opty level, the totals inlcude only the records that have revenue associated with them at the Opty Prod Line Item level.
    I assume your requirements are similar and the same approach could be used in your case.
    Good Luck,
    Thom

  • DTW Error65171 when Updating Business Partners

    I have gotten the following error multiple times when attempting to update Business Partners in the DTW:  "Can not find this object in B1Application-defined or object-defined error65171".  I have tried many different things as well as only trying to import one record with only the line num, card code, and card type and still I get this error when trying to update BP's.  I have also tried using both a tab delimited and a comma delimited file.  Pleae let me know if you have any related information.  Thanks!

    Hi Sarah,
    a typical situation where this kind of error occurs is when there is data in the line to be imported/updated which is not defined in SAP, e.g. in the import-file I used a tax-code which was not defined in SAP.
    Furthermore I had problems with a newer version of DTW (no time to look for the version number right now). With this version it is NOT possible to UPDATE business partners. I installed an older version of DTW which was part of SAP BO 2005A SP01 PL16 (if I remember it corretly) and did the update of business partners.
    To solve your problem you should inform us on the versions of SAP and DTW you are currently using, as Suda already asked you for in his reply!
    Regards,
    Frank Romeni

  • Add logic behind 'Update Opportunity Totals' button in Oracle CRM On Demand

    HI,
    I need to add custom logic behind 'Update Opportunity Totals' button in Oracle CRM On Demand. Can anyone please let me know where can I implement this logic? Where can I find already implemented code of  'Update Opportunity Totals' button.
    Thanks,
    RM

    Pl post this in a Siebel related forum
    HTH
    Srini

  • Scheduled update of partners to site customers (KNVP partner functions)

    Hello all
    We have a need to change customer master partner function so that the definion of the needed changes is done in beforehand but the actual updating of change sis done on a certain time. The reason for this is that the amount of needed changes is huge and the updating of changes should be done at a certain moment.
    Do you know if there is some standard way in SAP to do the update of partners of site customers scheduled?
    Thanks for you help.
    Best regards
    Seija

    Hello all
    There is a transaction/program for "mass activation of planned changes for vendor (RMCHACTB and RSBDCSUB Batch Input: Process All Sessions).  I wonder if the same kind of tool exists also for planned changes for customer.
    We have a need to change customer master partner function so that the definion of the needed changes is done in beforehand but the actual updating of change iis done on a certain time. The reason for this is that the amount of needed changes is huge and the updating of changes should be done at a certain moment.
    Do you know if there is some standard way in SAP to do the update of partners of site customers scheduled?
    Thanks for you help.
    Best regards
    Seija

  • Disable the Update Opportunity Totals

    Has anyone come up with a way of disabling the "Update Opportunity Totals" button on the Opportunity Page. Without going into detail, under certain circumstances, when our users click the button we come up with incorrect totals. This is due to our implmentation and how we populate the frequency & # of periods, not Oracle.
    I looked into trying to add something in the in HTML Head Additions section of the custom web applet, that would disable just this button, but could not come up with anything.
    The code that is executed when the button is selected is:
    <div tabindex="5" onmouseover="toggleNavButton(this);" onkeypress="onButtonPress(this);" onmouseout="toggleNavButton(this);" class="buttonChildTitleBarTD" onclick="doNavigate('\/OnDemand\/user\/OpportunityDetail?OMTGT=RevenueList&OMCR0=1-19FGQ67&OpptyDetailForm.Id=1-19FGQ67&OMRET0=OpportunityDetail%3focTitle%3dDixie%2bPAS%26OMTGT%3dOpptyDetailForm%26OMTHD%3dOpportunityDetailNav%26ocEdit%3dY%26OpptyDetailForm.Id%3d1-19FGQ67%26OCTYPE%3d%26ocTitleField%3dName&OMCBO=Opportunity&OCTYPE=&OMTHD=UpdateTotals',true, this, null);" id="ProductRevenueChildListTB28508260*1">&#160;Update Opportunity Totals&#160;</div>
    Any thoughts?

    You can't remove the Update opty total button but I had a similar issue, we capture revenue in 2 fields mthly and inital setup and it wouldn't use both and send it to the Opty total so we looked at redesigning it. I have 2 new currency fields and when a record is updated it divides the initial setup by # periods and adds that figure to the monthly figure and puts it in the currency field that displays in related items. The update Opty button then works with the correct numbers. Of course this goes in right after R16 because then I can remove the original Monthly revenue field off the related items section.
    cheers
    Alex

  • Import Opportunity Partners data reporting non-primary contact relationship

    I currently have three contacts related to each opportunity, but only the primary can be reported in OnDemand. It looks to me like I can use Opportunity Partners to accomplish the reporting of contacts related to the opportunities by linking the contacts in the opportunity partner area.
    Anyone have experience with this problem and/or this solution?
    My other problem is that Oracle says that Opportunity Partner data can not be imported, but I am guessing that someone knows how to do that in some way. maybe using web services??
    thanks

    Hi Mike,
    You may want to try posting your question regarding CRM On Demand's reporting capabilities to the Analytics forum: CRM On Demand Analytics and Reports
    Regarding your second question, WS can be used to associate Partner records as well as Contact records to an Opportunity.
    Thanks,
    Sean

  • Problem updating business partners - "Bank does not exist in the company"

    Hi
    I have written a small program to update business partners ( SP01 PL 34 ) and I am getting a message saying "Bank does not exist in the company"
    I am only updating simple information such as telephone, fax and email addresses.
    Does anyone know why I am getting that error ?
    Thanks
    Regards Andy

    Paul,
    Other than the code that you have written, are there any other add-ons installed with Business One such as the Payment Engine?
    I have not heard of this issue.  You may want to create a message with SAP Support since you are getting the same error through the DTW which also uses the DI API.
    Also, is there any difference between what you manually key in and what you try to push in?
    Eddy

  • Error updating business partners

    Hi,
    I have a routine to add/updat business partners, but when I update them I get the message  "Cannot add multi bill.to address to non supplier BP", but I am doning nothing with the addresses.
                    If bp.GetByKey(rs.Fields.Item(0).Value) Then
                        bp.CardType = SAPbobsCOM.BoCardTypes.cLid
                        bp.CardName = compname
                        bp.Phone1 = telnr
                        bp.ContactPerson = contactp
                        bp.Website = website
                        bp.UserFields.Fields.Item("U_HUIDPAKK").Value = huidigpak
                        If bp.UserFields.Fields.Item("U_BELVERSL").Value.length > 0 Then
                            bp.UserFields.Fields.Item("U_BELVERSL").Value += contact
                        Else
                            bp.UserFields.Fields.Item("U_BELVERSL").Value = contact
                        End If
                        bp.UserFields.Fields.Item("U_MAILDATM").Value = caldate
                        Dim rc As Integer = bp.Update
                        If rc <> 0 Then
                            SBO_Application.MessageBox("UPDATE: " + oCmp.GetLastErrorDescription + vbCrLf + bp.CardCode)
                        End If
                    Else
                            SBO_Application.MessageBox(rs.Fields.Item(0).Value + " niet gevonden")
                        End If
                    End If

    Hey Ad,
    Looks like it is not possible.
    BusinessPartners Object has a BPAdresses object, which contains all adressses (ship to and bill to). But The BPAdresses object only contains an add function, no remove function.
    So you'll should delete the business partner, and add it again...
    Good luck!
    Edit:
    You'll can also delete the address entry in table CRD1 (that's the adresses table according to the DI-API. Not supported by SAP though, (you'll lose support) so take care with it...
    Message was edited by: R. Schwachofer

  • BAPI for Updating the partners in Contract Documents

    Hi All,
    I am Using a BAPI  BAPI_CONTRACT_CREATEFROMDATA for Updating the Partners in the Contract documents by passing 'U' in the field Update_flag of the structure BAPISDHD1X.
    I am facing an issue as in the BAPI Return table : S document saved successfully
                                                                                  S No data was changed.
    Please help or give me a solution to update only partners in the Contract documents(VA42).
    Also please let me know any other BAPIs that can be used to do so.
    Thanks & Regards,
    Bhargav.

    HI,
    I am passing the right data. there is no problem with the data. My question is how do we update partners in the Contract documents. If possible can you explain with example.
    Regards,
    Bhargav.

  • Modify functionality of "Update Opportunity Totals"

    Hi all,
    We are looking to modify the functionality of the button, "Update Opportunity Totals" in the Opportunities screen.
    Can you share some pointers as to where can I find the flow, and modify the same to change the fields included maybe, and/or modify the calculations in effect ?
    Best Regards

    Hi,
    what you can do is hide the standard button and instead insert a custom button with DOM manipulation (Global Web Applet in Action Bar with onload event). Afterwards you have to Query the Revenues (js query with sso) and update the opportunity (js insert)
    Best Regards
    SL

  • Update Opportunity Totals automatic ?

    Hello,
    Pls. is it possible somehow to automate the "click" on the Update Opportunity Totals button in the Opp. ? There is a tendency to forget the click... and the opp. value is not up to date...
    Txs.
    Antonio

    Antonio, this is something that is being considered in a future CRM On Demand release.

  • Update Opportunity Totals - trigger this action

    Is there a way to trigger the Update Opportunity Totals action (so the user does not have to click on the button)?

    Does anyone know if this functionality is available yet?
    I have a customer that would like to know if there is a way to automate the clicking of the "Update Opportunity Totals" button everytime someone changes the product revenue record(s). Their issue is that if a user forgets to click the Update Opportunity Totals button after making a change that the Opportunity totals will be off.
    Is there any work arounds for this?
    Thanks.

  • LIVE EXTERNAL WEBCAST: AIA Awareness Update for Partners

    LIVE EXTERNAL WEBCAST: AIA Awareness Update for Partners
    …want to position AIA products to your partners?
    [ Get your partners to register today!|     http://oukc.oracle.com/static05/opn/login/?t=livewebcast&c=718575821]
    Enterprise application integration creates huge opportunities for system integrators . However, the complexity of the application environments and business processes increases the cost and risk of integration projects to both customers and partners. It results in rigid processes and tightly coupled architecture which are almost impossible for managing, extending, and upgrading..
    In this LIVE Webcast we will be presenting a product awareness update in three key aspects Oracle AIA: AIA Product Components and Road Map, AIA Advantages and Benefits, AIA Partner Programs.– We will discuss how, together, AIA products reduce integration risk, accelerate time to solution, and lower the total cost of ownership. Invite your partners to learn more!
    [Get your partners to register today!|     http://oukc.oracle.com/static05/opn/login/?t=livewebcast&c=718575821]
    LIVE Webcast: Wednesday, Sept 30 at 12:00PM (PT) – register to learn more.
    NOTE: Oracle audience is welcome, however, this is meant to be an external demand generation webcast so please forward this link to your partners, ask them to register and join us!

     Is my assumption correct?  yep

Maybe you are looking for