cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Contacts to supplier via XML import

Former Member
0 Kudos

Hi,

I am trying to add contact to existing supplier via xml import but getting error "The object referenced in column VENDOR_EXTERNAL_ID could not be found".


Attached is the XML file. Please let me know if anyone help.

Thanks & Regards,

Tisha

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190023
Contributor
0 Kudos

Hi Geetika,

You'll need to revert back to importing just the masterdata.Contact. Please find a sample XML below (tested on V10 and working, even though system complains a bit).


<?xml version="1.0" encoding="UTF-8"?>

<sapesourcing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Contact.xsd">

  <object classname="masterdata.Contact">

  <fields>

  <PARENT>your_vendor_external_id_here</PARENT>

  <NAME>xx000001</NAME>

  <FIRST_NAME>First</FIRST_NAME>

  <LAST_NAME>Last</LAST_NAME>

  <EMAIL>dummy@email.com</EMAIL>

  </fields>

  </object>

</sapesourcing>

, the option to export from ECC the Vendor including Contact is broken. Sourcing will not be able to import the file. I actually don't think it ever worked, because I see the same issue from V9 SP05 all the way to latest release V10 SP08:

- Class ContactBoProcessor doesn't have the required constructor to be able to be instantiated as a collection. It's missing a blind:

public ContactBoProcessor(CollectionMdIfc collMd, Integer intVal) {}

It will work if imported as a primary object, but not as secondary (inside the Vendor CONTACTS_T collection). Maybe you should raise this internally with SAP DEV.

Regards,

Bogdan

Former Member
0 Kudos

Hi Bogdan,

Many thanks for the resolution .XML worked.

Regards,

Geetika

Former Member
0 Kudos

Thanks Bogdan, I will pass this information over to the development.

Regards

Prasad

katie_doody2
Participant
0 Kudos

Hi, I have been trying to add the contact to the supplier using the contact as the primary object.

I had been trying to send CONTACT_T and was happy to find this post. Anyway, my import says it is successfull but has warnings and it does not update the contact. Here is the error:

We are on version 10.0.09.01.

Do you have any idea why I would be getting this error?

Thanks,

Katie

katie_doody2
Participant
0 Kudos

Nevermind, the xml provided by Bogdan works. Thanks!!

former_member190023
Contributor
0 Kudos

Hi Katie,

Yes I mentioned the system is 'complaining' but the import is actually successful .

I didn't go through to investigate why that error is coming...but it should be sent to SAP to make sure it doesn't brake anything else.

Bogdan

Former Member
0 Kudos

Hi,

Thank you so much for your inputs but now I am also getting  error while uploading xml.

error message

com.sap.odp.usermgmt.masterdata.importer.processors.ContactBoProcessor.<init>(com.sap.odp.common.db.metadata.CollectionMdIfc, java.lang.Integer)


The XML I am using is


Former Member
0 Kudos

Hi Tisha,

   Does the vendor C57 (ID=1000181) already exist in the sourcing system ?. The XML does not contain additional details of the Logical_system etc...

1. Is the SAP Sourcing integrated with ECC

2. If you are trying to do this vendors that are local to Sourcing, then try to use the CSV importer instead.

3. The XML file you are using is ECC integration relevant and therefore it needs more information than what you are currently populating in the XML.

Prasad

Former Member
0 Kudos

Hi Prasad,

Many thanks for your input.

Yes , the vendor code exists in the system,  we have tried via csv it's working fine.

But as we have lot of data we are trying via xml, can you please help what extra fields we need to get this xml successfully uploaded.

Thanks in Advance!

Regards,

Geetika

Former Member
0 Kudos

Hi Geetika,

1. Are these supplier contacts coming from ECC

2. The XML you are using is missing lot of vendor related data and will not work

Approach

1. Identify the fields that you have to add in the XML to support contacts - this you do by comparing the fields on the CSV and trying to reproduce the structure in XML (sorry we dont have this ready made for you, you have to try it on your side)

2. On ECC when you run the extraction report to extract vendor master include code in the BADI exits to add the above 'Contacts' related XML structures - this if the contacts are coming from ECC. If not you have to do this in PI

First try step one manually with a working XML file generated from ECC and then go to the step2. to make it easier for you.

If your vendors are not coming from ECC, then I believe this XML approach may not work because the XML Importer is looking for specific data coming from ECC....

Prasad

Former Member
0 Kudos

Hi Prasad,

Many thanks for your input.

We are not generating xml from ECC of Vendor Contact, we are getting xml prepared by pi team based on the fields we are using in template(csv which is getting successfully loaded0.

If I get you right, you want us to append the contact fields Vendor xml only, and give it a try?

Thanks in Advance!!

Regards,

Geetika Bansal

Former Member
0 Kudos

Yes Geetika, that is correct. Once it works for one XML then you can add more vendors/contacts to the same XML

Prasad

Former Member
0 Kudos

Thanks a ton Prasad!!

Will give it a try:)

Regards,

Geetika

Former Member
0 Kudos

H Prasad,

I have generated the xml with vendor contacts,Attached is the same.

But i am getting the below error

Failed: object 1: com.sap.odp.usermgmt.masterdata.importer.processors.ContactBoProcessor.<init>(com.sap.odp.common.db.metadata.CollectionMdIfc, java.lang.Integer)

Not sure why xml Import failed.

Your inputs would be of great help!!

Regards,

Geetika

former_member190023
Contributor
0 Kudos

Hi Geetika,

The XML structure looks good. But I see two things that will cause issues:

1. make sure you are using the IDs or CODEs for fields: TIME_ZONE, CURRENCY, DISPLAY_LANGUAGE

2. some other mandatory fields are missing: Decimal Format, Excel Format.

PS: Not sure if the 'Primary Contact' checkbox will get filled automatically, but you could also cover for that in the XML. Set it as TRUE for the first (or primary contact) and FALSE for the rest.

Bogdan

Former Member
0 Kudos

Hi Geetika, In addition to Bogdan's suggestions, please enable debug level for the trace files.. there may be more details there about the exact reason it is failing..

Prasad

Former Member
0 Kudos

HI Bogdan,

many thanks for your input.

will give it a try:)

Regards,

Geetika

Former Member
0 Kudos

HI Prasad,

Many thanks for your inputs.

will give it a try and will let u know:)

Regards,

Geetika

Former Member
0 Kudos

Hi Bogdan & Prasad,

I have modified the xml and tried , but still i am getting the same error.

Checked in logs reflecting the below error:

|java.lang.NoSuchMethodException: com.sap.odp.usermgmt.masterdata.importer.processors.ContactBoProcessor.<init>(com.sap.odp.common.db.metadata.CollectionMdIfc, java.lang.Integer)|


It's not recognizing the contact collection. I can see its collection type is "ASSOCIATIVE" can this cause this issue?

Any leads would be of great help!!

Thanks

Regards,

Geetika

former_member190023
Contributor
0 Kudos

Hi Geetika,

The error message (NoSuchMethodException) "hides" a data issue.

System is dynamically calling the field setters with your provided params. If method is not found, that doesn't necessarily mean it doesn't exist. It can exist but with a different signature (eg parameters or types).

At first glance at least the language is wrong. It should be 'en' not 'English'.

Bogdan

former_member190023
Contributor
0 Kudos

Hi Geetika,

Actually the problem is more complex. Can you tell me your Sourcing version and ServicePack?

There are a lot of bugs in the ContactBoProcessor.class; I'll try to take a look at what options you have for your specific SP.

Bogdan

Former Member
0 Kudos

HI Bogdan,

Thanks for your kind support.

Here are the details:

Sourcing Version 10 and service pack 0.

Regards,

Geetika