Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Calling BAPI_CUSTOMER_CHANGEFROMDATA1 from Data Services

$
0
0

I’m having a couple of issues trying to use Data Services to update R/3 via BAPI_CUSTOMER_CHANGEFROMDATA1.

 

I’m new to SAP and relatively new to BODS too, so apologies in advance if I'm doing something silly.

 

So, the object of the exercise overall is to pick up changes in the source system - salesforce.com (SFDC), if it matters - and update the corresponding customer record in SAP.

 

Here’s where I’m up to at the moment: in SFDC, I can change, say, the contact’s telephone number and then see the change go through my Data Services dataflow.  There’s a custom field in SFDC that holds the SAP customer number, so by the time the data gets through as far as the BAPI, I have the SAP customer number, the changed telephone number, and a few other fields like LastName, and I think I should be able to assign those values to fields in the BAPI function, and have the SAP record updated.

 

The SAP log reports that the job completed successfully, but it also throws up an error:

 

Error calling custom RFC function <BAPI_CUSTOMER_CHANGEFROMDATA1 RFC return error! F2 892 Internal error: Sales Organization does not exist in master record  000000    >

 

The change to the telephone number has not been successfully applied to SAP.

 

The Sales Organization that I’m passing to the BAPI is ‘UK10’ (which I’ve tried passing through the dataflow and which I’ve also tried hard-coding into the BAPI function), and this is the correct Sales Organization for the customer that I’m trying to update.

 

I read a post on SCN that said you can’t update the company level data and the personal data via the BAPI at the same time.  So I tried to change the BAPI call to only update the personal-level data (and also AL_LANGUAGE, CUSTOMERNO, PI_DISTR_CHAN, PI_DIVISION, PI_SALESORG).  This gave me a different error when I tried to run the job:

 

Error calling custom RFC function <BAPI_CUSTOMER_CHANGEFROMDATA1 RFC return error! F2 827 Internal error: Make an entry in all fields where required   000000    >

 

I tried to figure out what the required fields were from the BAPI documentation, but I couldn't find the relevant information.  A post on SCN suggested that the required fields are LASTNAME, CITY, POSTL_COD1, STREET, COUNTRY, LANGU_P and CURRENCY.  All these are set in my BAPI function, and I’ve also set the corresponding ‘X’ field for each of these.

 

I’ve tried Google and I’ve tried re-reading the BAPI documentation, but it hasn’t helped me.

 

If you do have any ideas, or suggestions for where I could look next, I’d be very grateful.

 

Thanks

 

Steve


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>