cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Vendor using VMD_EI_API not possible

Former Member
0 Kudos

Hi,

We are developing a portal application so users can create vendors in a more friendly way.

Some users submit the request through the portal, the request is then validated using a workflow in ERP, and if accepted, using VMD_EI_API we create the vendor.

We are facing two issues, related to each other: after the approver approve the vendor, we use the VMD_EI_API class to create the vendor, the immediately return from this call is success (not true), the workflow approver stays confident everything worked fine, but later receive a message from the system with an error saying it was not possible to insert into table LFM1, and the work item already disappeared.

After analyzing the class VMD_EI_API, we found that the class uses BAPI VENDOR_CREATE in update task, meaning the creation process is not synchronous, the error is not explicit about the cause and is not also possible to recover the work item in order to correct the problem and retry.

Thanks

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

there is no BAPI to maintain vendors. Therefore, BAPI VENDOR_CREATE does not exists. I guess you talked about VENDOR_INSERT which is an update task function module.

Yes it is true the updates are done in update task.

You may have a look at the following statements, this may help with your current trouble.

  • COMMIT WORK AND WAIT

  • SET UPDATE TASK LOCAL

An other remark, if VENDOR_INSERT is failing on LFA1, this usually means that an other records is already existing for the same key (LIFNR)

Hope this helped

BR

Alain

Former Member
0 Kudos

We are also working on this class to create vendor master.

Could you provide the sample code to create vendor master? Is that we need to use static method "MAINTAIN"? There is no documentation.

Former Member
0 Kudos

Hi HK,

Yes, in fact, besides the method get_number (when the new entity requires an internal number to assigned automatically), the method maintain is the only method used.

Kind Regards,

John

Former Member
0 Kudos

Hi John,

We are also working on this class to create vendor master from front end microsoft infopath screen. But after reading your message, we are not sure now if this is the way to go.

We are able to use this class to create vendors - General data and COMPANY, but we have not been able to create with the CONTACT segment.

Have you got around the problem using VMD_EI_API - ie success message but yet failed in ERP?

Should we now go back to use the good old BDC?

Sue

Former Member
0 Kudos

Hi,

We succeeded to implement the Portal Application to create Customers and Vendors, and use VMD_EI_API is the way to go.

When you refer contact segment, you are mentioning Address, Phone Number, E-mail, Postal Code? If yes, we were able to create contact segment.

The class, work and do what is expected, it is only unfortunate that SAP does not provide the same level of documentation for classes as it does for Services in SDN.

Thanks & Regards,

John

Former Member
0 Kudos

Hi John

Glad to know that you make it work. as you said, the VMD_EI_API is not synchonise, so what is your solution ?

Thanks

Felix

Former Member
0 Kudos

Hello Sue,

well in all case the BDC will be the best. Even idoc processing if you include CREMAS AND ADRMAS.

For contact persons, the situation is still not as clear as we would like:

  • CREMAS is still not supporting contact persons maintenance.

  • Contact person maintenance is supported in batchinput

  • As of ERP 2005 ehp3, the reading is also supported from within VMD_EI_API_EXTRACT. The maintenance is theorically supported too (I've not tried)

BR

Alain

Former Member
0 Kudos

Hi John,

I see that you had success with making a portal for vendors and we are having the same problem up here.

I was surprised that there is no FM or something similar for vendor creation so the only thing I see as the best option is the VMD_EI_API.

Can you give me some guidelines how you made it work?

How did you manage to keep all the data consistent and the vendor number up-to-date.

Thanks a lot in advance.

Cheers

PoojaThareja
Participant
0 Kudos

Hi John

I had gone through your question and you have sucessfully created the vendor using class VMD_EI_API.

I am also having the same requirements. Can you pls provide me some guideline how to proceed.

Thanks In advance

Pooja Thareja

Former Member
0 Kudos

Hi Guys

I have also used VMD_EI_API class for vendor creation and updating through the MAINTAIN method.

Thanks.

Regards

Tumelo Modise

Former Member
0 Kudos

Hi,

i am also having similar requirement.can you guide me how to utilize this method maintain to create or update vendor.

Thanks & regards,

manoj

Former Member
0 Kudos

Get next available number for PARNR. Then pass that parnr number in the strucute "vmds_ei_contacts".

Answers (1)

Answers (1)

Former Member
0 Kudos

Cool.

This is working great.

Even though the documentation is missing, the error messages and exceptions helped me figure it out.

Thanks guys

Former Member
0 Kudos

Hi,

I have the same problem with creation of vendor. I'me using the class VMD_EI_API with success for general data, company, purchasing, bankdata but I'm not able to create vendor's contacts.

I have no error message but vendor's contacts are not created. I have implemented the contact segment (name, last name,function, department (knvk)). Can you please give me an example if you have succeeded.

Thank you for your help.

Nath