Updating Business Partner via B1WS web services

Hi,
I get an error when I try to update (through the 'update' function of the BusinessPartnersService object) a BP that has already a bank account; even if I populate the BPBankAccounts property with the existing info of bank account, I get:
Bank account is in use and therefore cannot be removed or changed   [(----) 705-20]
My code is:
            BusinessPartnersService px = NewBPService(LoginDefault());
            BusinessPartner bp = new BusinessPartner();
            bp.CardCode = "CADRIAT0000";
            bp.Phone1 = "041666666";
            BusinessPartnerBPBankAccount[] bpba = new BusinessPartnerBPBankAccount[1];
            bpba[0] = new BusinessPartnerBPBankAccount();
            bpba[0].BPCode = "CADRIAT0000";
            bpba[0].IBAN = "IT42L0350012500000000021179";
            bpba[0].Branch = "12500";
            bpba[0].BankCode = "03500";
            bpba[0].AccountNo = "000000021179";
            bp.BPBankAccounts = bpba;
            px.Update(bp);
Does anyone know ho to update correctly a BP with an existing bank account?
Thanks,
Alessio

Hi,
First Use the getbykey to get the Business partnet then update.
sample code is available with B1WS package
Regards.

Similar Messages

  • Update Business Partner via SAP Business One Webservices

    Dear all,
    We use the SAP Business One Webservices to add/update businesspartners and items.
    We can add/update items without any problem.
    We can also add businesspartners without any problem.
    But when we try to update a businesspartner.
    We always get the error message : "Entry already exists in following tables:"
    This is the code we use to update BusinessPartner:
    Dim bpsService As BP.BusinessPartnersService = New BP.BusinessPartnersService()
    Dim msgheader As BP.MsgHeader = New BP.MsgHeader()
    msgheader.SessionID = sSessionID
        msgheader.ServiceName = Global.BP.MsgHeaderServiceName.BusinessPartnersService
        msgheader.ServiceNameSpecified = True
        bpsService.MsgHeaderValue = msgheader
                ' fill business partner class
                Dim oBp As BP.BusinessPartner = Nothing
                Dim myBPParams As BP.BusinessPartnerParams = New BP.BusinessPartnerParams()
                myBPParams.CardCode = sCardCode
                ' Call GetByParams command
                oBp = bpsService.GetByParams(myBPParams)
    oBp.CardName = "Test update BP"
    Can someone tell me what is going wrong when I call this function :
      bpsService.Update(oBp)
    Kind regards
    Bart

    Hi Bart,
    I think the problem is because you are using the BPService twice without initializing it one more time in the middle.
    You call first GetByParams and then Update.
    The following code works for me:
            myBPService = New BusinessPartnersService()
            Dim myBP As BusinessPartner = New BusinessPartner()
            Dim myBPParams As BusinessPartnerParams = New BusinessPartnerParams()
            ' Create Header
            Dim msgHeader As MsgHeader = New MsgHeader()
            msgHeader.SessionID = B1WS_WindowsSample.GlbData.sessionID
            msgHeader.ServiceName = MsgHeaderServiceName.BusinessPartnersService
            msgHeader.ServiceNameSpecified = True
            myBPService.MsgHeaderValue = msgHeader
            myBPParams.CardCode = MainForm.CardCodeTextBox.Text
            myBP = myBPService.GetByParams(myBPParams)
            myBPService = New BusinessPartnersService()
            ' Create Header
            msgHeader = New MsgHeader()
            msgHeader.SessionID = B1WS_WindowsSample.GlbData.sessionID
            msgHeader.ServiceName = MsgHeaderServiceName.BusinessPartnersService
            msgHeader.ServiceNameSpecified = True
            myBPService.MsgHeaderValue = msgHeader
            System.Console.Out.WriteLine("Update a BP")
            myBP.CardName = "CardName MOD"
            '/ call Asyncronous Add
            myBPService.Update(myBP)
    Hope it works also for you
    Regards
    Trinidad.

  • DTW problem when updating business partner

    Hi Experts,
    I want to update business partner master data via DTW.
    I only want to update the Remarks.
    In my import file only the fields RecordKey, CardCode and FreeText are filled.
    Example:
    RecordKey: 1
    CardCode: C20000
    FreeText: My Remarks
    The import is successful and the remarks were filled but the DTW has also updated other fields in the business partner master data.
    Before update via DTW the business partner has no payment methods included on the payment system tab but after update via DTW the payment method is included and is defined as Standard.
    Any idea?
    Thanks for help.
    Jacqueline

    Hi,
    yes, the existing payment methods were defined manually before update.
    But the payment method was not included for that business partner.
    Here are some hardcopys before update and after update.
    [BP Master Data Before Update DTW|http://www.sap-potsdam.de/BoneUpload/BP_before_Update.JPG]
    [BP Master Data After Update DTW|http://www.sap-potsdam.de/BoneUpload/BP_after_Update.JPG]
    Jacqueline

  • Create or Update Business Partner in CRM  ?

    Dear Folks  ,
    Scenario is to Create or update Business partner in CRM from  thirdparty system  via PI
    It would be great if you could  clarify the following
    Hope we have BAPI to create and Update Business partner in CRM system but my question is
    1. Can we use any predelivered PI content - Message Interfaces - as proxies ( Server proxies ) to create BP from system ?
    2. Same interface will work for Update as well ? 
             IF so what is that content ?  where to find for our PI System ?
    3. Can we use the same way for Client proxies as well  when we want to update the business partner ?
    4. What are the inbound and outbound Message Interfaces are available ?
    Any help will be highly appreciated
    Thanks.,
    Shiva

    Hi Ravi ,
    I think that i am not described my question properly    , Say i have CRM system where i have to create BP for this input comes from external system (forget about the system ) , Here i want to use Proxy (Server proxy ) which helps me create Business partner in CRM system .
    Here my question is If sap delivers the  Inbound interface ( where server proxy already generated by SAP) , which i will use to create BP ?
    Can we do in this way ?
    Thanks
    Shiva

  • Updating business partner hierarchy in CRM

    Hi,
    I Need to build a interface to update business partner hierarchy (Transaction BPH) in CRM. I can not find a suitable FM/BAPI for this purpose. Please advise me how to accomplish this.

    Hi,
    Where do you start to activate or configure Business Address Services in R/3 Business partners. Any links to user guides or startup documents will be greatly helpful.
    Thanks very much
    Cheers!
    Padi

  • Updating business partner addresses in CRM

    Hi,
    I Need to build a interface to update business partner addresses in CRM and assign it to a address usage. I can not find a suitable FM/BAPI for this purpose. Please advise me how to accomplish this.

    Hi,
    Where do you start to activate or configure Business Address Services in R/3 Business partners. Any links to user guides or startup documents will be greatly helpful.
    Thanks very much
    Cheers!
    Padi

  • Limitation on data that can be fetched (ABAP RFC) via a Web Service?

    Hi,
    Is there any limit on the data that can be fetched via a Web Service (ABAP exposed as Web Service). I am trying to fetch PI monitoring data from ABAP Tables via a Web Service and there can be thousands of messages proceesed say in a day and what if user is provided the option of fetching messages for a specefic duration.
    Please advise.
    Neha

    Hello my friend
    If I understand your question correctly, there's an environment variable CPIC_MAX_CONV handles sessions between integration engine and adapter engine (ABAP and Java). By default, the value of this variable is 500, and you might want to increase it to 1000 at least, depends on system throughput. Recommended value from SAP for Production is 5000.
    Hopefully it's helpful,
    Effan

  • Can i receive XML via a web service into the PDF form??

    hi all,  I am able to send data to a server via a web service configured in my email submit button.  Once the data has been received on the server, a reference number is sent back.  My problem starts here as the reference number comes back into my browser and not back into the PDF.  How can i get the reference number into the PDF?  Thanks  J

    Thank you very much for your help.
    I have another question if you don't mind.
    I am trying to establish a WSDL in ALCD. I establish the connection successfully and
    in return i receive predefined objects such as 3 numeric fields and a button.
    I drag these objects onto a new form and try to execute but nothing happens.
    The first 2 objects are supposed to accept input, send it via WSDL to a server that should return
    a new value back to another predefined object when the button is clicked.
    I have not response when the button is clicked. It is as if there is not connection at all.
    If i try and change the button to a submit button and enter the WSDL manually it tries to connect but fails.
    The WSDL does work if I test it using soapUI.
    Would you have any idea why this is not working?
    Thanks
    Joey

  • IDOC to update business partner data in FSRI(part of CRM system) .

    Hi ,
    I want to know an INBOUND IDOCs to update business partner data in FSRI (part of CRM system) .
    Please help .
    Regards
    Chetan
    Moderator message: please do your own research before asking.
    Edited by: Thomas Zloch on Dec 21, 2010 5:14 PM
    Moderator message -
    Also, when closing old threads, there is no need to add a comment. Adding a pasted answer like "rectified" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.
    Edited by: Rob Burbank on Dec 21, 2010 1:20 PM

    Mass not available in 4.0, could write your own LSMW routine but you still will create bdocs for updates so not sure how that will improve your performance.

  • Send a map of documents via Invoke Web Service

    Hi,
        I have one process with map of documents and 2nd process on other server, where input variable is map od documents too. How can I send this map between these processes via "Invoke Web Service" component? Simple datatypes I can.
    Petr

    Take a look at Quick Start: Assembling a PDF document using the web service API
    It shows how to create an input map for multiple documents.
    But it sounds like you're asking how to create a WSDL that allows you to use an input map as an argument in a Web Service invocation. If so, take a look at the Assembler services WSDL. For 8.2, access
    http://myServer:myPort/soap/services/AssemblerService?wsdl

  • Can't call B1WS web services from other machines?

    Hi Everyone,
    We have come across a strange problem that I hope you might have the answer to.
    We are using B1WS and DISERVER on a Windows 2003 Server machine.  When I run code from within the machine that has DISERVER and B1WS running on it, it works fine.  It's really nice actually.  I register a web reference to the web service, and it connects and is able to process actions on SAP objects.
    The problem I have come into is when I do the same thing, but from another machine.  This means that I create a simple web app, make a web reference to the web service which is now running on another machine, and try to use the same code that works on the other machine.  It fails from this other machine, and when I look at the inner exception, this is what it says:
    "no connection could made because target machine actively refused 127.0 0.1 80"
    I am not sure what is happening.  We have reviewed the configuration, and it seems okay.
    Another way of describing this problem, in case this isn't clear yet, is  this:
    Machine A runs DISERVER and B1WS
    Running code which uses B1WS web service being hosted in Machine A works well.
    Running code in Machine B, which uses B1WS web service being hosted in Machine A does not work at all.
    Machine A and Machine B can see each other.  They can talk on port 80, no problems.
    IIS is running on Machine A, and is working fine.
    I am not sure where to turn next.  Please share your thoughts.
    Thank you very much,
    Mike

    Greetings everyone,
    We have found a solution to this problem, and it is very much like one offered by Trinidad, except there was some confusion in my understanding.
    http://sql-patch/B1WS/webreferences/LoginService.wsdl
    Indeed, the url http://localhost/Service.asmx appears in the WSDL files, as well as the web.config.
    I changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl in the WSDL files only.  This did not work.
    We then found it in the web.config file also, and changed it to http://sql-patch/B1WS/webreferences/LoginService.wsdl also.
    The reason I was using this URL is because the files exist there.  Looking at IIS, there is no Service.asmx anywhere in the B1WS path, and this confused me.
    This got us one step further, but now a new error was showing itself -- 405 Method Not Allowed.
    It turns out that the URL we needed to change it to is this:
    http://sql-patch/B1WS/Service.asmx
    That is, we replace localhost with the name of the machine, and NOTHING else.
    This seems to have solved it for us, and is hopefully useful for you.
    Thanks all,
    Mike

  • Access Enterprise Search via ABAP Web Service

    Hello ES experts,
    I am looking for more information on how to access Enterprise Search via ABAP web service QSDispatcher, using processQuery operation. I created a client proxy and need information on structure of input and output parameters (query and query result)
    Thanks, Srdjan

    Hi Srdjan
    You can access the SAP ABAP system by configuring it in the NW ES admin console, any system with version > 4.6C can be integrated in the search engine.
    The UI for NW ES is a WebDynpro via Web Browser (In the future will be integrated in Widgets and Portal, etc) but i'm not sure if you want to use the WS to access the results of the ES searching or if you want to integrate a WS from ABAP as part of the searching area...
    Please clarify.
    Thanks,
    Best Regards,
    Luis

  • Problem Updating Business Partner DI Object loaded via XML

    Hello,
    I'm working with  SB1 8.81 PL 08
    I have to Update a Business Partner Object in a Target SB1 Company Database starting from a Business Partner Objects saved as XML from the Source SB1 Company Database.
    Normally this works fine, I load from XML this Object and calling the Method Update all data is Syncronized in the Target DB.
    But if the Business Partner Object has at least a Contact Person and in the Target Company DB a Marketing Document has been created for this particular Business Partner the Update Method called on the loaded by XML object always fail giving the following error:
    Error: -10
    Message: Contact Person is referenced by another object.  , 'Sales Quotations [...contact Person ID...]'
    The modifications I need to update do not involve contact person in the BP object but only other simple properties like Tel Nr. ...
    In conclusion ... if the target BP has a marketing document created it seems no more possible to update it with an XML load, instead if a load the BP using the   GetByKey() Method and changing manually some properties of the object the Update works fine.
    Thank you for support.
    Max

    Hi,
    First Use the getbykey to get the Business partnet then update.
    sample code is available with B1WS package
    Regards.

  • Unable to Create/Update Sales Party Object via FA Web Service Calls.

    Invoking the updateSalesParty() and createSalesParty() methods of the Web Service proxy doesn't show any errors, but at the same time, it doesn't create or update the Sales party objects on the Fusion instance.
    ( https://rws-fap0267-crm.oracledemos.com/crmCommonSalesParties/SalesPartyService?WSDL )
    I've attached the java code and console output when I run the code for your ready reference.
    Any pointers on what I'm missing will be very helpful.
    Thanks in advance!
    Cheers,
    Sharath

    I tried invoking the WS -via SOAPUI - using the payload specified in WebService Sample Payload for Creating a Sales Account (Doc ID 1362190.1) and I get the follow error response.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Header/>
      <env:Body>
          <env:Fault>
            <faultcode>env:Server</faultcode>
            <faultstring><![CDATA[JBO-27023: Failed to validate all rows in a transaction.JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245710 ] in OrganizationDEOJBO-27014: Attribute Type_c in OrganizationDEO is required.JBO-27014: Attribute Type_c in OrganizationDEO is required.JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245711 ] in PartySiteEOJBO-HZ:::HZ_NO_LOCATION_FOUND: <MESSAGE><NUMBER>HZ-120085</NUMBER><TEXT>The location 958 is invalid. Use a valid location from the HZ_LOCATIONS table.</TEXT><CAUSE></CAUSE><ACTION></ACTION><DETAILS></DETAILS><INCIDENT></INCIDENT></MESSAGE>JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245712 ] in PartySiteUseEO: nullJBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245714 ] in PartyUsageAssignmentEO: null]]></faultstring>
            <detail>
                <tns:ServiceErrorMessage xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                  <tns:code>27023</tns:code>
                  <tns:message>JBO-27023: Failed to validate all rows in a transaction.</tns:message>
                  <tns:severity>SEVERITY_ERROR</tns:severity>
                  <tns:detail xsi:type="tns:ServiceRowValErrorMessage">
                      <tns:code>27024</tns:code>
                      <tns:message>JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245710 ] in OrganizationDEO</tns:message>
                      <tns:severity>SEVERITY_ERROR</tns:severity>
                      <tns:detail xsi:type="tns:ServiceAttrValErrorMessage">
                        <tns:code>27014</tns:code>
                        <tns:message>JBO-27014: Attribute Type_c in OrganizationDEO is required.</tns:message>
                        <tns:severity>SEVERITY_ERROR</tns:severity>
                        <tns:exceptionClassName>oracle.jbo.AttrValException</tns:exceptionClassName>
                        <tns:attributeName>Type_c</tns:attributeName>
                        <tns:objectName>OrganizationDEO</tns:objectName>
                      </tns:detail>
                      <tns:detail xsi:type="tns:ServiceAttrValErrorMessage">
                        <tns:code>27014</tns:code>
                        <tns:message>JBO-27014: Attribute Type_c in OrganizationDEO is required.</tns:message>
                        <tns:severity>SEVERITY_ERROR</tns:severity>
                        <tns:exceptionClassName>oracle.jbo.AttrValException</tns:exceptionClassName>
                        <tns:attributeName>Type_c</tns:attributeName>
                        <tns:objectName>OrganizationDEO</tns:objectName>
                      </tns:detail>
                      <tns:exceptionClassName>oracle.jbo.RowValException</tns:exceptionClassName>
                      <tns:objectName>OrganizationDEO</tns:objectName>
                  </tns:detail>
                  <tns:detail xsi:type="tns:ServiceRowValErrorMessage">
                      <tns:code>27024</tns:code>
                      <tns:message>JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245711 ] in PartySiteEO</tns:message>
                      <tns:severity>SEVERITY_ERROR</tns:severity>
                      <tns:detail xsi:type="tns:ServiceRowValErrorMessage">
                        <tns:code>HZ:::HZ_NO_LOCATION_FOUND</tns:code>
                        <tns:message><![CDATA[JBO-HZ:::HZ_NO_LOCATION_FOUND: <MESSAGE><NUMBER>HZ-120085</NUMBER><TEXT>The location 958 is invalid. Use a valid location from the HZ_LOCATIONS table.</TEXT><CAUSE></CAUSE><ACTION></ACTION><DETAILS></DETAILS><INCIDENT></INCIDENT></MESSAGE>]]></tns:message>
                        <tns:severity>SEVERITY_RECOVERABLE_ERROR</tns:severity>
                        <tns:exceptionClassName>oracle.jbo.RowValException</tns:exceptionClassName>
                        <tns:objectName>PartySiteEO</tns:objectName>
                      </tns:detail>
                      <tns:exceptionClassName>oracle.jbo.RowValException</tns:exceptionClassName>
                      <tns:objectName>PartySiteEO</tns:objectName>
                  </tns:detail>
                  <tns:detail xsi:type="tns:ServiceRowValErrorMessage">
                      <tns:code>27024</tns:code>
                      <tns:message>JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245712 ] in PartySiteUseEO</tns:message>
                      <tns:severity>SEVERITY_ERROR</tns:severity>
                      <tns:detail xsi:type="tns:ServiceErrorMessage">
                        <tns:severity>SEVERITY_ERROR</tns:severity>
                        <tns:exceptionClassName>java.lang.NullPointerException</tns:exceptionClassName>
                      </tns:detail>
                      <tns:exceptionClassName>oracle.jbo.RowValException</tns:exceptionClassName>
                      <tns:objectName>PartySiteUseEO</tns:objectName>
                  </tns:detail>
                  <tns:detail xsi:type="tns:ServiceRowValErrorMessage">
                      <tns:code>27024</tns:code>
                      <tns:message>JBO-27024: Failed to validate a row with key oracle.jbo.Key[300000077245714 ] in PartyUsageAssignmentEO</tns:message>
                      <tns:severity>SEVERITY_ERROR</tns:severity>
                      <tns:detail xsi:type="tns:ServiceErrorMessage">
                        <tns:severity>SEVERITY_ERROR</tns:severity>
                        <tns:exceptionClassName>java.lang.NullPointerException</tns:exceptionClassName>
                      </tns:detail>
                      <tns:exceptionClassName>oracle.jbo.RowValException</tns:exceptionClassName>
                      <tns:objectName>PartyUsageAssignmentEO</tns:objectName>
                  </tns:detail>
                  <tns:exceptionClassName>oracle.jbo.TxnValException</tns:exceptionClassName>
                </tns:ServiceErrorMessage>
            </detail>
          </env:Fault>
      </env:Body>
    </env:Envelope>
    Is there a way to see this error response when invoking the WS via a Java client-proxy?

  • Update Business Partner Master Data for Incident Management

    Hi fellow SAP-ians,
    I have two questions that I need to ask in relation to Incident Management SOLMAN 7.1:
    1) Can Business Partner (BP) master data be mass updated via a catt script? (recording of transaction BP)
    2) What BP roles can I use if i need to capture profit center, cost center and department info for each BP and to be able to display those info from Incident Management (CRM Web UI)?
    Thanks in advance. Your swift response is highly appreciated.
    B.Regards,
    Khairul

    Hi Vikram,
    I appreciate your quick response. I went over the document that you've mentioned. However, nothing in there seemed to help.
    Just FYI, i need to create/change approx. 25,000 Business Partners in SOLMAN 7.1 by 1)creating system users in SOLMAN and 2) execute report AI_SDK_USER_BP_GEN to generate/update BP IDs accordingly.
    My question was, lets say if i needed to enter profit center, cost center and division info into each BP. In what BP role and fields, besides the standard BUP001 (Contact Person) & BUP003 (Employee), that I can use to enter those type of information?
    For example, profit center - 88KUL186; cost center - 88KUL186; division - KLIA.
    Thanks in advance.

Maybe you are looking for

  • How to transfer an iTunes library from an iPhone to a new Macbook Air

    I just received a new macbook air and I would like to transfer the music from my iPhone to my new laptop. My old laptop that contained my itunes library is dead so I don't know how to get the music from my iPhone onto my new computer.

  • MIRO- Unplanned Delivery Costs info. not showing on FS10N line items

    HI, Can anyone explain why when posting an Invoice with unplanned delivery costs using T-code MIRO, the purchase order info. does not show in the GL line item display T-code FS10N for any of the unplanned delivery cost line items. If anyone have a so

  • How to extract latest instance of a report using BO Enterprise SDK?

    Using BO Enterprise SDK how to extract latest instance of report from Crystal Enterprise XIR2?. Can anybody help me with explanation or code? Thanks in advance.

  • Need help with 30gig black ipod

    I just recently purchased this ipod and loaded 233 songs. it was working fine until i connected it to the pc to charge it it keeps giving this picture with the battery charging http://images.apple.com/support/ipod/elements/banners/4ipodicons.gif then

  • How to define map of maps?

    Hello, i want to do something like that in pl/sql: TYPE map_type    IS       TABLE OF NUMBER          INDEX BY VARCHAR2 (1);    --    map: 1 -> 'a'    --         2 -> 'b'    --         11 -> 'A'    --         22 -> 'B'    TYPE map_of_map_type    IS