Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

VMD_EI_API_EXTRACT does not return contact person

kim_ternstrm
Explorer
0 Kudos

I'm writing a program to copy a Vendor to a customer. For that I need to read all the data from the Vendor using the GET_DATA method of class VMD_EI_API_EXTRACT. But this methos does not return the contact persons for my vendors. I need the job address of the contact person to become the address of the customer.

I have tried the test program from the wiki, and here the section with the contact person is also empty : Extracting vendor master data using class - VMD_EI_API_EXTRACT - ABAP Development - SCN Wiki

Is it not possible to read contact persons with this class - even if there is section for contacts under CENTRAL_DATA-CONTACT ?

1 ACCEPTED SOLUTION

0 Kudos

Hi Kim,

I'm facing exactly the same situation. How did you solve it finally? I would appreciate any indication to help me to solve this problem.

Thanks in advance.

7 REPLIES 7

0 Kudos

Hi Kim,

I'm facing exactly the same situation. How did you solve it finally? I would appreciate any indication to help me to solve this problem.

Thanks in advance.

0 Kudos

Short answer : A general available method/Class is not just a method/class you just can call anymore

The answer I got from SAP after creating an OSS was that this API is part of the switch framework (Operations, Enterprise Services 2 - Business Functions (SAP Enhancement Package 3 for SAP ERP 6.0) -...) from where you can enable new functionality. So you have to do some customizing !


You need to activate switch VENDOR_SFWS_SC1.


And activate customizing :

Cross-Application Components

->Master Data Synchronization

->Customer/Vendor Integration

->Business Partner Settings

->Settings for Customer Integration

->Field Assignment for Customer Integration

->Assign Attributes

->Contact Person

=>Activate Assignment of Contact Persons


Why this should be nessesary in a READ method is beyond my understanding

(that said - we are running IS-CWM and could not get the answer if activating a switch/this switch on a IS-CWM system was recommended, and therefore I ended up coding the read of contactperson using my own code)

0 Kudos

Thanks a lot, Kim.

We will analyze if it's possible (and recommendable) to activate that framework. By the moment, I will do my own code to get the data from database, as you did.

Thanks again and greetings.

0 Kudos

I'm using FM :

ADDR_REMARKS_GET

ADDR_GET

MAP2E_ADDR1_VAL_TO_BAPIAD1VL (I'm creating/modifying a Customer based on a Vendor, so I'm ending up calling cmd_ei_api=>maintain_bapi)

0 Kudos

Thanks again,

I've already done and it works perfectly.

My requirement it's different (we create in the customer the vendor contacts as function partners), so i have used the cmd_ei_api=>maintain but I didn't need the address functions.


Greetings.

周建华
Participant
0 Kudos

**********************************************************************************
** Display the Contacts details, (All fields not displayed using Write) **
**********************************************************************************
REFRESH : lt_contacts.
CLEAR : ls_contacts.
APPEND LINES OF ls_vendors_o-central_data-contact-contacts TO lt_contacts.
WRITE 😕 'Central -> Contacts -> Contacts data' COLOR 1.
IF lt_contacts[] IS NOT INITIAL.
LOOP AT lt_contacts INTO ls_contacts.
WRITE 😕 'Contact : ',ls_contacts-address_type_3-postal-data-firstname.
WRITE : ' ',ls_contacts-address_type_3-postal-data-lastname.
ENDLOOP.
ELSE.
WRITE 😕 ' No Contacts data available.. '.
ENDIF. SPAN { font-family: "Consolas"; font-size: 10pt; color: #F8F8F2; background: #282A36; }.L0S31 { font-style: italic; color: #6272A4; }.L0S32 { color: #BD93F9; }.L0S33 { color: #F1FA8C; }.L0S52 { color: #66D9EF; }.L0S55 { color: #50FA7B; }.L0S70 { color: #50FA7B; }

kim_ternstrm
Explorer
0 Kudos

Way back I got an answer back from SAP :

For first issue please activate following in IMG:

Cross-Application Components ->Master Data Synchronization ->Customer/Vendor Integration ->Business Partner Settings ->Settings for Customer Integration ->Field Assignment for Customer Integration ->Assign Attributes ->Contact Person =>Activate Assignment of Contact Persons

Please note that some coding for contact persons is switched

You also need to activate switch VENDOR_SFWS_SC1.

So I wrote the coding myself. We have activated IS-CWM on our system, and activation a switch that is not documented in the IS-CWS solution is not recommended